<#5052 [BUG] Can't pickle local object 'get_flyte...
# flytekit
a
#5052 [BUG] Can't pickle local object 'get_flyte_fs.&lt;locals&gt;._FlyteFS' (FlyteRemote) Issue created by alexbeach-bc Describe the bug I am attempting to write pulumi dynamic provider in python, which serializes objects in the provider. The issue is that FlyteRemote cannot be serialized with pickle. The following code reproduces the issue:
Copy code
import pickle
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config

remote = FlyteRemote(
     config=Config.auto(),
     default_project="flytesnacks", 
     default_domain="development"
)
pickle.dumps(remote)
Copy code
AttributeError: Can't pickle local object 'get_flyte_fs.<locals>._FlyteFS'
The issue stems the nested class here: https://github.com/flyteorg/flytekit/blob/d61e79e722875348b1ccd354e1076fcf12600053/flytekit/remote/remote_fs.py#L91 I am using python 3.12.1, flytekit==1.11.0. Expected behavior flytekit remote objects are serializable with pickle Additional context to reproduce No response Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte