From 6868eeecb3e72ed8bf974989464a3008dc84d035 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 16 May 2022 17:23:20 -0700 Subject: [PATCH 1/6] stubtest: test against 3.11 --- .github/workflows/daily.yml | 2 +- .github/workflows/tests.yml | 2 +- tests/stubtest_allowlists/py310.txt | 14 + tests/stubtest_allowlists/py311.txt | 425 +++++++++++++++++++++++ tests/stubtest_allowlists/py36.txt | 14 + tests/stubtest_allowlists/py37.txt | 14 + tests/stubtest_allowlists/py38.txt | 14 + tests/stubtest_allowlists/py39.txt | 14 + tests/stubtest_allowlists/py3_common.txt | 14 - tests/stubtest_stdlib.py | 1 + 10 files changed, 498 insertions(+), 16 deletions(-) create mode 100644 tests/stubtest_allowlists/py311.txt diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 964b1f72c01a..9f6e2019021c 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -21,7 +21,7 @@ jobs: matrix: # macos-11 does not have tcl/tk installed, needed for stubtesting tkinter os: ["ubuntu-latest", "windows-latest", "macos-10.15"] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"] fail-fast: false steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a9adcfe398b7..6ff2bccb1c76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -96,7 +96,7 @@ jobs: matrix: # macos-11 does not have tcl/tk installed, needed for stubtesting tkinter os: ["ubuntu-latest", "windows-latest", "macos-10.15"] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"] fail-fast: false steps: diff --git a/tests/stubtest_allowlists/py310.txt b/tests/stubtest_allowlists/py310.txt index 2bd4b701b486..0046b2cdf474 100644 --- a/tests/stubtest_allowlists/py310.txt +++ b/tests/stubtest_allowlists/py310.txt @@ -150,6 +150,8 @@ distutils.dist.DistributionMetadata.set_keywords distutils.dist.DistributionMetadata.set_platforms distutils.util.get_host_platform functools.partial.__vectorcalloffset__ # undocumented implementation detail +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 multiprocessing.managers.SharedMemoryServer.create multiprocessing.managers.SharedMemoryServer.list_segments multiprocessing.managers.SharedMemoryServer.public @@ -163,3 +165,15 @@ unicodedata.UCD.is_normalized xml.parsers.expat.XMLParserType.SkippedEntityHandler xml.parsers.expat.XMLParserType.intern xml.sax.handler.LexicalHandler + +# Side effects from module initialization +_compat_pickle.excname +email.contentmanager.maintype +email.contentmanager.subtype +inspect.k +inspect.mod_dict +inspect.v +json.encoder.i +lib2to3.pgen2.grammar.line +lib2to3.pgen2.grammar.name +lib2to3.pgen2.grammar.op diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt new file mode 100644 index 000000000000..3cfcc5cc79fd --- /dev/null +++ b/tests/stubtest_allowlists/py311.txt @@ -0,0 +1,425 @@ +_ast.ImportFrom.level +_ast.Tuple.dims +_codecs.unregister +_collections_abc.AsyncGenerator.ag_await +_collections_abc.AsyncGenerator.ag_code +_collections_abc.AsyncGenerator.ag_frame +_collections_abc.AsyncGenerator.ag_running +_collections_abc.AsyncGenerator.athrow +_collections_abc.AsyncIterable.__class_getitem__ +_collections_abc.Awaitable.__class_getitem__ +_collections_abc.Container.__class_getitem__ +_collections_abc.Coroutine.send +_collections_abc.Coroutine.throw +_collections_abc.Generator.send +_collections_abc.Generator.throw +_collections_abc.ItemsView.__reversed__ +_collections_abc.Iterable.__class_getitem__ +_collections_abc.KeysView.__reversed__ +_collections_abc.MappingView.__class_getitem__ +_collections_abc.MutableMapping.pop +_collections_abc.MutableMapping.setdefault +_collections_abc.ValuesView.__reversed__ +_csv.Reader +_csv.Writer +_curses.color_pair +_imp.find_frozen +_imp.get_frozen_object +_imp.source_hash +_operator.attrgetter.__vectorcalloffset__ +_operator.itemgetter.__vectorcalloffset__ +_weakref.ProxyType.__reversed__ +argparse._AppendConstAction.__init__ +argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group +argparse._StoreConstAction.__init__ +ast.Bytes.__new__ +ast.Ellipsis.__new__ +ast.ExtSlice.__new__ +ast.ImportFrom.level +ast.Index.__new__ +ast.NameConstant.__new__ +ast.Num.__new__ +ast.Str.__new__ +ast.Tuple.dims +ast.main +asynchat.__warningregistry__ +asyncio.AbstractEventLoop.connect_accepted_socket +asyncio.AbstractEventLoop.create_connection +asyncio.AbstractEventLoop.create_server +asyncio.AbstractEventLoop.create_task +asyncio.AbstractEventLoop.create_unix_connection +asyncio.AbstractEventLoop.create_unix_server +asyncio.AbstractEventLoop.sock_recvfrom +asyncio.AbstractEventLoop.sock_recvfrom_into +asyncio.AbstractEventLoop.sock_sendto +asyncio.AbstractEventLoop.start_tls +asyncio.Barrier +asyncio.BaseEventLoop.connect_accepted_socket +asyncio.BaseEventLoop.create_connection +asyncio.BaseEventLoop.create_server +asyncio.BaseEventLoop.create_task +asyncio.BaseEventLoop.start_tls +asyncio.BoundedSemaphore.__init__ +asyncio.BrokenBarrierError +asyncio.Condition.__init__ +asyncio.Event.__init__ +asyncio.Future.__init__ +asyncio.Lock.__init__ +asyncio.Queue.__init__ +asyncio.Runner +asyncio.SelectorEventLoop.create_unix_connection +asyncio.SelectorEventLoop.create_unix_server +asyncio.Semaphore.__init__ +asyncio.Server.__init__ +asyncio.StreamWriter.start_tls +asyncio.TaskGroup.create_task +asyncio.Timeout +asyncio.base_events.BaseEventLoop.connect_accepted_socket +asyncio.base_events.BaseEventLoop.create_connection +asyncio.base_events.BaseEventLoop.create_server +asyncio.base_events.BaseEventLoop.create_task +asyncio.base_events.BaseEventLoop.start_tls +asyncio.base_events.Server.__init__ +asyncio.constants.FLOW_CONTROL_HIGH_WATER_SSL_READ +asyncio.constants.FLOW_CONTROL_HIGH_WATER_SSL_WRITE +asyncio.constants.SSL_SHUTDOWN_TIMEOUT +asyncio.create_task +asyncio.events.AbstractEventLoop.connect_accepted_socket +asyncio.events.AbstractEventLoop.create_connection +asyncio.events.AbstractEventLoop.create_server +asyncio.events.AbstractEventLoop.create_task +asyncio.events.AbstractEventLoop.create_unix_connection +asyncio.events.AbstractEventLoop.create_unix_server +asyncio.events.AbstractEventLoop.sock_recvfrom +asyncio.events.AbstractEventLoop.sock_recvfrom_into +asyncio.events.AbstractEventLoop.sock_sendto +asyncio.events.AbstractEventLoop.start_tls +asyncio.exceptions.BrokenBarrierError +asyncio.exceptions.__all__ +asyncio.futures.Future.__init__ +asyncio.locks.Barrier +asyncio.locks.BoundedSemaphore.__init__ +asyncio.locks.Condition.__init__ +asyncio.locks.Event.__init__ +asyncio.locks.Lock.__init__ +asyncio.locks.Semaphore.__init__ +asyncio.locks.__all__ +asyncio.mixins._LoopBoundMixin.__init__ +asyncio.proactor_events.BaseProactorEventLoop.sock_recvfrom +asyncio.proactor_events.BaseProactorEventLoop.sock_recvfrom_into +asyncio.proactor_events.BaseProactorEventLoop.sock_sendto +asyncio.queues.Queue.__init__ +asyncio.runners.Runner +asyncio.runners.__all__ +asyncio.selector_events.BaseSelectorEventLoop.sock_recvfrom +asyncio.selector_events.BaseSelectorEventLoop.sock_recvfrom_into +asyncio.selector_events.BaseSelectorEventLoop.sock_sendto +asyncio.sslproto.AppProtocolState +asyncio.sslproto.SSLAgainErrors +asyncio.sslproto.SSLProtocol.__init__ +asyncio.sslproto.SSLProtocol._write_appdata +asyncio.sslproto.SSLProtocol.buffer_updated +asyncio.sslproto.SSLProtocol.get_buffer +asyncio.sslproto.SSLProtocol.max_size +asyncio.sslproto.SSLProtocolState +asyncio.sslproto._SSLProtocolTransport.get_read_buffer_limits +asyncio.sslproto._SSLProtocolTransport.get_read_buffer_size +asyncio.sslproto._SSLProtocolTransport.set_read_buffer_limits +asyncio.sslproto.add_flowcontrol_defaults +asyncio.streams.StreamWriter.start_tls +asyncio.taskgroups.TaskGroup.create_task +asyncio.tasks.create_task +asyncio.timeout +asyncio.timeout_at +asyncio.unix_events.SelectorEventLoop.create_unix_connection +asyncio.unix_events.SelectorEventLoop.create_unix_server +asyncio.unix_events._UnixSelectorEventLoop.create_unix_connection +asyncio.unix_events._UnixSelectorEventLoop.create_unix_server +bdb.Breakpoint.clearBreakpoints +binascii.a2b_base64 +builtins.BaseException.add_note +builtins.dict.get +builtins.property.__set_name__ +concurrent.futures.ProcessPoolExecutor.__init__ +concurrent.futures.process.ProcessPoolExecutor.__init__ +concurrent.futures.process._ResultItem.__init__ +concurrent.futures.process._process_worker +concurrent.futures.process._sendback_result +configparser.LegacyInterpolation.__init__ +contextlib.AbstractAsyncContextManager.__class_getitem__ +contextlib.AbstractContextManager.__class_getitem__ +contextvars.Context.__init__ +curses.color_pair +dataclasses.KW_ONLY +dataclasses.field +dataclasses.make_dataclass +dis.Bytecode.__init__ +dis.Bytecode.from_traceback +dis.dis +dis.disassemble +dis.disco +dis.distb +dis.get_instructions +distutils.command.build_ext.__warningregistry__ +distutils.dist.DistributionMetadata.set_classifiers +distutils.dist.DistributionMetadata.set_keywords +distutils.dist.DistributionMetadata.set_platforms +distutils.util.get_host_platform +enum.Enum.__init__ +enum.Enum._generate_next_value_ +enum.Flag.__iter__ +enum.Flag.__len__ +enum.Flag.__rand__ +enum.Flag.__ror__ +enum.Flag.__rxor__ +enum.StrEnum.value +enum._EnumDict.update +fractions.Fraction.__int__ +fractions.Fraction.__new__ +ftplib.FTP.trust_server_pasv_ipv4_address +functools.partial.__vectorcalloffset__ +gettext.install +hmac.new +http.HTTPMethod.description +http.server.SimpleHTTPRequestHandler.__init__ +imp.get_frozen_object +importlib.abc.Traversable.__init__ +importlib.metadata.EntryPoint.__init__ +importlib.metadata.PackageMetadata.__init__ +importlib.metadata._meta.PackageMetadata.__init__ +importlib.metadata._meta.SimplePath.__init__ +importlib.resources.Resource +inspect._ParameterKind.description +ipaddress.IPv4Interface.hostmask +ipaddress.IPv6Interface.hostmask +ipaddress._BaseNetwork.broadcast_address +ipaddress._BaseNetwork.hostmask +locale.getencoding +logging.LoggerAdapter.__class_getitem__ +logging.StreamHandler.__class_getitem__ +logging.getLevelNamesMapping +logging.handlers.SysLogHandler.createSocket +mmap.MAP_STACK +multiprocessing.managers.SharedMemoryServer.create +multiprocessing.managers.SharedMemoryServer.list_segments +multiprocessing.managers.SharedMemoryServer.public +multiprocessing.managers.SharedMemoryServer.release_segment +multiprocessing.managers.SharedMemoryServer.shutdown +multiprocessing.managers.SharedMemoryServer.track_segment +multiprocessing.spawn._main +ntpath.join +operator.attrgetter.__vectorcalloffset__ +operator.itemgetter.__vectorcalloffset__ +os.EFD_CLOEXEC +os.EFD_NONBLOCK +os.EFD_SEMAPHORE +os.PathLike.__class_getitem__ +os.SPLICE_F_MORE +os.SPLICE_F_MOVE +os.SPLICE_F_NONBLOCK +os.eventfd +os.eventfd_read +os.eventfd_write +os.path.join +os.popen +os.posix_fadvise +os.posix_fallocate +os.sched_getaffinity +os.sched_getparam +os.sched_getscheduler +os.sched_rr_get_interval +os.sched_setaffinity +os.sched_setparam +os.sched_setscheduler +os.sendfile +os.setresgid +os.setresuid +os.splice +os.waitid +pickle.Pickler.reducer_override +platform.uname_result.__match_args__ +platform.uname_result.__new__ +platform.uname_result._fields +platform.uname_result.processor +posix.EFD_CLOEXEC +posix.EFD_NONBLOCK +posix.EFD_SEMAPHORE +posix.SPLICE_F_MORE +posix.SPLICE_F_MOVE +posix.SPLICE_F_NONBLOCK +posix.eventfd +posix.eventfd_read +posix.eventfd_write +posix.posix_fadvise +posix.posix_fallocate +posix.sched_getaffinity +posix.sched_getparam +posix.sched_getscheduler +posix.sched_rr_get_interval +posix.sched_setaffinity +posix.sched_setparam +posix.sched_setscheduler +posix.sendfile +posix.setresgid +posix.setresuid +posix.splice +posix.waitid +posixpath.join +pstats.SortKey.__new__ +pydoc.HTMLDoc.heading +pydoc.HTMLDoc.multicolumn +pydoc.HTMLDoc.section +pyexpat.XMLParserType.SkippedEntityHandler +pyexpat.XMLParserType.intern +pyexpat.errors.XML_ERROR_AMPLIFICATION_LIMIT_BREACH +pyexpat.errors.XML_ERROR_INVALID_ARGUMENT +pyexpat.errors.XML_ERROR_NO_BUFFER +pyexpat.errors.XML_ERROR_RESERVED_NAMESPACE_URI +pyexpat.errors.XML_ERROR_RESERVED_PREFIX_XML +pyexpat.errors.XML_ERROR_RESERVED_PREFIX_XMLNS +queue.SimpleQueue.__init__ +re.Pattern.scanner +re.T +re.TEMPLATE +re.template +select.epoll.register +shutil.rmtree +signal.SIGSTKFLT +signal.Signals.SIGSTKFLT +signal.sigtimedwait +signal.sigwaitinfo +socketserver.UDPServer.allow_reuse_port +sqlite3.Blob +sqlite3.Blob.seek +sqlite3.Connection.deserialize +sqlite3.Connection.serialize +sqlite3.SQLITE_BUSY_TIMEOUT +sqlite3.SQLITE_CORRUPT_INDEX +sqlite3.SQLITE_IOERR_CORRUPTFS +sqlite3.SQLITE_IOERR_DATA +sqlite3.dbapi2.Blob +sqlite3.dbapi2.Blob.seek +sqlite3.dbapi2.Connection.deserialize +sqlite3.dbapi2.Connection.serialize +sqlite3.dbapi2.SQLITE_BUSY_TIMEOUT +sqlite3.dbapi2.SQLITE_CORRUPT_INDEX +sqlite3.dbapi2.SQLITE_IOERR_CORRUPTFS +sqlite3.dbapi2.SQLITE_IOERR_DATA +sre_compile.CALL +sre_compile.SRE_FLAG_TEMPLATE +sre_constants.CALL +sre_constants.SRE_FLAG_TEMPLATE +sre_parse.CALL +sre_parse.SRE_FLAG_TEMPLATE +sre_parse.Tokenizer.checkgroupname +sre_parse.Verbose +ssl.PROTOCOL_SSLv3 +ssl.RAND_egd +ssl.SSLContext.__new__ +ssl._create_unverified_context +string.Template.get_identifiers +string.Template.is_valid +subprocess.getoutput +subprocess.getstatusoutput +symtable.SymbolTable.has_exec +sys.UnraisableHookArgs +sys.exception +tempfile.SpooledTemporaryFile.detach +tempfile.SpooledTemporaryFile.read1 +tempfile.SpooledTemporaryFile.readinto +tempfile.SpooledTemporaryFile.readinto1 +termios.tcgetwinsize +termios.tcsetwinsize +tkinter.EventType.__new__ +tkinter._VersionInfoType.__doc__ +traceback.StackSummary.format_frame_summary +traceback.TracebackException.__init__ +traceback.TracebackException.format +traceback.TracebackException.print +types.ClassMethodDescriptorType.__get__ +types.CodeType.co_exceptiontable +types.CodeType.co_qualname +types.CodeType.replace +types.CoroutineType.cr_suspended +types.DynamicClassAttribute.deleter +types.DynamicClassAttribute.getter +types.DynamicClassAttribute.setter +types.GeneratorType.gi_suspended +types.GenericAlias.__call__ +types.GenericAlias.__getattr__ +types.GenericAlias.__mro_entries__ +types.MethodDescriptorType.__get__ +types.WrapperDescriptorType.__get__ +typing.BinaryIO.write +typing.ForwardRef._evaluate +typing.IO.read +typing.IO.readline +typing.IO.readlines +typing.IO.seek +typing.IO.truncate +typing.IO.write +typing.IO.writelines +typing.NewType.__call__ +typing.NewType.__mro_entries__ +typing.ParamSpec.__typing_subst__ +typing.SupportsAbs.__init__ +typing.SupportsBytes.__init__ +typing.SupportsComplex.__init__ +typing.SupportsFloat.__init__ +typing.SupportsIndex.__init__ +typing.SupportsInt.__init__ +typing.SupportsRound.__init__ +typing.TypeVar.__typing_subst__ +typing.TypeVarTuple.__typing_subst__ +typing._SpecialForm.__call__ +typing._SpecialForm.__init__ +typing._SpecialForm.__mro_entries__ +typing._TypedDict.__delitem__ +typing._TypedDict.__ior__ +typing._TypedDict.__or__ +typing._TypedDict.copy +typing._TypedDict.items +typing._TypedDict.keys +typing._TypedDict.pop +typing._TypedDict.setdefault +typing._TypedDict.update +typing._TypedDict.values +unicodedata.UCD.is_normalized +unittest.TestCase._addSkip +unittest.case.TestCase._addSkip +unittest.doModuleCleanups +urllib.request.FancyURLopener.http_error_308 +urllib.request.HTTPRedirectHandler.http_error_308 +weakref.ProxyType.__reversed__ +weakref.WeakValueDictionary.update +wsgiref.types.ErrorStream.__init__ +wsgiref.types.FileWrapper.__call__ +wsgiref.types.FileWrapper.__init__ +wsgiref.types.InputStream.__init__ +wsgiref.types.InputStream.read +wsgiref.types.InputStream.readline +wsgiref.types.InputStream.readlines +wsgiref.types.StartResponse.__call__ +wsgiref.types.StartResponse.__init__ +wsgiref.types.WSGIApplication +wsgiref.types.WSGIEnvironment.get +wsgiref.types._Readable.__init__ +wsgiref.types._Readable.read +xml.etree.ElementTree.XMLParser.__init__ +xml.etree.cElementTree.XMLParser.__init__ +xml.parsers.expat.XMLParserType.SkippedEntityHandler +xml.parsers.expat.XMLParserType.intern +xml.parsers.expat.errors.XML_ERROR_AMPLIFICATION_LIMIT_BREACH +xml.parsers.expat.errors.XML_ERROR_INVALID_ARGUMENT +xml.parsers.expat.errors.XML_ERROR_NO_BUFFER +xml.parsers.expat.errors.XML_ERROR_RESERVED_NAMESPACE_URI +xml.parsers.expat.errors.XML_ERROR_RESERVED_PREFIX_XML +xml.parsers.expat.errors.XML_ERROR_RESERVED_PREFIX_XMLNS +xml.sax.handler.LexicalHandler +xmlrpc.server.SimpleXMLRPCRequestHandler.rpc_paths +xxlimited.Xxo.x_exports +zipfile.Path.stem +zipfile.Path.suffix +zipfile.Path.suffixes +zipfile.ZipFile.__init__ +zipfile.ZipFile.mkdir diff --git a/tests/stubtest_allowlists/py36.txt b/tests/stubtest_allowlists/py36.txt index 3d4a38c052f5..b37505aa9a48 100644 --- a/tests/stubtest_allowlists/py36.txt +++ b/tests/stubtest_allowlists/py36.txt @@ -42,6 +42,8 @@ dummy_threading.local.__new__ enum.Enum._generate_next_value_ fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve hmac.HMAC.__init__ +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 io.StringIO.readline ipaddress._BaseNetwork.__init__ json.loads @@ -147,3 +149,15 @@ tkinter.dnd.Tester tkinter.dnd.test typing.[A-Z]\w*.__.*__ # many missing typing dunders in py36 xml.dom.xmlbuilder.DocumentLS.async + +# Side effects from module initialization +_compat_pickle.excname +email.contentmanager.maintype +email.contentmanager.subtype +inspect.k +inspect.mod_dict +inspect.v +json.encoder.i +lib2to3.pgen2.grammar.line +lib2to3.pgen2.grammar.name +lib2to3.pgen2.grammar.op diff --git a/tests/stubtest_allowlists/py37.txt b/tests/stubtest_allowlists/py37.txt index cf733aebbdf1..35f3a292a09b 100644 --- a/tests/stubtest_allowlists/py37.txt +++ b/tests/stubtest_allowlists/py37.txt @@ -43,6 +43,8 @@ enum.Enum._generate_next_value_ fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve hmac.HMAC.__init__ http.server.SimpleHTTPRequestHandler.__init__ # *args is expanded +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 ipaddress._BaseNetwork.__init__ json.loads (os|posix).utime @@ -139,3 +141,15 @@ tkinter.filedialog.wantobjects tkinter.simpledialog.wantobjects tkinter.tix.wantobjects typing._SpecialForm.__call__ + +# Side effects from module initialization +_compat_pickle.excname +email.contentmanager.maintype +email.contentmanager.subtype +inspect.k +inspect.mod_dict +inspect.v +json.encoder.i +lib2to3.pgen2.grammar.line +lib2to3.pgen2.grammar.name +lib2to3.pgen2.grammar.op diff --git a/tests/stubtest_allowlists/py38.txt b/tests/stubtest_allowlists/py38.txt index 19543a524579..15107774f066 100644 --- a/tests/stubtest_allowlists/py38.txt +++ b/tests/stubtest_allowlists/py38.txt @@ -52,6 +52,8 @@ gettext.install # codeset default value is ['unspecified'] so can't be specifie gettext.translation # codeset default value is ['unspecified'] so can't be specified hmac.new # Stub is a white lie; see comments in the stub http.server.SimpleHTTPRequestHandler.__init__ # *args is expanded +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 ipaddress.IPv4Interface.hostmask ipaddress.IPv6Interface.hostmask ipaddress._BaseNetwork.broadcast_address @@ -162,3 +164,15 @@ typing._SpecialForm.__call__ unicodedata.UCD.is_normalized xml.parsers.expat.XMLParserType.SkippedEntityHandler xml.parsers.expat.XMLParserType.intern + +# Side effects from module initialization +_compat_pickle.excname +email.contentmanager.maintype +email.contentmanager.subtype +inspect.k +inspect.mod_dict +inspect.v +json.encoder.i +lib2to3.pgen2.grammar.line +lib2to3.pgen2.grammar.name +lib2to3.pgen2.grammar.op diff --git a/tests/stubtest_allowlists/py39.txt b/tests/stubtest_allowlists/py39.txt index f7d2a4dd5ffd..49615c4571ff 100644 --- a/tests/stubtest_allowlists/py39.txt +++ b/tests/stubtest_allowlists/py39.txt @@ -50,6 +50,8 @@ gettext.translation hmac.new # Stub is a white lie; see comments in the stub http.server.SimpleHTTPRequestHandler.__init__ # *args is expanded importlib.abc.Traversable.__init__ # Inherits __init__ from typing.Protocol +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 ipaddress.IPv4Interface.hostmask ipaddress.IPv6Interface.hostmask ipaddress._BaseNetwork.broadcast_address @@ -166,3 +168,15 @@ xml.parsers.expat.XMLParserType.intern # None on the class, but never None on instances ast.FormattedValue.conversion _ast.FormattedValue.conversion + +# Side effects from module initialization +_compat_pickle.excname +email.contentmanager.maintype +email.contentmanager.subtype +inspect.k +inspect.mod_dict +inspect.v +json.encoder.i +lib2to3.pgen2.grammar.line +lib2to3.pgen2.grammar.name +lib2to3.pgen2.grammar.op diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index 89f80407514d..bbfec008bffd 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -114,8 +114,6 @@ importlib.abc.PathEntryFinder.find_spec # Not defined on the actual class, but importlib.machinery.ExtensionFileLoader.get_filename # Wrapped with _check_name decorator which changes runtime signature inspect.Parameter.empty # set as private marker _empty inspect.Signature.empty # set as private marker _empty -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 io.BufferedRandom.truncate io.BufferedReader.seek io.BufferedReader.truncate @@ -483,18 +481,6 @@ turtle.ScrolledCanvas.onResize wave.Wave_read.initfp wave.Wave_write.initfp -# Side effects from module initialization -_compat_pickle.excname -email.contentmanager.maintype -email.contentmanager.subtype -inspect.k -inspect.mod_dict -inspect.v -json.encoder.i -lib2to3.pgen2.grammar.line -lib2to3.pgen2.grammar.name -lib2to3.pgen2.grammar.op - # ========== # Missing from deprecated modules # Any of these can be added if someone needs them diff --git a/tests/stubtest_stdlib.py b/tests/stubtest_stdlib.py index 385e0ef45d62..405e5b4ffaee 100755 --- a/tests/stubtest_stdlib.py +++ b/tests/stubtest_stdlib.py @@ -31,6 +31,7 @@ def run_stubtest(typeshed_dir: Path) -> int: str(allowlist_dir / "py3_common.txt"), "--allowlist", str(allowlist_dir / version_allowlist), + "--generate-allowlist", ] if ignore_unused_allowlist: cmd += ["--ignore-unused-allowlist"] From eefa4a6782c025cef06192494d992277980327d0 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 16 May 2022 18:30:35 -0700 Subject: [PATCH 2/6] iterate --- tests/stubtest_allowlists/darwin-py311.txt | 7 ++++ tests/stubtest_allowlists/linux-py311.txt | 49 ++++++++++++++++++++++ tests/stubtest_allowlists/py310.txt | 10 +++++ tests/stubtest_allowlists/py311.txt | 35 ---------------- tests/stubtest_allowlists/py36.txt | 10 +++++ tests/stubtest_allowlists/py37.txt | 10 +++++ tests/stubtest_allowlists/py38.txt | 10 +++++ tests/stubtest_allowlists/py39.txt | 10 +++++ tests/stubtest_allowlists/py3_common.txt | 9 ---- tests/stubtest_allowlists/win32-py311.txt | 18 ++++++++ 10 files changed, 124 insertions(+), 44 deletions(-) create mode 100644 tests/stubtest_allowlists/darwin-py311.txt create mode 100644 tests/stubtest_allowlists/linux-py311.txt create mode 100644 tests/stubtest_allowlists/win32-py311.txt diff --git a/tests/stubtest_allowlists/darwin-py311.txt b/tests/stubtest_allowlists/darwin-py311.txt new file mode 100644 index 000000000000..3f08864b49bc --- /dev/null +++ b/tests/stubtest_allowlists/darwin-py311.txt @@ -0,0 +1,7 @@ +_?curses.A_ITALIC +_curses.color_pair +curses.color_pair + +# Exists at runtime, but missing from stubs +mmap.MADV_FREE +distutils.util.__warningregistry__ diff --git a/tests/stubtest_allowlists/linux-py311.txt b/tests/stubtest_allowlists/linux-py311.txt new file mode 100644 index 000000000000..e77782e0ca25 --- /dev/null +++ b/tests/stubtest_allowlists/linux-py311.txt @@ -0,0 +1,49 @@ +_curses.color_pair +curses.color_pair +(os|posix).posix_fadvise +(os|posix).posix_fallocate +(os|posix).sched_getaffinity +(os|posix).sched_getparam +(os|posix).sched_getscheduler +(os|posix).sched_rr_get_interval +(os|posix).sched_setaffinity +(os|posix).sched_setparam +(os|posix).sched_setscheduler +(os|posix).setresgid +(os|posix).setresuid +(os|posix).waitid +(os|posix).sendfile +signal.sigtimedwait +signal.sigwaitinfo +select.epoll.register +sqlite3.Connection.deserialize +sqlite3.Connection.serialize +sqlite3.SQLITE_BUSY_TIMEOUT +sqlite3.SQLITE_CORRUPT_INDEX +sqlite3.SQLITE_IOERR_CORRUPTFS +sqlite3.SQLITE_IOERR_DATA +sqlite3.dbapi2.Connection.deserialize +sqlite3.dbapi2.Connection.serialize +sqlite3.dbapi2.SQLITE_BUSY_TIMEOUT +sqlite3.dbapi2.SQLITE_CORRUPT_INDEX +sqlite3.dbapi2.SQLITE_IOERR_CORRUPTFS +sqlite3.dbapi2.SQLITE_IOERR_DATA + +# Exists at runtime, but missing from stubs +distutils.command.build_ext.__warningregistry__ +os.EFD_CLOEXEC +os.EFD_NONBLOCK +os.EFD_SEMAPHORE +os.SPLICE_F_MORE +os.SPLICE_F_MOVE +os.SPLICE_F_NONBLOCK +os.eventfd +os.eventfd_read +os.eventfd_write +os.splice +posix.EFD_[A-Z]+ +posix.SPLICE_[A-Z_]+ +posix.eventfd +posix.eventfd_read +posix.eventfd_write +posix.splice diff --git a/tests/stubtest_allowlists/py310.txt b/tests/stubtest_allowlists/py310.txt index 0046b2cdf474..53706199801c 100644 --- a/tests/stubtest_allowlists/py310.txt +++ b/tests/stubtest_allowlists/py310.txt @@ -128,6 +128,13 @@ tkinter.EventType.__new__ ssl.SSLContext.__new__ ssl._create_unverified_context +# SpooledTemporaryFile implements IO except these methods before Python 3.11 +# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918 +tempfile.SpooledTemporaryFile.__next__ +tempfile.SpooledTemporaryFile.readable +tempfile.SpooledTemporaryFile.seekable +tempfile.SpooledTemporaryFile.writable + # Exists at runtime, but missing from stubs _ast.Tuple.dims _codecs.unregister @@ -177,3 +184,6 @@ json.encoder.i lib2to3.pgen2.grammar.line lib2to3.pgen2.grammar.name lib2to3.pgen2.grammar.op +pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522 +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 diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt index 3cfcc5cc79fd..a187ef9fa3ad 100644 --- a/tests/stubtest_allowlists/py311.txt +++ b/tests/stubtest_allowlists/py311.txt @@ -241,29 +241,6 @@ platform.uname_result.__match_args__ platform.uname_result.__new__ platform.uname_result._fields platform.uname_result.processor -posix.EFD_CLOEXEC -posix.EFD_NONBLOCK -posix.EFD_SEMAPHORE -posix.SPLICE_F_MORE -posix.SPLICE_F_MOVE -posix.SPLICE_F_NONBLOCK -posix.eventfd -posix.eventfd_read -posix.eventfd_write -posix.posix_fadvise -posix.posix_fallocate -posix.sched_getaffinity -posix.sched_getparam -posix.sched_getscheduler -posix.sched_rr_get_interval -posix.sched_setaffinity -posix.sched_setparam -posix.sched_setscheduler -posix.sendfile -posix.setresgid -posix.setresuid -posix.splice -posix.waitid posixpath.join pstats.SortKey.__new__ pydoc.HTMLDoc.heading @@ -291,20 +268,8 @@ signal.sigwaitinfo socketserver.UDPServer.allow_reuse_port sqlite3.Blob sqlite3.Blob.seek -sqlite3.Connection.deserialize -sqlite3.Connection.serialize -sqlite3.SQLITE_BUSY_TIMEOUT -sqlite3.SQLITE_CORRUPT_INDEX -sqlite3.SQLITE_IOERR_CORRUPTFS -sqlite3.SQLITE_IOERR_DATA sqlite3.dbapi2.Blob sqlite3.dbapi2.Blob.seek -sqlite3.dbapi2.Connection.deserialize -sqlite3.dbapi2.Connection.serialize -sqlite3.dbapi2.SQLITE_BUSY_TIMEOUT -sqlite3.dbapi2.SQLITE_CORRUPT_INDEX -sqlite3.dbapi2.SQLITE_IOERR_CORRUPTFS -sqlite3.dbapi2.SQLITE_IOERR_DATA sre_compile.CALL sre_compile.SRE_FLAG_TEMPLATE sre_constants.CALL diff --git a/tests/stubtest_allowlists/py36.txt b/tests/stubtest_allowlists/py36.txt index b37505aa9a48..18105e5b2257 100644 --- a/tests/stubtest_allowlists/py36.txt +++ b/tests/stubtest_allowlists/py36.txt @@ -121,6 +121,13 @@ collections.Generator.gi_yieldfrom collections.Mapping.get # Adding None to the Union messed up mypy collections.Sequence.index # Supporting None in end is not mandatory +# SpooledTemporaryFile implements IO except these methods before Python 3.11 +# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918 +tempfile.SpooledTemporaryFile.__next__ +tempfile.SpooledTemporaryFile.readable +tempfile.SpooledTemporaryFile.seekable +tempfile.SpooledTemporaryFile.writable + # Intentionally omitted because of syntax issues asyncio.async asyncio.tasks.async @@ -161,3 +168,6 @@ json.encoder.i lib2to3.pgen2.grammar.line lib2to3.pgen2.grammar.name lib2to3.pgen2.grammar.op +pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522 +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 diff --git a/tests/stubtest_allowlists/py37.txt b/tests/stubtest_allowlists/py37.txt index 35f3a292a09b..4164ebbf6b72 100644 --- a/tests/stubtest_allowlists/py37.txt +++ b/tests/stubtest_allowlists/py37.txt @@ -96,6 +96,13 @@ collections.Generator.gi_yieldfrom collections.Mapping.get # Adding None to the Union messed up mypy collections.Sequence.index # Supporting None in end is not mandatory +# SpooledTemporaryFile implements IO except these methods before Python 3.11 +# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918 +tempfile.SpooledTemporaryFile.__next__ +tempfile.SpooledTemporaryFile.readable +tempfile.SpooledTemporaryFile.seekable +tempfile.SpooledTemporaryFile.writable + # Exists at runtime, but missing from stubs _dummy_thread.RLock _imp.source_hash @@ -153,3 +160,6 @@ json.encoder.i lib2to3.pgen2.grammar.line lib2to3.pgen2.grammar.name lib2to3.pgen2.grammar.op +pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522 +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 diff --git a/tests/stubtest_allowlists/py38.txt b/tests/stubtest_allowlists/py38.txt index 15107774f066..8655dba7bef3 100644 --- a/tests/stubtest_allowlists/py38.txt +++ b/tests/stubtest_allowlists/py38.txt @@ -111,6 +111,13 @@ collections.Generator.gi_yieldfrom collections.Mapping.get # Adding None to the Union messed up mypy collections.Sequence.index # Supporting None in end is not mandatory +# SpooledTemporaryFile implements IO except these methods before Python 3.11 +# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918 +tempfile.SpooledTemporaryFile.__next__ +tempfile.SpooledTemporaryFile.readable +tempfile.SpooledTemporaryFile.seekable +tempfile.SpooledTemporaryFile.writable + # Exists at runtime, but missing from stubs _dummy_thread.RLock _imp.source_hash @@ -176,3 +183,6 @@ json.encoder.i lib2to3.pgen2.grammar.line lib2to3.pgen2.grammar.name lib2to3.pgen2.grammar.op +pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522 +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 diff --git a/tests/stubtest_allowlists/py39.txt b/tests/stubtest_allowlists/py39.txt index 49615c4571ff..ab3c9985c19e 100644 --- a/tests/stubtest_allowlists/py39.txt +++ b/tests/stubtest_allowlists/py39.txt @@ -169,6 +169,13 @@ xml.parsers.expat.XMLParserType.intern ast.FormattedValue.conversion _ast.FormattedValue.conversion +# SpooledTemporaryFile implements IO except these methods before Python 3.11 +# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918 +tempfile.SpooledTemporaryFile.__next__ +tempfile.SpooledTemporaryFile.readable +tempfile.SpooledTemporaryFile.seekable +tempfile.SpooledTemporaryFile.writable + # Side effects from module initialization _compat_pickle.excname email.contentmanager.maintype @@ -180,3 +187,6 @@ json.encoder.i lib2to3.pgen2.grammar.line lib2to3.pgen2.grammar.name lib2to3.pgen2.grammar.op +pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522 +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 diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index bbfec008bffd..2d42ff9021f8 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -187,12 +187,6 @@ sys.gettotalrefcount # Available on python debug builds sys.implementation # Actually SimpleNamespace but then you wouldn't have convenient attributes sys.thread_info tarfile.TarFile.errors # errors is initialized for some reason as None even though it really only accepts str -# SpooledTemporaryFile implements IO except these methods -# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918 -tempfile.SpooledTemporaryFile.__next__ -tempfile.SpooledTemporaryFile.readable -tempfile.SpooledTemporaryFile.seekable -tempfile.SpooledTemporaryFile.writable threading.Condition.acquire # Condition functions are exported in __init__ threading.Condition.release # Condition functions are exported in __init__ tkinter.simpledialog.[A-Z_]+ @@ -279,9 +273,6 @@ distutils.command.check.SilentReporter # only defined if docutils in installed hmac.HMAC.blocksize # use block_size instead pickle.Pickler.memo # undocumented implementation detail, has different type in C/Python implementations pickle.Unpickler.memo # undocumented implementation detail, has different type in C/Python implementations -pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522 -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 # Dynamically specified by __getattr__, and thus don't exist on the class tempfile._TemporaryFileWrapper.[\w_]+ # stubtest incorrectly highlights the type argument as not having a default value. diff --git a/tests/stubtest_allowlists/win32-py311.txt b/tests/stubtest_allowlists/win32-py311.txt new file mode 100644 index 000000000000..922b76741594 --- /dev/null +++ b/tests/stubtest_allowlists/win32-py311.txt @@ -0,0 +1,18 @@ +# pathlib methods that exist on Windows, but always raise NotImplementedError, +# so are omitted from the stub +pathlib.WindowsPath.is_mount +pathlib.Path.is_mount + +# Exists at runtime, but missing from stubs +_winapi.CreateFileMapping +_winapi.MapViewOfFile +_winapi.OpenFileMapping +_winapi.VirtualQuerySize +asyncio.IocpProactor.recvfrom +asyncio.IocpProactor.sendto +asyncio.windows_events.IocpProactor.recvfrom +asyncio.windows_events.IocpProactor.sendto +distutils.command.build_ext.__warningregistry__ +msvcrt.GetErrorMode +socket.MsgFlag.MSG_ERRQUEUE +subprocess.STARTUPINFO.copy From 5bc314b3fecb5c463e0d6fbffe7a997bd131d322 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 16 May 2022 18:31:15 -0700 Subject: [PATCH 3/6] iterate --- tests/stubtest_allowlists/darwin-py311.txt | 2 + tests/stubtest_allowlists/linux-py310.txt | 26 +++++------- tests/stubtest_allowlists/linux-py311.txt | 34 +++++++-------- tests/stubtest_allowlists/py311.txt | 48 ++++++++-------------- tests/stubtest_allowlists/win32-py311.txt | 2 + tests/stubtest_stdlib.py | 1 - 6 files changed, 46 insertions(+), 67 deletions(-) diff --git a/tests/stubtest_allowlists/darwin-py311.txt b/tests/stubtest_allowlists/darwin-py311.txt index 3f08864b49bc..fc661535ffe1 100644 --- a/tests/stubtest_allowlists/darwin-py311.txt +++ b/tests/stubtest_allowlists/darwin-py311.txt @@ -1,6 +1,8 @@ _?curses.A_ITALIC _curses.color_pair curses.color_pair +termios.tcgetwinsize +termios.tcsetwinsize # Exists at runtime, but missing from stubs mmap.MADV_FREE diff --git a/tests/stubtest_allowlists/linux-py310.txt b/tests/stubtest_allowlists/linux-py310.txt index 378acdecb1fc..79ebc6307587 100644 --- a/tests/stubtest_allowlists/linux-py310.txt +++ b/tests/stubtest_allowlists/linux-py310.txt @@ -1,5 +1,11 @@ _curses.color_pair curses.color_pair +(os|posix).EFD_CLOEXEC +(os|posix).EFD_NONBLOCK +(os|posix).EFD_SEMAPHORE +(os|posix).SPLICE_F_MORE +(os|posix).SPLICE_F_MOVE +(os|posix).SPLICE_F_NONBLOCK (os|posix).posix_fadvise (os|posix).posix_fallocate (os|posix).sched_getaffinity @@ -13,25 +19,13 @@ curses.color_pair (os|posix).setresuid (os|posix).waitid (os|posix).sendfile +(os|posix).eventfd +(os|posix).eventfd_read +(os|posix).eventfd_write +(os|posix).splice signal.sigtimedwait signal.sigwaitinfo select.epoll.register # Exists at runtime, but missing from stubs distutils.command.build_ext.__warningregistry__ -os.EFD_CLOEXEC -os.EFD_NONBLOCK -os.EFD_SEMAPHORE -os.SPLICE_F_MORE -os.SPLICE_F_MOVE -os.SPLICE_F_NONBLOCK -os.eventfd -os.eventfd_read -os.eventfd_write -os.splice -posix.EFD_[A-Z]+ -posix.SPLICE_[A-Z_]+ -posix.eventfd -posix.eventfd_read -posix.eventfd_write -posix.splice diff --git a/tests/stubtest_allowlists/linux-py311.txt b/tests/stubtest_allowlists/linux-py311.txt index e77782e0ca25..e5cb4761ebf4 100644 --- a/tests/stubtest_allowlists/linux-py311.txt +++ b/tests/stubtest_allowlists/linux-py311.txt @@ -1,5 +1,11 @@ _curses.color_pair curses.color_pair +(os|posix).EFD_CLOEXEC +(os|posix).EFD_NONBLOCK +(os|posix).EFD_SEMAPHORE +(os|posix).SPLICE_F_MORE +(os|posix).SPLICE_F_MOVE +(os|posix).SPLICE_F_NONBLOCK (os|posix).posix_fadvise (os|posix).posix_fallocate (os|posix).sched_getaffinity @@ -13,6 +19,12 @@ curses.color_pair (os|posix).setresuid (os|posix).waitid (os|posix).sendfile +(os|posix).eventfd +(os|posix).eventfd_read +(os|posix).eventfd_write +(os|posix).splice +signal.SIGSTKFLT +signal.Signals.SIGSTKFLT signal.sigtimedwait signal.sigwaitinfo select.epoll.register @@ -28,22 +40,6 @@ sqlite3.dbapi2.SQLITE_BUSY_TIMEOUT sqlite3.dbapi2.SQLITE_CORRUPT_INDEX sqlite3.dbapi2.SQLITE_IOERR_CORRUPTFS sqlite3.dbapi2.SQLITE_IOERR_DATA - -# Exists at runtime, but missing from stubs -distutils.command.build_ext.__warningregistry__ -os.EFD_CLOEXEC -os.EFD_NONBLOCK -os.EFD_SEMAPHORE -os.SPLICE_F_MORE -os.SPLICE_F_MOVE -os.SPLICE_F_NONBLOCK -os.eventfd -os.eventfd_read -os.eventfd_write -os.splice -posix.EFD_[A-Z]+ -posix.SPLICE_[A-Z_]+ -posix.eventfd -posix.eventfd_read -posix.eventfd_write -posix.splice +termios.tcgetwinsize +termios.tcsetwinsize +xxlimited.Xxo.x_exports diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt index a187ef9fa3ad..063d5e10ca3b 100644 --- a/tests/stubtest_allowlists/py311.txt +++ b/tests/stubtest_allowlists/py311.txt @@ -117,8 +117,11 @@ asyncio.selector_events.BaseSelectorEventLoop.sock_sendto asyncio.sslproto.AppProtocolState asyncio.sslproto.SSLAgainErrors asyncio.sslproto.SSLProtocol.__init__ +asyncio.sslproto.SSLProtocol._finalize +asyncio.sslproto.SSLProtocol._process_write_backlog asyncio.sslproto.SSLProtocol._write_appdata asyncio.sslproto.SSLProtocol.buffer_updated +asyncio.sslproto.SSLProtocol.data_received asyncio.sslproto.SSLProtocol.get_buffer asyncio.sslproto.SSLProtocol.max_size asyncio.sslproto.SSLProtocolState @@ -131,6 +134,7 @@ asyncio.taskgroups.TaskGroup.create_task asyncio.tasks.create_task asyncio.timeout asyncio.timeout_at +asyncio.trsock.TransportSocket._na asyncio.unix_events.SelectorEventLoop.create_unix_connection asyncio.unix_events.SelectorEventLoop.create_unix_server asyncio.unix_events._UnixSelectorEventLoop.create_unix_connection @@ -178,6 +182,8 @@ fractions.Fraction.__int__ fractions.Fraction.__new__ ftplib.FTP.trust_server_pasv_ipv4_address functools.partial.__vectorcalloffset__ +gettext.NullTranslations.lgettext +gettext.NullTranslations.lngettext gettext.install hmac.new http.HTTPMethod.description @@ -187,7 +193,9 @@ importlib.abc.Traversable.__init__ importlib.metadata.EntryPoint.__init__ importlib.metadata.PackageMetadata.__init__ importlib.metadata._meta.PackageMetadata.__init__ +importlib.metadata._meta.SimplePath.__div__ importlib.metadata._meta.SimplePath.__init__ +importlib.metadata._meta.SimplePath.__truediv__ importlib.resources.Resource inspect._ParameterKind.description ipaddress.IPv4Interface.hostmask @@ -200,6 +208,12 @@ logging.StreamHandler.__class_getitem__ logging.getLevelNamesMapping logging.handlers.SysLogHandler.createSocket mmap.MAP_STACK +modulefinder.EXTENDED_ARG +modulefinder.IMPORT_NAME +modulefinder.LOAD_CONST +modulefinder.STORE_GLOBAL +modulefinder.STORE_NAME +modulefinder.STORE_OPS multiprocessing.managers.SharedMemoryServer.create multiprocessing.managers.SharedMemoryServer.list_segments multiprocessing.managers.SharedMemoryServer.public @@ -210,32 +224,10 @@ multiprocessing.spawn._main ntpath.join operator.attrgetter.__vectorcalloffset__ operator.itemgetter.__vectorcalloffset__ -os.EFD_CLOEXEC -os.EFD_NONBLOCK -os.EFD_SEMAPHORE os.PathLike.__class_getitem__ -os.SPLICE_F_MORE -os.SPLICE_F_MOVE -os.SPLICE_F_NONBLOCK -os.eventfd -os.eventfd_read -os.eventfd_write os.path.join -os.popen -os.posix_fadvise -os.posix_fallocate -os.sched_getaffinity -os.sched_getparam -os.sched_getscheduler -os.sched_rr_get_interval -os.sched_setaffinity -os.sched_setparam -os.sched_setscheduler -os.sendfile -os.setresgid -os.setresuid -os.splice -os.waitid +pdb.Pdb._runmodule +pdb.Pdb._runscript pickle.Pickler.reducer_override platform.uname_result.__match_args__ platform.uname_result.__new__ @@ -261,10 +253,6 @@ re.TEMPLATE re.template select.epoll.register shutil.rmtree -signal.SIGSTKFLT -signal.Signals.SIGSTKFLT -signal.sigtimedwait -signal.sigwaitinfo socketserver.UDPServer.allow_reuse_port sqlite3.Blob sqlite3.Blob.seek @@ -293,8 +281,6 @@ tempfile.SpooledTemporaryFile.detach tempfile.SpooledTemporaryFile.read1 tempfile.SpooledTemporaryFile.readinto tempfile.SpooledTemporaryFile.readinto1 -termios.tcgetwinsize -termios.tcsetwinsize tkinter.EventType.__new__ tkinter._VersionInfoType.__doc__ traceback.StackSummary.format_frame_summary @@ -353,6 +339,7 @@ unicodedata.UCD.is_normalized unittest.TestCase._addSkip unittest.case.TestCase._addSkip unittest.doModuleCleanups +urllib.parse.MAX_CACHE_SIZE urllib.request.FancyURLopener.http_error_308 urllib.request.HTTPRedirectHandler.http_error_308 weakref.ProxyType.__reversed__ @@ -382,7 +369,6 @@ xml.parsers.expat.errors.XML_ERROR_RESERVED_PREFIX_XML xml.parsers.expat.errors.XML_ERROR_RESERVED_PREFIX_XMLNS xml.sax.handler.LexicalHandler xmlrpc.server.SimpleXMLRPCRequestHandler.rpc_paths -xxlimited.Xxo.x_exports zipfile.Path.stem zipfile.Path.suffix zipfile.Path.suffixes diff --git a/tests/stubtest_allowlists/win32-py311.txt b/tests/stubtest_allowlists/win32-py311.txt index 922b76741594..680b2fa5e94e 100644 --- a/tests/stubtest_allowlists/win32-py311.txt +++ b/tests/stubtest_allowlists/win32-py311.txt @@ -3,6 +3,8 @@ pathlib.WindowsPath.is_mount pathlib.Path.is_mount +os.EX_OK + # Exists at runtime, but missing from stubs _winapi.CreateFileMapping _winapi.MapViewOfFile diff --git a/tests/stubtest_stdlib.py b/tests/stubtest_stdlib.py index 405e5b4ffaee..385e0ef45d62 100755 --- a/tests/stubtest_stdlib.py +++ b/tests/stubtest_stdlib.py @@ -31,7 +31,6 @@ def run_stubtest(typeshed_dir: Path) -> int: str(allowlist_dir / "py3_common.txt"), "--allowlist", str(allowlist_dir / version_allowlist), - "--generate-allowlist", ] if ignore_unused_allowlist: cmd += ["--ignore-unused-allowlist"] From aa1d9ad01f4878eecbfcdb6d18122bf4cd448209 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 16 May 2022 18:58:05 -0700 Subject: [PATCH 4/6] iterate --- tests/stubtest_allowlists/darwin-py311.txt | 1 + tests/stubtest_allowlists/darwin.txt | 4 ---- tests/stubtest_allowlists/linux-py311.txt | 1 + tests/stubtest_allowlists/linux.txt | 4 ---- tests/stubtest_allowlists/py311.txt | 19 +------------------ tests/stubtest_allowlists/py3_common.txt | 4 ++++ tests/stubtest_allowlists/win32-py311.txt | 2 ++ 7 files changed, 9 insertions(+), 26 deletions(-) diff --git a/tests/stubtest_allowlists/darwin-py311.txt b/tests/stubtest_allowlists/darwin-py311.txt index fc661535ffe1..575bc923ac63 100644 --- a/tests/stubtest_allowlists/darwin-py311.txt +++ b/tests/stubtest_allowlists/darwin-py311.txt @@ -3,6 +3,7 @@ _curses.color_pair curses.color_pair termios.tcgetwinsize termios.tcsetwinsize +xxlimited.Xxo.x_exports # Exists at runtime, but missing from stubs mmap.MADV_FREE diff --git a/tests/stubtest_allowlists/darwin.txt b/tests/stubtest_allowlists/darwin.txt index b1b2b48b579a..bcf7cc7c043c 100644 --- a/tests/stubtest_allowlists/darwin.txt +++ b/tests/stubtest_allowlists/darwin.txt @@ -39,10 +39,6 @@ posix.SCHED_[A-Z_]+ # Some of these exist on non-windows, but they are useless and this is not intended stat.FILE_ATTRIBUTE_[A-Z_]+ -# Loadable SQLite extensions are disabled on GitHub runners -(sqlite3(.dbapi2)?.Connection.enable_load_extension)? -(sqlite3(.dbapi2)?.Connection.load_extension)? - # Methods that come from __getattr__() at runtime tkinter.Tk.createfilehandler tkinter.Tk.deletefilehandler diff --git a/tests/stubtest_allowlists/linux-py311.txt b/tests/stubtest_allowlists/linux-py311.txt index e5cb4761ebf4..a69558aa3ae2 100644 --- a/tests/stubtest_allowlists/linux-py311.txt +++ b/tests/stubtest_allowlists/linux-py311.txt @@ -1,5 +1,6 @@ _curses.color_pair curses.color_pair +mmap.MAP_STACK (os|posix).EFD_CLOEXEC (os|posix).EFD_NONBLOCK (os|posix).EFD_SEMAPHORE diff --git a/tests/stubtest_allowlists/linux.txt b/tests/stubtest_allowlists/linux.txt index a7692e7b9de3..cef5740126f4 100644 --- a/tests/stubtest_allowlists/linux.txt +++ b/tests/stubtest_allowlists/linux.txt @@ -43,10 +43,6 @@ posix.SCHED_[A-Z_]+ # Some of these exist on non-windows, but they are useless and this is not intended stat.FILE_ATTRIBUTE_[A-Z_]+ -# Loadable SQLite extensions are disabled on GitHub runners -(sqlite3(.dbapi2)?.Connection.enable_load_extension)? -(sqlite3(.dbapi2)?.Connection.load_extension)? - # Methods that come from __getattr__() at runtime tkinter.Tk.createfilehandler tkinter.Tk.deletefilehandler diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt index 063d5e10ca3b..ae43a6d3bfb8 100644 --- a/tests/stubtest_allowlists/py311.txt +++ b/tests/stubtest_allowlists/py311.txt @@ -117,9 +117,6 @@ asyncio.selector_events.BaseSelectorEventLoop.sock_sendto asyncio.sslproto.AppProtocolState asyncio.sslproto.SSLAgainErrors asyncio.sslproto.SSLProtocol.__init__ -asyncio.sslproto.SSLProtocol._finalize -asyncio.sslproto.SSLProtocol._process_write_backlog -asyncio.sslproto.SSLProtocol._write_appdata asyncio.sslproto.SSLProtocol.buffer_updated asyncio.sslproto.SSLProtocol.data_received asyncio.sslproto.SSLProtocol.get_buffer @@ -134,7 +131,6 @@ asyncio.taskgroups.TaskGroup.create_task asyncio.tasks.create_task asyncio.timeout asyncio.timeout_at -asyncio.trsock.TransportSocket._na asyncio.unix_events.SelectorEventLoop.create_unix_connection asyncio.unix_events.SelectorEventLoop.create_unix_server asyncio.unix_events._UnixSelectorEventLoop.create_unix_connection @@ -182,8 +178,6 @@ fractions.Fraction.__int__ fractions.Fraction.__new__ ftplib.FTP.trust_server_pasv_ipv4_address functools.partial.__vectorcalloffset__ -gettext.NullTranslations.lgettext -gettext.NullTranslations.lngettext gettext.install hmac.new http.HTTPMethod.description @@ -193,9 +187,7 @@ importlib.abc.Traversable.__init__ importlib.metadata.EntryPoint.__init__ importlib.metadata.PackageMetadata.__init__ importlib.metadata._meta.PackageMetadata.__init__ -importlib.metadata._meta.SimplePath.__div__ importlib.metadata._meta.SimplePath.__init__ -importlib.metadata._meta.SimplePath.__truediv__ importlib.resources.Resource inspect._ParameterKind.description ipaddress.IPv4Interface.hostmask @@ -207,13 +199,6 @@ logging.LoggerAdapter.__class_getitem__ logging.StreamHandler.__class_getitem__ logging.getLevelNamesMapping logging.handlers.SysLogHandler.createSocket -mmap.MAP_STACK -modulefinder.EXTENDED_ARG -modulefinder.IMPORT_NAME -modulefinder.LOAD_CONST -modulefinder.STORE_GLOBAL -modulefinder.STORE_NAME -modulefinder.STORE_OPS multiprocessing.managers.SharedMemoryServer.create multiprocessing.managers.SharedMemoryServer.list_segments multiprocessing.managers.SharedMemoryServer.public @@ -226,8 +211,7 @@ operator.attrgetter.__vectorcalloffset__ operator.itemgetter.__vectorcalloffset__ os.PathLike.__class_getitem__ os.path.join -pdb.Pdb._runmodule -pdb.Pdb._runscript +os.popen pickle.Pickler.reducer_override platform.uname_result.__match_args__ platform.uname_result.__new__ @@ -339,7 +323,6 @@ unicodedata.UCD.is_normalized unittest.TestCase._addSkip unittest.case.TestCase._addSkip unittest.doModuleCleanups -urllib.parse.MAX_CACHE_SIZE urllib.request.FancyURLopener.http_error_308 urllib.request.HTTPRedirectHandler.http_error_308 weakref.ProxyType.__reversed__ diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index 2d42ff9021f8..53ed7b26e32a 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -370,6 +370,10 @@ socket.AF_DECnet socket.[A-Z0-9_]+ (termios.[A-Z0-9_]+)? +# Loadable SQLite extensions are disabled on GitHub runners +(sqlite3(.dbapi2)?.Connection.enable_load_extension)? +(sqlite3(.dbapi2)?.Connection.load_extension)? + # Missing aliases to existing methods that not many people seem to use. # Complicated multiple inheritance, confuses type checkers. tkinter.Grid.bbox diff --git a/tests/stubtest_allowlists/win32-py311.txt b/tests/stubtest_allowlists/win32-py311.txt index 680b2fa5e94e..7fc8a08ba499 100644 --- a/tests/stubtest_allowlists/win32-py311.txt +++ b/tests/stubtest_allowlists/win32-py311.txt @@ -11,8 +11,10 @@ _winapi.MapViewOfFile _winapi.OpenFileMapping _winapi.VirtualQuerySize asyncio.IocpProactor.recvfrom +asyncio.IocpProactor.recvfrom_into asyncio.IocpProactor.sendto asyncio.windows_events.IocpProactor.recvfrom +asyncio.windows_events.IocpProactor.recvfrom_into asyncio.windows_events.IocpProactor.sendto distutils.command.build_ext.__warningregistry__ msvcrt.GetErrorMode From e3a90c6260a6a62237283015a4ccdc92b200843e Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 16 May 2022 19:13:16 -0700 Subject: [PATCH 5/6] iterate --- tests/stubtest_allowlists/darwin-py310.txt | 5 +++-- tests/stubtest_allowlists/darwin-py311.txt | 9 +++++++-- tests/stubtest_allowlists/darwin-py36.txt | 2 ++ tests/stubtest_allowlists/darwin-py37.txt | 2 ++ tests/stubtest_allowlists/darwin-py38.txt | 2 ++ tests/stubtest_allowlists/darwin-py39.txt | 2 ++ tests/stubtest_allowlists/darwin.txt | 1 - tests/stubtest_allowlists/linux-py310.txt | 2 ++ tests/stubtest_allowlists/linux-py311.txt | 9 +++++++-- tests/stubtest_allowlists/linux-py36.txt | 2 ++ tests/stubtest_allowlists/linux-py37.txt | 2 ++ tests/stubtest_allowlists/linux-py38.txt | 2 ++ tests/stubtest_allowlists/linux-py39.txt | 2 ++ tests/stubtest_allowlists/linux.txt | 1 - tests/stubtest_allowlists/py310.txt | 1 + tests/stubtest_allowlists/py311.txt | 11 +---------- tests/stubtest_allowlists/py36.txt | 1 + tests/stubtest_allowlists/py37.txt | 1 + tests/stubtest_allowlists/py38.txt | 1 + tests/stubtest_allowlists/py39.txt | 1 + tests/stubtest_allowlists/py3_common.txt | 1 - 21 files changed, 41 insertions(+), 19 deletions(-) diff --git a/tests/stubtest_allowlists/darwin-py310.txt b/tests/stubtest_allowlists/darwin-py310.txt index 3f08864b49bc..474902951787 100644 --- a/tests/stubtest_allowlists/darwin-py310.txt +++ b/tests/stubtest_allowlists/darwin-py310.txt @@ -1,6 +1,7 @@ _?curses.A_ITALIC -_curses.color_pair -curses.color_pair +_?curses.color_pair + +distutils.command.bdist_msi # msi is only available on windows # Exists at runtime, but missing from stubs mmap.MADV_FREE diff --git a/tests/stubtest_allowlists/darwin-py311.txt b/tests/stubtest_allowlists/darwin-py311.txt index 575bc923ac63..fcc44b18d8c5 100644 --- a/tests/stubtest_allowlists/darwin-py311.txt +++ b/tests/stubtest_allowlists/darwin-py311.txt @@ -1,6 +1,11 @@ _?curses.A_ITALIC -_curses.color_pair -curses.color_pair +_?curses.color_pair +asyncio.SelectorEventLoop.create_unix_connection +asyncio.SelectorEventLoop.create_unix_server +asyncio.unix_events.SelectorEventLoop.create_unix_connection +asyncio.unix_events.SelectorEventLoop.create_unix_server +asyncio.unix_events._UnixSelectorEventLoop.create_unix_connection +asyncio.unix_events._UnixSelectorEventLoop.create_unix_server termios.tcgetwinsize termios.tcsetwinsize xxlimited.Xxo.x_exports diff --git a/tests/stubtest_allowlists/darwin-py36.txt b/tests/stubtest_allowlists/darwin-py36.txt index 2d6707abf504..55a82f726dbf 100644 --- a/tests/stubtest_allowlists/darwin-py36.txt +++ b/tests/stubtest_allowlists/darwin-py36.txt @@ -4,6 +4,8 @@ pwd.getpwnam ssl.PROTOCOL_SSLv3 # Depends on openssl compilation ssl.RAND_egd # Depends on openssl compilation +distutils.command.bdist_msi # msi is only available on windows + # Exists at runtime, but missing from stubs ntpath.splitunc posix.stat_float_times diff --git a/tests/stubtest_allowlists/darwin-py37.txt b/tests/stubtest_allowlists/darwin-py37.txt index a684628ec299..6ac90f93f3a8 100644 --- a/tests/stubtest_allowlists/darwin-py37.txt +++ b/tests/stubtest_allowlists/darwin-py37.txt @@ -2,3 +2,5 @@ _?curses.A_ITALIC ctypes.wintypes ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154 pwd.getpwnam + +distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/darwin-py38.txt b/tests/stubtest_allowlists/darwin-py38.txt index 1b9e1e10eb83..65ae56ee9892 100644 --- a/tests/stubtest_allowlists/darwin-py38.txt +++ b/tests/stubtest_allowlists/darwin-py38.txt @@ -1,4 +1,6 @@ _?curses.A_ITALIC +distutils.command.bdist_msi # msi is only available on windows + # Exists at runtime, but missing from stubs mmap.MADV_FREE diff --git a/tests/stubtest_allowlists/darwin-py39.txt b/tests/stubtest_allowlists/darwin-py39.txt index 1b9e1e10eb83..65ae56ee9892 100644 --- a/tests/stubtest_allowlists/darwin-py39.txt +++ b/tests/stubtest_allowlists/darwin-py39.txt @@ -1,4 +1,6 @@ _?curses.A_ITALIC +distutils.command.bdist_msi # msi is only available on windows + # Exists at runtime, but missing from stubs mmap.MADV_FREE diff --git a/tests/stubtest_allowlists/darwin.txt b/tests/stubtest_allowlists/darwin.txt index bcf7cc7c043c..c475fdec70ba 100644 --- a/tests/stubtest_allowlists/darwin.txt +++ b/tests/stubtest_allowlists/darwin.txt @@ -4,7 +4,6 @@ curses.COLORS # Initialized after start_color curses.COLOR_PAIRS # Initialized after start_color curses.COLS # Initialized only after initscr call. curses.LINES # Initialized only after initscr call. -distutils.command.bdist_msi # msi is only available on windows os.EX_NOTFOUND os.SF_MNOWAIT os.SF_NODISKIO diff --git a/tests/stubtest_allowlists/linux-py310.txt b/tests/stubtest_allowlists/linux-py310.txt index 79ebc6307587..2f43a04cd206 100644 --- a/tests/stubtest_allowlists/linux-py310.txt +++ b/tests/stubtest_allowlists/linux-py310.txt @@ -27,5 +27,7 @@ signal.sigtimedwait signal.sigwaitinfo select.epoll.register +distutils.command.bdist_msi # msi is only available on windows + # Exists at runtime, but missing from stubs distutils.command.build_ext.__warningregistry__ diff --git a/tests/stubtest_allowlists/linux-py311.txt b/tests/stubtest_allowlists/linux-py311.txt index a69558aa3ae2..02613aa6fafd 100644 --- a/tests/stubtest_allowlists/linux-py311.txt +++ b/tests/stubtest_allowlists/linux-py311.txt @@ -1,5 +1,10 @@ -_curses.color_pair -curses.color_pair +_?curses.color_pair +asyncio.SelectorEventLoop.create_unix_connection +asyncio.SelectorEventLoop.create_unix_server +asyncio.unix_events.SelectorEventLoop.create_unix_connection +asyncio.unix_events.SelectorEventLoop.create_unix_server +asyncio.unix_events._UnixSelectorEventLoop.create_unix_connection +asyncio.unix_events._UnixSelectorEventLoop.create_unix_server mmap.MAP_STACK (os|posix).EFD_CLOEXEC (os|posix).EFD_NONBLOCK diff --git a/tests/stubtest_allowlists/linux-py36.txt b/tests/stubtest_allowlists/linux-py36.txt index a2ca6ef266ca..c0e98713514f 100644 --- a/tests/stubtest_allowlists/linux-py36.txt +++ b/tests/stubtest_allowlists/linux-py36.txt @@ -10,3 +10,5 @@ posix.stat_float_times ssl.OP_ENABLE_MIDDLEBOX_COMPAT ssl.Options.OP_ENABLE_MIDDLEBOX_COMPAT uuid.lib + +distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/linux-py37.txt b/tests/stubtest_allowlists/linux-py37.txt index 15011803b089..2f149957d115 100644 --- a/tests/stubtest_allowlists/linux-py37.txt +++ b/tests/stubtest_allowlists/linux-py37.txt @@ -1,3 +1,5 @@ ctypes.wintypes ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154 pwd.getpwnam + +distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/linux-py38.txt b/tests/stubtest_allowlists/linux-py38.txt index 2c835817c208..a6d01b0eebf9 100644 --- a/tests/stubtest_allowlists/linux-py38.txt +++ b/tests/stubtest_allowlists/linux-py38.txt @@ -1 +1,3 @@ select.epoll.register + +distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/linux-py39.txt b/tests/stubtest_allowlists/linux-py39.txt index 71f4eb92dd40..ac790c104ce0 100644 --- a/tests/stubtest_allowlists/linux-py39.txt +++ b/tests/stubtest_allowlists/linux-py39.txt @@ -1,2 +1,4 @@ (os|posix).sendfile select.epoll.register + +distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/linux.txt b/tests/stubtest_allowlists/linux.txt index cef5740126f4..8933568479f7 100644 --- a/tests/stubtest_allowlists/linux.txt +++ b/tests/stubtest_allowlists/linux.txt @@ -4,7 +4,6 @@ curses.COLORS # Initialized after start_color curses.COLOR_PAIRS # Initialized after start_color curses.COLS # Initialized only after initscr call. curses.LINES # Initialized only after initscr call. -distutils.command.bdist_msi # msi is only available on windows os.EX_NOTFOUND os.SF_MNOWAIT os.SF_NODISKIO diff --git a/tests/stubtest_allowlists/py310.txt b/tests/stubtest_allowlists/py310.txt index 53706199801c..4f4915aa6a21 100644 --- a/tests/stubtest_allowlists/py310.txt +++ b/tests/stubtest_allowlists/py310.txt @@ -72,6 +72,7 @@ ssl.PROTOCOL_SSLv3 # Depends on ssl compilation ssl.RAND_egd # Depends on openssl compilation symtable.SymbolTable.has_exec sys.UnraisableHookArgs # Not exported from sys +tkinter.Tk.split types.ClassMethodDescriptorType.__get__ types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime types.GenericAlias.__getattr__ diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt index ae43a6d3bfb8..1623a0220235 100644 --- a/tests/stubtest_allowlists/py311.txt +++ b/tests/stubtest_allowlists/py311.txt @@ -22,7 +22,6 @@ _collections_abc.MutableMapping.setdefault _collections_abc.ValuesView.__reversed__ _csv.Reader _csv.Writer -_curses.color_pair _imp.find_frozen _imp.get_frozen_object _imp.source_hash @@ -67,8 +66,6 @@ asyncio.Future.__init__ asyncio.Lock.__init__ asyncio.Queue.__init__ asyncio.Runner -asyncio.SelectorEventLoop.create_unix_connection -asyncio.SelectorEventLoop.create_unix_server asyncio.Semaphore.__init__ asyncio.Server.__init__ asyncio.StreamWriter.start_tls @@ -117,8 +114,8 @@ asyncio.selector_events.BaseSelectorEventLoop.sock_sendto asyncio.sslproto.AppProtocolState asyncio.sslproto.SSLAgainErrors asyncio.sslproto.SSLProtocol.__init__ +asyncio.sslproto.SSLProtocol._write_appdata asyncio.sslproto.SSLProtocol.buffer_updated -asyncio.sslproto.SSLProtocol.data_received asyncio.sslproto.SSLProtocol.get_buffer asyncio.sslproto.SSLProtocol.max_size asyncio.sslproto.SSLProtocolState @@ -131,10 +128,6 @@ asyncio.taskgroups.TaskGroup.create_task asyncio.tasks.create_task asyncio.timeout asyncio.timeout_at -asyncio.unix_events.SelectorEventLoop.create_unix_connection -asyncio.unix_events.SelectorEventLoop.create_unix_server -asyncio.unix_events._UnixSelectorEventLoop.create_unix_connection -asyncio.unix_events._UnixSelectorEventLoop.create_unix_server bdb.Breakpoint.clearBreakpoints binascii.a2b_base64 builtins.BaseException.add_note @@ -149,7 +142,6 @@ configparser.LegacyInterpolation.__init__ contextlib.AbstractAsyncContextManager.__class_getitem__ contextlib.AbstractContextManager.__class_getitem__ contextvars.Context.__init__ -curses.color_pair dataclasses.KW_ONLY dataclasses.field dataclasses.make_dataclass @@ -235,7 +227,6 @@ re.Pattern.scanner re.T re.TEMPLATE re.template -select.epoll.register shutil.rmtree socketserver.UDPServer.allow_reuse_port sqlite3.Blob diff --git a/tests/stubtest_allowlists/py36.txt b/tests/stubtest_allowlists/py36.txt index 18105e5b2257..7b1465937f67 100644 --- a/tests/stubtest_allowlists/py36.txt +++ b/tests/stubtest_allowlists/py36.txt @@ -151,6 +151,7 @@ plistlib.Data.fromBase64 ssl.SSLObject.verify_client_post_handshake ssl.SSLSocket.verify_client_post_handshake tempfile.SpooledTemporaryFile.softspace +tkinter.Tk.split tkinter.dnd.Icon tkinter.dnd.Tester tkinter.dnd.test diff --git a/tests/stubtest_allowlists/py37.txt b/tests/stubtest_allowlists/py37.txt index 4164ebbf6b72..dae780ab7306 100644 --- a/tests/stubtest_allowlists/py37.txt +++ b/tests/stubtest_allowlists/py37.txt @@ -130,6 +130,7 @@ ssl.SSLObject.verify_client_post_handshake ssl.SSLSocket.verify_client_post_handshake stringprep.unicodedata # re-exported from unicodedata tempfile.SpooledTemporaryFile.softspace +tkinter.Tk.split tkinter.commondialog.[A-Z_]+ tkinter.commondialog.TclVersion tkinter.commondialog.TkVersion diff --git a/tests/stubtest_allowlists/py38.txt b/tests/stubtest_allowlists/py38.txt index 8655dba7bef3..4b5bfc35db0e 100644 --- a/tests/stubtest_allowlists/py38.txt +++ b/tests/stubtest_allowlists/py38.txt @@ -150,6 +150,7 @@ pyexpat.XMLParserType.SkippedEntityHandler pyexpat.XMLParserType.intern stringprep.unicodedata # re-exported from unicodedata tempfile.SpooledTemporaryFile.softspace +tkinter.Tk.split tkinter.commondialog.[A-Z_]+ tkinter.commondialog.TclVersion tkinter.commondialog.TkVersion diff --git a/tests/stubtest_allowlists/py39.txt b/tests/stubtest_allowlists/py39.txt index ab3c9985c19e..beba4973e9d6 100644 --- a/tests/stubtest_allowlists/py39.txt +++ b/tests/stubtest_allowlists/py39.txt @@ -70,6 +70,7 @@ ssl.PROTOCOL_SSLv3 # Depends on ssl compilation ssl.RAND_egd # Depends on openssl compilation symtable.SymbolTable.has_exec sys.UnraisableHookArgs # Not exported from sys +tkinter.Tk.split types.ClassMethodDescriptorType.__get__ types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime types.GenericAlias.__getattr__ diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index 53ed7b26e32a..ac4b3f7fb304 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -420,7 +420,6 @@ tkinter.Tk.globalsetvar tkinter.Tk.globalunsetvar tkinter.Tk.interpaddr tkinter.Tk.record -tkinter.Tk.split tkinter.Tk.splitlist tkinter.Tk.unsetvar tkinter.Tk.wantobjects From 98533a0fb0230edc91e431b72fb782b6fa891fe4 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 16 May 2022 19:24:04 -0700 Subject: [PATCH 6/6] iterate --- tests/stubtest_allowlists/darwin-py310.txt | 1 + tests/stubtest_allowlists/darwin-py36.txt | 2 ++ tests/stubtest_allowlists/darwin-py37.txt | 1 + tests/stubtest_allowlists/darwin-py38.txt | 1 + tests/stubtest_allowlists/darwin-py39.txt | 1 + tests/stubtest_allowlists/darwin.txt | 1 - tests/stubtest_allowlists/linux-py311.txt | 1 + tests/stubtest_allowlists/py311.txt | 1 - 8 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/stubtest_allowlists/darwin-py310.txt b/tests/stubtest_allowlists/darwin-py310.txt index 474902951787..d53ae663893e 100644 --- a/tests/stubtest_allowlists/darwin-py310.txt +++ b/tests/stubtest_allowlists/darwin-py310.txt @@ -1,5 +1,6 @@ _?curses.A_ITALIC _?curses.color_pair +webbrowser.MacOSXOSAScript.__init__ distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/darwin-py36.txt b/tests/stubtest_allowlists/darwin-py36.txt index 55a82f726dbf..788e7a699d08 100644 --- a/tests/stubtest_allowlists/darwin-py36.txt +++ b/tests/stubtest_allowlists/darwin-py36.txt @@ -6,6 +6,8 @@ ssl.RAND_egd # Depends on openssl compilation distutils.command.bdist_msi # msi is only available on windows +webbrowser.MacOSXOSAScript.__init__ + # Exists at runtime, but missing from stubs ntpath.splitunc posix.stat_float_times diff --git a/tests/stubtest_allowlists/darwin-py37.txt b/tests/stubtest_allowlists/darwin-py37.txt index 6ac90f93f3a8..82684b8177f2 100644 --- a/tests/stubtest_allowlists/darwin-py37.txt +++ b/tests/stubtest_allowlists/darwin-py37.txt @@ -2,5 +2,6 @@ _?curses.A_ITALIC ctypes.wintypes ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154 pwd.getpwnam +webbrowser.MacOSXOSAScript.__init__ distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/darwin-py38.txt b/tests/stubtest_allowlists/darwin-py38.txt index 65ae56ee9892..038ae65a91b1 100644 --- a/tests/stubtest_allowlists/darwin-py38.txt +++ b/tests/stubtest_allowlists/darwin-py38.txt @@ -1,4 +1,5 @@ _?curses.A_ITALIC +webbrowser.MacOSXOSAScript.__init__ distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/darwin-py39.txt b/tests/stubtest_allowlists/darwin-py39.txt index 65ae56ee9892..038ae65a91b1 100644 --- a/tests/stubtest_allowlists/darwin-py39.txt +++ b/tests/stubtest_allowlists/darwin-py39.txt @@ -1,4 +1,5 @@ _?curses.A_ITALIC +webbrowser.MacOSXOSAScript.__init__ distutils.command.bdist_msi # msi is only available on windows diff --git a/tests/stubtest_allowlists/darwin.txt b/tests/stubtest_allowlists/darwin.txt index c475fdec70ba..bbb823a2f4c9 100644 --- a/tests/stubtest_allowlists/darwin.txt +++ b/tests/stubtest_allowlists/darwin.txt @@ -58,4 +58,3 @@ posix.error.characters_written resource.error.characters_written select.POLLRDHUP webbrowser.MacOSX.__init__ -webbrowser.MacOSXOSAScript.__init__ diff --git a/tests/stubtest_allowlists/linux-py311.txt b/tests/stubtest_allowlists/linux-py311.txt index 02613aa6fafd..9c9c3827710d 100644 --- a/tests/stubtest_allowlists/linux-py311.txt +++ b/tests/stubtest_allowlists/linux-py311.txt @@ -5,6 +5,7 @@ asyncio.unix_events.SelectorEventLoop.create_unix_connection asyncio.unix_events.SelectorEventLoop.create_unix_server asyncio.unix_events._UnixSelectorEventLoop.create_unix_connection asyncio.unix_events._UnixSelectorEventLoop.create_unix_server +distutils.command.build_ext.__warningregistry__ mmap.MAP_STACK (os|posix).EFD_CLOEXEC (os|posix).EFD_NONBLOCK diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt index 1623a0220235..ac66c9e11b6f 100644 --- a/tests/stubtest_allowlists/py311.txt +++ b/tests/stubtest_allowlists/py311.txt @@ -152,7 +152,6 @@ dis.disassemble dis.disco dis.distb dis.get_instructions -distutils.command.build_ext.__warningregistry__ distutils.dist.DistributionMetadata.set_classifiers distutils.dist.DistributionMetadata.set_keywords distutils.dist.DistributionMetadata.set_platforms