Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Jun 23, 2023

Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.


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

@vstinner
Copy link
MemberAuthor

Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
@vstinnervstinnerforce-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
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
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.

@vstinnervstinner merged commit c075a19 into python:mainJun 26, 2023
@vstinnervstinner deleted the deprecate_weakref_getobject branch June 26, 2023 10:10
@encukou
Copy link
Member

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

@vstinner
Copy link
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