PEP 702: Tools may clean up the deprecation message (#3482)

See https://discuss.python.org/t/pep-702-marking-deprecations-using-the-type-system/23036/53?u=jelle

I don't want to prescribe the exact behavior on tools and IDEs; they
can figure out for themselves what works best. This change is intended
to make it so they can adjust the message without worrying that they
are breaking the specification.
This commit is contained in:
Jelle Zijlstra 2023-10-15 15:18:19 -07:00 committed by GitHub
parent 43bdd16f01
commit 6715be7d1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,8 @@ The decorator takes the following arguments:
The positional-only argument is of type ``str`` and contains a message that should
be shown by the type checker when it encounters a usage of the decorated object.
Tools may clean up the deprecation message for display, for example
by using :func:`inspect.cleandoc` or equivalent logic.
The message must be a string literal.
The content of deprecation messages is up to the user, but it may include the version
in which the deprecated object is to be removed, and information about suggested