Skip to content

gh-122088: Copy the coroutine status of the underlying callable in @warnings.deprecated #122086

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

Merged
merged 5 commits into from
Jul 23, 2024

Conversation

srittau
Copy link
Contributor

@srittau srittau commented Jul 21, 2024

(This needs #122088 to be moved over to the cpython repository and then a NEWS entry.)

@JelleZijlstra JelleZijlstra changed the title gh-NNNNN: Copy the coroutine flag in @warnings.deprecated gh-122088: Copy the coroutine flag in @warnings.deprecated Jul 21, 2024
@srittau srittau marked this pull request as ready for review July 21, 2024 16:03
@srittau
Copy link
Contributor Author

srittau commented Jul 21, 2024

This should also be backported to 3.13, ideally before rc1.

@AlexWaygood AlexWaygood added the needs backport to 3.13 bugs and security fixes label Jul 21, 2024
Co-authored-by: Bénédikt Tran <[email protected]>
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM. Kinda unfortunate that we need to import inspect in warnings in order to do this, but I can't see another way.

I'll leave it a few days before merging in case anybody else has objections -- please ping me if it's been a few days and I've forgotten!

@bedevere-app
Copy link

bedevere-app bot commented Jul 23, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@srittau
Copy link
Contributor Author

srittau commented Jul 23, 2024

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Jul 23, 2024

Thanks for making the requested changes!

@AlexWaygood, @kumaraditya303: please review the changes made to this pull request.

@AlexWaygood AlexWaygood changed the title gh-122088: Copy the coroutine flag in @warnings.deprecated gh-122088: Copy the coroutine status of the underlying callable in @warnings.deprecated Jul 23, 2024
@AlexWaygood AlexWaygood merged commit 375c9f6 into python:main Jul 23, 2024
34 of 37 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 23, 2024
… in `@warnings.deprecated` (pythonGH-122086)

(cherry picked from commit 375c9f6)

Co-authored-by: Sebastian Rittau <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 23, 2024

GH-122156 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 23, 2024
@srittau srittau deleted the async-deprecated branch July 23, 2024 10:01
AlexWaygood pushed a commit that referenced this pull request Jul 23, 2024
…e in `@warnings.deprecated` (GH-122086) (#122156)

Co-authored-by: Sebastian Rittau <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
nohlson pushed a commit to nohlson/cpython that referenced this pull request Jul 24, 2024
nohlson pushed a commit to nohlson/cpython that referenced this pull request Jul 24, 2024
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