[New-bugs-announce] [issue45837] Fix turtle deprecations
Hugo van Kemenade
report at bugs.python.org
Thu Nov 18 08:43:45 EST 2021
New submission from Hugo van Kemenade <hugovk+python at gmail.com>:
turtle's settiltangle was deprecated in Python 3.1:
"Deprecated since version 3.1."
https://docs.python.org/3.10/library/turtle.html#turtle.settiltangle says of settiltangle:
And the reason:
"`Turtle.tiltangle()` has been enhanced in functionality: it now can be used to get or set the tiltangle. `Turtle.settiltangle()` has been deprecated."
https://docs.python.org/3.10/library/turtle.html#changes-since-python-3-0
However, in docstrings, tiltangle was accidentally marked as deprecated:
"Deprecated since Python 3.1"
https://github.com/python/cpython/blob/v3.10.0/Lib/turtle.py#L2880
Neither tiltangle nor settiltangle raise DeprecationWarnings.
So let's:
* Correct tiltangle's docstring to say it's not really deprecated
* Update settiltangle's docstring to say it is deprecated
* Add a DeprecationWarning to settiltangle
* Internally call self.tiltangle instead of self.settiltangle
BPO references:
2009 https://bugs.python.org/issue5923 - settiltangle originally deprecated, with rationale.
2010 https://bugs.python.org/issue7888 - the mixup was discovered and apparently corrected in py3k and release31-maint. I've not done the SCM archaeology to discover why this regressed.
2020 https://bugs.python.org/issue41165 - both mentioned as deprecated, mixup not noted.
----------
components: Library (Lib)
messages: 406536
nosy: hugovk
priority: normal
severity: normal
status: open
title: Fix turtle deprecations
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45837>
_______________________________________
More information about the New-bugs-announce
mailing list