Skip to content

Commit b7b764b

Browse files
authored
Bump HTMLParser.parse_comment to 3.14 (#14386)
1 parent d4e03e0 commit b7b764b

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ _frozen_importlib_external.FileLoader.get_filename
195195
_frozen_importlib_external.FileLoader.get_resource_reader
196196
_frozen_importlib_external.FileLoader.load_module
197197

198+
# Mismatch of default values of `report` parameter:
199+
_markupbase.ParserBase.parse_comment
200+
_markupbase.ParserBase.parse_marked_section
201+
198202
_pydecimal.* # See comments in file
199203
_typeshed.* # Utility types for typeshed, doesn't exist at runtime
200204
argparse.ArgumentParser.__init__ # stubtest doesn't recognise the runtime default (a class) as being compatible with a callback protocol (the stub annotation)
@@ -307,6 +311,7 @@ functools._lru_cache_wrapper.cache_parameters # Cannot be detected statically
307311
functools.cached_property.__set__ # doesn't exist, but cached_property is settable by another mechanism
308312

309313
hmac.new # Raises TypeError if optional argument digestmod is not provided
314+
html.parser.HTMLParser.parse_bogus_comment # default values mismatch
310315
http.HTTPStatus.description # set in __new__; work-around for enum wierdness
311316
http.HTTPStatus.phrase # set in __new__; work-around for enum wierdness
312317
imaplib.IMAP4_SSL.ssl # Depends on the existence and flags of SSL

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ concurrent.futures.interpreter.InterpreterPoolExecutor.prepare_context
1111
concurrent.futures.interpreter.WorkerContext.__init__
1212
concurrent.futures.interpreter.WorkerContext.prepare
1313
concurrent.futures.interpreter.do_call
14-
html.parser.HTMLParser.parse_comment
1514
multiprocessing.managers.BaseListProxy.clear
1615
multiprocessing.managers.BaseListProxy.copy
1716
multiprocessing.managers.DictProxy.__ior__

stdlib/_markupbase.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ class ParserBase:
55
def reset(self) -> None: ...
66
def getpos(self) -> tuple[int, int]: ...
77
def unknown_decl(self, data: str) -> None: ...
8-
def parse_comment(self, i: int, report: int = 1) -> int: ... # undocumented
8+
def parse_comment(self, i: int, report: bool = True) -> int: ... # undocumented
99
def parse_declaration(self, i: int) -> int: ... # undocumented
10-
def parse_marked_section(self, i: int, report: int = 1) -> int: ... # undocumented
10+
def parse_marked_section(self, i: int, report: bool = True) -> int: ... # undocumented
1111
def updatepos(self, i: int, j: int) -> int: ... # undocumented
1212
if sys.version_info < (3, 10):
1313
# Removed from ParserBase: https://bugs.python.org/issue31844

stdlib/html/parser.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class HTMLParser(ParserBase):
2121
def check_for_whole_start_tag(self, i: int) -> int: ... # undocumented
2222
def clear_cdata_mode(self) -> None: ... # undocumented
2323
def goahead(self, end: bool) -> None: ... # undocumented
24-
def parse_bogus_comment(self, i: int, report: bool = ...) -> int: ... # undocumented
24+
def parse_bogus_comment(self, i: int, report: bool = True) -> int: ... # undocumented
2525
def parse_endtag(self, i: int) -> int: ... # undocumented
2626
def parse_html_declaration(self, i: int) -> int: ... # undocumented
2727
def parse_pi(self, i: int) -> int: ... # undocumented

0 commit comments

Comments
 (0)