diff --git a/stdlib/turtle.pyi b/stdlib/turtle.pyi index 5df3e4b90cb5..80ea40879dee 100644 --- a/stdlib/turtle.pyi +++ b/stdlib/turtle.pyi @@ -1,3 +1,4 @@ +import sys from collections.abc import Callable, Sequence from tkinter import Canvas, Frame, Misc, PhotoImage, Scrollbar from typing import Any, ClassVar, overload @@ -249,6 +250,9 @@ class TNavigator: def reset(self) -> None: ... def degrees(self, fullcircle: float = 360.0) -> None: ... def radians(self) -> None: ... + if sys.version_info >= (3, 12): + def teleport(self, x: float | None = None, y: float | None = None, *, fill_gap: bool = False) -> None: ... + def forward(self, distance: float) -> None: ... def back(self, distance: float) -> None: ... def right(self, angle: float) -> None: ... @@ -321,6 +325,9 @@ class TPen: def color(self, r: float, g: float, b: float) -> None: ... @overload def color(self, color1: _Color, color2: _Color) -> None: ... + if sys.version_info >= (3, 12): + def teleport(self, x: float | None = None, y: float | None = None, *, fill_gap: bool = False) -> None: ... + def showturtle(self) -> None: ... def hideturtle(self) -> None: ... def isvisible(self) -> bool: ... diff --git a/tests/stubtest_allowlists/py312.txt b/tests/stubtest_allowlists/py312.txt index 6222c60f0505..0d66a8462508 100644 --- a/tests/stubtest_allowlists/py312.txt +++ b/tests/stubtest_allowlists/py312.txt @@ -60,11 +60,6 @@ smtplib.SMTP_SSL.__init__ sre_parse.Tokenizer.checkgroupname sre_parse.expand_template sre_parse.parse_template -turtle.RawTurtle.teleport -turtle.TNavigator.teleport -turtle.TPen.teleport -turtle.__all__ -turtle.teleport typing.ParamSpec.__mro_entries__ typing.ParamSpecArgs.__mro_entries__ typing.ParamSpecKwargs.__mro_entries__ @@ -98,6 +93,10 @@ zipfile.Path.match zipfile.Path.relative_to zipfile.Path.rglob +# TODO: remove after rc2 release +turtle.__all__ +turtle.teleport + # Errors that also existed on Python 3.11 _collections_abc.AsyncGenerator.ag_await _collections_abc.AsyncGenerator.ag_code