Skip to content

Set literal default arguments for pickle.Pickler.__init__ and pickle.Unpickler.__init__ #12797

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

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

brianschubert
Copy link
Contributor

Similar default arguments were filled-in to other parts of pickle in #9501. For whatever reason, pickle.Pickler.__init__ and pickle.Unpickler.__init__ aren't picked up by stubdefaulter.

For reference:

>>> import inspect, pickle
>>> inspect.signature(pickle.Pickler)
<Signature (file, protocol=None, fix_imports=True, buffer_callback=None)>
>>> inspect.signature(pickle.Unpickler)
<Signature (file, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=())>

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 01036d2 into python:main Oct 13, 2024
63 checks passed
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.

2 participants