Skip to content

gh-105927: Deprecate PyWeakref_GetObject() function - #106006

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:deprecate_weakref_getobject
Jun 26, 2023
Merged

gh-105927: Deprecate PyWeakref_GetObject() function#106006
vstinner merged 1 commit into
python:mainfrom
vstinner:deprecate_weakref_getobject

Conversation

@vstinner

@vstinnervstinner commented Jun 23, 2023

Copy link
Copy Markdown
Member

Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.


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

@vstinner

Copy link
Copy Markdown
MemberAuthor

Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
@vstinner
vstinnerforce-pushed the deprecate_weakref_getobject branch from cded796 to 5753693CompareJune 23, 2023 06:45
Comment on lines +3379 to +3380
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I did not know these macros; TIL!

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

It's very useful to write tests on deprecated APIs.

@vstinner
vstinner merged commit c075a19 into python:mainJun 26, 2023
@vstinner
vstinner deleted the deprecate_weakref_getobject branch June 26, 2023 10:10
@encukou

Copy link
Copy Markdown
Member

Why 3.15? I don't see any reason to use the minimum allowed deprecation period here.

@vstinner

Copy link
Copy Markdown
MemberAuthor

Why 3.15? I don't see any reason to use the minimum allowed deprecation period here.

Borrowed references as bad: see the issue for the rationale.

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.

4 participants

@vstinner@encukou@erlend-aasland@bedevere-bot