py2docfx 0.1.16.dev2051338__py3-none-any.whl → 0.1.16.dev2064350__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py2docfx/convert_prepare/environment.py +3 -1
- py2docfx/convert_prepare/get_source.py +6 -1
- py2docfx/convert_prepare/package_info.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/babel/py.typed +1 -0
- py2docfx/venv/basevenv/Lib/site-packages/markupsafe/_speedups.pyi +1 -0
- py2docfx/venv/basevenv/Lib/site-packages/markupsafe/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/packaging/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/certifi/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/chardet/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/distro/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/idna/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/packaging/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/pyparsing/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/rich/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/tenacity/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/tomli/py.typed +1 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/_vendor/truststore/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/pip/py.typed +4 -0
- py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_metadata/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/inflect/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/jaraco/collections/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/jaraco/functools/__init__.pyi +125 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/jaraco/functools/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/more_itertools/__init__.pyi +2 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/more_itertools/more.pyi +709 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/more_itertools/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/more_itertools/recipes.pyi +136 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/platformdirs/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/tomli/py.typed +1 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/typeguard/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/sphinx/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/sphinxcontrib/applehelp/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/sphinxcontrib/htmlhelp/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/sphinxcontrib/qthelp/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/sphinxcontrib/serializinghtml/py.typed +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/_version.py +9 -4
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/contrib/emscripten/response.py +8 -16
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/contrib/pyopenssl.py +10 -0
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/exceptions.py +12 -4
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/http2/connection.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/py.typed +2 -0
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/ssl_.py +21 -1
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/ssl_match_hostname.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/wheel/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/wheel/__main__.py +7 -5
- py2docfx/venv/basevenv/Lib/site-packages/wheel/{cli → _commands}/__init__.py +3 -5
- py2docfx/venv/basevenv/Lib/site-packages/wheel/{cli → _commands}/convert.py +14 -9
- py2docfx/venv/basevenv/Lib/site-packages/wheel/{cli → _commands}/pack.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/wheel/{cli → _commands}/tags.py +4 -3
- py2docfx/venv/basevenv/Lib/site-packages/wheel/_metadata.py +184 -0
- py2docfx/venv/basevenv/Lib/site-packages/wheel/bdist_wheel.py +12 -23
- py2docfx/venv/basevenv/Lib/site-packages/wheel/macosx_libfile.py +4 -0
- py2docfx/venv/basevenv/Lib/site-packages/wheel/metadata.py +17 -183
- py2docfx/venv/basevenv/Lib/site-packages/wheel/wheelfile.py +30 -16
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/credentials.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/core/instrumentation.py +67 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_base.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_tools.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_authentication.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_authentication_async.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_distributed_tracing.py +152 -29
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_redirect.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_redirect_async.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_retry.py +3 -10
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_retry_async.py +3 -8
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_universal.py +2 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_aiohttp.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/polling/base_polling.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_http_response_impl_async.py +3 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_rest_py3.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/settings.py +27 -21
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/__init__.py +3 -7
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/_abstract_span.py +2 -35
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/_models.py +71 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/common.py +12 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/decorator.py +66 -13
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/decorator_async.py +62 -23
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/ext/opencensus_span/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/opentelemetry.py +244 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_connection_string_parser.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_messaging_shared.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_utils.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/certifi/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi +28 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/_openssl.pyi +8 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi +7 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/exceptions.pyi +17 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi +117 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi +72 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/aead.pyi +103 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ciphers.pyi +38 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/cmac.pyi +18 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/dh.pyi +51 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/dsa.pyi +41 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ec.pyi +52 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed25519.pyi +12 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed448.pyi +12 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hashes.pyi +19 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hmac.pyi +21 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +43 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/keys.pyi +33 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/poly1305.pyi +13 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/rsa.pyi +55 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi +12 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x448.pyi +12 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs12.pyi +46 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs7.pyi +49 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/test_support.pyi +22 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +246 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/annotations_pb2.pyi +24 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/auth_pb2.pyi +120 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/backend_pb2.pyi +102 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/billing_pb2.pyi +50 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/client_pb2.pyi +405 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/config_change_pb2.pyi +65 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/consumer_pb2.pyi +62 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/context_pb2.pyi +60 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/control_pb2.pyi +43 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/distribution_pb2.pyi +144 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/documentation_pb2.pyi +86 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/endpoint_pb2.pyi +41 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/error_reason_pb2.pyi +90 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/field_behavior_pb2.pyi +45 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/field_info_pb2.pyi +60 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/http_pb2.pyi +94 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/httpbody_pb2.pyi +41 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/label_pb2.pyi +47 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/launch_stage_pb2.pyi +40 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/log_pb2.pyi +47 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/logging_pb2.pyi +57 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/metric_pb2.pyi +186 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/monitored_resource_pb2.pyi +104 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/monitoring_pb2.pyi +57 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/policy_pb2.pyi +57 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/quota_pb2.pyi +116 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/resource_pb2.pyi +93 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/routing_pb2.pyi +49 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/service_pb2.pyi +170 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/source_info_pb2.pyi +34 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/system_parameter_pb2.pyi +60 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/usage_pb2.pyi +55 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api/visibility_pb2.pyi +56 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/py.typed +2 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/py.typed +2 -0
- py2docfx/venv/venv1/Lib/site-packages/google/cloud/extended_operations_pb2.pyi +45 -0
- py2docfx/venv/venv1/Lib/site-packages/google/cloud/location/locations_pb2.pyi +96 -0
- py2docfx/venv/venv1/Lib/site-packages/google/gapic/metadata/gapic_metadata_pb2.pyi +118 -0
- py2docfx/venv/venv1/Lib/site-packages/google/logging/type/http_request_pb2.pyi +91 -0
- py2docfx/venv/venv1/Lib/site-packages/google/logging/type/log_severity_pb2.pyi +42 -0
- py2docfx/venv/venv1/Lib/site-packages/google/longrunning/operations_proto_pb2.pyi +126 -0
- py2docfx/venv/venv1/Lib/site-packages/google/oauth2/py.typed +2 -0
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/code_pb2.pyi +58 -0
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/context/attribute_context_pb2.pyi +309 -0
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/context/audit_context_pb2.pyi +51 -0
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/error_details_pb2.pyi +207 -0
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/http_pb2.pyi +71 -0
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/status_pb2.pyi +41 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/calendar_period_pb2.pyi +40 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/color_pb2.pyi +42 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/date_pb2.pyi +36 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/datetime_pb2.pyi +77 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/dayofweek_pb2.pyi +40 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/decimal_pb2.pyi +27 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/expr_pb2.pyi +39 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/fraction_pb2.pyi +31 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/interval_pb2.pyi +36 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/latlng_pb2.pyi +31 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/localized_text_pb2.pyi +31 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/money_pb2.pyi +36 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/month_pb2.pyi +50 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/phone_number_pb2.pyi +48 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/postal_address_pb2.pyi +74 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/quaternion_pb2.pyi +39 -0
- py2docfx/venv/venv1/Lib/site-packages/google/type/timeofday_pb2.pyi +39 -0
- py2docfx/venv/venv1/Lib/site-packages/idna/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/jwt/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/packaging/__init__.py +15 -0
- py2docfx/venv/venv1/Lib/site-packages/{wheel/vendored/packaging → packaging}/_elffile.py +9 -7
- py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/_manylinux.py +12 -9
- py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/_musllinux.py +5 -3
- py2docfx/venv/venv1/Lib/site-packages/{wheel/vendored/packaging → packaging}/_parser.py +11 -13
- py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/_tokenizer.py +10 -8
- py2docfx/venv/venv1/Lib/site-packages/packaging/licenses/__init__.py +145 -0
- py2docfx/venv/venv1/Lib/site-packages/packaging/licenses/_spdx.py +759 -0
- py2docfx/venv/venv1/Lib/site-packages/{wheel/vendored/packaging → packaging}/markers.py +103 -25
- py2docfx/venv/venv1/Lib/site-packages/packaging/metadata.py +863 -0
- py2docfx/venv/venv1/Lib/site-packages/packaging/py.typed +0 -0
- py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/requirements.py +5 -4
- py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/specifiers.py +40 -31
- py2docfx/venv/venv1/Lib/site-packages/{wheel/vendored/packaging → packaging}/tags.py +96 -50
- py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/utils.py +39 -48
- py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/version.py +53 -32
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/certifi/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/chardet/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/distro/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/idna/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/packaging/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/pyparsing/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/rich/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/tenacity/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/tomli/py.typed +1 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/_vendor/truststore/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pip/py.typed +4 -0
- py2docfx/venv/venv1/Lib/site-packages/pkg_resources/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/rsa/py.typed +1 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_metadata/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/inflect/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/jaraco/collections/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/jaraco/functools/__init__.pyi +125 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/jaraco/functools/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/more_itertools/__init__.pyi +2 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/more_itertools/more.pyi +709 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/more_itertools/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/more_itertools/recipes.pyi +136 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/platformdirs/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/tomli/py.typed +1 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/typeguard/py.typed +0 -0
- py2docfx/venv/venv1/Lib/site-packages/typing_extensions.py +30 -12
- py2docfx/venv/venv1/Lib/site-packages/urllib3/_version.py +9 -4
- py2docfx/venv/venv1/Lib/site-packages/urllib3/contrib/emscripten/response.py +8 -16
- py2docfx/venv/venv1/Lib/site-packages/urllib3/contrib/pyopenssl.py +10 -0
- py2docfx/venv/venv1/Lib/site-packages/urllib3/exceptions.py +12 -4
- py2docfx/venv/venv1/Lib/site-packages/urllib3/http2/connection.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/urllib3/py.typed +2 -0
- py2docfx/venv/venv1/Lib/site-packages/urllib3/util/ssl_.py +21 -1
- py2docfx/venv/venv1/Lib/site-packages/urllib3/util/ssl_match_hostname.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/wheel/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/wheel/__main__.py +7 -5
- py2docfx/venv/venv1/Lib/site-packages/wheel/{cli → _commands}/__init__.py +3 -5
- py2docfx/venv/venv1/Lib/site-packages/wheel/{cli → _commands}/convert.py +14 -9
- py2docfx/venv/venv1/Lib/site-packages/wheel/{cli → _commands}/pack.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/wheel/{cli → _commands}/tags.py +4 -3
- py2docfx/venv/venv1/Lib/site-packages/wheel/_metadata.py +184 -0
- py2docfx/venv/venv1/Lib/site-packages/wheel/bdist_wheel.py +12 -23
- py2docfx/venv/venv1/Lib/site-packages/wheel/macosx_libfile.py +4 -0
- py2docfx/venv/venv1/Lib/site-packages/wheel/metadata.py +17 -183
- py2docfx/venv/venv1/Lib/site-packages/wheel/wheelfile.py +30 -16
- {py2docfx-0.1.16.dev2051338.dist-info → py2docfx-0.1.16.dev2064350.dist-info}/METADATA +2 -3
- {py2docfx-0.1.16.dev2051338.dist-info → py2docfx-0.1.16.dev2064350.dist-info}/RECORD +263 -104
- {py2docfx-0.1.16.dev2051338.dist-info → py2docfx-0.1.16.dev2064350.dist-info}/WHEEL +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/wheel/_bdist_wheel.py +0 -613
- py2docfx/venv/basevenv/Lib/site-packages/wheel/_setuptools_logging.py +0 -26
- py2docfx/venv/basevenv/Lib/site-packages/wheel/util.py +0 -17
- py2docfx/venv/basevenv/Lib/site-packages/wheel/vendored/packaging/_elffile.py +0 -108
- py2docfx/venv/basevenv/Lib/site-packages/wheel/vendored/packaging/_parser.py +0 -356
- py2docfx/venv/basevenv/Lib/site-packages/wheel/vendored/packaging/markers.py +0 -253
- py2docfx/venv/basevenv/Lib/site-packages/wheel/vendored/packaging/tags.py +0 -571
- py2docfx/venv/venv1/Lib/site-packages/wheel/_bdist_wheel.py +0 -613
- py2docfx/venv/venv1/Lib/site-packages/wheel/_setuptools_logging.py +0 -26
- py2docfx/venv/venv1/Lib/site-packages/wheel/util.py +0 -17
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/_manylinux.py +0 -260
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/_musllinux.py +0 -83
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/_structures.py +0 -61
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/_tokenizer.py +0 -192
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/requirements.py +0 -90
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/specifiers.py +0 -1011
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/utils.py +0 -172
- py2docfx/venv/venv1/Lib/site-packages/wheel/vendored/packaging/version.py +0 -561
- /py2docfx/venv/basevenv/Lib/site-packages/{wheel/vendored/__init__.py → certifi/py.typed} +0 -0
- /py2docfx/venv/basevenv/Lib/site-packages/{wheel/vendored/packaging/__init__.py → charset_normalizer/py.typed} +0 -0
- /py2docfx/venv/{venv1/Lib/site-packages/wheel/vendored/__init__.py → basevenv/Lib/site-packages/idna/py.typed} +0 -0
- /py2docfx/venv/{venv1/Lib/site-packages/wheel/vendored/packaging/__init__.py → basevenv/Lib/site-packages/jinja2/py.typed} +0 -0
- /py2docfx/venv/basevenv/Lib/site-packages/wheel/{cli → _commands}/unpack.py +0 -0
- /py2docfx/venv/{basevenv/Lib/site-packages/wheel/vendored → venv1/Lib/site-packages}/packaging/_structures.py +0 -0
- /py2docfx/venv/venv1/Lib/site-packages/wheel/{cli → _commands}/unpack.py +0 -0
- {py2docfx-0.1.16.dev2051338.dist-info → py2docfx-0.1.16.dev2064350.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
# Copyright 2025 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
from typing import ClassVar as _ClassVar
|
16
|
+
from typing import Optional as _Optional
|
17
|
+
|
18
|
+
from google.protobuf import descriptor as _descriptor
|
19
|
+
from google.protobuf import message as _message
|
20
|
+
|
21
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
22
|
+
|
23
|
+
class Quaternion(_message.Message):
|
24
|
+
__slots__ = ("x", "y", "z", "w")
|
25
|
+
X_FIELD_NUMBER: _ClassVar[int]
|
26
|
+
Y_FIELD_NUMBER: _ClassVar[int]
|
27
|
+
Z_FIELD_NUMBER: _ClassVar[int]
|
28
|
+
W_FIELD_NUMBER: _ClassVar[int]
|
29
|
+
x: float
|
30
|
+
y: float
|
31
|
+
z: float
|
32
|
+
w: float
|
33
|
+
def __init__(
|
34
|
+
self,
|
35
|
+
x: _Optional[float] = ...,
|
36
|
+
y: _Optional[float] = ...,
|
37
|
+
z: _Optional[float] = ...,
|
38
|
+
w: _Optional[float] = ...,
|
39
|
+
) -> None: ...
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Copyright 2025 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
from typing import ClassVar as _ClassVar
|
16
|
+
from typing import Optional as _Optional
|
17
|
+
|
18
|
+
from google.protobuf import descriptor as _descriptor
|
19
|
+
from google.protobuf import message as _message
|
20
|
+
|
21
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
22
|
+
|
23
|
+
class TimeOfDay(_message.Message):
|
24
|
+
__slots__ = ("hours", "minutes", "seconds", "nanos")
|
25
|
+
HOURS_FIELD_NUMBER: _ClassVar[int]
|
26
|
+
MINUTES_FIELD_NUMBER: _ClassVar[int]
|
27
|
+
SECONDS_FIELD_NUMBER: _ClassVar[int]
|
28
|
+
NANOS_FIELD_NUMBER: _ClassVar[int]
|
29
|
+
hours: int
|
30
|
+
minutes: int
|
31
|
+
seconds: int
|
32
|
+
nanos: int
|
33
|
+
def __init__(
|
34
|
+
self,
|
35
|
+
hours: _Optional[int] = ...,
|
36
|
+
minutes: _Optional[int] = ...,
|
37
|
+
seconds: _Optional[int] = ...,
|
38
|
+
nanos: _Optional[int] = ...,
|
39
|
+
) -> None: ...
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# This file is dual licensed under the terms of the Apache License, Version
|
2
|
+
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
3
|
+
# for complete details.
|
4
|
+
|
5
|
+
__title__ = "packaging"
|
6
|
+
__summary__ = "Core utilities for Python packages"
|
7
|
+
__uri__ = "https://github.com/pypa/packaging"
|
8
|
+
|
9
|
+
__version__ = "24.2"
|
10
|
+
|
11
|
+
__author__ = "Donald Stufft and individual contributors"
|
12
|
+
__email__ = "donald@stufft.io"
|
13
|
+
|
14
|
+
__license__ = "BSD-2-Clause or Apache-2.0"
|
15
|
+
__copyright__ = f"2014 {__author__}"
|
@@ -8,10 +8,12 @@ Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
|
|
8
8
|
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
|
9
9
|
"""
|
10
10
|
|
11
|
+
from __future__ import annotations
|
12
|
+
|
11
13
|
import enum
|
12
14
|
import os
|
13
15
|
import struct
|
14
|
-
from typing import IO
|
16
|
+
from typing import IO
|
15
17
|
|
16
18
|
|
17
19
|
class ELFInvalid(ValueError):
|
@@ -46,8 +48,8 @@ class ELFFile:
|
|
46
48
|
|
47
49
|
try:
|
48
50
|
ident = self._read("16B")
|
49
|
-
except struct.error:
|
50
|
-
raise ELFInvalid("unable to parse identification")
|
51
|
+
except struct.error as e:
|
52
|
+
raise ELFInvalid("unable to parse identification") from e
|
51
53
|
magic = bytes(ident[:4])
|
52
54
|
if magic != b"\x7fELF":
|
53
55
|
raise ELFInvalid(f"invalid magic: {magic!r}")
|
@@ -65,11 +67,11 @@ class ELFFile:
|
|
65
67
|
(2, 1): ("<HHIQQQIHHH", "<IIQQQQQQ", (0, 2, 5)), # 64-bit LSB.
|
66
68
|
(2, 2): (">HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)), # 64-bit MSB.
|
67
69
|
}[(self.capacity, self.encoding)]
|
68
|
-
except KeyError:
|
70
|
+
except KeyError as e:
|
69
71
|
raise ELFInvalid(
|
70
72
|
f"unrecognized capacity ({self.capacity}) or "
|
71
73
|
f"encoding ({self.encoding})"
|
72
|
-
)
|
74
|
+
) from e
|
73
75
|
|
74
76
|
try:
|
75
77
|
(
|
@@ -87,11 +89,11 @@ class ELFFile:
|
|
87
89
|
except struct.error as e:
|
88
90
|
raise ELFInvalid("unable to parse machine and section information") from e
|
89
91
|
|
90
|
-
def _read(self, fmt: str) ->
|
92
|
+
def _read(self, fmt: str) -> tuple[int, ...]:
|
91
93
|
return struct.unpack(fmt, self._f.read(struct.calcsize(fmt)))
|
92
94
|
|
93
95
|
@property
|
94
|
-
def interpreter(self) ->
|
96
|
+
def interpreter(self) -> str | None:
|
95
97
|
"""
|
96
98
|
The path recorded in the ``PT_INTERP`` section header.
|
97
99
|
"""
|
@@ -1,3 +1,5 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
1
3
|
import collections
|
2
4
|
import contextlib
|
3
5
|
import functools
|
@@ -5,7 +7,7 @@ import os
|
|
5
7
|
import re
|
6
8
|
import sys
|
7
9
|
import warnings
|
8
|
-
from typing import
|
10
|
+
from typing import Generator, Iterator, NamedTuple, Sequence
|
9
11
|
|
10
12
|
from ._elffile import EIClass, EIData, ELFFile, EMachine
|
11
13
|
|
@@ -17,7 +19,7 @@ EF_ARM_ABI_FLOAT_HARD = 0x00000400
|
|
17
19
|
# `os.PathLike` not a generic type until Python 3.9, so sticking with `str`
|
18
20
|
# as the type for `path` until then.
|
19
21
|
@contextlib.contextmanager
|
20
|
-
def _parse_elf(path: str) -> Generator[
|
22
|
+
def _parse_elf(path: str) -> Generator[ELFFile | None, None, None]:
|
21
23
|
try:
|
22
24
|
with open(path, "rb") as f:
|
23
25
|
yield ELFFile(f)
|
@@ -72,7 +74,7 @@ def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool:
|
|
72
74
|
# For now, guess what the highest minor version might be, assume it will
|
73
75
|
# be 50 for testing. Once this actually happens, update the dictionary
|
74
76
|
# with the actual value.
|
75
|
-
_LAST_GLIBC_MINOR:
|
77
|
+
_LAST_GLIBC_MINOR: dict[int, int] = collections.defaultdict(lambda: 50)
|
76
78
|
|
77
79
|
|
78
80
|
class _GLibCVersion(NamedTuple):
|
@@ -80,7 +82,7 @@ class _GLibCVersion(NamedTuple):
|
|
80
82
|
minor: int
|
81
83
|
|
82
84
|
|
83
|
-
def _glibc_version_string_confstr() ->
|
85
|
+
def _glibc_version_string_confstr() -> str | None:
|
84
86
|
"""
|
85
87
|
Primary implementation of glibc_version_string using os.confstr.
|
86
88
|
"""
|
@@ -90,7 +92,7 @@ def _glibc_version_string_confstr() -> Optional[str]:
|
|
90
92
|
# https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
|
91
93
|
try:
|
92
94
|
# Should be a string like "glibc 2.17".
|
93
|
-
version_string:
|
95
|
+
version_string: str | None = os.confstr("CS_GNU_LIBC_VERSION")
|
94
96
|
assert version_string is not None
|
95
97
|
_, version = version_string.rsplit()
|
96
98
|
except (AssertionError, AttributeError, OSError, ValueError):
|
@@ -99,7 +101,7 @@ def _glibc_version_string_confstr() -> Optional[str]:
|
|
99
101
|
return version
|
100
102
|
|
101
103
|
|
102
|
-
def _glibc_version_string_ctypes() ->
|
104
|
+
def _glibc_version_string_ctypes() -> str | None:
|
103
105
|
"""
|
104
106
|
Fallback implementation of glibc_version_string using ctypes.
|
105
107
|
"""
|
@@ -143,12 +145,12 @@ def _glibc_version_string_ctypes() -> Optional[str]:
|
|
143
145
|
return version_str
|
144
146
|
|
145
147
|
|
146
|
-
def _glibc_version_string() ->
|
148
|
+
def _glibc_version_string() -> str | None:
|
147
149
|
"""Returns glibc version string, or None if not using glibc."""
|
148
150
|
return _glibc_version_string_confstr() or _glibc_version_string_ctypes()
|
149
151
|
|
150
152
|
|
151
|
-
def _parse_glibc_version(version_str: str) ->
|
153
|
+
def _parse_glibc_version(version_str: str) -> tuple[int, int]:
|
152
154
|
"""Parse glibc version.
|
153
155
|
|
154
156
|
We use a regexp instead of str.split because we want to discard any
|
@@ -162,13 +164,14 @@ def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
|
|
162
164
|
f"Expected glibc version with 2 components major.minor,"
|
163
165
|
f" got: {version_str}",
|
164
166
|
RuntimeWarning,
|
167
|
+
stacklevel=2,
|
165
168
|
)
|
166
169
|
return -1, -1
|
167
170
|
return int(m.group("major")), int(m.group("minor"))
|
168
171
|
|
169
172
|
|
170
173
|
@functools.lru_cache
|
171
|
-
def _get_glibc_version() ->
|
174
|
+
def _get_glibc_version() -> tuple[int, int]:
|
172
175
|
version_str = _glibc_version_string()
|
173
176
|
if version_str is None:
|
174
177
|
return (-1, -1)
|
@@ -4,11 +4,13 @@ This module implements logic to detect if the currently running Python is
|
|
4
4
|
linked against musl, and what musl version is used.
|
5
5
|
"""
|
6
6
|
|
7
|
+
from __future__ import annotations
|
8
|
+
|
7
9
|
import functools
|
8
10
|
import re
|
9
11
|
import subprocess
|
10
12
|
import sys
|
11
|
-
from typing import Iterator, NamedTuple,
|
13
|
+
from typing import Iterator, NamedTuple, Sequence
|
12
14
|
|
13
15
|
from ._elffile import ELFFile
|
14
16
|
|
@@ -18,7 +20,7 @@ class _MuslVersion(NamedTuple):
|
|
18
20
|
minor: int
|
19
21
|
|
20
22
|
|
21
|
-
def _parse_musl_version(output: str) ->
|
23
|
+
def _parse_musl_version(output: str) -> _MuslVersion | None:
|
22
24
|
lines = [n for n in (n.strip() for n in output.splitlines()) if n]
|
23
25
|
if len(lines) < 2 or lines[0][:4] != "musl":
|
24
26
|
return None
|
@@ -29,7 +31,7 @@ def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
|
|
29
31
|
|
30
32
|
|
31
33
|
@functools.lru_cache
|
32
|
-
def _get_musl_version(executable: str) ->
|
34
|
+
def _get_musl_version(executable: str) -> _MuslVersion | None:
|
33
35
|
"""Detect currently-running musl runtime version.
|
34
36
|
|
35
37
|
This is done by checking the specified executable's dynamic linking
|
@@ -4,8 +4,10 @@ The docstring for each __parse_* function contains EBNF-inspired grammar represe
|
|
4
4
|
the implementation.
|
5
5
|
"""
|
6
6
|
|
7
|
+
from __future__ import annotations
|
8
|
+
|
7
9
|
import ast
|
8
|
-
from typing import
|
10
|
+
from typing import NamedTuple, Sequence, Tuple, Union
|
9
11
|
|
10
12
|
from ._tokenizer import DEFAULT_RULES, Tokenizer
|
11
13
|
|
@@ -41,20 +43,16 @@ class Op(Node):
|
|
41
43
|
|
42
44
|
MarkerVar = Union[Variable, Value]
|
43
45
|
MarkerItem = Tuple[MarkerVar, Op, MarkerVar]
|
44
|
-
|
45
|
-
|
46
|
-
# mypy does not support recursive type definition
|
47
|
-
# https://github.com/python/mypy/issues/731
|
48
|
-
MarkerAtom = Any
|
49
|
-
MarkerList = List[Any]
|
46
|
+
MarkerAtom = Union[MarkerItem, Sequence["MarkerAtom"]]
|
47
|
+
MarkerList = Sequence[Union["MarkerList", MarkerAtom, str]]
|
50
48
|
|
51
49
|
|
52
50
|
class ParsedRequirement(NamedTuple):
|
53
51
|
name: str
|
54
52
|
url: str
|
55
|
-
extras:
|
53
|
+
extras: list[str]
|
56
54
|
specifier: str
|
57
|
-
marker:
|
55
|
+
marker: MarkerList | None
|
58
56
|
|
59
57
|
|
60
58
|
# --------------------------------------------------------------------------------------
|
@@ -87,7 +85,7 @@ def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement:
|
|
87
85
|
|
88
86
|
def _parse_requirement_details(
|
89
87
|
tokenizer: Tokenizer,
|
90
|
-
) ->
|
88
|
+
) -> tuple[str, str, MarkerList | None]:
|
91
89
|
"""
|
92
90
|
requirement_details = AT URL (WS requirement_marker?)?
|
93
91
|
| specifier WS? (requirement_marker)?
|
@@ -156,7 +154,7 @@ def _parse_requirement_marker(
|
|
156
154
|
return marker
|
157
155
|
|
158
156
|
|
159
|
-
def _parse_extras(tokenizer: Tokenizer) ->
|
157
|
+
def _parse_extras(tokenizer: Tokenizer) -> list[str]:
|
160
158
|
"""
|
161
159
|
extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
|
162
160
|
"""
|
@@ -175,11 +173,11 @@ def _parse_extras(tokenizer: Tokenizer) -> List[str]:
|
|
175
173
|
return extras
|
176
174
|
|
177
175
|
|
178
|
-
def _parse_extras_list(tokenizer: Tokenizer) ->
|
176
|
+
def _parse_extras_list(tokenizer: Tokenizer) -> list[str]:
|
179
177
|
"""
|
180
178
|
extras_list = identifier (wsp* ',' wsp* identifier)*
|
181
179
|
"""
|
182
|
-
extras:
|
180
|
+
extras: list[str] = []
|
183
181
|
|
184
182
|
if not tokenizer.check("IDENTIFIER"):
|
185
183
|
return extras
|
@@ -1,7 +1,9 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
1
3
|
import contextlib
|
2
4
|
import re
|
3
5
|
from dataclasses import dataclass
|
4
|
-
from typing import
|
6
|
+
from typing import Iterator, NoReturn
|
5
7
|
|
6
8
|
from .specifiers import Specifier
|
7
9
|
|
@@ -21,7 +23,7 @@ class ParserSyntaxError(Exception):
|
|
21
23
|
message: str,
|
22
24
|
*,
|
23
25
|
source: str,
|
24
|
-
span:
|
26
|
+
span: tuple[int, int],
|
25
27
|
) -> None:
|
26
28
|
self.span = span
|
27
29
|
self.message = message
|
@@ -34,7 +36,7 @@ class ParserSyntaxError(Exception):
|
|
34
36
|
return "\n ".join([self.message, self.source, marker])
|
35
37
|
|
36
38
|
|
37
|
-
DEFAULT_RULES:
|
39
|
+
DEFAULT_RULES: dict[str, str | re.Pattern[str]] = {
|
38
40
|
"LEFT_PARENTHESIS": r"\(",
|
39
41
|
"RIGHT_PARENTHESIS": r"\)",
|
40
42
|
"LEFT_BRACKET": r"\[",
|
@@ -96,13 +98,13 @@ class Tokenizer:
|
|
96
98
|
self,
|
97
99
|
source: str,
|
98
100
|
*,
|
99
|
-
rules:
|
101
|
+
rules: dict[str, str | re.Pattern[str]],
|
100
102
|
) -> None:
|
101
103
|
self.source = source
|
102
|
-
self.rules:
|
104
|
+
self.rules: dict[str, re.Pattern[str]] = {
|
103
105
|
name: re.compile(pattern) for name, pattern in rules.items()
|
104
106
|
}
|
105
|
-
self.next_token:
|
107
|
+
self.next_token: Token | None = None
|
106
108
|
self.position = 0
|
107
109
|
|
108
110
|
def consume(self, name: str) -> None:
|
@@ -154,8 +156,8 @@ class Tokenizer:
|
|
154
156
|
self,
|
155
157
|
message: str,
|
156
158
|
*,
|
157
|
-
span_start:
|
158
|
-
span_end:
|
159
|
+
span_start: int | None = None,
|
160
|
+
span_end: int | None = None,
|
159
161
|
) -> NoReturn:
|
160
162
|
"""Raise ParserSyntaxError at the given position."""
|
161
163
|
span = (
|
@@ -0,0 +1,145 @@
|
|
1
|
+
#######################################################################################
|
2
|
+
#
|
3
|
+
# Adapted from:
|
4
|
+
# https://github.com/pypa/hatch/blob/5352e44/backend/src/hatchling/licenses/parse.py
|
5
|
+
#
|
6
|
+
# MIT License
|
7
|
+
#
|
8
|
+
# Copyright (c) 2017-present Ofek Lev <oss@ofek.dev>
|
9
|
+
#
|
10
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
11
|
+
# software and associated documentation files (the "Software"), to deal in the Software
|
12
|
+
# without restriction, including without limitation the rights to use, copy, modify,
|
13
|
+
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
14
|
+
# permit persons to whom the Software is furnished to do so, subject to the following
|
15
|
+
# conditions:
|
16
|
+
#
|
17
|
+
# The above copyright notice and this permission notice shall be included in all copies
|
18
|
+
# or substantial portions of the Software.
|
19
|
+
#
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
21
|
+
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
22
|
+
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
23
|
+
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
24
|
+
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
25
|
+
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
|
+
#
|
27
|
+
#
|
28
|
+
# With additional allowance of arbitrary `LicenseRef-` identifiers, not just
|
29
|
+
# `LicenseRef-Public-Domain` and `LicenseRef-Proprietary`.
|
30
|
+
#
|
31
|
+
#######################################################################################
|
32
|
+
from __future__ import annotations
|
33
|
+
|
34
|
+
import re
|
35
|
+
from typing import NewType, cast
|
36
|
+
|
37
|
+
from packaging.licenses._spdx import EXCEPTIONS, LICENSES
|
38
|
+
|
39
|
+
__all__ = [
|
40
|
+
"NormalizedLicenseExpression",
|
41
|
+
"InvalidLicenseExpression",
|
42
|
+
"canonicalize_license_expression",
|
43
|
+
]
|
44
|
+
|
45
|
+
license_ref_allowed = re.compile("^[A-Za-z0-9.-]*$")
|
46
|
+
|
47
|
+
NormalizedLicenseExpression = NewType("NormalizedLicenseExpression", str)
|
48
|
+
|
49
|
+
|
50
|
+
class InvalidLicenseExpression(ValueError):
|
51
|
+
"""Raised when a license-expression string is invalid
|
52
|
+
|
53
|
+
>>> canonicalize_license_expression("invalid")
|
54
|
+
Traceback (most recent call last):
|
55
|
+
...
|
56
|
+
packaging.licenses.InvalidLicenseExpression: Invalid license expression: 'invalid'
|
57
|
+
"""
|
58
|
+
|
59
|
+
|
60
|
+
def canonicalize_license_expression(
|
61
|
+
raw_license_expression: str,
|
62
|
+
) -> NormalizedLicenseExpression:
|
63
|
+
if not raw_license_expression:
|
64
|
+
message = f"Invalid license expression: {raw_license_expression!r}"
|
65
|
+
raise InvalidLicenseExpression(message)
|
66
|
+
|
67
|
+
# Pad any parentheses so tokenization can be achieved by merely splitting on
|
68
|
+
# whitespace.
|
69
|
+
license_expression = raw_license_expression.replace("(", " ( ").replace(")", " ) ")
|
70
|
+
licenseref_prefix = "LicenseRef-"
|
71
|
+
license_refs = {
|
72
|
+
ref.lower(): "LicenseRef-" + ref[len(licenseref_prefix) :]
|
73
|
+
for ref in license_expression.split()
|
74
|
+
if ref.lower().startswith(licenseref_prefix.lower())
|
75
|
+
}
|
76
|
+
|
77
|
+
# Normalize to lower case so we can look up licenses/exceptions
|
78
|
+
# and so boolean operators are Python-compatible.
|
79
|
+
license_expression = license_expression.lower()
|
80
|
+
|
81
|
+
tokens = license_expression.split()
|
82
|
+
|
83
|
+
# Rather than implementing boolean logic, we create an expression that Python can
|
84
|
+
# parse. Everything that is not involved with the grammar itself is treated as
|
85
|
+
# `False` and the expression should evaluate as such.
|
86
|
+
python_tokens = []
|
87
|
+
for token in tokens:
|
88
|
+
if token not in {"or", "and", "with", "(", ")"}:
|
89
|
+
python_tokens.append("False")
|
90
|
+
elif token == "with":
|
91
|
+
python_tokens.append("or")
|
92
|
+
elif token == "(" and python_tokens and python_tokens[-1] not in {"or", "and"}:
|
93
|
+
message = f"Invalid license expression: {raw_license_expression!r}"
|
94
|
+
raise InvalidLicenseExpression(message)
|
95
|
+
else:
|
96
|
+
python_tokens.append(token)
|
97
|
+
|
98
|
+
python_expression = " ".join(python_tokens)
|
99
|
+
try:
|
100
|
+
invalid = eval(python_expression, globals(), locals())
|
101
|
+
except Exception:
|
102
|
+
invalid = True
|
103
|
+
|
104
|
+
if invalid is not False:
|
105
|
+
message = f"Invalid license expression: {raw_license_expression!r}"
|
106
|
+
raise InvalidLicenseExpression(message) from None
|
107
|
+
|
108
|
+
# Take a final pass to check for unknown licenses/exceptions.
|
109
|
+
normalized_tokens = []
|
110
|
+
for token in tokens:
|
111
|
+
if token in {"or", "and", "with", "(", ")"}:
|
112
|
+
normalized_tokens.append(token.upper())
|
113
|
+
continue
|
114
|
+
|
115
|
+
if normalized_tokens and normalized_tokens[-1] == "WITH":
|
116
|
+
if token not in EXCEPTIONS:
|
117
|
+
message = f"Unknown license exception: {token!r}"
|
118
|
+
raise InvalidLicenseExpression(message)
|
119
|
+
|
120
|
+
normalized_tokens.append(EXCEPTIONS[token]["id"])
|
121
|
+
else:
|
122
|
+
if token.endswith("+"):
|
123
|
+
final_token = token[:-1]
|
124
|
+
suffix = "+"
|
125
|
+
else:
|
126
|
+
final_token = token
|
127
|
+
suffix = ""
|
128
|
+
|
129
|
+
if final_token.startswith("licenseref-"):
|
130
|
+
if not license_ref_allowed.match(final_token):
|
131
|
+
message = f"Invalid licenseref: {final_token!r}"
|
132
|
+
raise InvalidLicenseExpression(message)
|
133
|
+
normalized_tokens.append(license_refs[final_token] + suffix)
|
134
|
+
else:
|
135
|
+
if final_token not in LICENSES:
|
136
|
+
message = f"Unknown license: {final_token!r}"
|
137
|
+
raise InvalidLicenseExpression(message)
|
138
|
+
normalized_tokens.append(LICENSES[final_token]["id"] + suffix)
|
139
|
+
|
140
|
+
normalized_expression = " ".join(normalized_tokens)
|
141
|
+
|
142
|
+
return cast(
|
143
|
+
NormalizedLicenseExpression,
|
144
|
+
normalized_expression.replace("( ", "(").replace(" )", ")"),
|
145
|
+
)
|