From 4f2dcdecde98129365f8b4272029e5cacde59a09 Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Thu, 11 Jul 2024 19:19:40 -0500 Subject: [PATCH] Update `CoverageResults` for 3.13 (#12325) --- stdlib/@tests/stubtest_allowlists/py313.txt | 1 - stdlib/trace.pyi | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/py313.txt b/stdlib/@tests/stubtest_allowlists/py313.txt index 803e3f9c5..fee13e549 100644 --- a/stdlib/@tests/stubtest_allowlists/py313.txt +++ b/stdlib/@tests/stubtest_allowlists/py313.txt @@ -105,7 +105,6 @@ tkinter.PhotoImage.write tkinter.PhotoImage.zoom tkinter.Text.count tkinter.Wm.wm_attributes -trace.CoverageResults.write_results types.MappingProxyType.get # ====================================== diff --git a/stdlib/trace.pyi b/stdlib/trace.pyi index d32647a55..04390f119 100644 --- a/stdlib/trace.pyi +++ b/stdlib/trace.pyi @@ -27,7 +27,18 @@ class CoverageResults: outfile: StrPath | None = None, ) -> None: ... # undocumented def update(self, other: CoverageResults) -> None: ... - def write_results(self, show_missing: bool = True, summary: bool = False, coverdir: StrPath | None = None) -> None: ... + if sys.version_info >= (3, 13): + def write_results( + self, + show_missing: bool = True, + summary: bool = False, + coverdir: StrPath | None = None, + *, + ignore_missing_files: bool = False, + ) -> None: ... + else: + def write_results(self, show_missing: bool = True, summary: bool = False, coverdir: StrPath | None = None) -> None: ... + def write_results_file( self, path: StrPath, lines: Sequence[str], lnotab: Any, lines_hit: Mapping[int, int], encoding: str | None = None ) -> tuple[int, int]: ...