Skip to content

bpo-45837: Properly deprecate turtle.RawTurtle.settiltangle #29618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Nov 18, 2021

turtle's settiltangle was deprecated in Python 3.1, according to docs:

Deprecated since version 3.1.

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.

However, in docstrings, tiltangle was accidentally commented as deprecated:

Deprecated since Python 3.1

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's deprecated
  • Add a DeprecationWarning to settiltangle
  • Internally call self.tiltangle instead of self.settiltangle

BPO references:

https://bugs.python.org/issue45837

@hugovk hugovk force-pushed the turtle-deprecations branch from c145b3b to 10809f3 Compare November 18, 2021 14:00
@ambv ambv merged commit c94664c into python:main Nov 18, 2021
@ambv
Copy link
Contributor

ambv commented Nov 18, 2021

@hugovk would be great if you created a 3.10 and 3.9 PR that only clarifies in its docstring that tiltangle is not in fact deprecated.

@hugovk
Copy link
Member Author

hugovk commented Nov 18, 2021

Sure, please see #29629 and #29630. Do they need news entries?

@ambv
Copy link
Contributor

ambv commented Nov 20, 2021

No, they don't. Thanks, Hugo! All merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants