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
Update pickle to take advantage of PEP 451 #63901
Comments
I don't recall the specifics of how we'd talked about making use of module specs in pickle. I vaguely remember (or misremember <wink>) something related to saving __main__.__spec__.name in the pickle rather than __main__.__name__. Anyone have anything more concrete than that? I'm willing to work this out but only with a more specific goal relative to the pickle module. |
The specific proposal was to use __spec__.name when __name__ == "__main__" runpy has to be updated first, though. |
bpo-19700 means that runpy now ensures that __main__.__spec__ is set appropriately when __main__ is executed via the import system. bpo-19946 means that multiprocessing now ensures that __main__ is configured correctly in child processes to reference a properly initialised "fake main" to allow pickle compatibility with classes and functions defined in __main__ outside "if __name__ == '__main__'" guards. The proposal here is that we make the following changes:
While I still think this is a reasonable idea, I think it qualifies as a new feature, and hence is better postponed to Python 3.5 |
So far I agree that this should be postponed to 3.5. |
Just noting that PEP-499 covers adding modules executed with |
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: