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

Use typing_extensions.deprecated #2036

Open
MartinThoma opened this issue Jul 28, 2023 · 2 comments
Open

Use typing_extensions.deprecated #2036

MartinThoma opened this issue Jul 28, 2023 · 2 comments
Labels
is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements

Comments

@MartinThoma
Copy link
Member

I've just noticed https://peps.python.org/pep-0702/ by using model.json() of a pydantic model object. The json() method is deprecated in pydantic 2.0.0 and Visual Studio Code made it visually pretty clear.

We should also use that, to give developers the hint.

This is mostly a note to myself :-)

@MartinThoma
Copy link
Member Author

@stefan6419846
Copy link
Collaborator

I can only speak for PyCharm, but using the "old" way with warnings.warn("deprecated", DeprecationWarning) correctly marks the corresponding methods as well.

@stefan6419846 stefan6419846 added the is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements
Projects
None yet
Development

No branches or pull requests

2 participants