Run stubtest on py313 in CI (#11987)

This commit is contained in:
Alex Waygood
2024-05-20 15:56:41 -04:00
committed by GitHub
parent e2e3750ee9
commit 88c7f96d25
24 changed files with 1202 additions and 61 deletions

View File

@@ -55,6 +55,24 @@ jobs:
- name: Run stubtest
run: python tests/stubtest_stdlib.py
stubtest-stdlib-py313:
name: Check py313-linux stdlib with stubtest
# TODO: get it passing on all platforms and add it to the main matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Run stubtest
run: python tests/stubtest_stdlib.py
stubtest-third-party:
name: Check third party stubs with stubtest
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}

View File

@@ -50,3 +50,21 @@ jobs:
run: pip install -r requirements-tests.txt
- name: Run stubtest
run: python tests/stubtest_stdlib.py
stubtest-stdlib-py313:
name: Check py313-linux stdlib with stubtest
# TODO: get it passing on all platforms and add it to the main matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Run stubtest
run: python tests/stubtest_stdlib.py

View File

@@ -75,15 +75,6 @@ ipaddress._BaseAddress.is_unspecified
ipaddress._BaseAddress.max_prefixlen
ipaddress._BaseAddress.packed
ipaddress._BaseNetwork.max_prefixlen
lib2to3.pygram.pattern_symbols
lib2to3.pygram.python_symbols
lib2to3.pytree.Base.__new__
lib2to3.pytree.Base.children
lib2to3.pytree.Base.type
lib2to3.pytree.BasePattern.__new__
lib2to3.pytree.BasePattern.type
lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
multiprocessing.JoinableQueue
multiprocessing.Queue
multiprocessing.SimpleQueue
@@ -118,9 +109,6 @@ tarfile.TarFile.errors # errors is initialized for some reason as None even tho
tkinter.simpledialog.[A-Z_]+
tkinter.simpledialog.TclVersion
tkinter.simpledialog.TkVersion
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
tkinter.Misc.after # we intentionally don't allow everything that "works" at runtime
traceback.TracebackException.from_exception # explicitly expanding arguments going into TracebackException __init__
typing(_extensions)?\.IO\.__next__ # Added because IO streams are iterable. See https://github.com/python/typeshed/commit/97bc450acd60c1bcdafef3ce8fbe3b95a9c0cac3
@@ -186,9 +174,6 @@ encodings.utf_7
encodings.uu_codec
encodings.zlib_codec
json.scanner
lib2to3.btm_utils
lib2to3.fixer_util
lib2to3.patcomp
sqlite3.dump
turtledemo
turtledemo\..+
@@ -217,7 +202,6 @@ ctypes.ARRAY
ctypes.SetPointerType
ctypes.c_voidp
ctypes.util.test
lib2to3.pgen2.grammar.Grammar.loads
mimetypes.MimeTypes.add_type
modulefinder.test
multiprocessing.managers.Server.accepter
@@ -250,22 +234,6 @@ multiprocessing.pool.ThreadPool.Process
multiprocessing.synchronize.Semaphore.get_value
tkinter.Misc.config
tkinter.font.Font.counter
tkinter.tix.CObjView
tkinter.tix.DialogShell
tkinter.tix.ExFileSelectDialog
tkinter.tix.FileSelectDialog
tkinter.tix.FileTypeList
tkinter.tix.Grid
tkinter.tix.NoteBookFrame
tkinter.tix.OptionName
tkinter.tix.ResizeHandle
tkinter.tix.ScrolledGrid
tkinter.tix.ScrolledHList
tkinter.tix.ScrolledListBox
tkinter.tix.ScrolledTList
tkinter.tix.ScrolledText
tkinter.tix.ScrolledWindow
tkinter.tix.Shell
turtle.TNavigator.speed
# Undocumented implementation details of a deprecated class
@@ -285,15 +253,6 @@ profile.Profile.trace_dispatch_i
profile.Profile.trace_dispatch_l
profile.Profile.trace_dispatch_mac
profile.Profile.trace_dispatch_return
cgi.FieldStorage.bufsize
cgi.FieldStorage.read_binary
cgi.FieldStorage.read_lines
cgi.FieldStorage.read_lines_to_eof
cgi.FieldStorage.read_lines_to_outerboundary
cgi.FieldStorage.read_multi
cgi.FieldStorage.read_single
cgi.FieldStorage.read_urlencoded
cgi.FieldStorage.skip_lines
email.contentmanager.get_and_fixup_unknown_message_content
email.contentmanager.get_message_content
email.contentmanager.get_non_text_content
@@ -301,11 +260,6 @@ email.contentmanager.get_text_content
email.contentmanager.set_bytes_content
email.contentmanager.set_message_content
email.contentmanager.set_text_content
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w
sunau.Au_read.initfp
sunau.Au_write.initfp
turtle.ScrolledCanvas.adjustScrolls
turtle.ScrolledCanvas.onResize
wave.Wave_read.initfp
@@ -442,11 +396,9 @@ multiprocessing.managers.BaseListProxy.reverse
multiprocessing.managers.BaseListProxy.sort
multiprocessing.managers.DictProxy.__iter__
multiprocessing.managers.DictProxy.__len__
multiprocessing.managers.DictProxy.clear
multiprocessing.managers.DictProxy.copy
multiprocessing.managers.DictProxy.items
multiprocessing.managers.DictProxy.keys
multiprocessing.managers.DictProxy.popitem
multiprocessing.managers.DictProxy.values
multiprocessing.(dummy|managers).Namespace.__[gs]etattr__ # Any field can be set on Namespace
@@ -484,7 +436,6 @@ typing\.Protocol
typing(_extensions)?\._TypedDict
# Special primitives
typing_extensions\.Annotated
typing_extensions\.Final
typing_extensions\.NamedTuple
typing_extensions\.LiteralString
@@ -564,9 +515,7 @@ sys.implementation # Actually SimpleNamespace but then you wouldn't have conven
# A factory function that returns 'most efficient lock'.
# Marking it as a function will make it impossible for users to use the Lock type as an annotation.
threading.Lock
threading.RLock
multiprocessing.dummy.Lock
multiprocessing.dummy.RLock
# Dynamically created, has unnecessary *args

View File

@@ -0,0 +1,6 @@
webbrowser.MacOSX.__init__
# Doesn't exist on macos:
spwd
msilib(.[a-z]+)?
ossaudiodev

View File

@@ -1,3 +1,5 @@
webbrowser.MacOSX.__init__
# These entries looks like a `setup-python` bug:
(dbm.gnu)?
(_?locale.bind_textdomain_codeset)?
@@ -6,3 +8,8 @@
(_?locale.dgettext)?
(_?locale.gettext)?
(_?locale.textdomain)?
# Doesn't exist on macos:
spwd
msilib(.[a-z]+)?
ossaudiodev

View File

@@ -1,3 +1,5 @@
webbrowser.MacOSX.__init__
# TODO: fix
_curses.unget_wch
_curses.window.get_wch
@@ -11,3 +13,8 @@ curses.window.get_wch
(_?locale.dgettext)?
(_?locale.gettext)?
(_?locale.textdomain)?
# Doesn't exist on macos:
spwd
msilib(.[a-z]+)?
ossaudiodev

View File

@@ -0,0 +1,40 @@
# new in py313
fcntl.F_GETNOSIGPIPE
fcntl.F_OFD_GETLK
fcntl.F_OFD_SETLK
fcntl.F_OFD_SETLKW
fcntl.F_RDAHEAD
fcntl.F_SETNOSIGPIPE
mmap.MAP_HASSEMAPHORE
mmap.MAP_JIT
mmap.MAP_NOCACHE
mmap.MAP_NOEXTEND
mmap.MAP_RESILIENT_CODESIGN
mmap.MAP_RESILIENT_MEDIA
mmap.MAP_TPRO
mmap.MAP_TRANSLATED_ALLOW_EXECUTE
mmap.MAP_UNIX03
os.waitid
os.waitid_result
posix.waitid
posix.waitid_result
time.CLOCK_MONOTONIC_RAW_APPROX
time.CLOCK_UPTIME_RAW_APPROX
webbrowser.MacOSX
_curses.A_ITALIC
curses.A_ITALIC
_decimal.DecimalTuple.__replace__
# TODO: fix
_curses.unget_wch
_curses.window.get_wch
curses.window.get_wch
# These entries looks like a `setup-python` bug:
(dbm.gnu)?
(_?locale.bind_textdomain_codeset)?
(_?locale.bindtextdomain)?
(_?locale.dcgettext)?
(_?locale.dgettext)?
(_?locale.gettext)?
(_?locale.textdomain)?

View File

@@ -0,0 +1,6 @@
webbrowser.MacOSX.__init__
# Doesn't exist on macos:
spwd
msilib(.[a-z]+)?
ossaudiodev

View File

@@ -0,0 +1,6 @@
webbrowser.MacOSX.__init__
# Doesn't exist on macos:
spwd
msilib(.[a-z]+)?
ossaudiodev

View File

@@ -27,8 +27,6 @@ _ctypes.dlclose
_ctypes.dlopen
_ctypes.dlsym
webbrowser.MacOSX.__init__
# ==========
# Allowlist entries that cannot or should not be fixed
# ==========
@@ -38,13 +36,10 @@ _msi
_winapi
asyncio.windows_events
asyncio.windows_utils
msilib(.[a-z]+)?
msvcrt
nt
winreg
winsound
ossaudiodev
spwd
# multiprocessing.popen_spawn_win32 exists on Darwin but fail to import
multiprocessing.popen_spawn_win32

View File

@@ -0,0 +1,6 @@
# Exists at runtime, but missing from stubs
spwd.struct_spwd.sp_nam
spwd.struct_spwd.sp_pwd
# doesn't exist on linux
msilib(.[a-z]+)?

View File

@@ -0,0 +1,6 @@
# Exists at runtime, but missing from stubs
spwd.struct_spwd.sp_nam
spwd.struct_spwd.sp_pwd
# doesn't exist on linux
msilib(.[a-z]+)?

View File

@@ -1,3 +1,10 @@
# Exists on some Linux builds, and is documented,
# but is unavailable in Github Actions on Linux with Python 3.12
(os|posix).CLONE_NEWTIME
# Exists at runtime, but missing from stubs
spwd.struct_spwd.sp_nam
spwd.struct_spwd.sp_pwd
# doesn't exist on linux
msilib(.[a-z]+)?

View File

@@ -0,0 +1,149 @@
# TODO: triage these (new in py313)
_decimal
_stat.SF_SETTABLE
_stat.SF_SUPPORTED
_stat.SF_SYNTHETIC
decimal.Context.abs
decimal.Context.add
decimal.Context.canonical
decimal.Context.compare
decimal.Context.compare_signal
decimal.Context.compare_total
decimal.Context.compare_total_mag
decimal.Context.copy_abs
decimal.Context.copy_decimal
decimal.Context.copy_negate
decimal.Context.copy_sign
decimal.Context.create_decimal
decimal.Context.create_decimal_from_float
decimal.Context.divide
decimal.Context.divide_int
decimal.Context.divmod
decimal.Context.exp
decimal.Context.fma
decimal.Context.is_canonical
decimal.Context.is_finite
decimal.Context.is_infinite
decimal.Context.is_nan
decimal.Context.is_normal
decimal.Context.is_qnan
decimal.Context.is_signed
decimal.Context.is_snan
decimal.Context.is_subnormal
decimal.Context.is_zero
decimal.Context.ln
decimal.Context.log10
decimal.Context.logb
decimal.Context.logical_and
decimal.Context.logical_invert
decimal.Context.logical_or
decimal.Context.logical_xor
decimal.Context.max
decimal.Context.max_mag
decimal.Context.min
decimal.Context.min_mag
decimal.Context.minus
decimal.Context.multiply
decimal.Context.next_minus
decimal.Context.next_plus
decimal.Context.next_toward
decimal.Context.normalize
decimal.Context.number_class
decimal.Context.plus
decimal.Context.quantize
decimal.Context.remainder
decimal.Context.remainder_near
decimal.Context.rotate
decimal.Context.same_quantum
decimal.Context.scaleb
decimal.Context.shift
decimal.Context.sqrt
decimal.Context.subtract
decimal.Context.to_eng_string
decimal.Context.to_integral
decimal.Context.to_integral_exact
decimal.Context.to_integral_value
decimal.Context.to_sci_string
decimal.ConversionSyntax.handle
decimal.Decimal.__abs__
decimal.Decimal.__add__
decimal.Decimal.__divmod__
decimal.Decimal.__eq__
decimal.Decimal.__floordiv__
decimal.Decimal.__ge__
decimal.Decimal.__gt__
decimal.Decimal.__le__
decimal.Decimal.__lt__
decimal.Decimal.__mod__
decimal.Decimal.__mul__
decimal.Decimal.__neg__
decimal.Decimal.__pos__
decimal.Decimal.__pow__
decimal.Decimal.__radd__
decimal.Decimal.__rdivmod__
decimal.Decimal.__rfloordiv__
decimal.Decimal.__rmod__
decimal.Decimal.__rmul__
decimal.Decimal.__round__
decimal.Decimal.__rsub__
decimal.Decimal.__rtruediv__
decimal.Decimal.__str__
decimal.Decimal.__sub__
decimal.Decimal.__truediv__
decimal.Decimal.from_float
decimal.DecimalException.handle
decimal.DivisionByZero.handle
decimal.DivisionImpossible.handle
decimal.DivisionUndefined.handle
decimal.InvalidContext.handle
decimal.InvalidOperation.handle
decimal.Overflow.handle
decimal.setcontext
fcntl.F_GETOWN_EX
fcntl.F_GET_FILE_RW_HINT
fcntl.F_GET_RW_HINT
fcntl.F_OWNER_PGRP
fcntl.F_OWNER_PID
fcntl.F_OWNER_TID
fcntl.F_SEAL_FUTURE_WRITE
fcntl.F_SETOWN_EX
fcntl.F_SET_FILE_RW_HINT
fcntl.F_SET_RW_HINT
fcntl.RWH_WRITE_LIFE_EXTREME
fcntl.RWH_WRITE_LIFE_LONG
fcntl.RWH_WRITE_LIFE_MEDIUM
fcntl.RWH_WRITE_LIFE_NONE
fcntl.RWH_WRITE_LIFE_NOT_SET
fcntl.RWH_WRITE_LIFE_SHORT
os.POSIX_SPAWN_CLOSEFROM
os.TFD_CLOEXEC
os.TFD_NONBLOCK
os.TFD_TIMER_ABSTIME
os.TFD_TIMER_CANCEL_ON_SET
os.timerfd_create
os.timerfd_gettime
os.timerfd_gettime_ns
os.timerfd_settime
os.timerfd_settime_ns
posix.POSIX_SPAWN_CLOSEFROM
posix.TFD_CLOEXEC
posix.TFD_NONBLOCK
posix.TFD_TIMER_ABSTIME
posix.TFD_TIMER_CANCEL_ON_SET
posix.timerfd_create
posix.timerfd_gettime
posix.timerfd_gettime_ns
posix.timerfd_settime
posix.timerfd_settime_ns
stat.SF_SETTABLE
stat.SF_SUPPORTED
stat.SF_SYNTHETIC
syslog.LOG_INSTALL
syslog.LOG_LAUNCHD
syslog.LOG_NETINFO
syslog.LOG_RAS
syslog.LOG_REMOTEAUTH
# Exists on some Linux builds, and is documented,
# but is unavailable in Github Actions on Linux with Python 3.12
(os|posix).CLONE_NEWTIME

View File

@@ -1 +1,8 @@
select.epoll.register
# Exists at runtime, but missing from stubs
spwd.struct_spwd.sp_nam
spwd.struct_spwd.sp_pwd
# doesn't exist on linux
msilib(.[a-z]+)?

View File

@@ -1 +1,8 @@
select.epoll.register
# Exists at runtime, but missing from stubs
spwd.struct_spwd.sp_nam
spwd.struct_spwd.sp_pwd
# doesn't exist on linux
msilib(.[a-z]+)?

View File

@@ -5,10 +5,6 @@ os.plock
selectors.KqueueSelector
socket.[A-Z0-9_]+
# Exists at runtime, but missing from stubs
spwd.struct_spwd.sp_nam
spwd.struct_spwd.sp_pwd
# Platform differences that cannot be captured by the type system
(posix.O_[A-Z_]+)?
(posix.ST_[A-Z]+)?
@@ -27,7 +23,6 @@ _msi
_winapi
asyncio.windows_events
asyncio.windows_utils
msilib(.[a-z]+)?
msvcrt
nt
winreg

View File

@@ -15,11 +15,40 @@ gettext.install
gettext.translation
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
importlib.abc.Finder.find_module
lib2to3.pygram.pattern_symbols
lib2to3.pygram.python_symbols
lib2to3.pytree.Base.__new__
lib2to3.pytree.Base.children
lib2to3.pytree.Base.type
lib2to3.pytree.BasePattern.__new__
lib2to3.pytree.BasePattern.type
lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
lib2to3.pgen2.grammar.Grammar.loads
# platform.uname_result's processor field is now dynamically made to exist
platform.uname_result.__match_args__
platform.uname_result.__new__
platform.uname_result.processor
tkinter.Tk.split
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
tkinter.tix.CObjView
tkinter.tix.DialogShell
tkinter.tix.ExFileSelectDialog
tkinter.tix.FileSelectDialog
tkinter.tix.FileTypeList
tkinter.tix.Grid
tkinter.tix.NoteBookFrame
tkinter.tix.OptionName
tkinter.tix.ResizeHandle
tkinter.tix.ScrolledGrid
tkinter.tix.ScrolledHList
tkinter.tix.ScrolledListBox
tkinter.tix.ScrolledTList
tkinter.tix.ScrolledText
tkinter.tix.ScrolledWindow
tkinter.tix.Shell
types.GenericAlias.__getattr__
types.GenericAlias.__mro_entries__
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
@@ -90,6 +119,9 @@ _csv.Writer
bdb.Breakpoint.clearBreakpoints
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
lib2to3.btm_utils
lib2to3.fixer_util
lib2to3.patcomp
# ==========
# Related to positional-only arguments
@@ -129,11 +161,20 @@ os.path.join
# Allowlist entries that cannot or should not be fixed
# ==========
# Factory function at runtime
# but that wouldn't let us use it in type hints
threading.Lock
multiprocessing.dummy.Lock
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
_?ast.pattern.__init__
# more precise signature in the stubs than at runtime
multiprocessing.managers.DictProxy.clear
multiprocessing.managers.DictProxy.popitem
# Side effects from module initialization
_compat_pickle.excname
email.contentmanager.maintype
@@ -150,6 +191,23 @@ pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed
pydoc.Helper.symbols_ # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
pydoc.Helper.topic # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
# Undocumented implementation details
cgi.FieldStorage.bufsize
cgi.FieldStorage.read_binary
cgi.FieldStorage.read_lines
cgi.FieldStorage.read_lines_to_eof
cgi.FieldStorage.read_lines_to_outerboundary
cgi.FieldStorage.read_multi
cgi.FieldStorage.read_single
cgi.FieldStorage.read_urlencoded
cgi.FieldStorage.skip_lines
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w
sunau.Au_read.initfp
sunau.Au_write.initfp
typing_extensions\.Annotated
# C signature is broader than what is actually accepted
ast.ExtSlice.__new__
ast.Index.__new__

View File

@@ -15,7 +15,39 @@ enum.Enum._generate_next_value_
enum.StrEnum._generate_next_value_
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
importlib.abc.Finder.find_module
lib2to3.pygram.pattern_symbols
lib2to3.pygram.python_symbols
lib2to3.pytree.Base.__new__
lib2to3.pytree.Base.children
lib2to3.pytree.Base.type
lib2to3.pytree.BasePattern.__new__
lib2to3.pytree.BasePattern.type
lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
lib2to3.btm_utils
lib2to3.fixer_util
lib2to3.patcomp
lib2to3.pgen2.grammar.Grammar.loads
tkinter._VersionInfoType.__doc__
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
tkinter.tix.CObjView
tkinter.tix.DialogShell
tkinter.tix.ExFileSelectDialog
tkinter.tix.FileSelectDialog
tkinter.tix.FileTypeList
tkinter.tix.Grid
tkinter.tix.NoteBookFrame
tkinter.tix.OptionName
tkinter.tix.ResizeHandle
tkinter.tix.ScrolledGrid
tkinter.tix.ScrolledHList
tkinter.tix.ScrolledListBox
tkinter.tix.ScrolledTList
tkinter.tix.ScrolledText
tkinter.tix.ScrolledWindow
tkinter.tix.Shell
typing.NewType.__mro_entries__
builtins.ellipsis # type is not exposed anywhere
@@ -74,6 +106,15 @@ os.path.join
# Allowlist entries that cannot or should not be fixed
# ==========
# Factory function at runtime
# but that wouldn't let us use it in type hints
threading.Lock
multiprocessing.dummy.Lock
# more precise signature in the stubs than at runtime
multiprocessing.managers.DictProxy.clear
multiprocessing.managers.DictProxy.popitem
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
@@ -103,6 +144,23 @@ ast.ExtSlice.__new__
ast.Index.__new__
contextvars.Context.__init__
# Undocumented implementation details
cgi.FieldStorage.bufsize
cgi.FieldStorage.read_binary
cgi.FieldStorage.read_lines
cgi.FieldStorage.read_lines_to_eof
cgi.FieldStorage.read_lines_to_outerboundary
cgi.FieldStorage.read_multi
cgi.FieldStorage.read_single
cgi.FieldStorage.read_urlencoded
cgi.FieldStorage.skip_lines
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w
sunau.Au_read.initfp
sunau.Au_write.initfp
typing_extensions\.Annotated
# Treated an alias of a typing class in the stubs,
# they are generic to type checkers anyway.
contextlib.AbstractAsyncContextManager.__class_getitem__

View File

@@ -12,7 +12,39 @@ _csv.Writer
configparser.LegacyInterpolation.__init__
enum.Enum.__init__
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
lib2to3.pygram.pattern_symbols
lib2to3.pygram.python_symbols
lib2to3.pytree.Base.__new__
lib2to3.pytree.Base.children
lib2to3.pytree.Base.type
lib2to3.pytree.BasePattern.__new__
lib2to3.pytree.BasePattern.type
lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
lib2to3.btm_utils
lib2to3.fixer_util
lib2to3.patcomp
lib2to3.pgen2.grammar.Grammar.loads
tkinter._VersionInfoType.__doc__
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
tkinter.tix.CObjView
tkinter.tix.DialogShell
tkinter.tix.ExFileSelectDialog
tkinter.tix.FileSelectDialog
tkinter.tix.FileTypeList
tkinter.tix.Grid
tkinter.tix.NoteBookFrame
tkinter.tix.OptionName
tkinter.tix.ResizeHandle
tkinter.tix.ScrolledGrid
tkinter.tix.ScrolledHList
tkinter.tix.ScrolledListBox
tkinter.tix.ScrolledTList
tkinter.tix.ScrolledText
tkinter.tix.ScrolledWindow
tkinter.tix.Shell
typing.NewType.__mro_entries__
builtins.ellipsis # type is not exposed anywhere
@@ -57,6 +89,32 @@ zoneinfo.ZoneInfo.from_file
# Allowlist entries that cannot or should not be fixed
# ==========
# Factory function at runtime
# but that wouldn't let us use it in type hints
threading.Lock
multiprocessing.dummy.Lock
# more precise signature in the stubs than at runtime
multiprocessing.managers.DictProxy.clear
multiprocessing.managers.DictProxy.popitem
# Undocumented implementation details
cgi.FieldStorage.bufsize
cgi.FieldStorage.read_binary
cgi.FieldStorage.read_lines
cgi.FieldStorage.read_lines_to_eof
cgi.FieldStorage.read_lines_to_outerboundary
cgi.FieldStorage.read_multi
cgi.FieldStorage.read_single
cgi.FieldStorage.read_urlencoded
cgi.FieldStorage.skip_lines
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w
sunau.Au_read.initfp
sunau.Au_write.initfp
typing_extensions\.Annotated
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)

View File

@@ -0,0 +1,622 @@
# =========================
# New errors in Python 3.13
# =========================
# TODO: triage these new errors
_ast.PyCF_OPTIMIZED_AST
_collections_abc.dict_items.isdisjoint
_collections_abc.dict_keys.isdisjoint
_ctypes.Array.__class_getitem__
_ctypes.POINTER
_ctypes.addressof
_ctypes.alignment
_ctypes.pointer
_ctypes.sizeof
_json.encode_basestring_ascii
_pyrepl.commands
_pyrepl.completing_reader
_pyrepl.console
_pyrepl.curses
_pyrepl.fancy_termios
_pyrepl.historical_reader
_pyrepl.input
_pyrepl.keymap
_pyrepl.pager
_pyrepl.reader
_pyrepl.readline
_pyrepl.simple_interact
_pyrepl.trace
_pyrepl.types
_pyrepl.unix_console
_pyrepl.unix_eventqueue
_pyrepl.utils
_socket.close
_socket.dup
_socket.if_indextoname
_socket.setdefaulttimeout
_socket.socket.bind
_socket.socket.connect
_socket.socket.connect_ex
_socket.socket.setblocking
_socket.socket.settimeout
_socket.socket.shutdown
_stat.S_IFMT
_stat.S_IMODE
_stat.S_ISBLK
_stat.S_ISCHR
_stat.S_ISDIR
_stat.S_ISDOOR
_stat.S_ISFIFO
_stat.S_ISLNK
_stat.S_ISPORT
_stat.S_ISREG
_stat.S_ISSOCK
_stat.S_ISWHT
_stat.filemode
_thread.interrupt_main
_thread.lock
_thread.stack_size
_thread.start_joinable_thread
_thread.start_new_thread
_tkinter.TkappType.gettrace
_tkinter.TkappType.settrace
_tkinter.create
_weakref.ReferenceType.__class_getitem__
_weakref.ref.__class_getitem__
_weakrefset.WeakSet.__class_getitem__
argparse.Action.__init__
argparse.BooleanOptionalAction.__init__
argparse._AppendAction.__init__
argparse._AppendConstAction.__init__
argparse._CountAction.__init__
argparse._HelpAction.__init__
argparse._StoreAction.__init__
argparse._StoreConstAction.__init__
argparse._StoreFalseAction.__init__
argparse._StoreTrueAction.__init__
argparse._SubParsersAction.add_parser
argparse._VersionAction.__init__
array.array.__class_getitem__
ast.PyCF_OPTIMIZED_AST
asyncio.AbstractEventLoop.create_server
asyncio.AbstractServer.abort_clients
asyncio.AbstractServer.close_clients
asyncio.BaseEventLoop.create_server
asyncio.EventLoop
asyncio.Future.__class_getitem__
asyncio.Queue.__class_getitem__
asyncio.Queue.shutdown
asyncio.QueueShutDown
asyncio.Server.abort_clients
asyncio.Server.close_clients
asyncio.StreamWriter.__del__
asyncio.Task.__class_getitem__
asyncio.base_events.BaseEventLoop.create_server
asyncio.base_events.Server.abort_clients
asyncio.base_events.Server.close_clients
asyncio.events.AbstractEventLoop.create_server
asyncio.events.AbstractServer.abort_clients
asyncio.events.AbstractServer.close_clients
asyncio.format_helpers._format_args_and_kwargs
asyncio.format_helpers._format_callback
asyncio.format_helpers._format_callback_source
asyncio.futures.Future.__class_getitem__
asyncio.queues.Queue.__class_getitem__
asyncio.queues.Queue.shutdown
asyncio.queues.QueueShutDown
asyncio.queues.__all__
asyncio.streams.StreamWriter.__del__
asyncio.tasks.Task.__class_getitem__
asyncio.unix_events.EventLoop
asyncio.unix_events._UnixSelectorEventLoop.create_unix_server
asyncio.unix_events.__all__
base64.__all__
base64.z85decode
base64.z85encode
bdb.Bdb.dispatch_opcode
bdb.Bdb.set_stepinstr
bdb.Bdb.user_opcode
builtins.BaseException.add_note
builtins.BaseException.with_traceback
builtins.BaseExceptionGroup.__class_getitem__
builtins.BaseExceptionGroup.derive
builtins.BaseExceptionGroup.split
builtins.BaseExceptionGroup.subgroup
builtins.ExceptionGroup.split
builtins.ExceptionGroup.subgroup
builtins.IncompleteInputError
builtins.PythonFinalizationError
builtins.dict.__class_getitem__
builtins.enumerate.__class_getitem__
builtins.frozenset.__class_getitem__
builtins.list.__class_getitem__
builtins.property.__name__
builtins.property.deleter
builtins.property.getter
builtins.property.setter
builtins.range.count
builtins.range.index
builtins.set.__class_getitem__
builtins.set.add
builtins.set.discard
builtins.set.remove
builtins.slice.indices
builtins.str.format_map
builtins.str.replace
builtins.tuple.__class_getitem__
codecs.backslashreplace_errors
codecs.ignore_errors
codecs.namereplace_errors
codecs.replace_errors
codecs.strict_errors
codecs.xmlcharrefreplace_errors
collections.defaultdict.__class_getitem__
collections.deque.__class_getitem__
concurrent.futures.Future.__class_getitem__
concurrent.futures._base.DoneAndNotDoneFutures.__replace__
concurrent.futures._base.Future.__class_getitem__
concurrent.futures.thread._WorkItem.__class_getitem__
configparser.LegacyInterpolation
configparser.MultilineContinuationError
configparser.ParsingError.__init__
configparser.ParsingError.combine
configparser.RawConfigParser.__init__
configparser.UNNAMED_SECTION
configparser.__all__
contextvars.ContextVar.__class_getitem__
contextvars.Token.__class_getitem__
csv.DictReader.__class_getitem__
csv.DictWriter.__class_getitem__
ctypes.Array.__class_getitem__
ctypes.LibraryLoader.__class_getitem__
ctypes.POINTER
ctypes._endian.DEFAULT_MODE
ctypes._endian.RTLD_GLOBAL
ctypes._endian.RTLD_LOCAL
ctypes._endian.SIZEOF_TIME_T
ctypes._endian.cdll
ctypes._endian.pydll
ctypes._endian.pythonapi
ctypes.addressof
ctypes.alignment
ctypes.c_char_p.from_param
ctypes.c_void_p.from_param
ctypes.c_wchar_p.from_param
ctypes.pointer
ctypes.sizeof
ctypes.wintypes.PCHAR.from_param
ctypes.wintypes.PWCHAR.from_param
dataclasses.Field.__class_getitem__
datetime.date.__replace__
datetime.date.fromisoformat
datetime.datetime.__replace__
datetime.datetime.fromisoformat
datetime.time.__replace__
datetime.time.fromisoformat
datetime.timezone.dst
datetime.timezone.fromutc
datetime.timezone.tzname
datetime.timezone.utcoffset
datetime.tzinfo.dst
datetime.tzinfo.fromutc
datetime.tzinfo.tzname
datetime.tzinfo.utcoffset
dbm.sqlite3
decimal.DecimalTuple.__replace__
difflib.Match.__replace__
difflib.SequenceMatcher.__class_getitem__
dis.Bytecode.__init__
dis.Instruction._disassemble
dis.Instruction.baseopcode
dis.Instruction.baseopname
dis.Instruction.cache_offset
dis.Instruction.end_offset
dis.Instruction.is_jump_target
dis.Instruction.jump_target
dis.Instruction.oparg
dis.Positions.__replace__
dis._Instruction.__replace__
dis.__all__
dis.dis
dis.disassemble
dis.disco
dis.distb
dis.get_instructions
doctest.TestResults.__doc__
doctest.TestResults.__new__
email.utils.getaddresses
email.utils.parseaddr
enum.EnumDict
enum._EnumDict.member_names
enum.__all__
filecmp.dircmp.__class_getitem__
filecmp.dircmp.__init__
fileinput.FileInput.__class_getitem__
functools._CacheInfo.__replace__
functools.cached_property.__class_getitem__
functools.partial.__class_getitem__
functools.partialmethod.__class_getitem__
glob.__all__
glob.translate
graphlib.TopologicalSorter.__class_getitem__
http.cookies.Morsel.__class_getitem__
importlib.metadata.DeprecatedTuple
importlib.metadata.Distribution.origin
importlib.metadata.MetadataPathFinder.invalidate_caches
importlib.metadata._meta.SimplePath.exists
importlib.metadata._meta.SimplePath.read_bytes
importlib.metadata._meta.SimplePath.read_text
importlib.metadata.diagnose
importlib.resources.Anchor
importlib.resources.Resource
importlib.resources.__all__
importlib.resources.contents
importlib.resources.is_resource
importlib.resources.open_binary
importlib.resources.open_text
importlib.resources.path
importlib.resources.read_binary
importlib.resources.read_text
inspect.ArgInfo.__replace__
inspect.Arguments.__replace__
inspect.Attribute.__replace__
inspect.ClosureVars.__replace__
inspect.FullArgSpec.__replace__
inspect._FrameInfo.__replace__
inspect._Traceback.__replace__
io.IOBase._checkClosed
ipaddress.IPv4Address.ipv6_mapped
itertools.chain.__class_getitem__
json.encoder.encode_basestring
json.encoder.encode_basestring_ascii
locale.resetlocale
logging.LoggerAdapter.__class_getitem__
logging.StreamHandler.__class_getitem__
mailbox.Mailbox.__class_getitem__
mailbox.Maildir.add_flag
mailbox.Maildir.get_flags
mailbox.Maildir.get_info
mailbox.Maildir.remove_flag
mailbox.Maildir.set_flags
mailbox.Maildir.set_info
mailbox._ProxyFile.__class_getitem__
math.fma
mimetypes.MimeTypes.guess_file_type
mimetypes.__all__
mimetypes.guess_file_type
mmap.MAP_32BIT
mmap.mmap.seekable
mmap.MAP_NORESERVE
multiprocessing.dummy.Queue.__class_getitem__
multiprocessing.managers.DictProxy.__class_getitem__
multiprocessing.managers.ListProxy.__class_getitem__
multiprocessing.managers.ValueProxy.__class_getitem__
multiprocessing.pool.ApplyResult.__class_getitem__
multiprocessing.queues.Queue.__class_getitem__
multiprocessing.queues.SimpleQueue.__class_getitem__
multiprocessing.shared_memory.ShareableList.__class_getitem__
multiprocessing.shared_memory.SharedMemory.__init__
os.DirEntry.__class_getitem__
os.grantpt
os.posix_openpt
os.ptsname
os.unlockpt
pathlib.Path.__enter__
pathlib.Path.__exit__
pathlib.Path.from_uri
pathlib.Path.glob
pathlib.Path.group
pathlib.Path.is_dir
pathlib.Path.is_file
pathlib.Path.owner
pathlib.Path.read_text
pathlib.Path.rglob
pathlib.PurePath.parser
pathlib.PurePosixPath.parser
pathlib.PureWindowsPath.parser
pathlib.UnsupportedOperation
pathlib.__all__
pdb.Pdb.MAX_CHAINED_EXCEPTION_DEPTH
pdb.Pdb.completedefault
pdb.Pdb.completenames
pdb.Pdb.do_exceptions
pdb.Pdb.execRcLines
pdb.Pdb.interaction
pdb.Pdb.message
pdb.Pdb.user_opcode
pkgutil.ModuleInfo.__replace__
platform.AndroidVer
platform.IOSVersionInfo
platform.android_ver
platform.ios_ver
posix.DirEntry.__class_getitem__
posix.grantpt
posix.posix_openpt
posix.ptsname
posix.unlockpt
pstats.FunctionProfile.__replace__
pstats.StatsProfile.__replace__
pydoc.HTMLDoc.docdata
pydoc.HTMLDoc.docproperty
pydoc.HTMLDoc.docroutine
pydoc.HTMLDoc.parentlink
pydoc.TextDoc.docdata
pydoc.TextDoc.docmodule
pydoc.TextDoc.docother
pydoc.TextDoc.docproperty
pydoc.TextDoc.docroutine
pydoc.pager
pydoc.pipepager
pydoc.plainpager
pydoc.tempfilepager
pydoc.ttypager
queue.Queue.__class_getitem__
queue.SimpleQueue.__class_getitem__
re.Match.__class_getitem__
re.Pattern.__class_getitem__
readline.backend
sched.Event.__replace__
selectors.SelectorKey.__replace__
shutil._ntuple_diskusage.__replace__
site.gethistoryfile
site.register_readline
socket.close
socket.dup
socket.if_indextoname
socket.setdefaulttimeout
sqlite3.Connection.iterdump
sqlite3.dbapi2.Connection.iterdump
sre_compile.SRE_FLAG_TEMPLATE
sre_constants.SRE_FLAG_TEMPLATE
sre_parse.SRE_FLAG_TEMPLATE
ssl.DefaultVerifyPaths.__replace__
stat.S_IFMT
stat.S_IMODE
stat.S_ISBLK
stat.S_ISCHR
stat.S_ISDIR
stat.S_ISDOOR
stat.S_ISFIFO
stat.S_ISLNK
stat.S_ISPORT
stat.S_ISREG
stat.S_ISSOCK
stat.S_ISWHT
stat.filemode
statistics.LinearRegression.__replace__
subprocess.CompletedProcess.__class_getitem__
subprocess.Popen.__class_getitem__
tarfile.TarFile.__init__
tempfile.SpooledTemporaryFile.__class_getitem__
tempfile.TemporaryDirectory.__class_getitem__
threading.stack_size
time.clock_gettime_ns
time.mktime
time.sleep
tkinter.Misc.after_info
tkinter.Misc.busy
tkinter.Misc.busy_cget
tkinter.Misc.busy_config
tkinter.Misc.busy_configure
tkinter.Misc.busy_current
tkinter.Misc.busy_forget
tkinter.Misc.busy_hold
tkinter.Misc.busy_status
tkinter.Misc.tk_busy
tkinter.Misc.tk_busy_cget
tkinter.Misc.tk_busy_config
tkinter.Misc.tk_busy_configure
tkinter.Misc.tk_busy_current
tkinter.Misc.tk_busy_forget
tkinter.Misc.tk_busy_hold
tkinter.Misc.tk_busy_status
tkinter.PhotoImage.copy
tkinter.PhotoImage.copy_replace
tkinter.PhotoImage.data
tkinter.PhotoImage.read
tkinter.PhotoImage.subsample
tkinter.PhotoImage.write
tkinter.PhotoImage.zoom
tkinter.Text.count
tkinter.Wm.wm_attributes
tkinter.tix
trace.CoverageResults.write_results
traceback.StackSummary.should_show_carets
traceback.TracebackException.__init__
traceback.TracebackException.exc_type
traceback.TracebackException.exc_type_str
traceback.TracebackException.format_exception_only
traceback.format_exception_only
turtle.RawTurtle.settiltangle
turtle.__all__
turtle.settiltangle
types.AsyncGeneratorType.__class_getitem__
types.AsyncGeneratorType.asend
types.CodeType.__replace__
types.CoroutineType.__class_getitem__
types.CoroutineType.send
types.GeneratorType.__class_getitem__
types.GeneratorType.send
types.MappingProxyType.__class_getitem__
types.MappingProxyType.get
types.SimpleNamespace.__replace__
typing.ForwardRef._evaluate
typing.ReadOnly
typing.TypeIs
typing.TypeVar.__typing_prepare_subst__
typing.__all__
typing_extensions.ForwardRef._evaluate
typing_extensions.Protocol
typing_extensions.ReadOnly
typing_extensions.TypeIs
unittest.IsolatedAsyncioTestCase.loop_factory
unittest.TestProgram.usageExit
unittest.__all__
unittest._log._LoggingWatcher.__replace__
unittest.async_case.IsolatedAsyncioTestCase.loop_factory
unittest.case._AssertRaisesContext.__class_getitem__
unittest.findTestCases
unittest.getTestCaseNames
unittest.loader.findTestCases
unittest.loader.getTestCaseNames
unittest.loader.makeSuite
unittest.main.TestProgram.usageExit
unittest.makeSuite
unittest.mock.NonCallableMock._calls_repr
unittest.mock.ThreadingMock
unittest.mock.__all__
urllib.parse._DefragResultBase.__replace__
urllib.parse._NetlocResultMixinBase.__class_getitem__
urllib.parse._ParseResultBase.__replace__
urllib.parse._SplitResultBase.__replace__
urllib.robotparser.RequestRate.__replace__
wave._wave_params.__replace__
weakref.ReferenceType.__class_getitem__
weakref.WeakSet.__class_getitem__
weakref.ref.__class_getitem__
zipfile.CompleteDirs.inject
zipfile.ZipInfo.compress_level
zipfile._path.CompleteDirs.inject
zoneinfo.ZoneInfo.fromutc
# These attributes exist on all Python classes on py313+
# (Stubtest handles this on mypy master)
.*\.__firstlineno__
.*\.__static_attributes__
# ======================================
# Pre-existing errors from Python <=3.12
# ======================================
# Modules that exist at runtime, but are missing from typeshed
zipfile._path.glob
# Errors that also existed on Python 3.11
_collections_abc.AsyncIterable.__class_getitem__
_collections_abc.Awaitable.__class_getitem__
_collections_abc.Container.__class_getitem__
_collections_abc.Iterable.__class_getitem__
_collections_abc.MappingView.__class_getitem__
_csv.Reader
_csv.Writer
enum.Enum.__init__
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
tkinter._VersionInfoType.__doc__
typing.NewType.__mro_entries__
builtins.ellipsis # type is not exposed anywhere
# ==========
# Related to positional-only arguments
# ==========
# These are not positional-only at runtime, but we treat them
# as positional-only to match dict.
_collections_abc.MutableMapping.pop
_collections_abc.MutableMapping.setdefault
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
# to mark these as positional-only for compatibility with existing sub-classes.
typing(_extensions)?\.BinaryIO\.write
typing(_extensions)?\.IO\.read
typing(_extensions)?\.IO\.readline
typing(_extensions)?\.IO\.readlines
typing(_extensions)?\.IO\.seek
typing(_extensions)?\.IO\.truncate
typing(_extensions)?\.IO\.write
typing(_extensions)?\.IO\.writelines
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
_collections_abc.Coroutine.send
_collections_abc.Coroutine.throw
_collections_abc.Generator.send
_collections_abc.Generator.throw
# typing.SupportsRound.__round__ # pos-or-kw at runtime, but we pretend it's pos-only in the stub so that e.g. float.__round__ satisfies the interface
types.DynamicClassAttribute..* # In the stub we pretend it's an alias for property, but it has positional-only differences
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
posixpath.join
ntpath.join
os.path.join
# Pos-only parameters had different "names" in different Python versions:
zoneinfo.ZoneInfo.from_file
# ==========
# Allowlist entries that cannot or should not be fixed
# ==========
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
_?ast.pattern.__init__
_?ast.type_param.__init__
_ast.ImportFrom.level # None on the class, but never None on instances
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
_weakref.ProxyType.__reversed__ # Doesn't really exist
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group # deprecated, forwards arguments to super
ast.ImportFrom.level # None on the class, but never None on instances
builtins.property.__set_name__ # Doesn't actually exist
collections\.UserList\.index # ignoring pos-or-keyword parameter
dataclasses.KW_ONLY # white lies around defaults
enum.auto.__init__ # The stub for enum.auto is nothing like the implementation
enum.auto.value # The stub for enum.auto is nothing like the implementation
functools._lru_cache_wrapper.cache_parameters # Cannot be detected statically
http.HTTPMethod.description # mutable instance attribute at runtime but we pretend it's a property
inspect._ParameterKind.description # Still exists, but stubtest can't see it
os.PathLike.__class_getitem__ # PathLike is a protocol; we don't expect all PathLike classes to implement class_getitem
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
types.GenericAlias.__getattr__
types.GenericAlias.__mro_entries__
sys._monitoring # Doesn't really exist. See comments in the stub.
weakref.ProxyType.__reversed__ # Doesn't really exist
importlib.metadata._meta.SimplePath.joinpath # Incorrect runtime definition
# sys attributes that are not always defined
sys.last_exc
# C signature is broader than what is actually accepted
ast.ExtSlice.__new__
ast.Index.__new__
contextvars.Context.__init__
# Treated an alias of a typing class in the stubs,
# they are generic to type checkers anyway.
contextlib.AbstractAsyncContextManager.__class_getitem__
contextlib.AbstractContextManager.__class_getitem__
# platform.uname_result's processor field is now dynamically made to exist
platform.uname_result.__match_args__
platform.uname_result.__new__
platform.uname_result.processor
# Runtime has *args, **kwargs, but will error if any are supplied
unittest.TestCase.__init_subclass__
unittest.case.TestCase.__init_subclass__
# Problematic protocol signature at runtime, see source code comments.
importlib.abc.Traversable.open
importlib.resources.abc.Traversable.open
# Deprecation wrapper classes; their methods are just pass-through, so we can ignore them.
importlib.metadata.DeprecatedNonAbstract.__new__
# Super-special typing primitives
typing\._SpecialForm.*
typing\.NamedTuple
typing\.LiteralString
# These only exist to give a better error message if you try to subclass an instance
typing.ParamSpec.__mro_entries__
typing.ParamSpecArgs.__mro_entries__
typing.ParamSpecKwargs.__mro_entries__
typing.TypeVar.__mro_entries__
typing.TypeVarTuple.__mro_entries__
# TODO: mypy should infer that this attribute is inherited from builtins.type;
# why doesn't it infer this?
typing.SupportsAbs.__type_params__
typing.SupportsRound.__type_params__
typing_extensions.SupportsAbs.__type_params__
typing_extensions.SupportsRound.__type_params__

View File

@@ -42,7 +42,36 @@ gettext.translation # codeset default value is ['unspecified'] so can't be spec
importlib.abc.Finder.find_module
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
lib2to3.pygram.pattern_symbols
lib2to3.pygram.python_symbols
lib2to3.pytree.Base.__new__
lib2to3.pytree.Base.children
lib2to3.pytree.Base.type
lib2to3.pytree.BasePattern.__new__
lib2to3.pytree.BasePattern.type
lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
lib2to3.pgen2.grammar.Grammar.loads
sched.Event.__doc__ # __slots__ is overridden
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
tkinter.tix.CObjView
tkinter.tix.DialogShell
tkinter.tix.ExFileSelectDialog
tkinter.tix.FileSelectDialog
tkinter.tix.FileTypeList
tkinter.tix.Grid
tkinter.tix.NoteBookFrame
tkinter.tix.OptionName
tkinter.tix.ResizeHandle
tkinter.tix.ScrolledGrid
tkinter.tix.ScrolledHList
tkinter.tix.ScrolledListBox
tkinter.tix.ScrolledTList
tkinter.tix.ScrolledText
tkinter.tix.ScrolledWindow
tkinter.tix.Shell
typing.NamedTuple.__new__
typing.NamedTuple._asdict
typing.NamedTuple._make
@@ -111,11 +140,19 @@ tkinter.filedialog.TkVersion
tkinter.filedialog.wantobjects
tkinter.simpledialog.wantobjects
tkinter.tix.wantobjects
lib2to3.btm_utils
lib2to3.fixer_util
lib2to3.patcomp
# ==========
# Allowlist entries that cannot or should not be fixed
# ==========
# Factory function at runtime
# but that wouldn't let us use it in type hints
threading.Lock
multiprocessing.dummy.Lock
# Side effects from module initialization
_compat_pickle.excname
email.contentmanager.maintype
@@ -132,6 +169,23 @@ pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed
pydoc.Helper.symbols_ # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
pydoc.Helper.topic # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
# Undocumented implementation details
cgi.FieldStorage.bufsize
cgi.FieldStorage.read_binary
cgi.FieldStorage.read_lines
cgi.FieldStorage.read_lines_to_eof
cgi.FieldStorage.read_lines_to_outerboundary
cgi.FieldStorage.read_multi
cgi.FieldStorage.read_single
cgi.FieldStorage.read_urlencoded
cgi.FieldStorage.skip_lines
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w
sunau.Au_read.initfp
sunau.Au_write.initfp
typing_extensions\.Annotated
# Adding these reflected dunders to `typing.AbstractSet` causes a large number of false-positives. See #7414.
collections.Set.__rand__
collections.Set.__ror__
@@ -152,6 +206,8 @@ types.GetSetDescriptorType.__get__
types.MemberDescriptorType.__get__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
multiprocessing.managers.DictProxy.clear
multiprocessing.managers.DictProxy.popitem
# We lie about the existence of these methods
.*.__buffer__

View File

@@ -29,12 +29,41 @@ gettext.translation
importlib.abc.Finder.find_module
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
lib2to3.pygram.pattern_symbols
lib2to3.pygram.python_symbols
lib2to3.pytree.Base.__new__
lib2to3.pytree.Base.children
lib2to3.pytree.Base.type
lib2to3.pytree.BasePattern.__new__
lib2to3.pytree.BasePattern.type
lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
lib2to3.pgen2.grammar.Grammar.loads
# platform.uname_result's processor field is now dynamically made to exist
platform.uname_result.__new__
platform.uname_result._fields
platform.uname_result.processor
sched.Event.__doc__ # __slots__ is overridden
tkinter.Tk.split
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
tkinter.tix.CObjView
tkinter.tix.DialogShell
tkinter.tix.ExFileSelectDialog
tkinter.tix.FileSelectDialog
tkinter.tix.FileTypeList
tkinter.tix.Grid
tkinter.tix.NoteBookFrame
tkinter.tix.OptionName
tkinter.tix.ResizeHandle
tkinter.tix.ScrolledGrid
tkinter.tix.ScrolledHList
tkinter.tix.ScrolledListBox
tkinter.tix.ScrolledTList
tkinter.tix.ScrolledText
tkinter.tix.ScrolledWindow
tkinter.tix.Shell
types.GenericAlias.__getattr__
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
weakref.ProxyType.__reversed__ # Doesn't really exist
@@ -89,6 +118,9 @@ hmac.HMAC.inner
hmac.HMAC.outer
types.GenericAlias.__mro_entries__
typing._SpecialForm.__mro_entries__
lib2to3.btm_utils
lib2to3.fixer_util
lib2to3.patcomp
# SpooledTemporaryFile implements IO except these methods before Python 3.11
# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918
@@ -101,6 +133,11 @@ tempfile.SpooledTemporaryFile.writable
# Allowlist entries that cannot or should not be fixed
# ==========
# Factory function at runtime
# but that wouldn't let us use it in type hints
threading.Lock
multiprocessing.dummy.Lock
# Side effects from module initialization
_compat_pickle.excname
email.contentmanager.maintype
@@ -117,6 +154,23 @@ pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed
pydoc.Helper.symbols_ # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
pydoc.Helper.topic # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
# Undocumented implementation details
cgi.FieldStorage.bufsize
cgi.FieldStorage.read_binary
cgi.FieldStorage.read_lines
cgi.FieldStorage.read_lines_to_eof
cgi.FieldStorage.read_lines_to_outerboundary
cgi.FieldStorage.read_multi
cgi.FieldStorage.read_single
cgi.FieldStorage.read_urlencoded
cgi.FieldStorage.skip_lines
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w
sunau.Au_read.initfp
sunau.Au_write.initfp
typing_extensions\.Annotated
# Adding these reflected dunders to `typing.AbstractSet` causes a large number of false-positives. See #7414.
collections.Set.__rand__
collections.Set.__ror__
@@ -144,6 +198,8 @@ types.GetSetDescriptorType.__get__
types.MemberDescriptorType.__get__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
multiprocessing.managers.DictProxy.clear
multiprocessing.managers.DictProxy.popitem
# Problematic protocol signature at runtime, see source code comments.
importlib.abc.Traversable.open

View File

@@ -0,0 +1,4 @@
# Undocumented internal method, not really for public consumption.
# (Hard to add types for unless we add stubs for the undocumented _overlapped module...)
asyncio.IocpProactor.finish_socket_func
asyncio.windows_events.IocpProactor.finish_socket_func