-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing multiprocessing breaks pickle.whichmodule #86572
Comments
Importing multiprocessing prior to other modules that define Example: Python 3.8.6 (default, Sep 30 2020, 04:00:38)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing
>>> from scipy.special import gdtrix
>>> from pickle import whichmodule
>>> whichmodule(gdtrix, gdtrix.__name__)
'__mp_main__' Now, if we change the order of imports, whichmodule works fine: Python 3.8.6 (default, Sep 30 2020, 04:00:38)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.special import gdtrix
>>> from pickle import whichmodule
>>> import multiprocessing
>>> whichmodule(gdtrix, gdtrix.__name__)
'scipy.special._ufuncs' This happens because multiprocessing creates an alias to
But doing so changes the ordering of This bug has arisen in the context of using I intend to submit a patch/PR with a fix soon. |
gross / nice find :) |
thanks Renato! |
No worries, Gregory. Glad I could help. :-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: