]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typo in turtle deprecation warning and use warnings._deprecated (#91862)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Mon, 2 May 2022 16:57:00 +0000 (19:57 +0300)
committerGitHub <noreply@github.com>
Mon, 2 May 2022 16:57:00 +0000 (10:57 -0600)
Lib/turtle.py

index d5e715efec96ae8a3f26aea80fea0c44bb50dc0f..a8876e76bce40a54880bb60484fe67386077ec23 100644 (file)
@@ -2863,10 +2863,10 @@ class RawTurtle(TPen, TNavigator):
         >>> turtle.stamp()
         >>> turtle.fd(50)
         """
-        warnings.warn("turtle.RawTurtle.settiltangle() is deprecated since "
-                      "Python 3.1 and scheduled for removal in Python 3.13."
-                      "Use tiltangle() instead.",
-                       DeprecationWarning)
+        warnings._deprecated("turtle.RawTurtle.settiltangle()",
+                             "{name!r} is deprecated since Python 3.1 and scheduled "
+                             "for removal in Python {remove}. Use tiltangle() instead.",
+                             remove=(3, 13))
         self.tiltangle(angle)
 
     def tiltangle(self, angle=None):