diff --git a/stdlib/io.pyi b/stdlib/io.pyi index 16270b948..ee4eda1b4 100644 --- a/stdlib/io.pyi +++ b/stdlib/io.pyi @@ -33,6 +33,9 @@ __all__ = [ if sys.version_info >= (3, 8): __all__ += ["open_code"] +if sys.version_info >= (3, 11): + __all__ += ["DEFAULT_BUFFER_SIZE", "IncrementalNewlineDecoder", "text_encoding"] + _T = TypeVar("_T") DEFAULT_BUFFER_SIZE: Literal[8192] diff --git a/stdlib/sre_parse.pyi b/stdlib/sre_parse.pyi index 8ef65223d..2c10bf7e7 100644 --- a/stdlib/sre_parse.pyi +++ b/stdlib/sre_parse.pyi @@ -19,6 +19,9 @@ FLAGS: dict[str, int] TYPE_FLAGS: int GLOBAL_FLAGS: int +if sys.version_info >= (3, 11): + MAXWIDTH: int + if sys.version_info < (3, 11): class Verbose(Exception): ... diff --git a/tests/stubtest_allowlists/py312.txt b/tests/stubtest_allowlists/py312.txt index 792f4a25d..ad2cd800e 100644 --- a/tests/stubtest_allowlists/py312.txt +++ b/tests/stubtest_allowlists/py312.txt @@ -14,6 +14,10 @@ enum.Enum.__init__ tkinter._VersionInfoType.__doc__ typing.NewType.__mro_entries__ +# These can be removed when the next patch release of 3.12 comes out: +io.__all__ +sre_parse.MAXWIDTH + # ========== # Related to positional-only arguments # ==========