[issue43093] Make modules picklable

2021-08-21 Thread Myst
Change by Myst : -- nosy: +LeMyst ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mai

[issue43093] Make modules picklable

2021-08-20 Thread Cornelius Krupp
Cornelius Krupp added the comment: I would also like to see this added, and I can also provided a usecase where I naturally came across this. I am helping on a parsing library which uses regular expressions internally. We allow the user to select the stdlib re module or the third party regex

[issue43093] Make modules picklable

2021-02-01 Thread Arusekk
Arusekk added the comment: Sorry, I forgot to state what is my actual goal: for the module objects to be pickleable in native CPython (possibly from C layer) without the need to add this to every code that wants to pickle module objects. The point is that they can already be unpickled from t

[issue43093] Make modules picklable

2021-02-01 Thread Arusekk
New submission from Arusekk : Currently pickling functions and types stores modules by their name. So I believe it is possible to support pickling module objects with the following code (based on the logic in PyPy, which supports pickling modules): import copyreg import types import pickle i