Skip to content
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

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

Merged
merged 1 commit into from Nov 18, 2021

Conversation

@hugovk
Copy link
Contributor

@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 Nov 18, 2021
@ambv ambv merged commit c94664c into python:main Nov 18, 2021
12 checks passed
Loading
@ambv
Copy link
Contributor

@ambv 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.

Loading

@hugovk
Copy link
Contributor Author

@hugovk hugovk commented Nov 18, 2021

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

Loading

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