8000 Mark deprecated methods as `deprecated` in `wave` module by sobolevn · Pull Request #11001 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Mark deprecated methods as deprecated in wave module #11001

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 3 commits into from
Nov 17, 2023

Conversation

sobolevn
Copy link
Member
@sobolevn sobolevn commented Nov 9, 2023

No description provided.

Copy link
Contributor
github-actions bot commented Nov 9, 2023

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

stdlib/wave.pyi Outdated
@@ -37,7 +37,9 @@ class Wave_read:
def getcomptype(self) -> str: ...
def getcompname(self) -> str: ...
def getparams(self) -> _wave_params: ...
@deprecated("Removal scheduled for Python 3.15")
Copy link
Member

Choose a reason for hiding this comment

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

Would it be worth mentioning the version it's deprecated in, as well? Python 3.15 will be a long way off for people still using Python 3.8

Suggested change
@deprecated("Removal scheduled for Python 3.15")
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")

Copy link
Member

Choose a reason for hiding this comment

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

I didn't do this in #10994, but i wonder if we should apply the decorator conditionally (under if sys.version_info >= (3, 13) in this case). Should users who are say on 3.9 see this warning? On the one hand, it's useful for users to know that something they're using will go away; on the other hand, if they're on an old version, the replacement may not be usable yet, so the warning is not actionable.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I was writing up this issue as you were posting this comment :)

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.

3 participants
0