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

bpo-19569: Add a macro to suppress deprecation warnings (counterpart of Py_DEPRECATED()) #9004

Merged
merged 3 commits into from
Jun 16, 2020

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Aug 29, 2018

Co-Authored-By: Arfrever Frehtes Taifersar Arahesis [email protected]

https://bugs.python.org/issue19569

Unverified

No user is associated with the committer email.
…of Py_DEPRECATED())

Co-Authored-By: Arfrever Frehtes Taifersar Arahesis <[email protected]>
Copy link
Contributor

@jdemeyer jdemeyer left a comment

Choose a reason for hiding this comment

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

I think you should explain more clearly why this is needed.

@ZackerySpytz
Copy link
Contributor Author

These macros can be used to locally suppress deprecation warnings if a deprecated C API function needs to be used. There was some relevant discussion on the BPO issue.

@jdemeyer
Copy link
Contributor

jdemeyer commented Aug 9, 2019

There was some relevant discussion on the BPO issue.

Could you give a more concrete pointers? I didn't find the justification for this PR.

@methane
Copy link
Member

methane commented Jun 15, 2020

Could you give a more concrete pointers? I didn't find the justification for this PR.

When I uncomment Py_DEPRECATED macros in Include/cpython/unicodeobject.h,
I see some warning in _testcapimodule.c.

@methane
Copy link
Member

methane commented Jun 15, 2020

It seems these macros are too much.
I just want a Py_SUPRESS_DEPRECATED_DECLS macro.

@methane
Copy link
Member

methane commented Jun 15, 2020

@ZackerySpytz Would you make these macros private? (e.g. adding _ prefix).
I want to use it in Python 3.9, but I don't want to add public API to 3.9.

@methane methane merged commit de4304d into python:master Jun 16, 2020
@methane methane added the needs backport to 3.9 only security fixes label Jun 16, 2020
@miss-islington
Copy link
Contributor

Thanks @ZackerySpytz for the PR, and @methane for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-20907 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jun 16, 2020
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 16, 2020
Co-authored-by: Arfrever Frehtes Taifersar Arahesis <[email protected]>
(cherry picked from commit de4304d)

Co-authored-by: Zackery Spytz <[email protected]>
miss-islington added a commit that referenced this pull request Jun 17, 2020
Co-authored-by: Arfrever Frehtes Taifersar Arahesis <[email protected]>
(cherry picked from commit de4304d)

Co-authored-by: Zackery Spytz <[email protected]>
arun-mani-j pushed a commit to arun-mani-j/cpython that referenced this pull request Jul 21, 2020
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.

None yet

6 participants