Skip to content
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

partial __getstate__ wrong (?) #125094

Open
albertz opened this issue Oct 8, 2024 · 0 comments
Open

partial __getstate__ wrong (?) #125094

albertz opened this issue Oct 8, 2024 · 0 comments
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@albertz
Copy link
Contributor

albertz commented Oct 8, 2024

Bug report

Bug description:

The native _functools.partial type __getstate__ will return its __dict__. That will not include func, args or keywords.

This is different from the pure Python implementation of functools.partial (link), where it will return the slots, i.e. the state includes func, args or keywords.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

@albertz albertz added the type-bug An unexpected behavior, bug, or error label Oct 8, 2024
@tomasr8 tomasr8 added the extension-modules C modules in the Modules dir label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants