[Python-checkins] Fix typo in turtle deprecation warning and use warnings._deprecated (#91862)
JelleZijlstra
webhook-mailer at python.org
Mon May 2 12:57:40 EDT 2022
https://github.com/python/cpython/commit/341689cb85c4ee4f58dc9f0f96ecc94ded8fd9d4
commit: 341689cb85c4ee4f58dc9f0f96ecc94ded8fd9d4
branch: main
author: Hugo van Kemenade <hugovk at users.noreply.github.com>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2022-05-02T10:57:00-06:00
summary:
Fix typo in turtle deprecation warning and use warnings._deprecated (#91862)
files:
M Lib/turtle.py
diff --git a/Lib/turtle.py b/Lib/turtle.py
index d5e715efec96a..a8876e76bce40 100644
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -2863,10 +2863,10 @@ def settiltangle(self, angle):
>>> 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):
More information about the Python-checkins
mailing list