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

chore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functions #4106

Merged

Conversation

Skylion007
Copy link
Collaborator

@Skylion007 Skylion007 commented Aug 2, 2022

Description

Remove custom implementation of PyObject_GenericGetDict and PyObject_GenericSetDict. These functions have been exposed since Python 3.3 and have both been part of the stable API since 3.10. Since we don't support Python 2 anymore, there is no reason to keep them around.

Suggested changelog entry:

* Use the modern PyObject_GenericGetDict and PyObject_GenericSetDict for handling dynamic attribute dictionaries.

@Skylion007 Skylion007 changed the title Try to update getset_dict APIs for 3.11 chore: Modernize - use PyObject_GenericGetDict and PyObject_GenericSetDict functions Aug 4, 2022
@Skylion007 Skylion007 changed the title chore: Modernize - use PyObject_GenericGetDict and PyObject_GenericSetDict functions chore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functions Aug 4, 2022
@Skylion007 Skylion007 requested a review from rwgk August 4, 2022 18:32
@Skylion007 Skylion007 marked this pull request as ready for review August 4, 2022 18:33
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

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

Nice!

include/pybind11/detail/class.h Outdated Show resolved Hide resolved
@Skylion007 Skylion007 merged commit 6abb7de into pybind:master Aug 8, 2022
@Skylion007 Skylion007 deleted the skylion007/311-fix-managed-dict branch August 8, 2022 18:28
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Aug 8, 2022
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Oct 20, 2022
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