This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix turtle deprecations
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hugovk, lukasz.langa
Priority: normal Keywords: patch

Created on 2021-11-18 13:43 by hugovk, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29618 merged hugovk, 2021-11-18 13:49
PR 29629 merged hugovk, 2021-11-18 19:47
PR 29630 merged hugovk, 2021-11-18 19:47
Messages (5)
msg406536 - (view) Author: Hugo van Kemenade (hugovk) * (Python triager) Date: 2021-11-18 13:43
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.
msg406538 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-11-18 15:02
New changeset c94664c262bddbff4604795d46ecd0935402df8e by Hugo van Kemenade in branch 'main':
bpo-45837: Properly deprecate turtle.RawTurtle.settiltangle (GH-29618)
https://github.com/python/cpython/commit/c94664c262bddbff4604795d46ecd0935402df8e
msg406614 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-11-19 18:55
New changeset e8d41eea7a73a91cf1da2a4e60245902226bc599 by Hugo van Kemenade in branch '3.9':
bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29630)
https://github.com/python/cpython/commit/e8d41eea7a73a91cf1da2a4e60245902226bc599
msg406615 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-11-19 18:55
New changeset 9501e8d3a339c5a9217b7d90275d2a8c8cba5d13 by Hugo van Kemenade in branch '3.10':
bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29629)
https://github.com/python/cpython/commit/9501e8d3a339c5a9217b7d90275d2a8c8cba5d13
msg406616 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-11-19 18:56
Thanks, Hugo! ✨ 🍰 ✨
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 89995
2021-11-19 18:56:10lukasz.langasetstatus: open -> closed
resolution: fixed
messages: + msg406616

stage: patch review -> resolved
2021-11-19 18:55:48lukasz.langasetmessages: + msg406615
2021-11-19 18:55:28lukasz.langasetmessages: + msg406614
2021-11-18 19:47:24hugovksetpull_requests: + pull_request27862
2021-11-18 19:47:15hugovksetpull_requests: + pull_request27861
2021-11-18 15:02:56lukasz.langasetnosy: + lukasz.langa
messages: + msg406538
2021-11-18 13:49:43hugovksetkeywords: + patch
stage: patch review
pull_requests: + pull_request27853
2021-11-18 13:43:45hugovkcreate