py2docfx 0.1.16.dev2064350__py3-none-any.whl → 0.1.17__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 +1 -3
- py2docfx/convert_prepare/get_source.py +1 -6
- py2docfx/convert_prepare/package_info.py +1 -1
- py2docfx/docfx_yaml/miss_reference.py +1 -1
- py2docfx/docfx_yaml/parameter_utils.py +58 -6
- py2docfx/docfx_yaml/tests/roots/test-translator-typing/code_with_typing.py +14 -0
- py2docfx/docfx_yaml/tests/roots/test-translator-typing/conf.py +18 -0
- py2docfx/docfx_yaml/tests/test_translator_typing.py +39 -0
- py2docfx/docfx_yaml/utils.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/certifi/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/certifi/core.py +1 -32
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/cli/__main__.py +62 -2
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/constant.py +17 -0
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/legacy.py +1 -3
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/md.py +19 -14
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/utils.py +6 -0
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/version.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/packaging/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_elffile.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_manylinux.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_parser.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_tokenizer.py +5 -4
- py2docfx/venv/basevenv/Lib/site-packages/packaging/licenses/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/packaging/markers.py +53 -22
- py2docfx/venv/basevenv/Lib/site-packages/packaging/metadata.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/specifiers.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/tags.py +39 -0
- py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/__init__.py +6 -7
- py2docfx/venv/basevenv/Lib/site-packages/pygments/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/_sql_builtins.py +106 -0
- py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/scripting.py +5 -3
- py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/sql.py +24 -118
- py2docfx/venv/basevenv/Lib/site-packages/requests/__version__.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/requests/compat.py +12 -0
- py2docfx/venv/basevenv/Lib/site-packages/requests/models.py +3 -1
- py2docfx/venv/basevenv/Lib/site-packages/requests/utils.py +6 -16
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/__init__.py +0 -38
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_discovery.py +33 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py +63 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +5 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_entry_points.py +4 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_normalization.py +0 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_path.py +12 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_reqs.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_scripts.py +361 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_shutil.py +6 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/build_meta.py +25 -37
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_egg.py +9 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_wheel.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/build_ext.py +29 -28
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/develop.py +39 -179
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/easy_install.py +17 -2352
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/editable_wheel.py +14 -31
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/egg_info.py +0 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install.py +3 -55
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install_scripts.py +5 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/sdist.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/compat/py310.py +11 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/dist.py +10 -12
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/installer.py +34 -29
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/contexts.py +0 -14
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/fixtures.py +235 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/integration/test_pbr.py +20 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_meta.py +0 -24
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_develop.py +1 -64
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist_info.py +0 -63
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_editable_install.py +15 -41
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_egg_info.py +3 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_scripts.py +12 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_wheel.py +12 -36
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/wheel.py +49 -24
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/__init__.py +6 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/arabic_stemmer.py +798 -797
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/armenian_stemmer.py +212 -213
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/basestemmer.py +20 -54
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/basque_stemmer.py +202 -228
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/catalan_stemmer.py +370 -375
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/danish_stemmer.py +63 -61
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/dutch_porter_stemmer.py +466 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/dutch_stemmer.py +1217 -343
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/english_stemmer.py +295 -264
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/esperanto_stemmer.py +588 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/estonian_stemmer.py +850 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/finnish_stemmer.py +144 -143
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/french_stemmer.py +308 -246
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/german_stemmer.py +224 -167
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/greek_stemmer.py +1314 -1313
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/hindi_stemmer.py +39 -38
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/hungarian_stemmer.py +231 -256
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/indonesian_stemmer.py +61 -64
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/irish_stemmer.py +101 -106
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/italian_stemmer.py +272 -272
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/lithuanian_stemmer.py +233 -240
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/nepali_stemmer.py +108 -134
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/norwegian_stemmer.py +108 -63
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/porter_stemmer.py +101 -108
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/portuguese_stemmer.py +241 -250
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/romanian_stemmer.py +332 -296
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/russian_stemmer.py +178 -179
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/serbian_stemmer.py +2331 -2332
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/spanish_stemmer.py +254 -259
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/swedish_stemmer.py +143 -70
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/tamil_stemmer.py +638 -1491
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/turkish_stemmer.py +326 -292
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/yiddish_stemmer.py +245 -246
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/_version.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/connection.py +87 -38
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/contrib/emscripten/fetch.py +20 -0
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/poolmanager.py +17 -1
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/response.py +53 -24
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/request.py +12 -4
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/ssl_.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_base_async.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_aiohttp.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_base_async.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_requests_asyncio.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_aiohttp.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_requests_asyncio.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/opentelemetry.py +13 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared_async.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_utils.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_constants.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/default.py +23 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/environment.py +12 -16
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/service_fabric.py +22 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/user_password.py +10 -6
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/vscode.py +13 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/auth_code_redirect_handler.py +3 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/msal_client.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_persistent_cache.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azd_cli.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_cli.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_powershell.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/chained.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/default.py +22 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/environment.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/service_fabric.py +17 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/vscode.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/certifi/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/certifi/core.py +1 -32
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/cli/__main__.py +62 -2
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/constant.py +17 -0
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/legacy.py +1 -3
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/md.py +19 -14
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/utils.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/__about__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/__init__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/fernet.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/_oid.py +35 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/backends/openssl/backend.py +33 -10
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi +14 -5
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi +3 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/aead.pyi +49 -45
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ciphers.pyi +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed25519.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed448.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hashes.pyi +10 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hmac.pyi +3 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +8 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/keys.pyi +3 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/poly1305.pyi +6 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x448.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs12.pyi +9 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs7.pyi +7 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/test_support.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +79 -12
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/_conditional.py +9 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/binding.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/decrepit/ciphers/algorithms.py +5 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.py +4 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/_serialization.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/dh.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py +16 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py +47 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py +16 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.py +16 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py +14 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py +14 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/x448.py +14 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py +6 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/base.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/modes.py +18 -18
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/hashes.py +5 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/concatkdf.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.py +7 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/x963kdf.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/padding.py +7 -121
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/__init__.py +2 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py +21 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/pkcs7.py +48 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/ssh.py +68 -18
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/twofactor/hotp.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/twofactor/totp.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/utils.py +15 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/__init__.py +3 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/base.py +39 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/extensions.py +100 -49
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/name.py +27 -15
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/ocsp.py +60 -25
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/oid.py +2 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/verification.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/bidi.py +17 -4
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/client_info.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/gapic_v1/client_info.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_base.py +13 -4
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_streaming.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_streaming_async.py +8 -5
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_unary.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_unary_async.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/_default.py +2 -36
- py2docfx/venv/venv1/Lib/site-packages/google/auth/_helpers.py +240 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/aio/_helpers.py +62 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/aio/transport/aiohttp.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/compute_engine/_metadata.py +5 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/compute_engine/credentials.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/identity_pool.py +91 -2
- py2docfx/venv/venv1/Lib/site-packages/google/auth/impersonated_credentials.py +75 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/__init__.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/_aiohttp_requests.py +8 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/_http_client.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/requests.py +4 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/urllib3.py +15 -5
- py2docfx/venv/venv1/Lib/site-packages/google/auth/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/oauth2/id_token.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/google/oauth2/webauthn_types.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any.py +15 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/api_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/compiler/plugin_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor.py +15 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pb2.py +258 -113
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pool.py +22 -8
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/duration_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/empty_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/field_mask_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/decoder.py +106 -23
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/field_mask.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_edition_defaults.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_message.py +21 -18
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/testing_refleaks.py +8 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/well_known_types.py +60 -43
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/json_format.py +4 -5
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/message_factory.py +16 -0
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/runtime_version.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/source_context_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/struct_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/text_format.py +11 -7
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/timestamp_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/type_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/wrappers_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/error_details_pb2.py +29 -23
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/error_details_pb2.pyi +41 -2
- py2docfx/venv/venv1/Lib/site-packages/msal/application.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/msal/individual_cache.py +9 -5
- py2docfx/venv/venv1/Lib/site-packages/msal/managed_identity.py +4 -5
- py2docfx/venv/venv1/Lib/site-packages/msal/sku.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/msal/throttled_http_client.py +58 -30
- py2docfx/venv/venv1/Lib/site-packages/opencensus/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/__init__.py +138 -138
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/exporter.py +93 -93
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/processor.py +63 -63
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/protocol.py +206 -206
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/storage.py +205 -205
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/transport.py +355 -355
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/utils.py +79 -79
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/version.py +15 -15
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/log_exporter/__init__.py +314 -314
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/__init__.py +190 -190
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/__init__.py +62 -62
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/cpu.py +50 -50
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/http_requests.py +176 -176
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/memory.py +42 -42
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/process.py +87 -87
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/state.py +50 -50
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/statsbeat.py +100 -100
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/statsbeat_metrics.py +480 -480
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/trace_exporter/__init__.py +236 -236
- py2docfx/venv/venv1/Lib/site-packages/packaging/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/packaging/_elffile.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/_manylinux.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/_parser.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/_tokenizer.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/packaging/licenses/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/packaging/markers.py +53 -22
- py2docfx/venv/venv1/Lib/site-packages/packaging/metadata.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/specifiers.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/tags.py +39 -0
- py2docfx/venv/venv1/Lib/site-packages/pkg_resources/__init__.py +6 -7
- py2docfx/venv/venv1/Lib/site-packages/requests/__version__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/requests/compat.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/requests/models.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/requests/utils.py +6 -16
- py2docfx/venv/venv1/Lib/site-packages/rsa/__init__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/rsa/asn1.py +52 -52
- py2docfx/venv/venv1/Lib/site-packages/rsa/cli.py +321 -321
- py2docfx/venv/venv1/Lib/site-packages/rsa/common.py +184 -184
- py2docfx/venv/venv1/Lib/site-packages/rsa/core.py +53 -53
- py2docfx/venv/venv1/Lib/site-packages/rsa/key.py +858 -858
- py2docfx/venv/venv1/Lib/site-packages/rsa/parallel.py +96 -96
- py2docfx/venv/venv1/Lib/site-packages/rsa/pem.py +134 -134
- py2docfx/venv/venv1/Lib/site-packages/rsa/pkcs1.py +485 -485
- py2docfx/venv/venv1/Lib/site-packages/rsa/pkcs1_v2.py +100 -100
- py2docfx/venv/venv1/Lib/site-packages/rsa/prime.py +198 -198
- py2docfx/venv/venv1/Lib/site-packages/rsa/py.typed +1 -1
- py2docfx/venv/venv1/Lib/site-packages/rsa/randnum.py +95 -95
- py2docfx/venv/venv1/Lib/site-packages/rsa/transform.py +72 -72
- py2docfx/venv/venv1/Lib/site-packages/rsa/util.py +97 -97
- py2docfx/venv/venv1/Lib/site-packages/setuptools/__init__.py +0 -38
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_discovery.py +33 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py +63 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +5 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_entry_points.py +4 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_normalization.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_path.py +12 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_reqs.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_scripts.py +361 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_shutil.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/build_meta.py +25 -37
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_egg.py +9 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_wheel.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/build_ext.py +29 -28
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/develop.py +39 -179
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/easy_install.py +17 -2352
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/editable_wheel.py +14 -31
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/egg_info.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install.py +3 -55
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install_scripts.py +5 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/sdist.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/compat/py310.py +11 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/dist.py +10 -12
- py2docfx/venv/venv1/Lib/site-packages/setuptools/installer.py +34 -29
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/contexts.py +0 -14
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/fixtures.py +235 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/integration/test_pbr.py +20 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_meta.py +0 -24
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_develop.py +1 -64
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist_info.py +0 -63
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_editable_install.py +15 -41
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_egg_info.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_scripts.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_wheel.py +12 -36
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/wheel.py +49 -24
- py2docfx/venv/venv1/Lib/site-packages/typing_extensions.py +357 -703
- py2docfx/venv/venv1/Lib/site-packages/urllib3/_version.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/urllib3/connection.py +87 -38
- py2docfx/venv/venv1/Lib/site-packages/urllib3/contrib/emscripten/fetch.py +20 -0
- py2docfx/venv/venv1/Lib/site-packages/urllib3/poolmanager.py +17 -1
- py2docfx/venv/venv1/Lib/site-packages/urllib3/response.py +53 -24
- py2docfx/venv/venv1/Lib/site-packages/urllib3/util/request.py +12 -4
- py2docfx/venv/venv1/Lib/site-packages/urllib3/util/ssl_.py +1 -1
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/METADATA +1 -1
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/RECORD +374 -372
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/WHEEL +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/package_index.py +0 -1137
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/sandbox.py +0 -536
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/server.py +0 -86
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_easy_install.py +0 -1476
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_packageindex.py +0 -267
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_sandbox.py +0 -134
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/application.py +0 -119
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/application.py +0 -121
- py2docfx/venv/venv1/Lib/site-packages/setuptools/package_index.py +0 -1137
- py2docfx/venv/venv1/Lib/site-packages/setuptools/sandbox.py +0 -536
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/server.py +0 -86
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_easy_install.py +0 -1476
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_packageindex.py +0 -267
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_sandbox.py +0 -134
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/top_level.txt +0 -0
@@ -18,15 +18,38 @@ import base64
|
|
18
18
|
import calendar
|
19
19
|
import datetime
|
20
20
|
from email.message import Message
|
21
|
+
import hashlib
|
22
|
+
import json
|
23
|
+
import logging
|
21
24
|
import sys
|
25
|
+
from typing import Any, Dict, Mapping, Optional, Union
|
22
26
|
import urllib
|
23
27
|
|
24
28
|
from google.auth import exceptions
|
25
29
|
|
30
|
+
|
31
|
+
# _BASE_LOGGER_NAME is the base logger for all google-based loggers.
|
32
|
+
_BASE_LOGGER_NAME = "google"
|
33
|
+
|
34
|
+
# _LOGGING_INITIALIZED ensures that base logger is only configured once
|
35
|
+
# (unless already configured by the end-user).
|
36
|
+
_LOGGING_INITIALIZED = False
|
37
|
+
|
38
|
+
|
26
39
|
# The smallest MDS cache used by this library stores tokens until 4 minutes from
|
27
40
|
# expiry.
|
28
41
|
REFRESH_THRESHOLD = datetime.timedelta(minutes=3, seconds=45)
|
29
42
|
|
43
|
+
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1684): Audit and update the list below.
|
44
|
+
_SENSITIVE_FIELDS = {
|
45
|
+
"accessToken",
|
46
|
+
"access_token",
|
47
|
+
"id_token",
|
48
|
+
"client_id",
|
49
|
+
"refresh_token",
|
50
|
+
"client_secret",
|
51
|
+
}
|
52
|
+
|
30
53
|
|
31
54
|
def copy_docstring(source_class):
|
32
55
|
"""Decorator that copies a method's docstring from another class.
|
@@ -271,3 +294,220 @@ def is_python_3():
|
|
271
294
|
bool: True if the Python interpreter is Python 3 and False otherwise.
|
272
295
|
"""
|
273
296
|
return sys.version_info > (3, 0)
|
297
|
+
|
298
|
+
|
299
|
+
def _hash_sensitive_info(data: Union[dict, list]) -> Union[dict, list, str]:
|
300
|
+
"""
|
301
|
+
Hashes sensitive information within a dictionary.
|
302
|
+
|
303
|
+
Args:
|
304
|
+
data: The dictionary containing data to be processed.
|
305
|
+
|
306
|
+
Returns:
|
307
|
+
A new dictionary with sensitive values replaced by their SHA512 hashes.
|
308
|
+
If the input is a list, returns a list with each element recursively processed.
|
309
|
+
If the input is neither a dict nor a list, returns the type of the input as a string.
|
310
|
+
|
311
|
+
"""
|
312
|
+
if isinstance(data, dict):
|
313
|
+
hashed_data: Dict[Any, Union[Optional[str], dict, list]] = {}
|
314
|
+
for key, value in data.items():
|
315
|
+
if key in _SENSITIVE_FIELDS and not isinstance(value, (dict, list)):
|
316
|
+
hashed_data[key] = _hash_value(value, key)
|
317
|
+
elif isinstance(value, (dict, list)):
|
318
|
+
hashed_data[key] = _hash_sensitive_info(value)
|
319
|
+
else:
|
320
|
+
hashed_data[key] = value
|
321
|
+
return hashed_data
|
322
|
+
elif isinstance(data, list):
|
323
|
+
hashed_list = []
|
324
|
+
for val in data:
|
325
|
+
hashed_list.append(_hash_sensitive_info(val))
|
326
|
+
return hashed_list
|
327
|
+
else:
|
328
|
+
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1701):
|
329
|
+
# Investigate and hash sensitive info before logging when the data type is
|
330
|
+
# not a dict or a list.
|
331
|
+
return str(type(data))
|
332
|
+
|
333
|
+
|
334
|
+
def _hash_value(value, field_name: str) -> Optional[str]:
|
335
|
+
"""Hashes a value and returns a formatted hash string."""
|
336
|
+
if value is None:
|
337
|
+
return None
|
338
|
+
encoded_value = str(value).encode("utf-8")
|
339
|
+
hash_object = hashlib.sha512()
|
340
|
+
hash_object.update(encoded_value)
|
341
|
+
hex_digest = hash_object.hexdigest()
|
342
|
+
return f"hashed_{field_name}-{hex_digest}"
|
343
|
+
|
344
|
+
|
345
|
+
def _logger_configured(logger: logging.Logger) -> bool:
|
346
|
+
"""Determines whether `logger` has non-default configuration
|
347
|
+
|
348
|
+
Args:
|
349
|
+
logger: The logger to check.
|
350
|
+
|
351
|
+
Returns:
|
352
|
+
bool: Whether the logger has any non-default configuration.
|
353
|
+
"""
|
354
|
+
return (
|
355
|
+
logger.handlers != [] or logger.level != logging.NOTSET or not logger.propagate
|
356
|
+
)
|
357
|
+
|
358
|
+
|
359
|
+
def is_logging_enabled(logger: logging.Logger) -> bool:
|
360
|
+
"""
|
361
|
+
Checks if debug logging is enabled for the given logger.
|
362
|
+
|
363
|
+
Args:
|
364
|
+
logger: The logging.Logger instance to check.
|
365
|
+
|
366
|
+
Returns:
|
367
|
+
True if debug logging is enabled, False otherwise.
|
368
|
+
"""
|
369
|
+
# NOTE: Log propagation to the root logger is disabled unless
|
370
|
+
# the base logger i.e. logging.getLogger("google") is
|
371
|
+
# explicitly configured by the end user. Ideally this
|
372
|
+
# needs to happen in the client layer (already does for GAPICs).
|
373
|
+
# However, this is implemented here to avoid logging
|
374
|
+
# (if a root logger is configured) when a version of google-auth
|
375
|
+
# which supports logging is used with:
|
376
|
+
# - an older version of a GAPIC which does not support logging.
|
377
|
+
# - Apiary client which does not support logging.
|
378
|
+
global _LOGGING_INITIALIZED
|
379
|
+
if not _LOGGING_INITIALIZED:
|
380
|
+
base_logger = logging.getLogger(_BASE_LOGGER_NAME)
|
381
|
+
if not _logger_configured(base_logger):
|
382
|
+
base_logger.propagate = False
|
383
|
+
_LOGGING_INITIALIZED = True
|
384
|
+
|
385
|
+
return logger.isEnabledFor(logging.DEBUG)
|
386
|
+
|
387
|
+
|
388
|
+
def request_log(
|
389
|
+
logger: logging.Logger,
|
390
|
+
method: str,
|
391
|
+
url: str,
|
392
|
+
body: Optional[bytes],
|
393
|
+
headers: Optional[Mapping[str, str]],
|
394
|
+
) -> None:
|
395
|
+
"""
|
396
|
+
Logs an HTTP request at the DEBUG level if logging is enabled.
|
397
|
+
|
398
|
+
Args:
|
399
|
+
logger: The logging.Logger instance to use.
|
400
|
+
method: The HTTP method (e.g., "GET", "POST").
|
401
|
+
url: The URL of the request.
|
402
|
+
body: The request body (can be None).
|
403
|
+
headers: The request headers (can be None).
|
404
|
+
"""
|
405
|
+
if is_logging_enabled(logger):
|
406
|
+
content_type = (
|
407
|
+
headers["Content-Type"] if headers and "Content-Type" in headers else ""
|
408
|
+
)
|
409
|
+
json_body = _parse_request_body(body, content_type=content_type)
|
410
|
+
logged_body = _hash_sensitive_info(json_body)
|
411
|
+
logger.debug(
|
412
|
+
"Making request...",
|
413
|
+
extra={
|
414
|
+
"httpRequest": {
|
415
|
+
"method": method,
|
416
|
+
"url": url,
|
417
|
+
"body": logged_body,
|
418
|
+
"headers": headers,
|
419
|
+
}
|
420
|
+
},
|
421
|
+
)
|
422
|
+
|
423
|
+
|
424
|
+
def _parse_request_body(body: Optional[bytes], content_type: str = "") -> Any:
|
425
|
+
"""
|
426
|
+
Parses a request body, handling bytes and string types, and different content types.
|
427
|
+
|
428
|
+
Args:
|
429
|
+
body (Optional[bytes]): The request body.
|
430
|
+
content_type (str): The content type of the request body, e.g., "application/json",
|
431
|
+
"application/x-www-form-urlencoded", or "text/plain". If empty, attempts
|
432
|
+
to parse as JSON.
|
433
|
+
|
434
|
+
Returns:
|
435
|
+
Parsed body (dict, str, or None).
|
436
|
+
- JSON: Decodes if content_type is "application/json" or None (fallback).
|
437
|
+
- URL-encoded: Parses if content_type is "application/x-www-form-urlencoded".
|
438
|
+
- Plain text: Returns string if content_type is "text/plain".
|
439
|
+
- None: Returns if body is None, UTF-8 decode fails, or content_type is unknown.
|
440
|
+
"""
|
441
|
+
if body is None:
|
442
|
+
return None
|
443
|
+
try:
|
444
|
+
body_str = body.decode("utf-8")
|
445
|
+
except (UnicodeDecodeError, AttributeError):
|
446
|
+
return None
|
447
|
+
content_type = content_type.lower()
|
448
|
+
if not content_type or "application/json" in content_type:
|
449
|
+
try:
|
450
|
+
return json.loads(body_str)
|
451
|
+
except (json.JSONDecodeError, TypeError):
|
452
|
+
return body_str
|
453
|
+
if "application/x-www-form-urlencoded" in content_type:
|
454
|
+
parsed_query = urllib.parse.parse_qs(body_str)
|
455
|
+
result = {k: v[0] for k, v in parsed_query.items()}
|
456
|
+
return result
|
457
|
+
if "text/plain" in content_type:
|
458
|
+
return body_str
|
459
|
+
return None
|
460
|
+
|
461
|
+
|
462
|
+
def _parse_response(response: Any) -> Any:
|
463
|
+
"""
|
464
|
+
Parses a response, attempting to decode JSON.
|
465
|
+
|
466
|
+
Args:
|
467
|
+
response: The response object to parse. This can be any type, but
|
468
|
+
it is expected to have a `json()` method if it contains JSON.
|
469
|
+
|
470
|
+
Returns:
|
471
|
+
The parsed response. If the response contains valid JSON, the
|
472
|
+
decoded JSON object (e.g., a dictionary or list) is returned.
|
473
|
+
If the response does not have a `json()` method or if the JSON
|
474
|
+
decoding fails, None is returned.
|
475
|
+
"""
|
476
|
+
try:
|
477
|
+
json_response = response.json()
|
478
|
+
return json_response
|
479
|
+
except Exception:
|
480
|
+
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1744):
|
481
|
+
# Parse and return response payload as json based on different content types.
|
482
|
+
return None
|
483
|
+
|
484
|
+
|
485
|
+
def _response_log_base(logger: logging.Logger, parsed_response: Any) -> None:
|
486
|
+
"""
|
487
|
+
Logs a parsed HTTP response at the DEBUG level.
|
488
|
+
|
489
|
+
This internal helper function takes a parsed response and logs it
|
490
|
+
using the provided logger. It also applies a hashing function to
|
491
|
+
potentially sensitive information before logging.
|
492
|
+
|
493
|
+
Args:
|
494
|
+
logger: The logging.Logger instance to use for logging.
|
495
|
+
parsed_response: The parsed HTTP response object (e.g., a dictionary,
|
496
|
+
list, or the original response if parsing failed).
|
497
|
+
"""
|
498
|
+
|
499
|
+
logged_response = _hash_sensitive_info(parsed_response)
|
500
|
+
logger.debug("Response received...", extra={"httpResponse": logged_response})
|
501
|
+
|
502
|
+
|
503
|
+
def response_log(logger: logging.Logger, response: Any) -> None:
|
504
|
+
"""
|
505
|
+
Logs an HTTP response at the DEBUG level if logging is enabled.
|
506
|
+
|
507
|
+
Args:
|
508
|
+
logger: The logging.Logger instance to use.
|
509
|
+
response: The HTTP response object to log.
|
510
|
+
"""
|
511
|
+
if is_logging_enabled(logger):
|
512
|
+
json_response = _parse_response(response)
|
513
|
+
_response_log_base(logger, json_response)
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Copyright 2025 Google Inc.
|
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
|
+
"""Helper functions for commonly used utilities."""
|
16
|
+
|
17
|
+
|
18
|
+
import logging
|
19
|
+
from typing import Any
|
20
|
+
|
21
|
+
from google.auth import _helpers
|
22
|
+
|
23
|
+
|
24
|
+
async def _parse_response_async(response: Any) -> Any:
|
25
|
+
"""
|
26
|
+
Parses an async response, attempting to decode JSON.
|
27
|
+
|
28
|
+
Args:
|
29
|
+
response: The response object to parse. This can be any type, but
|
30
|
+
it is expected to have a `json()` method if it contains JSON.
|
31
|
+
|
32
|
+
Returns:
|
33
|
+
The parsed response. If the response contains valid JSON, the
|
34
|
+
decoded JSON object (e.g., a dictionary) is returned.
|
35
|
+
If the response does not have a `json()` method or if the JSON
|
36
|
+
decoding fails, None is returned.
|
37
|
+
"""
|
38
|
+
try:
|
39
|
+
json_response = await response.json()
|
40
|
+
return json_response
|
41
|
+
except Exception:
|
42
|
+
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1745):
|
43
|
+
# Parse and return response payload as json based on different content types.
|
44
|
+
return None
|
45
|
+
|
46
|
+
|
47
|
+
async def response_log_async(logger: logging.Logger, response: Any) -> None:
|
48
|
+
"""
|
49
|
+
Logs an Async HTTP response at the DEBUG level if logging is enabled.
|
50
|
+
|
51
|
+
Args:
|
52
|
+
logger: The logging.Logger instance to use.
|
53
|
+
response: The HTTP response object to log.
|
54
|
+
"""
|
55
|
+
if _helpers.is_logging_enabled(logger):
|
56
|
+
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1755):
|
57
|
+
# Parsing the response for async streaming logging results in
|
58
|
+
# the stream to be empty downstream. For now, we will not be logging
|
59
|
+
# the response for async responses until we investigate further.
|
60
|
+
# json_response = await _parse_response_async(response)
|
61
|
+
json_response = None
|
62
|
+
_helpers._response_log_base(logger, json_response)
|
@@ -16,6 +16,7 @@
|
|
16
16
|
"""
|
17
17
|
|
18
18
|
import asyncio
|
19
|
+
import logging
|
19
20
|
from typing import AsyncGenerator, Mapping, Optional
|
20
21
|
|
21
22
|
try:
|
@@ -27,8 +28,11 @@ except ImportError as caught_exc: # pragma: NO COVER
|
|
27
28
|
|
28
29
|
from google.auth import _helpers
|
29
30
|
from google.auth import exceptions
|
31
|
+
from google.auth.aio import _helpers as _helpers_async
|
30
32
|
from google.auth.aio import transport
|
31
33
|
|
34
|
+
_LOGGER = logging.getLogger(__name__)
|
35
|
+
|
32
36
|
|
33
37
|
class Response(transport.Response):
|
34
38
|
"""
|
@@ -155,6 +159,7 @@ class Request(transport.Request):
|
|
155
159
|
self._session = aiohttp.ClientSession()
|
156
160
|
|
157
161
|
client_timeout = aiohttp.ClientTimeout(total=timeout)
|
162
|
+
_helpers.request_log(_LOGGER, method, url, body, headers)
|
158
163
|
response = await self._session.request(
|
159
164
|
method,
|
160
165
|
url,
|
@@ -163,6 +168,7 @@ class Request(transport.Request):
|
|
163
168
|
timeout=client_timeout,
|
164
169
|
**kwargs,
|
165
170
|
)
|
171
|
+
await _helpers_async.response_log_async(_LOGGER, response)
|
166
172
|
return Response(response)
|
167
173
|
|
168
174
|
except aiohttp.ClientError as caught_exc:
|
@@ -159,6 +159,7 @@ def get(
|
|
159
159
|
retry_count=5,
|
160
160
|
headers=None,
|
161
161
|
return_none_for_not_found_error=False,
|
162
|
+
timeout=_METADATA_DEFAULT_TIMEOUT,
|
162
163
|
):
|
163
164
|
"""Fetch a resource from the metadata server.
|
164
165
|
|
@@ -178,6 +179,7 @@ def get(
|
|
178
179
|
headers (Optional[Mapping[str, str]]): Headers for the request.
|
179
180
|
return_none_for_not_found_error (Optional[bool]): If True, returns None
|
180
181
|
for 404 error instead of throwing an exception.
|
182
|
+
timeout (int): How long to wait, in seconds for the metadata server to respond.
|
181
183
|
|
182
184
|
Returns:
|
183
185
|
Union[Mapping, str]: If the metadata server returns JSON, a mapping of
|
@@ -204,7 +206,9 @@ def get(
|
|
204
206
|
failure_reason = None
|
205
207
|
for attempt in backoff:
|
206
208
|
try:
|
207
|
-
response = request(
|
209
|
+
response = request(
|
210
|
+
url=url, method="GET", headers=headers_to_use, timeout=timeout
|
211
|
+
)
|
208
212
|
if response.status in transport.DEFAULT_RETRYABLE_STATUS_CODES:
|
209
213
|
_LOGGER.warning(
|
210
214
|
"Compute Engine Metadata server unavailable on "
|
@@ -124,8 +124,9 @@ class Credentials(
|
|
124
124
|
scopes = self._scopes if self._scopes is not None else self._default_scopes
|
125
125
|
try:
|
126
126
|
self._retrieve_info(request)
|
127
|
+
# Always fetch token with default service account email.
|
127
128
|
self.token, self.expiry = _metadata.get_service_account_token(
|
128
|
-
request, service_account=
|
129
|
+
request, service_account="default", scopes=scopes
|
129
130
|
)
|
130
131
|
except exceptions.TransportError as caught_exc:
|
131
132
|
new_exc = exceptions.RefreshError(caught_exc)
|
@@ -41,6 +41,7 @@ try:
|
|
41
41
|
except ImportError: # pragma: NO COVER
|
42
42
|
from collections import Mapping # type: ignore
|
43
43
|
import abc
|
44
|
+
import base64
|
44
45
|
import json
|
45
46
|
import os
|
46
47
|
from typing import NamedTuple
|
@@ -145,9 +146,88 @@ class _UrlSupplier(SubjectTokenSupplier):
|
|
145
146
|
class _X509Supplier(SubjectTokenSupplier):
|
146
147
|
"""Internal supplier for X509 workload credentials. This class is used internally and always returns an empty string as the subject token."""
|
147
148
|
|
149
|
+
def __init__(self, trust_chain_path, leaf_cert_callback):
|
150
|
+
self._trust_chain_path = trust_chain_path
|
151
|
+
self._leaf_cert_callback = leaf_cert_callback
|
152
|
+
|
148
153
|
@_helpers.copy_docstring(SubjectTokenSupplier)
|
149
154
|
def get_subject_token(self, context, request):
|
150
|
-
|
155
|
+
# Import OpennSSL inline because it is an extra import only required by customers
|
156
|
+
# using mTLS.
|
157
|
+
from OpenSSL import crypto
|
158
|
+
|
159
|
+
leaf_cert = crypto.load_certificate(
|
160
|
+
crypto.FILETYPE_PEM, self._leaf_cert_callback()
|
161
|
+
)
|
162
|
+
trust_chain = self._read_trust_chain()
|
163
|
+
cert_chain = []
|
164
|
+
|
165
|
+
cert_chain.append(_X509Supplier._encode_cert(leaf_cert))
|
166
|
+
|
167
|
+
if trust_chain is None or len(trust_chain) == 0:
|
168
|
+
return json.dumps(cert_chain)
|
169
|
+
|
170
|
+
# Append the first cert if it is not the leaf cert.
|
171
|
+
first_cert = _X509Supplier._encode_cert(trust_chain[0])
|
172
|
+
if first_cert != cert_chain[0]:
|
173
|
+
cert_chain.append(first_cert)
|
174
|
+
|
175
|
+
for i in range(1, len(trust_chain)):
|
176
|
+
encoded = _X509Supplier._encode_cert(trust_chain[i])
|
177
|
+
# Check if the current cert is the leaf cert and raise an exception if it is.
|
178
|
+
if encoded == cert_chain[0]:
|
179
|
+
raise exceptions.RefreshError(
|
180
|
+
"The leaf certificate must be at the top of the trust chain file"
|
181
|
+
)
|
182
|
+
else:
|
183
|
+
cert_chain.append(encoded)
|
184
|
+
return json.dumps(cert_chain)
|
185
|
+
|
186
|
+
def _read_trust_chain(self):
|
187
|
+
# Import OpennSSL inline because it is an extra import only required by customers
|
188
|
+
# using mTLS.
|
189
|
+
from OpenSSL import crypto
|
190
|
+
|
191
|
+
certificate_trust_chain = []
|
192
|
+
# If no trust chain path was provided, return an empty list.
|
193
|
+
if self._trust_chain_path is None or self._trust_chain_path == "":
|
194
|
+
return certificate_trust_chain
|
195
|
+
try:
|
196
|
+
# Open the trust chain file.
|
197
|
+
with open(self._trust_chain_path, "rb") as f:
|
198
|
+
trust_chain_data = f.read()
|
199
|
+
# Split PEM data into individual certificates.
|
200
|
+
cert_blocks = trust_chain_data.split(b"-----BEGIN CERTIFICATE-----")
|
201
|
+
for cert_block in cert_blocks:
|
202
|
+
# Skip empty blocks.
|
203
|
+
if cert_block.strip():
|
204
|
+
cert_data = b"-----BEGIN CERTIFICATE-----" + cert_block
|
205
|
+
try:
|
206
|
+
# Load each certificate and add it to the trust chain.
|
207
|
+
cert = crypto.load_certificate(
|
208
|
+
crypto.FILETYPE_PEM, cert_data
|
209
|
+
)
|
210
|
+
certificate_trust_chain.append(cert)
|
211
|
+
except Exception as e:
|
212
|
+
raise exceptions.RefreshError(
|
213
|
+
"Error loading PEM certificates from the trust chain file '{}'".format(
|
214
|
+
self._trust_chain_path
|
215
|
+
)
|
216
|
+
) from e
|
217
|
+
return certificate_trust_chain
|
218
|
+
except FileNotFoundError:
|
219
|
+
raise exceptions.RefreshError(
|
220
|
+
"Trust chain file '{}' was not found.".format(self._trust_chain_path)
|
221
|
+
)
|
222
|
+
|
223
|
+
def _encode_cert(cert):
|
224
|
+
# Import OpennSSL inline because it is an extra import only required by customers
|
225
|
+
# using mTLS.
|
226
|
+
from OpenSSL import crypto
|
227
|
+
|
228
|
+
return base64.b64encode(
|
229
|
+
crypto.dump_certificate(crypto.FILETYPE_ASN1, cert)
|
230
|
+
).decode("utf-8")
|
151
231
|
|
152
232
|
|
153
233
|
def _parse_token_data(token_content, format_type="text", subject_token_field_name=None):
|
@@ -296,7 +376,9 @@ class Credentials(external_account.Credentials):
|
|
296
376
|
self._credential_source_headers,
|
297
377
|
)
|
298
378
|
else: # self._credential_source_certificate
|
299
|
-
self._subject_token_supplier = _X509Supplier(
|
379
|
+
self._subject_token_supplier = _X509Supplier(
|
380
|
+
self._trust_chain_path, self._get_cert_bytes
|
381
|
+
)
|
300
382
|
|
301
383
|
@_helpers.copy_docstring(external_account.Credentials)
|
302
384
|
def retrieve_subject_token(self, request):
|
@@ -314,6 +396,10 @@ class Credentials(external_account.Credentials):
|
|
314
396
|
self._certificate_config_location
|
315
397
|
)
|
316
398
|
|
399
|
+
def _get_cert_bytes(self):
|
400
|
+
cert_path, _ = self._get_mtls_cert_and_key_paths()
|
401
|
+
return _mtls_helper._read_cert_file(cert_path)
|
402
|
+
|
317
403
|
def _mtls_required(self):
|
318
404
|
return self._credential_source_certificate is not None
|
319
405
|
|
@@ -350,6 +436,9 @@ class Credentials(external_account.Credentials):
|
|
350
436
|
use_default = self._credential_source_certificate.get(
|
351
437
|
"use_default_certificate_config"
|
352
438
|
)
|
439
|
+
self._trust_chain_path = self._credential_source_certificate.get(
|
440
|
+
"trust_chain_path"
|
441
|
+
)
|
353
442
|
if self._certificate_config_location and use_default:
|
354
443
|
raise exceptions.MalformedError(
|
355
444
|
"Invalid certificate configuration, certificate_config_location cannot be specified when use_default_certificate_config = true."
|
@@ -47,6 +47,12 @@ _DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in seconds
|
|
47
47
|
|
48
48
|
_GOOGLE_OAUTH2_TOKEN_ENDPOINT = "https://oauth2.googleapis.com/token"
|
49
49
|
|
50
|
+
_SOURCE_CREDENTIAL_AUTHORIZED_USER_TYPE = "authorized_user"
|
51
|
+
_SOURCE_CREDENTIAL_SERVICE_ACCOUNT_TYPE = "service_account"
|
52
|
+
_SOURCE_CREDENTIAL_EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = (
|
53
|
+
"external_account_authorized_user"
|
54
|
+
)
|
55
|
+
|
50
56
|
|
51
57
|
def _make_iam_token_request(
|
52
58
|
request,
|
@@ -410,6 +416,75 @@ class Credentials(
|
|
410
416
|
cred._target_scopes = scopes or default_scopes
|
411
417
|
return cred
|
412
418
|
|
419
|
+
@classmethod
|
420
|
+
def from_impersonated_service_account_info(cls, info, scopes=None):
|
421
|
+
"""Creates a Credentials instance from parsed impersonated service account credentials info.
|
422
|
+
|
423
|
+
Args:
|
424
|
+
info (Mapping[str, str]): The impersonated service account credentials info in Google
|
425
|
+
format.
|
426
|
+
scopes (Sequence[str]): Optional list of scopes to include in the
|
427
|
+
credentials.
|
428
|
+
|
429
|
+
Returns:
|
430
|
+
google.oauth2.credentials.Credentials: The constructed
|
431
|
+
credentials.
|
432
|
+
|
433
|
+
Raises:
|
434
|
+
InvalidType: If the info["source_credentials"] are not a supported impersonation type
|
435
|
+
InvalidValue: If the info["service_account_impersonation_url"] is not in the expected format.
|
436
|
+
ValueError: If the info is not in the expected format.
|
437
|
+
"""
|
438
|
+
|
439
|
+
source_credentials_info = info.get("source_credentials")
|
440
|
+
source_credentials_type = source_credentials_info.get("type")
|
441
|
+
if source_credentials_type == _SOURCE_CREDENTIAL_AUTHORIZED_USER_TYPE:
|
442
|
+
from google.oauth2 import credentials
|
443
|
+
|
444
|
+
source_credentials = credentials.Credentials.from_authorized_user_info(
|
445
|
+
source_credentials_info
|
446
|
+
)
|
447
|
+
elif source_credentials_type == _SOURCE_CREDENTIAL_SERVICE_ACCOUNT_TYPE:
|
448
|
+
from google.oauth2 import service_account
|
449
|
+
|
450
|
+
source_credentials = service_account.Credentials.from_service_account_info(
|
451
|
+
source_credentials_info
|
452
|
+
)
|
453
|
+
elif (
|
454
|
+
source_credentials_type
|
455
|
+
== _SOURCE_CREDENTIAL_EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE
|
456
|
+
):
|
457
|
+
from google.auth import external_account_authorized_user
|
458
|
+
|
459
|
+
source_credentials = external_account_authorized_user.Credentials.from_info(
|
460
|
+
source_credentials_info
|
461
|
+
)
|
462
|
+
else:
|
463
|
+
raise exceptions.InvalidType(
|
464
|
+
"source credential of type {} is not supported.".format(
|
465
|
+
source_credentials_type
|
466
|
+
)
|
467
|
+
)
|
468
|
+
|
469
|
+
impersonation_url = info.get("service_account_impersonation_url")
|
470
|
+
start_index = impersonation_url.rfind("/")
|
471
|
+
end_index = impersonation_url.find(":generateAccessToken")
|
472
|
+
if start_index == -1 or end_index == -1 or start_index > end_index:
|
473
|
+
raise exceptions.InvalidValue(
|
474
|
+
"Cannot extract target principal from {}".format(impersonation_url)
|
475
|
+
)
|
476
|
+
target_principal = impersonation_url[start_index + 1 : end_index]
|
477
|
+
delegates = info.get("delegates")
|
478
|
+
quota_project_id = info.get("quota_project_id")
|
479
|
+
|
480
|
+
return cls(
|
481
|
+
source_credentials,
|
482
|
+
target_principal,
|
483
|
+
scopes,
|
484
|
+
delegates,
|
485
|
+
quota_project_id=quota_project_id,
|
486
|
+
)
|
487
|
+
|
413
488
|
|
414
489
|
class IDTokenCredentials(credentials.CredentialsWithQuotaProject):
|
415
490
|
"""Open ID Connect ID Token-based service account credentials.
|
@@ -22,14 +22,20 @@ from __future__ import absolute_import
|
|
22
22
|
|
23
23
|
import asyncio
|
24
24
|
import functools
|
25
|
+
import logging
|
25
26
|
|
26
27
|
import aiohttp # type: ignore
|
27
28
|
import urllib3 # type: ignore
|
28
29
|
|
30
|
+
from google.auth import _helpers
|
29
31
|
from google.auth import exceptions
|
30
32
|
from google.auth import transport
|
33
|
+
from google.auth.aio import _helpers as _helpers_async
|
31
34
|
from google.auth.transport import requests
|
32
35
|
|
36
|
+
|
37
|
+
_LOGGER = logging.getLogger(__name__)
|
38
|
+
|
33
39
|
# Timeout can be re-defined depending on async requirement. Currently made 60s more than
|
34
40
|
# sync timeout.
|
35
41
|
_DEFAULT_TIMEOUT = 180 # in seconds
|
@@ -182,10 +188,11 @@ class Request(transport.Request):
|
|
182
188
|
self.session = aiohttp.ClientSession(
|
183
189
|
auto_decompress=False
|
184
190
|
) # pragma: NO COVER
|
185
|
-
|
191
|
+
_helpers.request_log(_LOGGER, method, url, body, headers)
|
186
192
|
response = await self.session.request(
|
187
193
|
method, url, data=body, headers=headers, timeout=timeout, **kwargs
|
188
194
|
)
|
195
|
+
await _helpers_async.response_log_async(_LOGGER, response)
|
189
196
|
return _CombinedResponse(response)
|
190
197
|
|
191
198
|
except aiohttp.ClientError as caught_exc:
|
@@ -19,6 +19,7 @@ import logging
|
|
19
19
|
import socket
|
20
20
|
import urllib
|
21
21
|
|
22
|
+
from google.auth import _helpers
|
22
23
|
from google.auth import exceptions
|
23
24
|
from google.auth import transport
|
24
25
|
|
@@ -99,10 +100,11 @@ class Request(transport.Request):
|
|
99
100
|
connection = http_client.HTTPConnection(parts.netloc, timeout=timeout)
|
100
101
|
|
101
102
|
try:
|
102
|
-
_LOGGER.debug("Making request: %s %s", method, url)
|
103
103
|
|
104
|
+
_helpers.request_log(_LOGGER, method, url, body, headers)
|
104
105
|
connection.request(method, path, body=body, headers=headers, **kwargs)
|
105
106
|
response = connection.getresponse()
|
107
|
+
_helpers.response_log(_LOGGER, response)
|
106
108
|
return Response(response)
|
107
109
|
|
108
110
|
except (http_client.HTTPException, socket.error) as caught_exc:
|