Skip to content

gh-113626: Add allow_code parameter in marshal functions#113648

Merged
serhiy-storchaka merged 6 commits into
python:mainfrom
serhiy-storchaka:marshal-allow_code
Jan 16, 2024
Merged

gh-113626: Add allow_code parameter in marshal functions#113648
serhiy-storchaka merged 6 commits into
python:mainfrom
serhiy-storchaka:marshal-allow_code

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jan 2, 2024

Copy link
Copy Markdown
Member

Passing allow_code=False prevents serialization and de-serialization of code objects which is incompatible between Python versions.


📚 Documentation preview 📚: https://cpython-previews--113648.org.readthedocs.build/

Passing allow_code=False prevents serialization and de-serialization of
code objects which is incompatible between Python versions.
Comment thread Doc/library/marshal.rst Outdated
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Comment thread Lib/test/test_marshal.py Outdated
Comment thread Python/marshal.c Outdated
Comment thread Python/marshal.c Outdated
Comment thread Doc/whatsnew/3.13.rst Outdated
serhiy-storchaka and others added 4 commits January 12, 2024 22:17
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The error message is better thanks to the new WFERR_CODE_NOT_ALLOWED error code.

@serhiy-storchaka
serhiy-storchaka merged commit d2d8332 into python:main Jan 16, 2024
@serhiy-storchaka
serhiy-storchaka deleted the marshal-allow_code branch January 16, 2024 16:05
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

Thank you for your review Victor!

kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
…nGH-113648)

Passing allow_code=False prevents serialization and de-serialization of
code objects which is incompatible between Python versions.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…nGH-113648)

Passing allow_code=False prevents serialization and de-serialization of
code objects which is incompatible between Python versions.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…nGH-113648)

Passing allow_code=False prevents serialization and de-serialization of
code objects which is incompatible between Python versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants