Skip to content

Commit

Permalink
Merge branch 'main' into benchatt/pythongh-11990
Browse files Browse the repository at this point in the history
  • Loading branch information
benchatt committed May 23, 2024
2 parents 868451f + 4bc70e1 commit c153522
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 172 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Install mypy from git
run: pip install git+https://github.com/python/mypy@e8a26308d5d06925cf769b62f41ef2e4bc546ada
- name: Run stubtest
run: python tests/stubtest_stdlib.py

Expand All @@ -70,6 +72,8 @@ jobs:
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Install mypy from git
run: pip install git+https://github.com/python/mypy@e8a26308d5d06925cf769b62f41ef2e4bc546ada
- name: Run stubtest
run: python tests/stubtest_stdlib.py

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/stubtest_stdlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Install mypy from git
run: pip install git+https://github.com/python/mypy@e8a26308d5d06925cf769b62f41ef2e4bc546ada
- name: Run stubtest
run: python tests/stubtest_stdlib.py

Expand All @@ -66,5 +68,7 @@ jobs:
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Install mypy from git
run: pip install git+https://github.com/python/mypy@e8a26308d5d06925cf769b62f41ef2e4bc546ada
- name: Run stubtest
run: python tests/stubtest_stdlib.py
1 change: 0 additions & 1 deletion stdlib/@tests/stubtest_allowlists/darwin-py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ time.CLOCK_UPTIME_RAW_APPROX
webbrowser.MacOSX
_curses.A_ITALIC
curses.A_ITALIC
_decimal.DecimalTuple.__replace__

# TODO: fix
_curses.unget_wch
Expand Down
163 changes: 0 additions & 163 deletions stdlib/@tests/stubtest_allowlists/py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
_ast.PyCF_OPTIMIZED_AST
_collections_abc.dict_items.isdisjoint
_collections_abc.dict_keys.isdisjoint
_ctypes.Array.__class_getitem__
_ctypes.POINTER
_ctypes.addressof
_ctypes.alignment
Expand All @@ -30,29 +29,6 @@ _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
Expand All @@ -61,9 +37,6 @@ _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__
Expand All @@ -76,21 +49,17 @@ 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
Expand All @@ -100,66 +69,34 @@ 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__
bdb.Bdb.dispatch_opcode
bdb.Bdb.set_stepinstr
bdb.Bdb.user_opcode
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
Expand All @@ -177,22 +114,7 @@ ctypes.pointer
ctypes.sizeof
ctypes.wintypes.PCHAR.from_param
ctypes.wintypes.PWCHAR.from_param
dataclasses.Field.__class_getitem__
datetime.date.__replace__
datetime.datetime.__replace__
datetime.time.__replace__
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
Expand All @@ -202,8 +124,6 @@ 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
Expand All @@ -217,17 +137,9 @@ 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
Expand All @@ -245,46 +157,27 @@ 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
Expand Down Expand Up @@ -312,12 +205,10 @@ 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
Expand All @@ -338,49 +229,17 @@ 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
Expand Down Expand Up @@ -418,14 +277,9 @@ 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
Expand All @@ -440,9 +294,7 @@ 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
Expand All @@ -453,24 +305,9 @@ 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
Expand Down
Loading

0 comments on commit c153522

Please sign in to comment.