Skip to content

Commit 8cbb716

Browse files
authored
Update types.py for 3.14 (#14146)
1 parent 204ec12 commit 8cbb716

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ turtle.fill
5151
turtle.no_animation
5252
turtle.poly
5353
turtle.save
54-
types.CodeType.co_branches
55-
types.FrameType.f_generator
5654

5755
# =========================
5856
# New errors in Python 3.14

stdlib/types.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ class CodeType:
171171
@property
172172
def co_qualname(self) -> str: ...
173173
def co_positions(self) -> Iterable[tuple[int | None, int | None, int | None, int | None]]: ...
174+
if sys.version_info >= (3, 14):
175+
def co_branches(self) -> Iterator[tuple[int, int, int]]: ...
174176

175177
if sys.version_info >= (3, 11):
176178
def __new__(
@@ -580,6 +582,9 @@ class FrameType:
580582
f_trace_lines: bool
581583
f_trace_opcodes: bool
582584
def clear(self) -> None: ...
585+
if sys.version_info >= (3, 14):
586+
@property
587+
def f_generator(self) -> GeneratorType[Any, Any, Any] | CoroutineType[Any, Any, Any] | None: ...
583588

584589
@final
585590
class GetSetDescriptorType:

0 commit comments

Comments
 (0)