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
Can't pickle sre_constants
#92049
Comments
It is equally easy to fix pickling these constants, and to make them explicitly non-pickleable. They were pickleable before 3.5, but it was broken so long ago, that it does not make sense to fix pickleability in 3.10 and 3.9. So I am going to make them explicitly non-pickleable in 3.10 and 3.9 and fix pickling in 3.11. |
On other hand, there is no reason of making them pickleable. It is an implementation detail, and they are defined in a private module. |
Previously, pickling did not fail, but the result could not be unpickled.
Previously, pickling did not fail, but the result could not be unpickled.
…S etc (pythonGH-92070) Previously, pickling did not fail, but the result could not be unpickled.. (cherry picked from commit 6d0d547) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…SUCCESS etc (pythonGH-92070) (pythonGH-92073) Previously, pickling did not fail, but the result could not be unpickled. (cherry picked from commit 6d0d547) (cherry picked from commit e8ff3c9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… etc (pythonGH-92070) (pythonGH-92073) (pythonGH-92102) Previously, pickling did not fail, but the result could not be unpickled. (cherry picked from commit 6d0d547) (cherry picked from commit e8ff3c9)
Bug report
Even if we decide
sre_constants.*
are not picklable, theTypeError
should happen when trying to dump, not when trying to load. This could cause a user to write pickle files they can't ever read.Your environment
The text was updated successfully, but these errors were encountered: