mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Add support for PEP 702 (`@deprecated`)

Open llucax opened this issue 2 years ago • 4 comments

Feature

Report where @deprecated symbols are used in the code.

Pitch

Python 3.12 is coming soon, and it introduces PEP 702 (the @deprecated decorator).mypy should support it.

llucax avatar Sep 14 '23 08:09 llucax

(Technically PEP 702 will not be in Python 3.12, the PEP has not been accepted. But yes, mypy should support the draft standard and its use via typing_extensions)

hauntsaninja avatar Sep 14 '23 10:09 hauntsaninja

If some people are interested, I wrote a small plugin to support this until it's part of mypy directly : https://github.com/Bendabir/mypypp

I don't really know the internals so it's probably a bit hacky but it appears to work.

Bendabir avatar Mar 16 '24 22:03 Bendabir

If I'm correct, this issue is required for Python 3.13 support right? What's needed to move it forward?

EwoutH avatar Aug 17 '24 16:08 EwoutH

You could make a PR that incorporates this feedback: https://github.com/python/mypy/pull/17476#pullrequestreview-2161951407

hauntsaninja avatar Aug 17 '24 21:08 hauntsaninja