From 7244ea1f719eb5c3cb206560c3c04c99d7aee2a0 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sat, 12 Jun 2021 15:17:40 -0700 Subject: [PATCH] Test third party stubs with stubtest (#5615) --- .github/workflows/tests.yml | 21 +- .../Deprecated/@tests/stubtest_allowlist.txt | 3 + .../JACK-Client/@tests/stubtest_allowlist.txt | 1 + stubs/Jinja2/@tests/stubtest_allowlist.txt | 111 +++++++++++ stubs/Markdown/@tests/stubtest_allowlist.txt | 12 ++ .../MarkupSafe/@tests/stubtest_allowlist.txt | 10 + stubs/Pillow/@tests/stubtest_allowlist.txt | 15 ++ stubs/PyJWT/@tests/stubtest_allowlist.txt | 11 ++ stubs/PyMySQL/@tests/stubtest_allowlist.txt | 46 +++++ stubs/PyYAML/@tests/stubtest_allowlist.txt | 13 ++ stubs/Werkzeug/@tests/stubtest_allowlist.txt | 149 ++++++++++++++ stubs/aiofiles/@tests/stubtest_allowlist.txt | 27 +++ .../@tests/stubtest_allowlist.txt | 1 + .../@tests/stubtest_allowlist.txt | 1 + stubs/bleach/@tests/stubtest_allowlist.txt | 2 + stubs/boto/@tests/stubtest_allowlist.txt | 9 + .../cachetools/@tests/stubtest_allowlist.txt | 26 +++ stubs/chardet/@tests/stubtest_allowlist.txt | 25 +++ .../@tests/stubtest_allowlist.txt | 2 + stubs/click/@tests/stubtest_allowlist.txt | 19 ++ stubs/colorama/@tests/stubtest_allowlist.txt | 40 ++++ .../contextvars/@tests/stubtest_allowlist.txt | 4 + stubs/croniter/@tests/stubtest_allowlist.txt | 7 + .../@tests/stubtest_allowlist.txt | 43 +++++ .../dataclasses/@tests/stubtest_allowlist.txt | 5 + stubs/decorator/@tests/stubtest_allowlist.txt | 9 + stubs/docutils/@tests/stubtest_allowlist.txt | 12 ++ stubs/freezegun/@tests/stubtest_allowlist.txt | 3 + .../frozendict/@tests/stubtest_allowlist.txt | 5 + stubs/geoip2/@tests/stubtest_allowlist.txt | 15 ++ .../@tests/stubtest_allowlist.txt | 8 + stubs/maxminddb/@tests/stubtest_allowlist.txt | 2 + stubs/mock/@tests/stubtest_allowlist.txt | 7 + .../@tests/stubtest_allowlist.txt | 2 + stubs/nmap/@tests/stubtest_allowlist.txt | 12 ++ stubs/paramiko/@tests/stubtest_allowlist.txt | 30 +++ stubs/polib/@tests/stubtest_allowlist.txt | 2 + stubs/protobuf/@tests/stubtest_allowlist.txt | 182 ++++++++++++++++++ stubs/pycurl/@tests/stubtest_allowlist.txt | 1 + .../@tests/stubtest_allowlist.txt | 10 + .../@tests/stubtest_allowlist.txt | 1 + stubs/pytz/@tests/stubtest_allowlist.txt | 4 + stubs/pyvmomi/@tests/stubtest_allowlist.txt | 8 + stubs/redis/@tests/stubtest_allowlist.txt | 46 +++++ stubs/requests/@tests/stubtest_allowlist.txt | 65 +++++++ .../simplejson/@tests/stubtest_allowlist.txt | 18 ++ stubs/toml/@tests/stubtest_allowlist.txt | 5 + stubs/waitress/@tests/stubtest_allowlist.txt | 59 ++++++ tests/README.md | 17 +- tests/check_consistent.py | 2 +- .../{stubtest_test.py => stubtest_stdlib.py} | 5 +- tests/stubtest_third_party.py | 125 ++++++++++++ tests/stubtest_unused.py | 2 +- 53 files changed, 1249 insertions(+), 11 deletions(-) create mode 100644 stubs/Deprecated/@tests/stubtest_allowlist.txt create mode 100644 stubs/JACK-Client/@tests/stubtest_allowlist.txt create mode 100644 stubs/Jinja2/@tests/stubtest_allowlist.txt create mode 100644 stubs/Markdown/@tests/stubtest_allowlist.txt create mode 100644 stubs/MarkupSafe/@tests/stubtest_allowlist.txt create mode 100644 stubs/Pillow/@tests/stubtest_allowlist.txt create mode 100644 stubs/PyJWT/@tests/stubtest_allowlist.txt create mode 100644 stubs/PyMySQL/@tests/stubtest_allowlist.txt create mode 100644 stubs/PyYAML/@tests/stubtest_allowlist.txt create mode 100644 stubs/Werkzeug/@tests/stubtest_allowlist.txt create mode 100644 stubs/aiofiles/@tests/stubtest_allowlist.txt create mode 100644 stubs/atomicwrites/@tests/stubtest_allowlist.txt create mode 100644 stubs/backports_abc/@tests/stubtest_allowlist.txt create mode 100644 stubs/bleach/@tests/stubtest_allowlist.txt create mode 100644 stubs/boto/@tests/stubtest_allowlist.txt create mode 100644 stubs/cachetools/@tests/stubtest_allowlist.txt create mode 100644 stubs/chardet/@tests/stubtest_allowlist.txt create mode 100644 stubs/click-spinner/@tests/stubtest_allowlist.txt create mode 100644 stubs/click/@tests/stubtest_allowlist.txt create mode 100644 stubs/colorama/@tests/stubtest_allowlist.txt create mode 100644 stubs/contextvars/@tests/stubtest_allowlist.txt create mode 100644 stubs/croniter/@tests/stubtest_allowlist.txt create mode 100644 stubs/cryptography/@tests/stubtest_allowlist.txt create mode 100644 stubs/dataclasses/@tests/stubtest_allowlist.txt create mode 100644 stubs/decorator/@tests/stubtest_allowlist.txt create mode 100644 stubs/docutils/@tests/stubtest_allowlist.txt create mode 100644 stubs/freezegun/@tests/stubtest_allowlist.txt create mode 100644 stubs/frozendict/@tests/stubtest_allowlist.txt create mode 100644 stubs/geoip2/@tests/stubtest_allowlist.txt create mode 100644 stubs/itsdangerous/@tests/stubtest_allowlist.txt create mode 100644 stubs/maxminddb/@tests/stubtest_allowlist.txt create mode 100644 stubs/mock/@tests/stubtest_allowlist.txt create mode 100644 stubs/mypy-extensions/@tests/stubtest_allowlist.txt create mode 100644 stubs/nmap/@tests/stubtest_allowlist.txt create mode 100644 stubs/paramiko/@tests/stubtest_allowlist.txt create mode 100644 stubs/polib/@tests/stubtest_allowlist.txt create mode 100644 stubs/protobuf/@tests/stubtest_allowlist.txt create mode 100644 stubs/pycurl/@tests/stubtest_allowlist.txt create mode 100644 stubs/python-dateutil/@tests/stubtest_allowlist.txt create mode 100644 stubs/python-gflags/@tests/stubtest_allowlist.txt create mode 100644 stubs/pytz/@tests/stubtest_allowlist.txt create mode 100644 stubs/pyvmomi/@tests/stubtest_allowlist.txt create mode 100644 stubs/redis/@tests/stubtest_allowlist.txt create mode 100644 stubs/requests/@tests/stubtest_allowlist.txt create mode 100644 stubs/simplejson/@tests/stubtest_allowlist.txt create mode 100644 stubs/toml/@tests/stubtest_allowlist.txt create mode 100644 stubs/waitress/@tests/stubtest_allowlist.txt rename tests/{stubtest_test.py => stubtest_stdlib.py} (95%) create mode 100644 tests/stubtest_third_party.py diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7789f6079..11c56554f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -94,7 +94,7 @@ jobs: python-version: ${{ matrix.python-version }} no-comments: ${{ matrix.python-version != '3.9' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy. - stubtest: + stubtest-stdlib: name: Check stdlib with stubtest runs-on: ${{ matrix.os }} strategy: @@ -112,4 +112,21 @@ jobs: - name: Install dependencies run: pip install $(grep mypy== requirements-tests-py3.txt) - name: Run stubtest - run: python tests/stubtest_test.py --ignore-unused-allowlist + run: python tests/stubtest_stdlib.py --ignore-unused-allowlist + + stubtest-third-party: + name: Check third party stubs with stubtest + runs-on: ubuntu-latest + strategy: + matrix: + shard-index: [0, 1] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: pip install toml + - name: Run stubtest + run: python tests/stubtest_third_party.py --num-shards 2 --shard-index ${{ matrix.shard-index }} diff --git a/stubs/Deprecated/@tests/stubtest_allowlist.txt b/stubs/Deprecated/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..5aea61c8a --- /dev/null +++ b/stubs/Deprecated/@tests/stubtest_allowlist.txt @@ -0,0 +1,3 @@ +deprecated.sphinx.SphinxAdapter.__init__ +deprecated.sphinx.versionadded +deprecated.sphinx.versionchanged diff --git a/stubs/JACK-Client/@tests/stubtest_allowlist.txt b/stubs/JACK-Client/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..b0b1dbc66 --- /dev/null +++ b/stubs/JACK-Client/@tests/stubtest_allowlist.txt @@ -0,0 +1 @@ +jack diff --git a/stubs/Jinja2/@tests/stubtest_allowlist.txt b/stubs/Jinja2/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..9f63edb2a --- /dev/null +++ b/stubs/Jinja2/@tests/stubtest_allowlist.txt @@ -0,0 +1,111 @@ +jinja2.Environment.__init__ +jinja2.Environment.extract_translations +jinja2.Environment.handle_exception +jinja2.Environment.install_gettext_callables +jinja2.Environment.install_gettext_translations +jinja2.Environment.install_null_translations +jinja2.Environment.uninstall_gettext_translations +jinja2.Markup.__getslice__ +jinja2.Markup.__mod__ +jinja2.Markup.center +jinja2.Markup.ljust +jinja2.Markup.lstrip +jinja2.Markup.replace +jinja2.Markup.rjust +jinja2.Markup.rstrip +jinja2.Markup.strip +jinja2.Markup.translate +jinja2.Markup.zfill +jinja2.Template.__new__ +jinja2.TemplateError.__unicode__ +jinja2._compat.get_next +jinja2._stringdefs +jinja2.compiler.CodeGenerator.__init__ +jinja2.compiler.CodeGenerator.binop +jinja2.compiler.CodeGenerator.export_assigned_vars +jinja2.compiler.CodeGenerator.function_scoping +jinja2.compiler.CodeGenerator.macro_body +jinja2.compiler.CodeGenerator.macro_def +jinja2.compiler.CodeGenerator.make_assignment_frame +jinja2.compiler.CodeGenerator.pop_scope +jinja2.compiler.CodeGenerator.pull_locals +jinja2.compiler.CodeGenerator.push_scope +jinja2.compiler.CodeGenerator.return_buffer_contents +jinja2.compiler.CodeGenerator.uaop +jinja2.compiler.CodeGenerator.unoptimize_scope +jinja2.compiler.Frame.__init__ +jinja2.compiler.Frame.find_shadowed +jinja2.compiler.Frame.inner +jinja2.compiler.Frame.inspect +jinja2.compiler.FrameIdentifierVisitor +jinja2.compiler.Identifiers +jinja2.compiler.generate +jinja2.compiler.unoptimize_before_dead_code +jinja2.debug.ProcessedTraceback +jinja2.debug.TracebackFrameProxy +jinja2.debug.fake_exc_info +jinja2.debug.make_frame_proxy +jinja2.debug.make_traceback +jinja2.debug.raise_helper +jinja2.debug.tproxy +jinja2.debug.translate_exception +jinja2.debug.translate_syntax_error +jinja2.environment.Environment.__init__ +jinja2.environment.Environment.extract_translations +jinja2.environment.Environment.handle_exception +jinja2.environment.Environment.install_gettext_callables +jinja2.environment.Environment.install_gettext_translations +jinja2.environment.Environment.install_null_translations +jinja2.environment.Environment.uninstall_gettext_translations +jinja2.environment.Template.__new__ +jinja2.environment.TemplateModule.__init__ +jinja2.environment.get_spontaneous_environment +jinja2.exceptions.TemplateError.__unicode__ +jinja2.ext.ExtensionRegistry.__new__ +jinja2.filters.do_dictsort +jinja2.filters.do_indent +jinja2.filters.do_random +jinja2.filters.do_trim +jinja2.filters.do_truncate +jinja2.filters.do_urlize +jinja2.filters.do_wordwrap +jinja2.filters.make_attrgetter +jinja2.meta.TrackingCodeGenerator.pull_locals +jinja2.optimizer.Optimizer.fold +jinja2.optimizer.Optimizer.visit_If +jinja2.parser.Parser.parse_add +jinja2.parser.Parser.parse_assign_target +jinja2.parser.Parser.parse_div +jinja2.parser.Parser.parse_floordiv +jinja2.parser.Parser.parse_mod +jinja2.parser.Parser.parse_mul +jinja2.parser.Parser.parse_sub +jinja2.runtime.Context.call +jinja2.runtime.LoopContext.__init__ +jinja2.runtime.LoopContext.loop +jinja2.runtime.LoopContextIterator +jinja2.runtime.Macro.__init__ +jinja2.runtime.Markup.__getslice__ +jinja2.runtime.Markup.__mod__ +jinja2.runtime.Markup.center +jinja2.runtime.Markup.ljust +jinja2.runtime.Markup.lstrip +jinja2.runtime.Markup.replace +jinja2.runtime.Markup.rjust +jinja2.runtime.Markup.rstrip +jinja2.runtime.Markup.strip +jinja2.runtime.Markup.translate +jinja2.runtime.Markup.zfill +jinja2.sandbox.SandboxedEnvironment.call +jinja2.tests.test_equalto +jinja2.utils.Markup.__getslice__ +jinja2.utils.Markup.__mod__ +jinja2.utils.Markup.center +jinja2.utils.Markup.ljust +jinja2.utils.Markup.lstrip +jinja2.utils.Markup.replace +jinja2.utils.Markup.rjust +jinja2.utils.Markup.rstrip +jinja2.utils.Markup.strip +jinja2.utils.Markup.translate +jinja2.utils.Markup.zfill diff --git a/stubs/Markdown/@tests/stubtest_allowlist.txt b/stubs/Markdown/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..c3c674c2d --- /dev/null +++ b/stubs/Markdown/@tests/stubtest_allowlist.txt @@ -0,0 +1,12 @@ +markdown.blockprocessors.BlockProcessor.detab +markdown.extensions.abbr.ABBR_REF_RE +markdown.extensions.attr_list.AttrListTreeprocessor.run +markdown.extensions.codehilite.CodeHilite.__init__ +markdown.extensions.fenced_code.FencedBlockPreprocessor.__init__ +markdown.extensions.footnotes.DEF_RE +markdown.extensions.footnotes.FootnotePreprocessor +markdown.extensions.footnotes.TABBED_RE +markdown.extensions.legacy_attrs.LegacyAttrs.run +markdown.extensions.toc.TocTreeprocessor.run +markdown.extensions.toc.slugify +markdown.preprocessors.ReferencePreprocessor diff --git a/stubs/MarkupSafe/@tests/stubtest_allowlist.txt b/stubs/MarkupSafe/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..902ba7dbd --- /dev/null +++ b/stubs/MarkupSafe/@tests/stubtest_allowlist.txt @@ -0,0 +1,10 @@ +markupsafe.Markup.__getslice__ +markupsafe.Markup.__mod__ +markupsafe.Markup.capitalize +markupsafe.Markup.lower +markupsafe.Markup.swapcase +markupsafe.Markup.title +markupsafe.Markup.upper +markupsafe._compat.int_types +markupsafe._compat.iteritems +markupsafe._compat.string_types diff --git a/stubs/Pillow/@tests/stubtest_allowlist.txt b/stubs/Pillow/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..18a3de965 --- /dev/null +++ b/stubs/Pillow/@tests/stubtest_allowlist.txt @@ -0,0 +1,15 @@ +PIL.Image.Image.category +PIL.Image.Image.resize +PIL.Image.fromarray +PIL.Image.open +PIL.ImageDraw.ImageDraw.multiline_text +PIL.ImageDraw.ImageDraw.multiline_textbbox +PIL.ImageDraw.ImageDraw.textbbox +PIL.ImageFile.ImageFile.__getattr__ +PIL.ImageFile.ImageFile.__init__ +PIL.ImageFont.FreeTypeFont.getlength +PIL.ImageFont.FreeTypeFont.getmask +PIL.ImageFont.FreeTypeFont.getmask2 +PIL.ImageFont.FreeTypeFont.getsize +PIL.ImageFont.FreeTypeFont.getsize_multiline +PIL.__getattr__ diff --git a/stubs/PyJWT/@tests/stubtest_allowlist.txt b/stubs/PyJWT/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..a7f07d20d --- /dev/null +++ b/stubs/PyJWT/@tests/stubtest_allowlist.txt @@ -0,0 +1,11 @@ +jwt.InvalidKeyError +jwt.MissingRequiredClaimError.__init__ +jwt.algorithms.ECAlgorithm +jwt.algorithms.Ed25519Algorithm +jwt.algorithms.HMACAlgorithm.SHA256 +jwt.algorithms.HMACAlgorithm.SHA384 +jwt.algorithms.HMACAlgorithm.SHA512 +jwt.algorithms.RSAAlgorithm +jwt.algorithms.RSAPSSAlgorithm +jwt.contrib.algorithms.py_ecdsa +jwt.contrib.algorithms.pycrypto diff --git a/stubs/PyMySQL/@tests/stubtest_allowlist.txt b/stubs/PyMySQL/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..7025f9aee --- /dev/null +++ b/stubs/PyMySQL/@tests/stubtest_allowlist.txt @@ -0,0 +1,46 @@ +pymysql.Connect +pymysql.connections.Connection.__init__ +pymysql.connections.byte2int +pymysql.connections.int2byte +pymysql.connections.lenenc_int +pymysql.connections.pack_int24 +pymysql.converters.ESCAPE_MAP +pymysql.converters.ESCAPE_REGEX +pymysql.converters.FLAG +pymysql.converters.PYTHON3 +pymysql.converters.charset_by_id +pymysql.converters.convert_bit +pymysql.converters.convert_characters +pymysql.converters.convert_date +pymysql.converters.convert_datetime +pymysql.converters.convert_decimal +pymysql.converters.convert_float +pymysql.converters.convert_int +pymysql.converters.convert_long +pymysql.converters.convert_mysql_timestamp +pymysql.converters.convert_set +pymysql.converters.convert_time +pymysql.converters.convert_timedelta +pymysql.converters.escape_None +pymysql.converters.escape_bool +pymysql.converters.escape_date +pymysql.converters.escape_datetime +pymysql.converters.escape_decimal +pymysql.converters.escape_dict +pymysql.converters.escape_float +pymysql.converters.escape_item +pymysql.converters.escape_long +pymysql.converters.escape_object +pymysql.converters.escape_sequence +pymysql.converters.escape_set +pymysql.converters.escape_string +pymysql.converters.escape_struct_time +pymysql.converters.escape_time +pymysql.converters.escape_timedelta +pymysql.converters.escape_unicode +pymysql.cursors.Cursor.__del__ +pymysql.err.ER +pymysql.escape_dict +pymysql.escape_sequence +pymysql.escape_string +pymysql.util diff --git a/stubs/PyYAML/@tests/stubtest_allowlist.txt b/stubs/PyYAML/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..c5e594fd1 --- /dev/null +++ b/stubs/PyYAML/@tests/stubtest_allowlist.txt @@ -0,0 +1,13 @@ +yaml.CBaseDumper.__init__ +yaml.CDangerDumper +yaml.CDangerLoader +yaml.CDumper.__init__ +yaml.CEmitter +yaml.CParser +yaml.YAMLObjectMetaclass.__init__ +yaml.add_constructor +yaml.constructor.FullConstructor.set_python_instance_state +yaml.cyaml.CBaseDumper.__init__ +yaml.cyaml.CDangerDumper +yaml.cyaml.CDangerLoader +yaml.cyaml.CDumper.__init__ diff --git a/stubs/Werkzeug/@tests/stubtest_allowlist.txt b/stubs/Werkzeug/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..297b1673a --- /dev/null +++ b/stubs/Werkzeug/@tests/stubtest_allowlist.txt @@ -0,0 +1,149 @@ +werkzeug.HTTP_STATUS_CODES +werkzeug._compat.BytesIO.readlines +werkzeug._compat.BytesIO.seek +werkzeug._compat.StringIO.seek +werkzeug._compat.StringIO.truncate +werkzeug._compat.fix_tuple_repr +werkzeug._compat.implements_bool +werkzeug._compat.implements_iterator +werkzeug._compat.implements_to_string +werkzeug._compat.native_string_result +werkzeug._compat.try_coerce_native +werkzeug.append_slash_redirect +werkzeug.bind_arguments +werkzeug.check_password_hash +werkzeug.contrib +werkzeug.contrib.atom +werkzeug.contrib.cache +werkzeug.contrib.fixers +werkzeug.contrib.iterio +werkzeug.contrib.jsrouting +werkzeug.contrib.limiter +werkzeug.contrib.lint +werkzeug.contrib.profiler +werkzeug.contrib.securecookie +werkzeug.contrib.sessions +werkzeug.contrib.testtools +werkzeug.contrib.wrappers +werkzeug.cookie_date +werkzeug.create_environ +werkzeug.datastructures.Headers.__delitem__ +werkzeug.datastructures.Headers.pop +werkzeug.datastructures.Headers.setdefault +werkzeug.datastructures.Headers.to_list +werkzeug.datastructures.ImmutableDictMixin.fromkeys +werkzeug.datastructures.ImmutableHeadersMixin.add +werkzeug.datastructures.ImmutableHeadersMixin.pop +werkzeug.debug.DebuggedApplication.__init__ +werkzeug.debug.tbtools.Frame.console +werkzeug.debug.tbtools.Frame.render +werkzeug.debug.tbtools.Frame.sourcelines +werkzeug.debug.tbtools.Line.classes +werkzeug.debug.tbtools.Traceback.exception +werkzeug.debug.tbtools.Traceback.generate_plaintext_traceback +werkzeug.debug.tbtools.Traceback.is_syntax_error +werkzeug.debug.tbtools.Traceback.plaintext +werkzeug.dump_cookie +werkzeug.dump_header +werkzeug.dump_options_header +werkzeug.escape +werkzeug.exceptions.BadRequestKeyError.__init__ +werkzeug.extract_path_info +werkzeug.find_modules +werkzeug.format_string +werkzeug.generate_etag +werkzeug.generate_password_hash +werkzeug.get_current_url +werkzeug.get_host +werkzeug.html +werkzeug.http.dump_age +werkzeug.http.dump_cookie +werkzeug.http.parse_accept_header +werkzeug.http.parse_cache_control_header +werkzeug.http_date +werkzeug.import_string +werkzeug.iri_to_uri +werkzeug.is_entity_header +werkzeug.is_hop_by_hop_header +werkzeug.is_resource_modified +werkzeug.local.LocalProxy.__delslice__ +werkzeug.local.LocalProxy.__dict__ +werkzeug.local.LocalProxy.__setslice__ +werkzeug.local.LocalStack._get__ident_func__ +werkzeug.local.LocalStack._set__ident_func__ +werkzeug.make_line_iter +werkzeug.middleware.proxy_fix.ProxyFix.__init__ +werkzeug.middleware.proxy_fix.ProxyFix.get_remote_addr +werkzeug.middleware.shared_data.SharedDataMiddleware.__call__ +werkzeug.module +werkzeug.parse_accept_header +werkzeug.parse_authorization_header +werkzeug.parse_cache_control_header +werkzeug.parse_cookie +werkzeug.parse_date +werkzeug.parse_dict_header +werkzeug.parse_etags +werkzeug.parse_form_data +werkzeug.parse_list_header +werkzeug.parse_options_header +werkzeug.parse_set_header +werkzeug.parse_www_authenticate_header +werkzeug.peek_path_info +werkzeug.pop_path_info +werkzeug.posixemulation.rename +werkzeug.quote_etag +werkzeug.quote_header_value +werkzeug.redirect +werkzeug.release_local +werkzeug.remove_entity_headers +werkzeug.remove_hop_by_hop_headers +werkzeug.responder +werkzeug.routing.FloatConverter.__init__ +werkzeug.routing.Map.__init__ +werkzeug.routing.MapAdapter.match +werkzeug.routing.NumberConverter.__init__ +werkzeug.routing.RequestRedirect.get_response +werkzeug.routing.RequestSlash +werkzeug.routing.Rule.__init__ +werkzeug.run_wsgi_app +werkzeug.script +werkzeug.secure_filename +werkzeug.serving.select_ip_version +werkzeug.test.Client.set_cookie +werkzeug.test.EnvironBuilder.__init__ +werkzeug.test.File +werkzeug.test_app +werkzeug.unescape +werkzeug.unquote_etag +werkzeug.unquote_header_value +werkzeug.uri_to_iri +werkzeug.url_decode +werkzeug.url_encode +werkzeug.url_fix +werkzeug.url_quote +werkzeug.url_quote_plus +werkzeug.url_unquote +werkzeug.url_unquote_plus +werkzeug.utils.escape +werkzeug.validate_arguments +werkzeug.wrap_file +werkzeug.wrappers.BaseRequest.input_stream +werkzeug.wrappers.BaseRequest.is_multiprocess +werkzeug.wrappers.BaseRequest.is_multithread +werkzeug.wrappers.BaseRequest.is_run_once +werkzeug.wrappers.BaseRequest.max_form_memory_size +werkzeug.wrappers.BaseRequest.method +werkzeug.wrappers.BaseRequest.query_string +werkzeug.wrappers.BaseRequest.remote_user +werkzeug.wrappers.BaseRequest.scheme +werkzeug.wrappers.BaseResponse.freeze +werkzeug.wrappers.CommonResponseDescriptorsMixin.content_encoding +werkzeug.wrappers.CommonResponseDescriptorsMixin.content_length +werkzeug.wrappers.CommonResponseDescriptorsMixin.content_location +werkzeug.wrappers.CommonResponseDescriptorsMixin.content_md5 +werkzeug.wrappers.CommonResponseDescriptorsMixin.content_type +werkzeug.wrappers.CommonResponseDescriptorsMixin.location +werkzeug.wsgi.DispatcherMiddleware +werkzeug.wsgi.ProxyMiddleware +werkzeug.wsgi.SharedDataMiddleware +werkzeug.xhtml diff --git a/stubs/aiofiles/@tests/stubtest_allowlist.txt b/stubs/aiofiles/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..0a5668c9a --- /dev/null +++ b/stubs/aiofiles/@tests/stubtest_allowlist.txt @@ -0,0 +1,27 @@ +aiofiles.threadpool.binary.AsyncBufferedIOBase.close +aiofiles.threadpool.binary.AsyncBufferedIOBase.detach +aiofiles.threadpool.binary.AsyncBufferedIOBase.fileno +aiofiles.threadpool.binary.AsyncBufferedIOBase.flush +aiofiles.threadpool.binary.AsyncBufferedIOBase.isatty +aiofiles.threadpool.binary.AsyncBufferedIOBase.readable +aiofiles.threadpool.binary.AsyncBufferedIOBase.seekable +aiofiles.threadpool.binary.AsyncBufferedIOBase.tell +aiofiles.threadpool.binary.AsyncBufferedIOBase.writable +aiofiles.threadpool.binary.AsyncFileIO.close +aiofiles.threadpool.binary.AsyncFileIO.fileno +aiofiles.threadpool.binary.AsyncFileIO.flush +aiofiles.threadpool.binary.AsyncFileIO.isatty +aiofiles.threadpool.binary.AsyncFileIO.readable +aiofiles.threadpool.binary.AsyncFileIO.readall +aiofiles.threadpool.binary.AsyncFileIO.seekable +aiofiles.threadpool.binary.AsyncFileIO.tell +aiofiles.threadpool.binary.AsyncFileIO.writable +aiofiles.threadpool.text.AsyncTextIOWrapper.close +aiofiles.threadpool.text.AsyncTextIOWrapper.detach +aiofiles.threadpool.text.AsyncTextIOWrapper.fileno +aiofiles.threadpool.text.AsyncTextIOWrapper.flush +aiofiles.threadpool.text.AsyncTextIOWrapper.isatty +aiofiles.threadpool.text.AsyncTextIOWrapper.readable +aiofiles.threadpool.text.AsyncTextIOWrapper.seekable +aiofiles.threadpool.text.AsyncTextIOWrapper.tell +aiofiles.threadpool.text.AsyncTextIOWrapper.writable diff --git a/stubs/atomicwrites/@tests/stubtest_allowlist.txt b/stubs/atomicwrites/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..3bf9df36c --- /dev/null +++ b/stubs/atomicwrites/@tests/stubtest_allowlist.txt @@ -0,0 +1 @@ +atomicwrites.AtomicWriter.get_fileobject diff --git a/stubs/backports_abc/@tests/stubtest_allowlist.txt b/stubs/backports_abc/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..bc072c4d9 --- /dev/null +++ b/stubs/backports_abc/@tests/stubtest_allowlist.txt @@ -0,0 +1 @@ +backports_abc.isawaitable diff --git a/stubs/bleach/@tests/stubtest_allowlist.txt b/stubs/bleach/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..bd4011f2f --- /dev/null +++ b/stubs/bleach/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +bleach.linkifier.LinkifyFilter.__init__ +bleach.sanitizer.BleachSanitizerFilter.__init__ diff --git a/stubs/boto/@tests/stubtest_allowlist.txt b/stubs/boto/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..e5fa8bd1d --- /dev/null +++ b/stubs/boto/@tests/stubtest_allowlist.txt @@ -0,0 +1,9 @@ +boto.connection.AWSQueryConnection.make_request +boto.elb +boto.kms.layer1.KMSConnection.make_request +boto.s3.S3RegionInfo.connect +boto.s3.bucket.Bucket.get_location +boto.s3.bucket.Bucket.get_tags +boto.s3.bucket.Bucket.get_xml_tags +boto.s3.connection.S3Connection.make_request +boto.utils.LazyLoadMetadata.get diff --git a/stubs/cachetools/@tests/stubtest_allowlist.txt b/stubs/cachetools/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..b041adaf5 --- /dev/null +++ b/stubs/cachetools/@tests/stubtest_allowlist.txt @@ -0,0 +1,26 @@ +cachetools.Cache.get +cachetools.LFUCache.__delitem__ +cachetools.LFUCache.__getitem__ +cachetools.LFUCache.__setitem__ +cachetools.LRUCache.__delitem__ +cachetools.LRUCache.__getitem__ +cachetools.LRUCache.__setitem__ +cachetools.TTLCache.__delitem__ +cachetools.TTLCache.__getitem__ +cachetools.TTLCache.__setitem__ +cachetools.abc +cachetools.cache.Cache.get +cachetools.cache.DefaultMapping +cachetools.func.ttl_cache +cachetools.lfu.LFUCache.__delitem__ +cachetools.lfu.LFUCache.__getitem__ +cachetools.lfu.LFUCache.__setitem__ +cachetools.lru.Cache.get +cachetools.lru.LRUCache.__delitem__ +cachetools.lru.LRUCache.__getitem__ +cachetools.lru.LRUCache.__setitem__ +cachetools.rr.Cache.get +cachetools.ttl.Cache.get +cachetools.ttl.TTLCache.__delitem__ +cachetools.ttl.TTLCache.__getitem__ +cachetools.ttl.TTLCache.__setitem__ diff --git a/stubs/chardet/@tests/stubtest_allowlist.txt b/stubs/chardet/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..d3e6aac28 --- /dev/null +++ b/stubs/chardet/@tests/stubtest_allowlist.txt @@ -0,0 +1,25 @@ +chardet.langbulgarianmodel.BulgarianLangModel +chardet.langbulgarianmodel.Latin5BulgarianModel +chardet.langbulgarianmodel.Latin5_BulgarianCharToOrderMap +chardet.langbulgarianmodel.Win1251BulgarianModel +chardet.langbulgarianmodel.win1251BulgarianCharToOrderMap +chardet.langcyrillicmodel +chardet.langgreekmodel.GreekLangModel +chardet.langgreekmodel.Latin7GreekModel +chardet.langgreekmodel.Latin7_char_to_order_map +chardet.langgreekmodel.Win1253GreekModel +chardet.langgreekmodel.win1253_char_to_order_map +chardet.langhebrewmodel.HEBREW_LANG_MODEL +chardet.langhebrewmodel.WIN1255_CHAR_TO_ORDER_MAP +chardet.langhebrewmodel.Win1255HebrewModel +chardet.langhungarianmodel.HungarianLangModel +chardet.langhungarianmodel.Latin2HungarianModel +chardet.langhungarianmodel.Latin2_HungarianCharToOrderMap +chardet.langhungarianmodel.Win1250HungarianModel +chardet.langhungarianmodel.win1250HungarianCharToOrderMap +chardet.langthaimodel.TIS620CharToOrderMap +chardet.langthaimodel.TIS620ThaiModel +chardet.langthaimodel.ThaiLangModel +chardet.langturkishmodel.Latin5TurkishModel +chardet.langturkishmodel.Latin5_TurkishCharToOrderMap +chardet.langturkishmodel.TurkishLangModel diff --git a/stubs/click-spinner/@tests/stubtest_allowlist.txt b/stubs/click-spinner/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..dc1463c3c --- /dev/null +++ b/stubs/click-spinner/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +click_spinner.Spinner.__init__ +click_spinner.spinner diff --git a/stubs/click/@tests/stubtest_allowlist.txt b/stubs/click/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..6ef3dddac --- /dev/null +++ b/stubs/click/@tests/stubtest_allowlist.txt @@ -0,0 +1,19 @@ +click.Argument.__init__ +click.Context.__init__ +click.Parameter.__init__ +click._termui_impl.ProgressBar.__init__ +click.command +click.core.Argument.__init__ +click.core.Context.__init__ +click.core.Parameter.__init__ +click.decorators.command +click.decorators.group +click.decorators.pass_context +click.decorators.pass_obj +click.group +click.pass_context +click.pass_obj +click.secho +click.termui._build_prompt +click.termui.secho +click.testing.clickpkg diff --git a/stubs/colorama/@tests/stubtest_allowlist.txt b/stubs/colorama/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..e78dac9d6 --- /dev/null +++ b/stubs/colorama/@tests/stubtest_allowlist.txt @@ -0,0 +1,40 @@ +colorama.ansi.AnsiBack.BLACK +colorama.ansi.AnsiBack.BLUE +colorama.ansi.AnsiBack.CYAN +colorama.ansi.AnsiBack.GREEN +colorama.ansi.AnsiBack.LIGHTBLACK_EX +colorama.ansi.AnsiBack.LIGHTBLUE_EX +colorama.ansi.AnsiBack.LIGHTCYAN_EX +colorama.ansi.AnsiBack.LIGHTGREEN_EX +colorama.ansi.AnsiBack.LIGHTMAGENTA_EX +colorama.ansi.AnsiBack.LIGHTRED_EX +colorama.ansi.AnsiBack.LIGHTWHITE_EX +colorama.ansi.AnsiBack.LIGHTYELLOW_EX +colorama.ansi.AnsiBack.MAGENTA +colorama.ansi.AnsiBack.RED +colorama.ansi.AnsiBack.RESET +colorama.ansi.AnsiBack.WHITE +colorama.ansi.AnsiBack.YELLOW +colorama.ansi.AnsiFore.BLACK +colorama.ansi.AnsiFore.BLUE +colorama.ansi.AnsiFore.CYAN +colorama.ansi.AnsiFore.GREEN +colorama.ansi.AnsiFore.LIGHTBLACK_EX +colorama.ansi.AnsiFore.LIGHTBLUE_EX +colorama.ansi.AnsiFore.LIGHTCYAN_EX +colorama.ansi.AnsiFore.LIGHTGREEN_EX +colorama.ansi.AnsiFore.LIGHTMAGENTA_EX +colorama.ansi.AnsiFore.LIGHTRED_EX +colorama.ansi.AnsiFore.LIGHTWHITE_EX +colorama.ansi.AnsiFore.LIGHTYELLOW_EX +colorama.ansi.AnsiFore.MAGENTA +colorama.ansi.AnsiFore.RED +colorama.ansi.AnsiFore.RESET +colorama.ansi.AnsiFore.WHITE +colorama.ansi.AnsiFore.YELLOW +colorama.ansi.AnsiStyle.BRIGHT +colorama.ansi.AnsiStyle.DIM +colorama.ansi.AnsiStyle.NORMAL +colorama.ansi.AnsiStyle.RESET_ALL +colorama.initialise.wrapped_stderr +colorama.initialise.wrapped_stdout diff --git a/stubs/contextvars/@tests/stubtest_allowlist.txt b/stubs/contextvars/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..64f8aa01a --- /dev/null +++ b/stubs/contextvars/@tests/stubtest_allowlist.txt @@ -0,0 +1,4 @@ +contextvars.Context.__init__ +contextvars.Context.get +contextvars.ContextVar.reset +contextvars.ContextVar.set diff --git a/stubs/croniter/@tests/stubtest_allowlist.txt b/stubs/croniter/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..4a250b1eb --- /dev/null +++ b/stubs/croniter/@tests/stubtest_allowlist.txt @@ -0,0 +1,7 @@ +croniter.CroniterError +croniter.croniter.__init__ +croniter.croniter.__next__ +croniter.croniter.expand +croniter.croniter.get_next +croniter.croniter.is_valid +croniter.croniter.next diff --git a/stubs/cryptography/@tests/stubtest_allowlist.txt b/stubs/cryptography/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..96ec224aa --- /dev/null +++ b/stubs/cryptography/@tests/stubtest_allowlist.txt @@ -0,0 +1,43 @@ +cryptography.exceptions.UnsupportedAlgorithm.__init__ +cryptography.fernet.Fernet.__init__ +cryptography.fernet.MultiFernet.decrypt +cryptography.fernet.MultiFernet.decrypt_at_time +cryptography.fernet.MultiFernet.encrypt +cryptography.fernet.MultiFernet.encrypt_at_time +cryptography.hazmat.backends.interfaces.DHBackend.dh_parameters_supported +cryptography.hazmat.backends.interfaces.HMACBackend.cmac_algorithm_supported +cryptography.hazmat.bindings.openssl.binding.Binding.init_static_locks +cryptography.hazmat.primitives.asymmetric.dh.DHParameterNumbers.__init__ +cryptography.hazmat.primitives.ciphers.aead.AESCCM.__init__ +cryptography.hazmat.primitives.ciphers.modes.GCM.__init__ +cryptography.hazmat.primitives.cmac.CMAC.__init__ +cryptography.hazmat.primitives.hashes.BLAKE2b.__init__ +cryptography.hazmat.primitives.hashes.BLAKE2s.__init__ +cryptography.hazmat.primitives.hashes.Hash.__init__ +cryptography.hazmat.primitives.hmac.HMAC.__init__ +cryptography.hazmat.primitives.hmac.HMAC.update +cryptography.hazmat.primitives.serialization.pkcs12.serialize_key_and_certificates +cryptography.hazmat.primitives.serialization.pkcs7.PKCS7SignatureBuilder.__init__ +cryptography.x509.CertificateBuilder.add_extension +cryptography.x509.CertificateBuilder.public_key +cryptography.x509.CertificateBuilder.serial_number +cryptography.x509.CertificateRevocationListBuilder.__init__ +cryptography.x509.CertificateRevocationListBuilder.add_extension +cryptography.x509.CertificateRevocationListBuilder.issuer_name +cryptography.x509.CertificateRevocationListBuilder.last_update +cryptography.x509.CertificateRevocationListBuilder.next_update +cryptography.x509.CertificateSigningRequestBuilder.__init__ +cryptography.x509.CertificateSigningRequestBuilder.add_extension +cryptography.x509.Extension.__init__ +cryptography.x509.Extensions.__init__ +cryptography.x509.NameAttribute.__init__ +cryptography.x509.OCSPExtensionOID +cryptography.x509.RevokedCertificateBuilder.__init__ +cryptography.x509.RevokedCertificateBuilder.add_extension +cryptography.x509.RevokedCertificateBuilder.serial_number +cryptography.x509.extensions.AccessDescription.__init__ +cryptography.x509.extensions.AuthorityInformationAccess.__init__ +cryptography.x509.extensions.CRLDistributionPoints.__init__ +cryptography.x509.extensions.DistributionPoint.__init__ +cryptography.x509.extensions.Extension.__init__ +cryptography.x509.extensions.GeneralNames.__init__ diff --git a/stubs/dataclasses/@tests/stubtest_allowlist.txt b/stubs/dataclasses/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..402675898 --- /dev/null +++ b/stubs/dataclasses/@tests/stubtest_allowlist.txt @@ -0,0 +1,5 @@ +dataclasses.Field.__init__ +dataclasses.InitVar.__init__ +dataclasses.dataclass +dataclasses.field +dataclasses.replace diff --git a/stubs/decorator/@tests/stubtest_allowlist.txt b/stubs/decorator/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..c256a8ca4 --- /dev/null +++ b/stubs/decorator/@tests/stubtest_allowlist.txt @@ -0,0 +1,9 @@ +decorator.ContextManager.__init__ +decorator.FunctionMaker.args +decorator.FunctionMaker.kwonlyargs +decorator.FunctionMaker.kwonlydefaults +decorator.FunctionMaker.varargs +decorator.FunctionMaker.varkw +decorator.decorate +decorator.decorator +decorator.get_init diff --git a/stubs/docutils/@tests/stubtest_allowlist.txt b/stubs/docutils/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..1896cda62 --- /dev/null +++ b/stubs/docutils/@tests/stubtest_allowlist.txt @@ -0,0 +1,12 @@ +docutils.TransformSpec.unknown_reference_resolvers +docutils.frontend.ConfigParser.__getattr__ +docutils.frontend.ConfigParser.read +docutils.frontend.OptionParser.__getattr__ +docutils.frontend.OptionParser.__init__ +docutils.io.FileOutput.__getattr__ +docutils.io.FileOutput.__init__ +docutils.io.Input.__getattr__ +docutils.io.Input.__init__ +docutils.parsers.rst.Directive.__getattr__ +docutils.parsers.rst.Directive.__init__ +docutils.parsers.rst.nodes diff --git a/stubs/freezegun/@tests/stubtest_allowlist.txt b/stubs/freezegun/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..57a574df3 --- /dev/null +++ b/stubs/freezegun/@tests/stubtest_allowlist.txt @@ -0,0 +1,3 @@ +freezegun.api._freeze_time.__init__ +freezegun.api.freeze_time +freezegun.freeze_time diff --git a/stubs/frozendict/@tests/stubtest_allowlist.txt b/stubs/frozendict/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..8941c269f --- /dev/null +++ b/stubs/frozendict/@tests/stubtest_allowlist.txt @@ -0,0 +1,5 @@ +frozendict.FrozenOrderedDict +frozendict.frozendict.__hash__ +frozendict.frozendict.__new__ +frozendict.frozendict.__repr__ +frozendict.frozendict.copy diff --git a/stubs/geoip2/@tests/stubtest_allowlist.txt b/stubs/geoip2/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..276ec1a29 --- /dev/null +++ b/stubs/geoip2/@tests/stubtest_allowlist.txt @@ -0,0 +1,15 @@ +geoip2.database.Reader.__exit__ +geoip2.database.Reader.__init__ +geoip2.errors.HTTPError.__init__ +geoip2.models.SimpleModel.__init__ +geoip2.records.City.__init__ +geoip2.records.Continent.__init__ +geoip2.records.Country.__init__ +geoip2.records.Location.__init__ +geoip2.records.MaxMind.__init__ +geoip2.records.PlaceRecord.__init__ +geoip2.records.Postal.__init__ +geoip2.records.Record.__init__ +geoip2.records.RepresentedCountry.__init__ +geoip2.records.Subdivision.__init__ +geoip2.records.Traits.__init__ diff --git a/stubs/itsdangerous/@tests/stubtest_allowlist.txt b/stubs/itsdangerous/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..c3bfa0356 --- /dev/null +++ b/stubs/itsdangerous/@tests/stubtest_allowlist.txt @@ -0,0 +1,8 @@ +itsdangerous.BadData.message +itsdangerous.JSONWebSignatureSerializer.__init__ +itsdangerous.JSONWebSignatureSerializer.make_signer +itsdangerous.Serializer.__init__ +itsdangerous.SigningAlgorithm +itsdangerous.TimedJSONWebSignatureSerializer.__init__ +itsdangerous.TimedSerializer.loads +itsdangerous.TimedSerializer.loads_unsafe diff --git a/stubs/maxminddb/@tests/stubtest_allowlist.txt b/stubs/maxminddb/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..271efa6af --- /dev/null +++ b/stubs/maxminddb/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +maxminddb.compat +maxminddb.extension diff --git a/stubs/mock/@tests/stubtest_allowlist.txt b/stubs/mock/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..990441f8e --- /dev/null +++ b/stubs/mock/@tests/stubtest_allowlist.txt @@ -0,0 +1,7 @@ +mock.NonCallableMock.__new__ +mock.NonCallableMock.assert_called +mock.NonCallableMock.assert_called_once +mock.NonCallableMock.assert_called_once_with +mock.NonCallableMock.assert_called_with +mock.NonCallableMock.assert_not_called +mock.patch diff --git a/stubs/mypy-extensions/@tests/stubtest_allowlist.txt b/stubs/mypy-extensions/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..bffaebc69 --- /dev/null +++ b/stubs/mypy-extensions/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +mypy_extensions.FlexibleAlias +mypy_extensions.TypedDict diff --git a/stubs/nmap/@tests/stubtest_allowlist.txt b/stubs/nmap/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..f55d24035 --- /dev/null +++ b/stubs/nmap/@tests/stubtest_allowlist.txt @@ -0,0 +1,12 @@ +nmap.PortScanner +nmap.PortScannerAsync +nmap.PortScannerError +nmap.PortScannerHostDict +nmap.PortScannerYield +nmap.convert_nmap_output_to_encoding +nmap.nmap.PortScanner +nmap.nmap.PortScannerAsync +nmap.nmap.PortScannerError +nmap.nmap.PortScannerHostDict +nmap.nmap.PortScannerYield +nmap.nmap.convert_nmap_output_to_encoding diff --git a/stubs/paramiko/@tests/stubtest_allowlist.txt b/stubs/paramiko/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..34b27e512 --- /dev/null +++ b/stubs/paramiko/@tests/stubtest_allowlist.txt @@ -0,0 +1,30 @@ +paramiko.SFTPServer.__init__ +paramiko.Transport.open_x11_channel +paramiko.Transport.send_ignore +paramiko.Transport.start_server +paramiko._winapi +paramiko.py3compat.builtins.bytearray.pop +paramiko.py3compat.builtins.bytearray.remove +paramiko.py3compat.builtins.classmethod.__get__ +paramiko.py3compat.builtins.copyright +paramiko.py3compat.builtins.credits +paramiko.py3compat.builtins.dict.get +paramiko.py3compat.builtins.ellipsis +paramiko.py3compat.builtins.exit +paramiko.py3compat.builtins.function +paramiko.py3compat.builtins.help +paramiko.py3compat.builtins.license +paramiko.py3compat.builtins.memoryview.__contains__ +paramiko.py3compat.builtins.memoryview.__iter__ +paramiko.py3compat.builtins.memoryview.cast +paramiko.py3compat.builtins.object.__init__ +paramiko.py3compat.builtins.property.__get__ +paramiko.py3compat.builtins.quit +paramiko.py3compat.builtins.staticmethod.__get__ +paramiko.py3compat.input +paramiko.sftp_server.SFTPServer.__init__ +paramiko.transport.Transport.open_x11_channel +paramiko.transport.Transport.send_ignore +paramiko.transport.Transport.start_server +paramiko.util.SupportsClose +paramiko.win_pageant diff --git a/stubs/polib/@tests/stubtest_allowlist.txt b/stubs/polib/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..885e8a53b --- /dev/null +++ b/stubs/polib/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +polib.TextWrapper +polib._BaseFile.save diff --git a/stubs/protobuf/@tests/stubtest_allowlist.txt b/stubs/protobuf/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..8993a9413 --- /dev/null +++ b/stubs/protobuf/@tests/stubtest_allowlist.txt @@ -0,0 +1,182 @@ +google.protobuf.__version__ +google.protobuf.any_pb2.Any.__init__ +google.protobuf.api_pb2.Api.__init__ +google.protobuf.api_pb2.Method.__init__ +google.protobuf.api_pb2.Mixin.__init__ +google.protobuf.compiler.plugin_pb2.CodeGeneratorRequest.__init__ +google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.FEATURE_NONE +google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.FEATURE_PROTO3_OPTIONAL +google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.Feature +google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.FeatureValue +google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.File.__init__ +google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse._Feature +google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.__init__ +google.protobuf.compiler.plugin_pb2.Version.__init__ +google.protobuf.descriptor.Descriptor.__new__ +google.protobuf.descriptor.FieldDescriptor.__init__ +google.protobuf.descriptor.FieldDescriptor.__new__ +google.protobuf.descriptor.ServiceDescriptor.__new__ +google.protobuf.descriptor._NestedDescriptorBase.GetTopLevelContainingType +google.protobuf.descriptor_pb2.DescriptorProto.ExtensionRange.__init__ +google.protobuf.descriptor_pb2.DescriptorProto.ReservedRange.__init__ +google.protobuf.descriptor_pb2.DescriptorProto.__init__ +google.protobuf.descriptor_pb2.EnumDescriptorProto.EnumReservedRange.__init__ +google.protobuf.descriptor_pb2.EnumDescriptorProto.__init__ +google.protobuf.descriptor_pb2.EnumOptions.__init__ +google.protobuf.descriptor_pb2.EnumValueDescriptorProto.__init__ +google.protobuf.descriptor_pb2.EnumValueOptions.__init__ +google.protobuf.descriptor_pb2.ExtensionRangeOptions.__init__ +google.protobuf.descriptor_pb2.FieldDescriptorProto.LABEL_OPTIONAL +google.protobuf.descriptor_pb2.FieldDescriptorProto.LABEL_REPEATED +google.protobuf.descriptor_pb2.FieldDescriptorProto.LABEL_REQUIRED +google.protobuf.descriptor_pb2.FieldDescriptorProto.Label +google.protobuf.descriptor_pb2.FieldDescriptorProto.LabelValue +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_BOOL +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_BYTES +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_DOUBLE +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_ENUM +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_FIXED32 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_FIXED64 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_FLOAT +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_GROUP +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_INT32 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_INT64 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_MESSAGE +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SFIXED32 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SFIXED64 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SINT32 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SINT64 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_STRING +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_UINT32 +google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_UINT64 +google.protobuf.descriptor_pb2.FieldDescriptorProto.Type +google.protobuf.descriptor_pb2.FieldDescriptorProto.TypeValue +google.protobuf.descriptor_pb2.FieldDescriptorProto._Label +google.protobuf.descriptor_pb2.FieldDescriptorProto._Type +google.protobuf.descriptor_pb2.FieldDescriptorProto.__init__ +google.protobuf.descriptor_pb2.FieldOptions.CORD +google.protobuf.descriptor_pb2.FieldOptions.CType +google.protobuf.descriptor_pb2.FieldOptions.CTypeValue +google.protobuf.descriptor_pb2.FieldOptions.JSType +google.protobuf.descriptor_pb2.FieldOptions.JSTypeValue +google.protobuf.descriptor_pb2.FieldOptions.JS_NORMAL +google.protobuf.descriptor_pb2.FieldOptions.JS_NUMBER +google.protobuf.descriptor_pb2.FieldOptions.JS_STRING +google.protobuf.descriptor_pb2.FieldOptions.STRING +google.protobuf.descriptor_pb2.FieldOptions.STRING_PIECE +google.protobuf.descriptor_pb2.FieldOptions._CType +google.protobuf.descriptor_pb2.FieldOptions._JSType +google.protobuf.descriptor_pb2.FieldOptions.__init__ +google.protobuf.descriptor_pb2.FileDescriptorProto.__init__ +google.protobuf.descriptor_pb2.FileDescriptorSet.__init__ +google.protobuf.descriptor_pb2.FileOptions.CODE_SIZE +google.protobuf.descriptor_pb2.FileOptions.LITE_RUNTIME +google.protobuf.descriptor_pb2.FileOptions.OptimizeMode +google.protobuf.descriptor_pb2.FileOptions.OptimizeModeValue +google.protobuf.descriptor_pb2.FileOptions.SPEED +google.protobuf.descriptor_pb2.FileOptions._OptimizeMode +google.protobuf.descriptor_pb2.FileOptions.__init__ +google.protobuf.descriptor_pb2.GeneratedCodeInfo.Annotation.__init__ +google.protobuf.descriptor_pb2.GeneratedCodeInfo.__init__ +google.protobuf.descriptor_pb2.MessageOptions.__init__ +google.protobuf.descriptor_pb2.MethodDescriptorProto.__init__ +google.protobuf.descriptor_pb2.MethodOptions.IDEMPOTENCY_UNKNOWN +google.protobuf.descriptor_pb2.MethodOptions.IDEMPOTENT +google.protobuf.descriptor_pb2.MethodOptions.IdempotencyLevel +google.protobuf.descriptor_pb2.MethodOptions.IdempotencyLevelValue +google.protobuf.descriptor_pb2.MethodOptions.NO_SIDE_EFFECTS +google.protobuf.descriptor_pb2.MethodOptions._IdempotencyLevel +google.protobuf.descriptor_pb2.MethodOptions.__init__ +google.protobuf.descriptor_pb2.OneofDescriptorProto.__init__ +google.protobuf.descriptor_pb2.OneofOptions.__init__ +google.protobuf.descriptor_pb2.ServiceDescriptorProto.__init__ +google.protobuf.descriptor_pb2.ServiceOptions.__init__ +google.protobuf.descriptor_pb2.SourceCodeInfo.Location.__init__ +google.protobuf.descriptor_pb2.SourceCodeInfo.__init__ +google.protobuf.descriptor_pb2.UninterpretedOption.NamePart.__init__ +google.protobuf.descriptor_pb2.UninterpretedOption.__init__ +google.protobuf.duration_pb2.Duration.__init__ +google.protobuf.empty_pb2.Empty.__init__ +google.protobuf.field_mask_pb2.FieldMask.__init__ +google.protobuf.internal.containers.BaseContainer.sort +google.protobuf.internal.containers.Mapping +google.protobuf.internal.containers.MessageMap.__init__ +google.protobuf.internal.containers.MessageMap.get +google.protobuf.internal.containers.RepeatedCompositeFieldContainer.__init__ +google.protobuf.internal.containers.RepeatedScalarFieldContainer.__init__ +google.protobuf.internal.containers.ScalarMap.__init__ +google.protobuf.internal.containers.ScalarMap.get +google.protobuf.internal.decoder.BytesDecoder +google.protobuf.internal.decoder.EnumDecoder +google.protobuf.internal.decoder.MessageSetItemDecoder +google.protobuf.internal.decoder.StringDecoder +google.protobuf.internal.encoder.MapSizer +google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper.DESCRIPTOR +google.protobuf.internal.python_message.GeneratedProtocolMessageType.__init__ +google.protobuf.internal.python_message.GeneratedProtocolMessageType.__new__ +google.protobuf.internal.well_known_types.Any.Pack +google.protobuf.internal.well_known_types.Error +google.protobuf.internal.well_known_types.ParseError +google.protobuf.message.Message.DESCRIPTOR +google.protobuf.message.Message.Extensions +google.protobuf.message.Message.FromString +google.protobuf.message.Message.SerializePartialToString +google.protobuf.message.Message.SerializeToString +google.protobuf.message.Message.__init__ +google.protobuf.service.Service.GetDescriptor +google.protobuf.source_context_pb2.SourceContext.__init__ +google.protobuf.struct_pb2.ListValue.__init__ +google.protobuf.struct_pb2.NULL_VALUE +google.protobuf.struct_pb2.NullValueValue +google.protobuf.struct_pb2.Struct.FieldsEntry.__init__ +google.protobuf.struct_pb2.Struct.__init__ +google.protobuf.struct_pb2.Value.__init__ +google.protobuf.text_format.MessageToBytes +google.protobuf.timestamp_pb2.Timestamp.__init__ +google.protobuf.type_pb2.Enum.__init__ +google.protobuf.type_pb2.EnumValue.__init__ +google.protobuf.type_pb2.Field.CARDINALITY_OPTIONAL +google.protobuf.type_pb2.Field.CARDINALITY_REPEATED +google.protobuf.type_pb2.Field.CARDINALITY_REQUIRED +google.protobuf.type_pb2.Field.CARDINALITY_UNKNOWN +google.protobuf.type_pb2.Field.Cardinality +google.protobuf.type_pb2.Field.CardinalityValue +google.protobuf.type_pb2.Field.Kind +google.protobuf.type_pb2.Field.KindValue +google.protobuf.type_pb2.Field.TYPE_BOOL +google.protobuf.type_pb2.Field.TYPE_BYTES +google.protobuf.type_pb2.Field.TYPE_DOUBLE +google.protobuf.type_pb2.Field.TYPE_ENUM +google.protobuf.type_pb2.Field.TYPE_FIXED32 +google.protobuf.type_pb2.Field.TYPE_FIXED64 +google.protobuf.type_pb2.Field.TYPE_FLOAT +google.protobuf.type_pb2.Field.TYPE_GROUP +google.protobuf.type_pb2.Field.TYPE_INT32 +google.protobuf.type_pb2.Field.TYPE_INT64 +google.protobuf.type_pb2.Field.TYPE_MESSAGE +google.protobuf.type_pb2.Field.TYPE_SFIXED32 +google.protobuf.type_pb2.Field.TYPE_SFIXED64 +google.protobuf.type_pb2.Field.TYPE_SINT32 +google.protobuf.type_pb2.Field.TYPE_SINT64 +google.protobuf.type_pb2.Field.TYPE_STRING +google.protobuf.type_pb2.Field.TYPE_UINT32 +google.protobuf.type_pb2.Field.TYPE_UINT64 +google.protobuf.type_pb2.Field.TYPE_UNKNOWN +google.protobuf.type_pb2.Field._Cardinality +google.protobuf.type_pb2.Field._Kind +google.protobuf.type_pb2.Field.__init__ +google.protobuf.type_pb2.Option.__init__ +google.protobuf.type_pb2.SYNTAX_PROTO2 +google.protobuf.type_pb2.SYNTAX_PROTO3 +google.protobuf.type_pb2.Syntax +google.protobuf.type_pb2.SyntaxValue +google.protobuf.type_pb2.Type.__init__ +google.protobuf.wrappers_pb2.BoolValue.__init__ +google.protobuf.wrappers_pb2.BytesValue.__init__ +google.protobuf.wrappers_pb2.DoubleValue.__init__ +google.protobuf.wrappers_pb2.FloatValue.__init__ +google.protobuf.wrappers_pb2.Int32Value.__init__ +google.protobuf.wrappers_pb2.Int64Value.__init__ +google.protobuf.wrappers_pb2.StringValue.__init__ +google.protobuf.wrappers_pb2.UInt32Value.__init__ +google.protobuf.wrappers_pb2.UInt64Value.__init__ diff --git a/stubs/pycurl/@tests/stubtest_allowlist.txt b/stubs/pycurl/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..d4ba5cd3d --- /dev/null +++ b/stubs/pycurl/@tests/stubtest_allowlist.txt @@ -0,0 +1 @@ +pycurl diff --git a/stubs/python-dateutil/@tests/stubtest_allowlist.txt b/stubs/python-dateutil/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..cf5deeade --- /dev/null +++ b/stubs/python-dateutil/@tests/stubtest_allowlist.txt @@ -0,0 +1,10 @@ +dateutil.parser.InvalidDateError +dateutil.parser.InvalidDatetimeError +dateutil.parser.InvalidTimeError +dateutil.parser._tzparser.__init__ +dateutil.parser.parserinfo.convertyear +dateutil.rrule.weekday.__init__ +dateutil.tz.tz.tzoffset.instance +dateutil.tz.tz.tzstr.instance +dateutil.tz.tzoffset.instance +dateutil.tz.tzstr.instance diff --git a/stubs/python-gflags/@tests/stubtest_allowlist.txt b/stubs/python-gflags/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..f37b2b810 --- /dev/null +++ b/stubs/python-gflags/@tests/stubtest_allowlist.txt @@ -0,0 +1 @@ +gflags diff --git a/stubs/pytz/@tests/stubtest_allowlist.txt b/stubs/pytz/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..c6fbfed5b --- /dev/null +++ b/stubs/pytz/@tests/stubtest_allowlist.txt @@ -0,0 +1,4 @@ +pytz.BaseTzInfo.localize +pytz.BaseTzInfo.normalize +pytz.BaseTzInfo.zone +pytz.FixedOffset diff --git a/stubs/pyvmomi/@tests/stubtest_allowlist.txt b/stubs/pyvmomi/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..b14e3eb36 --- /dev/null +++ b/stubs/pyvmomi/@tests/stubtest_allowlist.txt @@ -0,0 +1,8 @@ +pyVmomi.vim +pyVmomi.vim.event +pyVmomi.vim.fault +pyVmomi.vim.option +pyVmomi.vim.view +pyVmomi.vmodl +pyVmomi.vmodl.fault +pyVmomi.vmodl.query diff --git a/stubs/redis/@tests/stubtest_allowlist.txt b/stubs/redis/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..21a5ea975 --- /dev/null +++ b/stubs/redis/@tests/stubtest_allowlist.txt @@ -0,0 +1,46 @@ +redis.client.Pipeline.acl_setuser +redis.client.Pipeline.client_list +redis.client.Pipeline.flushall +redis.client.Pipeline.flushdb +redis.client.Pipeline.hscan +redis.client.Pipeline.pubsub +redis.client.Pipeline.restore +redis.client.Pipeline.scan +redis.client.Pipeline.scan_iter +redis.client.Pipeline.shutdown +redis.client.Pipeline.sscan +redis.client.Pipeline.transaction +redis.client.Pipeline.zinterstore +redis.client.Pipeline.zrevrange +redis.client.Pipeline.zrevrangebylex +redis.client.Pipeline.zrevrangebyscore +redis.client.Pipeline.zunionstore +redis.client.PubSub.encode +redis.client.PubSub.execute_command +redis.client.PubSub.parse_response +redis.client.PubSub.run_in_thread +redis.client.Redis.acl_setuser +redis.client.Redis.client_list +redis.client.Redis.flushall +redis.client.Redis.flushdb +redis.client.Redis.from_url +redis.client.Redis.hscan +redis.client.Redis.pubsub +redis.client.Redis.restore +redis.client.Redis.scan +redis.client.Redis.scan_iter +redis.client.Redis.shutdown +redis.client.Redis.sscan +redis.client.Redis.zinterstore +redis.client.Redis.zrevrange +redis.client.Redis.zrevrangebylex +redis.client.Redis.zrevrangebyscore +redis.client.Redis.zunionstore +redis.client.pairs_to_dict +redis.connection.HIREDIS_SUPPORTS_BYTE_BUFFER +redis.connection.HIREDIS_SUPPORTS_CALLABLE_ERRORS +redis.connection.HIREDIS_USE_BYTE_BUFFER +redis.connection.hiredis_version +redis.connection.msg +redis.utils.safe_str +redis.utils.str_if_bytes diff --git a/stubs/requests/@tests/stubtest_allowlist.txt b/stubs/requests/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..991b495f8 --- /dev/null +++ b/stubs/requests/@tests/stubtest_allowlist.txt @@ -0,0 +1,65 @@ +requests.Session.delete +requests.Session.get +requests.Session.head +requests.Session.options +requests.Session.patch +requests.Session.post +requests.Session.put +requests.api.delete +requests.api.get +requests.api.head +requests.api.options +requests.api.patch +requests.api.post +requests.api.put +requests.api.request +requests.delete +requests.get +requests.head +requests.options +requests.packages.VendorAlias +requests.packages.urllib3.NullHandler +requests.packages.urllib3._collections.HTTPHeaderDict.from_httplib +requests.packages.urllib3._collections.HTTPHeaderDict.getlist +requests.packages.urllib3._collections.RLock +requests.packages.urllib3.connection.HTTPConnection.request +requests.packages.urllib3.connection.HTTPSConnection.__init__ +requests.packages.urllib3.connection.VerifiedHTTPSConnection.__init__ +requests.packages.urllib3.connection.VerifiedHTTPSConnection.set_cert +requests.packages.urllib3.connectionpool.ConnectionError +requests.packages.urllib3.connectionpool.HTTPConnectionPool.__init__ +requests.packages.urllib3.connectionpool.HTTPConnectionPool.urlopen +requests.packages.urllib3.connectionpool.HTTPSConnectionPool.__init__ +requests.packages.urllib3.exceptions.ProxyError.__init__ +requests.packages.urllib3.fields.RequestField.__init__ +requests.packages.urllib3.fields.RequestField.from_tuples +requests.packages.urllib3.poolmanager.PoolManager.connection_from_host +requests.packages.urllib3.poolmanager.PoolManager.connection_from_url +requests.packages.urllib3.poolmanager.PoolManager.urlopen +requests.packages.urllib3.poolmanager.ProxyManager.__init__ +requests.packages.urllib3.poolmanager.ProxyManager.connection_from_host +requests.packages.urllib3.poolmanager.ProxyManager.urlopen +requests.packages.urllib3.request.RequestMethods.request_encode_url +requests.packages.urllib3.response.HTTPResponse.__init__ +requests.packages.urllib3.response.PY3 +requests.packages.urllib3.util.connection.poll +requests.packages.urllib3.util.connection.select +requests.packages.urllib3.util.retry.Retry.__init__ +requests.packages.urllib3.util.retry.Retry.is_forced_retry +requests.packages.urllib3.util.retry.Retry.sleep +requests.packages.urllib3.util.ssl_.create_default_context +requests.packages.urllib3.util.ssl_.ssl_wrap_socket +requests.patch +requests.post +requests.put +requests.request +requests.sessions.Session.delete +requests.sessions.Session.get +requests.sessions.Session.head +requests.sessions.Session.options +requests.sessions.Session.patch +requests.sessions.Session.post +requests.sessions.Session.put +requests.sessions.SessionRedirectMixin.resolve_redirects +requests.structures.LookupDict.__getattr__ +requests.structures.LookupDict.get diff --git a/stubs/simplejson/@tests/stubtest_allowlist.txt b/stubs/simplejson/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..e55375de8 --- /dev/null +++ b/stubs/simplejson/@tests/stubtest_allowlist.txt @@ -0,0 +1,18 @@ +simplejson.JSONDecodeError.__init__ +simplejson.JSONDecoder.__init__ +simplejson.JSONDecoder.decode +simplejson.JSONDecoder.raw_decode +simplejson.JSONEncoder.__init__ +simplejson.JSONEncoder.iterencode +simplejson.JSONEncoderForHTML.iterencode +simplejson.decoder.JSONDecoder.__init__ +simplejson.decoder.JSONDecoder.decode +simplejson.decoder.JSONDecoder.raw_decode +simplejson.dump +simplejson.dumps +simplejson.encoder.JSONEncoder.__init__ +simplejson.encoder.JSONEncoder.iterencode +simplejson.encoder.JSONEncoderForHTML.iterencode +simplejson.load +simplejson.loads +simplejson.scanner.JSONDecodeError.__init__ diff --git a/stubs/toml/@tests/stubtest_allowlist.txt b/stubs/toml/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..83e897d1f --- /dev/null +++ b/stubs/toml/@tests/stubtest_allowlist.txt @@ -0,0 +1,5 @@ +toml.TomlDecodeError.__init__ +toml.dump +toml.dumps +toml.load +toml.loads diff --git a/stubs/waitress/@tests/stubtest_allowlist.txt b/stubs/waitress/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..d839ceb06 --- /dev/null +++ b/stubs/waitress/@tests/stubtest_allowlist.txt @@ -0,0 +1,59 @@ +waitress.adjustments.Adjustments.clear_untrusted_proxy_headers +waitress.adjustments.PY2 +waitress.adjustments.string_types +waitress.buffers.FileBasedBuffer.__bool__ +waitress.buffers.OverflowableBuffer.__bool__ +waitress.buffers.ReadOnlyFileBasedBuffer.__next__ +waitress.channel.HTTPChannel.addr +waitress.channel.HTTPChannel.error_task_class +waitress.channel.HTTPChannel.parser_class +waitress.channel.HTTPChannel.request +waitress.channel.HTTPChannel.task_class +waitress.channel.wasyncore.compat.qualname +waitress.channel.wasyncore.compat.reraise +waitress.channel.wasyncore.compat.set_nonblocking +waitress.channel.wasyncore.compat.text_ +waitress.channel.wasyncore.compat.tobytes +waitress.channel.wasyncore.compat.tostr +waitress.channel.wasyncore.compat.unquote_bytes_to_wsgi +waitress.channel.wasyncore.dispatcher_with_send.handle_write +waitress.compat.PY2 +waitress.compat.PY3 +waitress.compat.ResourceWarning +waitress.compat.class_types +waitress.compat.exec_ +waitress.compat.integer_types +waitress.compat.qualname +waitress.compat.reraise +waitress.compat.set_nonblocking +waitress.compat.string_types +waitress.compat.text_ +waitress.compat.tobytes +waitress.compat.tostr +waitress.compat.unquote_bytes_to_wsgi +waitress.rfc7230.tobytes +waitress.server.BaseWSGIServer.channel_class +waitress.server.BaseWSGIServer.get_server_name +waitress.server.MultiSocketServer.__init__ +waitress.server.UnixWSGIServer.get_server_name +waitress.server.WSGIServer +waitress.task.ErrorTask.content_length +waitress.task.ThreadedTaskDispatcher.start_new_thread +waitress.task.WSGITask.content_length +waitress.trigger.wasyncore.compat.qualname +waitress.trigger.wasyncore.compat.reraise +waitress.trigger.wasyncore.compat.set_nonblocking +waitress.trigger.wasyncore.compat.text_ +waitress.trigger.wasyncore.compat.tobytes +waitress.trigger.wasyncore.compat.tostr +waitress.trigger.wasyncore.compat.unquote_bytes_to_wsgi +waitress.trigger.wasyncore.dispatcher_with_send.handle_write +waitress.wasyncore.compat.qualname +waitress.wasyncore.compat.reraise +waitress.wasyncore.compat.set_nonblocking +waitress.wasyncore.compat.text_ +waitress.wasyncore.compat.tobytes +waitress.wasyncore.compat.tostr +waitress.wasyncore.compat.unquote_bytes_to_wsgi +waitress.wasyncore.dispatcher_with_send.handle_write +waitress.wasyncore.map diff --git a/tests/README.md b/tests/README.md index 457e3972b..69d1de1f0 100644 --- a/tests/README.md +++ b/tests/README.md @@ -7,7 +7,7 @@ tests typeshed with [mypy](https://github.com/python/mypy/) [pyright](https://github.com/microsoft/pyright). - `tests/check_consistent.py` checks certain files in typeshed remain consistent with each other. -- `tests/stubtest_test.py` checks stubs against the objects at runtime. +- `tests/stubtest_stdlib.py` checks stubs against the objects at runtime. To run the tests, follow the [setup instructions](../CONTRIBUTING.md#preparing-the-environment) in the `CONTRIBUTING.md` document. @@ -63,12 +63,12 @@ Run using: python3 tests/check_consistent.py ``` -## stubtest\_test.py +## stubtest\_stdlib.py This test requires Python 3.6 or higher. Run using ``` -(.venv3)$ python3 tests/stubtest_test.py +(.venv3)$ python3 tests/stubtest_stdlib.py ``` This test compares the stdlib stubs against the objects at runtime. Because of @@ -93,3 +93,14 @@ directly, with ``` stubtest can also help you find things missing from the stubs. + + +## stubtest\_third\_party.py + +This test requires Python 3.6 or higher. +Run using +``` +(.venv3)$ python3 tests/stubtest_third_party.py +``` + +Similar to `stubtest_stdlib.py`, but tests the third party stubs. diff --git a/tests/check_consistent.py b/tests/check_consistent.py index 2d7b31a0f..45dca946c 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -71,7 +71,7 @@ def check_stubs(): else: assert name.isidentifier(), f"Bad file name '{entry}' in stubs" else: - if entry == "@python2": + if entry in ("@python2", "@tests"): continue assert_stubs_only(os.path.join("stubs", distribution, entry)) if os.path.isdir(os.path.join("stubs", distribution, "@python2")): diff --git a/tests/stubtest_test.py b/tests/stubtest_stdlib.py similarity index 95% rename from tests/stubtest_test.py rename to tests/stubtest_stdlib.py index 1d40b1a2d..8558860c7 100755 --- a/tests/stubtest_test.py +++ b/tests/stubtest_stdlib.py @@ -1,13 +1,10 @@ #!/usr/bin/env python3 -"""Test typeshed using stubtest +"""Test typeshed's stdlib using stubtest stubtest is a script in the mypy project that compares stubs to the actual objects at runtime. Note that therefore the output of stubtest depends on which Python version it is run with. In typeshed CI, we run stubtest with each currently supported Python minor version, except 2.7. -We pin the version of mypy / stubtest we use in .travis.yml so changes to those don't break -typeshed CI. - """ import subprocess diff --git a/tests/stubtest_third_party.py b/tests/stubtest_third_party.py new file mode 100644 index 000000000..6f06ecc5a --- /dev/null +++ b/tests/stubtest_third_party.py @@ -0,0 +1,125 @@ +#!/usr/bin/env python3 +"""Test typeshed's third party stubs using stubtest""" + +import argparse +import functools +import subprocess +import sys +import tempfile +import toml +import venv +from pathlib import Path + + +EXCLUDE_LIST = [ + "Flask", # fails when stubtest tries to stringify some object + "pyaudio", # install failure locally + "backports", # errors on python version + "pkg_resources", # ??? + "six", # ??? + "aiofiles", # easily fixable, some platform specific difference between local and ci + "pycurl" # install failure, missing libcurl +] + + +class StubtestFailed(Exception): + pass + + +@functools.lru_cache() +def get_mypy_req(): + with open("requirements-tests-py3.txt") as f: + return next(line.strip() for line in f if "mypy" in line) + + +def run_stubtest(dist: Path) -> None: + with open(dist / "METADATA.toml") as f: + metadata = dict(toml.loads(f.read())) + + # Ignore stubs that don't support Python 2 + if not bool(metadata.get("python3", True)): + return + + with tempfile.TemporaryDirectory() as tmp: + venv_dir = Path(tmp) + venv.create(venv_dir, with_pip=True, clear=True) + + pip_exe = str(venv_dir / "bin" / "pip") + python_exe = str(venv_dir / "bin" / "python") + + dist_version = metadata.get("version") + if dist_version is None or dist_version == "0.1": + dist_req = dist.name + else: + dist_req = f"{dist.name}=={dist_version}.*" + + # We need stubtest to be able to import the package, so install mypy into the venv + # Hopefully mypy continues to not need too many dependencies + # TODO: Maybe find a way to cache these in CI + dists_to_install = [dist_req, get_mypy_req()] + dists_to_install.extend(metadata.get("requires", [])) + pip_cmd = [pip_exe, "install"] + dists_to_install + print(" ".join(pip_cmd), file=sys.stderr) + try: + subprocess.run(pip_cmd, check=True, capture_output=True) + except subprocess.CalledProcessError as e: + print(f"Failed to install {dist.name}", file=sys.stderr) + print(e.stdout.decode(), file=sys.stderr) + print(e.stderr.decode(), file=sys.stderr) + raise + + packages_to_check = [d.name for d in dist.iterdir() if d.is_dir() and d.name.isidentifier()] + modules_to_check = [d.stem for d in dist.iterdir() if d.is_file() and d.suffix == ".pyi"] + cmd = [ + python_exe, + "-m", + "mypy.stubtest", + # Use --ignore-missing-stub, because if someone makes a correct addition, they'll need to + # also make a allowlist change and if someone makes an incorrect addition, they'll run into + # false negatives. + "--ignore-missing-stub", + # Use --custom-typeshed-dir in case we make linked changes to stdlib or _typeshed + "--custom-typeshed-dir", + str(dist.parent.parent), + *packages_to_check, + *modules_to_check, + ] + allowlist_path = dist / "@tests/stubtest_allowlist.txt" + if allowlist_path.exists(): + cmd.extend(["--allowlist", str(allowlist_path)]) + + try: + print(f"MYPYPATH={dist}", " ".join(cmd), file=sys.stderr) + subprocess.run(cmd, env={"MYPYPATH": str(dist), "MYPY_FORCE_COLOR": "1"}, check=True) + except subprocess.CalledProcessError: + print(f"stubtest failed for {dist.name}", file=sys.stderr) + if not allowlist_path.exists(): + print( + "\n\nRe-running stubtest with --generate-allowlist. " + f"Add the following to {allowlist_path}:\n", + file=sys.stderr, + ) + subprocess.run(cmd + ["--generate-allowlist"], env={"MYPYPATH": str(dist)}) + raise StubtestFailed from None + else: + print(f"stubtest succeeded for {dist.name}", file=sys.stderr) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--num-shards", type=int, default=1) + parser.add_argument("--shard-index", type=int, default=0) + args = parser.parse_args() + + typeshed_dir = Path(".").resolve() + dists = sorted((typeshed_dir / "stubs").iterdir()) + for i, dist in enumerate(dists): + if i % args.num_shards != args.shard_index: + continue + if dist.name in EXCLUDE_LIST: + continue + run_stubtest(dist) + + +if __name__ == "__main__": + main() diff --git a/tests/stubtest_unused.py b/tests/stubtest_unused.py index 32a06b2a4..c2b52fbbb 100755 --- a/tests/stubtest_unused.py +++ b/tests/stubtest_unused.py @@ -20,7 +20,7 @@ def main() -> None: def run_stubtest() -> List[str]: - proc = subprocess.run([sys.executable, "tests/stubtest_test.py"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + proc = subprocess.run([sys.executable, "tests/stubtest_stdlib.py"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = proc.stdout.decode("utf-8").splitlines() return [line[len(_UNUSED_NOTE) :].strip() for line in output if line.startswith(_UNUSED_NOTE)]