Skip to content

Can't pickle trio as a package #2135

@uduse

Description

@uduse
import trio
import pickle

pickle.dumps(trio)

gives

TypeError: cannot pickle '_ModuleWithDeprecations' object
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_9132/1773362268.py in <module>
      2 import pickle
      3 
----> 4 pickle.dumps(trio)

TypeError: cannot pickle '_ModuleWithDeprecations' object

This is problematic for serializing objects that have methods that use trio somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions