From 65a56a21427591e8ceaf61caa87fbb5af420a489 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 9 Feb 2023 09:30:20 -0800 Subject: [PATCH] PEP 702: Update number of parameters in specification (#3011) Co-authored-by: Sebastian Rittau --- pep-0702.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pep-0702.rst b/pep-0702.rst index 670e3500f..6b487ee1c 100644 --- a/pep-0702.rst +++ b/pep-0702.rst @@ -107,7 +107,13 @@ indicating that the particular overload is deprecated. The decorator may also be applied to the overload implementation function, indicating that the entire function is deprecated. -The decorator takes a single argument of type ``str``, which is a message that should +The decorator takes the following arguments: + +* A required positional-only argument representing the deprecation message. +* Two keyword-only arguments, ``category`` and ``stacklevel``, controlling + runtime behavior (see under "Runtime behavior" below). + +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. The message must be a string literal. The content of deprecation messages is up to the user, but it may include the version