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

gh-105927: Deprecate PyWeakref_GetObject() function #106006

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 23, 2023

Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.


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

@vstinner
Copy link
Member Author

cc @erlend-aasland @encukou @hugovk

Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
@vstinner vstinner force-pushed the deprecate_weakref_getobject branch from cded796 to 5753693 Compare June 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
Member Author

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:main Jun 26, 2023
@vstinner vstinner deleted the deprecate_weakref_getobject branch June 26, 2023 10:10
@encukou
Copy link
Member

encukou commented Jun 26, 2023

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

@vstinner
Copy link
Member Author

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 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.

4 participants