Skip to content

Conversation

@donBarbos
Copy link
Contributor

I don't know if we have a way to show that module is deprecated, but nturl2path is deprecated: python/cpython#131432

@github-actions
Copy link
Contributor

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

@donBarbos donBarbos marked this pull request as ready for review May 14, 2025 08:10
@srittau
Copy link
Collaborator

srittau commented May 14, 2025

I don't know if we have a way to show that module is deprecated, but nturl2path is deprecated: python/cpython#131432

In theory something like this might work, but I think it's better to just add a comment to the top of the file:

@deprecated("...")
def __getattr__(name: str) -> Never: ...

Also this won't really generate a deprecation message, so not worth it.

@srittau srittau merged commit fc1ee8f into python:main May 14, 2025
67 checks passed
@donBarbos
Copy link
Contributor Author

donBarbos commented May 14, 2025

Also this won't really generate a deprecation message, so not worth it.

What do you think about adding @deprecated for each module function? (this module have only 2 functions)

of course with sys.version_info check

@srittau
Copy link
Collaborator

srittau commented May 14, 2025

Also this won't really generate a deprecation message, so not worth it.

What do you think about adding @deprecated for each module function? (this module have only 2 functions)

of course with sys.version_info check

That sounds like a good idea.

mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
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.

2 participants