This contains some notes in connection to an in-progress PEP about deprecation support in the type system.
Briefly, the proposals being considered are:
@deprecated
decorator for functions and classesDeprecated[T]
modifier for parameter and attribute types
I looked for usage of deprecations in the CPython codebase and whether some variation of this proposal could cover them, in the sense that it would be possible to write a stub that allows type checkers to detect code that would trigger the deprecation.