diff --git a/stdlib/@tests/stubtest_allowlists/darwin.txt b/stdlib/@tests/stubtest_allowlists/darwin.txt index b82f42156ad0..34e9f70321fb 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin.txt @@ -10,6 +10,14 @@ (fcntl.F_SETLEASE)? # GNU extension +# ======= +# <= 3.14 +# ======= + +# Added in Python 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 (parameter `scripting`) +html.parser.HTMLParser.__init__ + + # ========================================== # Modules that do not exist on MacOS systems # ========================================== diff --git a/stdlib/@tests/stubtest_allowlists/linux-py310.txt b/stdlib/@tests/stubtest_allowlists/linux-py310.txt index a4083aa22ed7..559c5d4ce8bf 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py310.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py310.txt @@ -1,3 +1,11 @@ +# ======= +# <= 3.14 +# ======= + +# Added in Python 3.10.20 (parameter `scripting`) +html.parser.HTMLParser.__init__ + + # ============================================================= # Allowlist entries that cannot or should not be fixed; <= 3.12 # ============================================================= diff --git a/stdlib/@tests/stubtest_allowlists/linux-py311.txt b/stdlib/@tests/stubtest_allowlists/linux-py311.txt index a4083aa22ed7..ce9d5d89f298 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py311.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py311.txt @@ -1,3 +1,11 @@ +# ======= +# <= 3.14 +# ======= + +# Added in Python 3.11.15 (parameter `scripting`) +html.parser.HTMLParser.__init__ + + # ============================================================= # Allowlist entries that cannot or should not be fixed; <= 3.12 # ============================================================= diff --git a/stdlib/@tests/stubtest_allowlists/linux-py312.txt b/stdlib/@tests/stubtest_allowlists/linux-py312.txt index a4083aa22ed7..602a661fbc95 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py312.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py312.txt @@ -1,3 +1,11 @@ +# ======= +# <= 3.14 +# ======= + +# Added in Python 3.12.13 (parameter `scripting`) +html.parser.HTMLParser.__init__ + + # ============================================================= # Allowlist entries that cannot or should not be fixed; <= 3.12 # ============================================================= diff --git a/stdlib/@tests/stubtest_allowlists/linux-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt index e69de29bb2d1..672b0cf50e09 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -0,0 +1,6 @@ +# ======= +# <= 3.14 +# ======= + +# Added in Python 3.13.10 (parameter `scripting`) +html.parser.HTMLParser.__init__ diff --git a/stdlib/@tests/stubtest_allowlists/linux-py314.txt b/stdlib/@tests/stubtest_allowlists/linux-py314.txt new file mode 100644 index 000000000000..2e5d4a88255d --- /dev/null +++ b/stdlib/@tests/stubtest_allowlists/linux-py314.txt @@ -0,0 +1,6 @@ +# ======= +# <= 3.14 +# ======= + +# Added in Python 3.14.1 (parameter `scripting`) +html.parser.HTMLParser.__init__ diff --git a/stdlib/@tests/stubtest_allowlists/win32.txt b/stdlib/@tests/stubtest_allowlists/win32.txt index 66695e1d87d3..1ac5529e7ebe 100644 --- a/stdlib/@tests/stubtest_allowlists/win32.txt +++ b/stdlib/@tests/stubtest_allowlists/win32.txt @@ -9,6 +9,14 @@ _winapi.OpenFileMapping _winapi.VirtualQuerySize +# ======= +# <= 3.14 +# ======= + +# Added in Python 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 (parameter `scripting`) +html.parser.HTMLParser.__init__ + + # ============================================ # Modules that do not exist on Windows systems # ============================================ diff --git a/stdlib/html/parser.pyi b/stdlib/html/parser.pyi index 7edd39e8c703..08dc7b936922 100644 --- a/stdlib/html/parser.pyi +++ b/stdlib/html/parser.pyi @@ -9,7 +9,8 @@ class HTMLParser(ParserBase): # Added in Python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.6 RCDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]] - def __init__(self, *, convert_charrefs: bool = True) -> None: ... + # `scripting` parameter added in Python 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 + def __init__(self, *, convert_charrefs: bool = True, scripting: bool = False) -> None: ... def feed(self, data: str) -> None: ... def close(self) -> None: ... def get_starttag_text(self) -> str | None: ...