Skip to content

chore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functions - #4106

Merged
Skylion007 merged 4 commits into
pybind:masterfrom
Skylion007:skylion007/311-fix-managed-dict
Aug 8, 2022
Merged

chore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functions#4106
Skylion007 merged 4 commits into
pybind:masterfrom
Skylion007:skylion007/311-fix-managed-dict

Conversation

@Skylion007

@Skylion007Skylion007 commented Aug 2, 2022

Copy link
Copy Markdown
Collaborator

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.

@Skylion007Skylion007 changed the title Try to update getset_dict APIs for 3.11chore: Modernize - use PyObject_GenericGetDict and PyObject_GenericSetDict functionsAug 4, 2022
@Skylion007Skylion007 changed the title chore: Modernize - use PyObject_GenericGetDict and PyObject_GenericSetDict functionschore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functionsAug 4, 2022
@Skylion007
Skylion007 requested a review from rwgkAugust 4, 2022 18:32
@Skylion007
Skylion007 marked this pull request as ready for review August 4, 2022 18:33
rwgk
rwgk approved these changes Aug 5, 2022

@rwgkrwgk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice!

Comment threadinclude/pybind11/detail/class.h Outdated
@Skylion007
Skylion007 merged commit 6abb7de into pybind:masterAug 8, 2022
@Skylion007
Skylion007 deleted the skylion007/311-fix-managed-dict branch August 8, 2022 18:28
@github-actionsgithub-actionsBot added the needs changelog Possibly needs a changelog entry label Aug 8, 2022
@henryiiihenryiii removed the needs changelog Possibly needs a changelog entry label Oct 20, 2022
@rwgkrwgk mentioned this pull request Feb 10, 2023
Sign up for freeto 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

@Skylion007@rwgk@henryiii