Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/darwin-py310.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# =======
# <= 3.12
# =======

# Added in Python 3.10.18 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =======
# <= 3.11
# =======
Expand Down
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/darwin-py311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ fcntl.F_OFD_SETLK
fcntl.F_OFD_SETLKW


# =======
# <= 3.12
# =======

# Added in Python 3.11.13 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =======
# <= 3.11
# =======
Expand Down
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/darwin-py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ fcntl.F_OFD_SETLK
fcntl.F_OFD_SETLKW


# =======
# <= 3.12
# =======

# Added in Python 3.12.11 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =============================================================
# Allowlist entries that cannot or should not be fixed; <= 3.12
# =============================================================
Expand Down
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/darwin-py39.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# =======
# <= 3.12
# =======

# Added in Python 3.9.23 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =======
# <= 3.11
# =======
Expand Down
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/win32-py310.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# =======
# <= 3.12
# =======

# Added in Python 3.10.18 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =======
# <= 3.11
# =======
Expand Down
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/win32-py311.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# =======
# <= 3.12
# =======

# Added in Python 3.11.13 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =======
# <= 3.11
# =======
Expand Down
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/win32-py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ _winapi.GetLongPathName
_winapi.GetShortPathName


# =======
# <= 3.12
# =======

# Added in Python 3.12.11 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =============================================================
# Allowlist entries that cannot or should not be fixed; <= 3.12
# =============================================================
Expand Down
8 changes: 8 additions & 0 deletions stdlib/@tests/stubtest_allowlists/win32-py39.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# =======
# <= 3.12
# =======

# Added in Python 3.9.23 (parameter `escapable`)
html.parser.HTMLParser.set_cdata_mode


# =======
# <= 3.11
# =======
Expand Down
13 changes: 4 additions & 9 deletions stdlib/html/parser.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from _markupbase import ParserBase
from re import Pattern
from typing import Final
Expand All @@ -7,9 +6,8 @@ __all__ = ["HTMLParser"]

class HTMLParser(ParserBase):
CDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]]
if sys.version_info >= (3, 13):
# Added in 3.13.6
RCDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]]
# 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: ...
def feed(self, data: str) -> None: ...
Expand All @@ -32,11 +30,8 @@ class HTMLParser(ParserBase):
def parse_html_declaration(self, i: int) -> int: ... # undocumented
def parse_pi(self, i: int) -> int: ... # undocumented
def parse_starttag(self, i: int) -> int: ... # undocumented
if sys.version_info >= (3, 13):
# `escapable` parameter added in 3.13.6
def set_cdata_mode(self, elem: str, *, escapable: bool = False) -> None: ... # undocumented
else:
def set_cdata_mode(self, elem: str) -> None: ... # undocumented
# `escapable` parameter added in Python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.6
def set_cdata_mode(self, elem: str, *, escapable: bool = False) -> None: ... # undocumented
rawdata: str # undocumented
cdata_elem: str | None # undocumented
convert_charrefs: bool # undocumented
Expand Down
Loading