snowflake-connector-python 3.17.3__tar.gz → 3.17.4__tar.gz
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.
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/DESCRIPTION.md +4 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/MANIFEST.in +1 -1
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/PKG-INFO +5 -1
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/connection_diagnostic.py +4 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/session_manager.py +22 -12
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/ssl_wrap_socket.py +78 -36
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/__init__.py +23 -8
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/__version__.py +3 -3
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/adapters.py +162 -3
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/api.py +1 -1
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/auth.py +0 -1
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/compat.py +31 -4
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/cookies.py +8 -8
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/exceptions.py +11 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/models.py +12 -6
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/requests/packages.py +23 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/sessions.py +6 -8
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/status_codes.py +5 -5
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/utils.py +15 -22
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/LICENSE.txt +1 -1
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/__init__.py +211 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/_base_connection.py +165 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/_collections.py +479 -0
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/request.py → snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/_request_methods.py +137 -50
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/_version.py +21 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/connection.py +1102 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/connectionpool.py +409 -368
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/contrib/emscripten/__init__.py +16 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/contrib/emscripten/connection.py +255 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/contrib/emscripten/emscripten_fetch_worker.js +110 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/contrib/emscripten/fetch.py +728 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/contrib/emscripten/request.py +22 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/contrib/emscripten/response.py +277 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py +228 -173
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/contrib/socks.py +48 -36
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/exceptions.py +110 -98
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/fields.py +341 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/filepost.py +28 -37
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/http2/__init__.py +53 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/http2/connection.py +356 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/http2/probe.py +87 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/poolmanager.py +237 -124
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/py.typed +2 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/response.py +1307 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/__init__.py +6 -13
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/connection.py +34 -53
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/proxy.py +12 -26
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/util/request.py +266 -0
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/util/response.py +101 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/retry.py +138 -225
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/util/ssl_.py +524 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/ssl_match_hostname.py +48 -48
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/ssltransport.py +106 -56
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/timeout.py +61 -57
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/url.py +214 -180
- snowflake_connector_python-3.17.4/src/snowflake/connector/vendored/urllib3/util/util.py +42 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/util/wait.py +31 -59
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/version.py +1 -1
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake_connector_python.egg-info/PKG-INFO +5 -1
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake_connector_python.egg-info/SOURCES.txt +14 -14
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/__init__.py +0 -85
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/_collections.py +0 -355
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/_version.py +0 -2
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/connection.py +0 -572
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/contrib/_appengine_environ.py +0 -36
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/__init__.py +0 -0
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/bindings.py +0 -519
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/low_level.py +0 -397
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/contrib/appengine.py +0 -314
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/contrib/ntlmpool.py +0 -130
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/contrib/securetransport.py +0 -920
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/fields.py +0 -274
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/packages/__init__.py +0 -0
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/packages/backports/__init__.py +0 -0
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/packages/backports/makefile.py +0 -51
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/packages/backports/weakref_finalize.py +0 -155
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/packages/six.py +0 -1076
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/response.py +0 -885
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/util/queue.py +0 -22
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/util/request.py +0 -146
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/util/response.py +0 -107
- snowflake_connector_python-3.17.3/src/snowflake/connector/vendored/urllib3/util/ssl_.py +0 -495
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/CONTRIBUTING.md +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/LICENSE.txt +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/NOTICE +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/README.md +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/SECURITY.md +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/pyproject.toml +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/setup.cfg +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/setup.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/__init__.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/_query_context_cache.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/_sql_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/_utils.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/arrow_context.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/__init__.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/_auth.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/_http_server.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/_oauth_base.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/by_plugin.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/default.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/idtoken.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/keypair.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/no_auth.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/oauth.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/oauth_code.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/oauth_credentials.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/okta.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/pat.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/usrpwdmfa.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/webbrowser.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/auth/workload_identity.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/azure_storage_client.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/backoff_policies.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/bind_upload_agent.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/cache.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/compat.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/config_manager.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/connection.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/constants.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/converter.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/converter_issue23517.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/converter_null.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/converter_snowsql.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/cursor.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/dbapi.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/description.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/direct_file_operation_utils.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/encryption_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/errorcode.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/errors.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/externals_utils/__init__.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/externals_utils/externals_setup.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/feature.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/file_compression_type.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/file_lock.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/file_transfer_agent.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/file_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/gcs_storage_client.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/gzip_decoder.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/interval_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/local_storage_client.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/log_configuration.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/logging_utils/__init__.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/logging_utils/filters.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecFloatConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecFloatConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IColumnConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntervalConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntervalConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/LICENSE.txt +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/macros.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_accessors.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_alloc.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_assert.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_builder.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_emitter.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_endian.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_epilogue.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_flatbuffers.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_identifier.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_iov.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_prologue.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_refmap.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_rtconfig.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_types.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_verifier.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/flatcc_portable.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/paligned_alloc.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pattributes.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_pop.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_push.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian_detect.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinline.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinttypes.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable_basic.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstatic_assert.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdalign.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdint.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/punaligned.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pversion.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pwarnings.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc.c +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.c +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_arrow_iterator.pyx +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.c +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.c +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.h +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.cpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.hpp +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/network.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/ocsp_asn1crypto.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/ocsp_snowflake.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/options.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/pandas_tools.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/platform_detection.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/proxy.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/py.typed +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/result_batch.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/result_set.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/s3_storage_client.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/secret_detector.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/sf_dirs.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/sfbinaryformat.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/sfdatetime.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/snow_logging.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/sqlstate.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/ssd_internal_keys.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/storage_client.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/telemetry.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/telemetry_oob.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/test_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/time_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/token_cache.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/tool/__init__.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/tool/dump_certs.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/tool/dump_ocsp_response.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/tool/dump_ocsp_response_cache.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/tool/probe_connection.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/url_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/util_text.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/__init__.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/LICENSE +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/_internal_utils.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/certs.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/help.py +1 -1
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/hooks.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/requests/structures.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/vendored/urllib3/contrib/__init__.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake/connector/wif_util.py +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake_connector_python.egg-info/dependency_links.txt +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake_connector_python.egg-info/entry_points.txt +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake_connector_python.egg-info/not-zip-safe +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake_connector_python.egg-info/requires.txt +0 -0
- {snowflake_connector_python-3.17.3 → snowflake_connector_python-3.17.4}/src/snowflake_connector_python.egg-info/top_level.txt +0 -0
|
@@ -7,6 +7,10 @@ https://docs.snowflake.com/
|
|
|
7
7
|
Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python
|
|
8
8
|
|
|
9
9
|
# Release Notes
|
|
10
|
+
- v3.17.4(September 22,2025)
|
|
11
|
+
- Added support for intermediate certificates as roots when they are stored in the trust store
|
|
12
|
+
- Bumped up vendored `urllib3` to `2.5.0` and `requests` to `v2.32.5`
|
|
13
|
+
|
|
10
14
|
- v3.17.3(September 02,2025)
|
|
11
15
|
- Enhanced configuration file permission warning messages.
|
|
12
16
|
- Improved warning messages for readable permission issues to include clear instructions on how to skip warnings using the `SF_SKIP_WARNING_FOR_READ_PERMISSIONS_ON_CONFIG_FILE` environment variable.
|
|
@@ -4,7 +4,7 @@ include LICENSE.txt
|
|
|
4
4
|
include NOTICE
|
|
5
5
|
include pyproject.toml
|
|
6
6
|
include src/snowflake/connector/nanoarrow_cpp/ArrowIterator/LICENSE.txt
|
|
7
|
-
recursive-include src/snowflake/connector py.typed *.py *.pyx
|
|
7
|
+
recursive-include src/snowflake/connector py.typed *.py *.pyx *.js
|
|
8
8
|
recursive-include src/snowflake/connector/vendored LICENSE*
|
|
9
9
|
|
|
10
10
|
recursive-include src/snowflake/connector/nanoarrow_cpp *.cpp *.hpp
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snowflake-connector-python
|
|
3
|
-
Version: 3.17.
|
|
3
|
+
Version: 3.17.4
|
|
4
4
|
Summary: Snowflake Connector for Python
|
|
5
5
|
Home-page: https://www.snowflake.com/
|
|
6
6
|
Author: Snowflake, Inc
|
|
@@ -86,6 +86,10 @@ https://docs.snowflake.com/
|
|
|
86
86
|
Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python
|
|
87
87
|
|
|
88
88
|
# Release Notes
|
|
89
|
+
- v3.17.4(September 22,2025)
|
|
90
|
+
- Added support for intermediate certificates as roots when they are stored in the trust store
|
|
91
|
+
- Bumped up vendored `urllib3` to `2.5.0` and `requests` to `v2.32.5`
|
|
92
|
+
|
|
89
93
|
- v3.17.3(September 02,2025)
|
|
90
94
|
- Enhanced configuration file permission warning messages.
|
|
91
95
|
- Improved warning messages for readable permission issues to include clear instructions on how to skip warnings using the `SF_SKIP_WARNING_FOR_READ_PERMISSIONS_ON_CONFIG_FILE` environment variable.
|
|
@@ -240,6 +240,10 @@ class ConnectionDiagnostic:
|
|
|
240
240
|
|
|
241
241
|
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
|
242
242
|
context.load_verify_locations(certifi.where())
|
|
243
|
+
# Best-effort: enable partial-chain when supported
|
|
244
|
+
_partial_flag = getattr(ssl, "VERIFY_X509_PARTIAL_CHAIN", 0)
|
|
245
|
+
if _partial_flag and hasattr(context, "verify_flags"):
|
|
246
|
+
context.verify_flags |= _partial_flag
|
|
243
247
|
sock = context.wrap_socket(conn, server_hostname=host)
|
|
244
248
|
certificate = ssl.DER_cert_to_PEM_cert(sock.getpeercert(True))
|
|
245
249
|
http_request = f"""GET / {host}:{port} HTTP/1.1\r\n
|
|
@@ -14,7 +14,7 @@ from .proxy import get_proxy_url
|
|
|
14
14
|
from .vendored import requests
|
|
15
15
|
from .vendored.requests import Response, Session
|
|
16
16
|
from .vendored.requests.adapters import BaseAdapter, HTTPAdapter
|
|
17
|
-
from .vendored.requests.exceptions import InvalidProxyURL
|
|
17
|
+
from .vendored.requests.exceptions import InvalidProxyURL, InvalidURL
|
|
18
18
|
from .vendored.requests.utils import prepend_scheme_if_needed, select_proxy
|
|
19
19
|
from .vendored.urllib3 import PoolManager, Retry
|
|
20
20
|
from .vendored.urllib3.poolmanager import ProxyManager
|
|
@@ -23,7 +23,6 @@ from .vendored.urllib3.util.url import parse_url
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
24
24
|
from .vendored.urllib3.connectionpool import HTTPConnectionPool, HTTPSConnectionPool
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
logger = logging.getLogger(__name__)
|
|
28
27
|
REQUESTS_RETRY = 1 # requests library builtin retry
|
|
29
28
|
|
|
@@ -60,19 +59,25 @@ def _propagate_session_manager_to_ocsp(generator_func):
|
|
|
60
59
|
class ProxySupportAdapter(HTTPAdapter):
|
|
61
60
|
"""This Adapter creates proper headers for Proxy CONNECT messages."""
|
|
62
61
|
|
|
63
|
-
def
|
|
64
|
-
self,
|
|
62
|
+
def get_connection_with_tls_context(
|
|
63
|
+
self, request, verify, proxies=None, cert=None
|
|
65
64
|
) -> HTTPConnectionPool | HTTPSConnectionPool:
|
|
66
|
-
proxy = select_proxy(url, proxies)
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
proxy = select_proxy(request.url, proxies)
|
|
66
|
+
try:
|
|
67
|
+
host_params, pool_kwargs = self.build_connection_pool_key_attributes(
|
|
68
|
+
request,
|
|
69
|
+
verify,
|
|
70
|
+
cert,
|
|
71
|
+
)
|
|
72
|
+
except ValueError as e:
|
|
73
|
+
raise InvalidURL(e, request=request)
|
|
69
74
|
if proxy:
|
|
70
75
|
proxy = prepend_scheme_if_needed(proxy, "http")
|
|
71
76
|
proxy_url = parse_url(proxy)
|
|
72
77
|
if not proxy_url.host:
|
|
73
78
|
raise InvalidProxyURL(
|
|
74
|
-
"Please check proxy URL. It is malformed"
|
|
75
|
-
"
|
|
79
|
+
"Please check proxy URL. It is malformed "
|
|
80
|
+
"and could be missing the host."
|
|
76
81
|
)
|
|
77
82
|
proxy_manager = self.proxy_manager_for(proxy)
|
|
78
83
|
|
|
@@ -85,17 +90,22 @@ class ProxySupportAdapter(HTTPAdapter):
|
|
|
85
90
|
# Note: netloc also keeps user-info (user:pass@host) if present in URL. The driver never sends
|
|
86
91
|
# URLs with embedded credentials, so we leave them unhandled — for full support
|
|
87
92
|
# we’d need to manually concatenate hostname with optional port and IPv6 brackets.
|
|
93
|
+
parsed_url = urlparse(request.url)
|
|
88
94
|
proxy_manager.proxy_headers["Host"] = parsed_url.netloc
|
|
89
95
|
else:
|
|
90
96
|
logger.debug(
|
|
91
97
|
f"Unable to set 'Host' to proxy manager of type {type(proxy_manager)} as"
|
|
92
98
|
f" it does not have attribute 'proxy_headers'."
|
|
93
99
|
)
|
|
94
|
-
|
|
100
|
+
|
|
101
|
+
conn = proxy_manager.connection_from_host(
|
|
102
|
+
**host_params, pool_kwargs=pool_kwargs
|
|
103
|
+
)
|
|
95
104
|
else:
|
|
96
105
|
# Only scheme should be lower case
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
conn = self.poolmanager.connection_from_host(
|
|
107
|
+
**host_params, pool_kwargs=pool_kwargs
|
|
108
|
+
)
|
|
99
109
|
|
|
100
110
|
return conn
|
|
101
111
|
|
|
@@ -8,11 +8,13 @@ from __future__ import annotations
|
|
|
8
8
|
#
|
|
9
9
|
# and added OCSP validator on the top.
|
|
10
10
|
import logging
|
|
11
|
+
import os
|
|
12
|
+
import ssl
|
|
11
13
|
import time
|
|
12
14
|
import weakref
|
|
13
15
|
from contextvars import ContextVar
|
|
14
16
|
from functools import wraps
|
|
15
|
-
from inspect import
|
|
17
|
+
from inspect import signature as _sig
|
|
16
18
|
from socket import socket
|
|
17
19
|
from typing import Any
|
|
18
20
|
|
|
@@ -38,9 +40,57 @@ FEATURE_OCSP_RESPONSE_CACHE_FILE_NAME: str | None = None
|
|
|
38
40
|
log = logging.getLogger(__name__)
|
|
39
41
|
|
|
40
42
|
|
|
43
|
+
# Helper utilities (private)
|
|
44
|
+
def _resolve_cafile(kwargs: dict[str, Any]) -> str | None:
|
|
45
|
+
"""Resolve CA bundle path from kwargs or standard environment variables.
|
|
46
|
+
|
|
47
|
+
Precedence:
|
|
48
|
+
1) kwargs['ca_certs'] if provided by caller
|
|
49
|
+
2) REQUESTS_CA_BUNDLE
|
|
50
|
+
3) SSL_CERT_FILE
|
|
51
|
+
"""
|
|
52
|
+
caf = kwargs.get("ca_certs")
|
|
53
|
+
if caf:
|
|
54
|
+
return caf
|
|
55
|
+
return os.environ.get("REQUESTS_CA_BUNDLE") or os.environ.get("SSL_CERT_FILE")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _ensure_partial_chain_on_context(ctx: PyOpenSSLContext, cafile: str | None) -> None:
|
|
59
|
+
"""Load CA bundle (when provided) and enable OpenSSL partial-chain support on ctx."""
|
|
60
|
+
if cafile:
|
|
61
|
+
try:
|
|
62
|
+
ctx.load_verify_locations(cafile=cafile, capath=None)
|
|
63
|
+
except (ssl.SSLError, OSError, ValueError):
|
|
64
|
+
# Leave context unchanged; handshake/validation surfaces failures
|
|
65
|
+
pass
|
|
66
|
+
try:
|
|
67
|
+
store = ctx._ctx.get_cert_store()
|
|
68
|
+
from OpenSSL import crypto as _crypto
|
|
69
|
+
|
|
70
|
+
if hasattr(_crypto, "X509StoreFlags") and hasattr(
|
|
71
|
+
_crypto.X509StoreFlags, "PARTIAL_CHAIN"
|
|
72
|
+
):
|
|
73
|
+
store.set_flags(_crypto.X509StoreFlags.PARTIAL_CHAIN)
|
|
74
|
+
except (AttributeError, ImportError, OpenSSL.SSL.Error, OSError, ValueError):
|
|
75
|
+
# Best-effort; if not available, default chain building applies
|
|
76
|
+
pass
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _build_context_with_partial_chain(cafile: str | None) -> PyOpenSSLContext:
|
|
80
|
+
"""Create PyOpenSSL context configured for CERT_REQUIRED and partial-chain trust."""
|
|
81
|
+
ctx = PyOpenSSLContext(ssl_.PROTOCOL_TLS_CLIENT)
|
|
82
|
+
try:
|
|
83
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
84
|
+
except Exception:
|
|
85
|
+
pass
|
|
86
|
+
_ensure_partial_chain_on_context(ctx, cafile)
|
|
87
|
+
return ctx
|
|
88
|
+
|
|
89
|
+
|
|
41
90
|
# Store a *weak* reference so that the context variable doesn’t prolong the
|
|
42
91
|
# lifetime of the SessionManager. Once all owning connections are GC-ed the
|
|
43
|
-
# weakref goes dead and OCSP will fall back to its local manager (but most
|
|
92
|
+
# weakref goes dead and OCSP will fall back to its local manager (but most
|
|
93
|
+
# likely won't be used ever again anyway).
|
|
44
94
|
_CURRENT_SESSION_MANAGER: ContextVar[weakref.ref[SessionManager] | None] = ContextVar(
|
|
45
95
|
"_CURRENT_SESSION_MANAGER",
|
|
46
96
|
default=None,
|
|
@@ -71,7 +121,10 @@ def set_current_session_manager(sm: SessionManager | None) -> Any:
|
|
|
71
121
|
Called from SnowflakeConnection so that OCSP downloads
|
|
72
122
|
use the same proxy / header configuration as the initiating connection.
|
|
73
123
|
|
|
74
|
-
Alternative approach would be moving method inject_into_urllib3() inside
|
|
124
|
+
Alternative approach would be moving method inject_into_urllib3() inside
|
|
125
|
+
connection initialization, but in case this delay (from module import time
|
|
126
|
+
to connection initialization time) would cause some code to break we stayed
|
|
127
|
+
with this approach, having in mind soon OCSP deprecation.
|
|
75
128
|
"""
|
|
76
129
|
return _CURRENT_SESSION_MANAGER.set(weakref.ref(sm) if sm is not None else None)
|
|
77
130
|
|
|
@@ -93,37 +146,29 @@ def inject_into_urllib3() -> None:
|
|
|
93
146
|
|
|
94
147
|
@wraps(ssl_.ssl_wrap_socket)
|
|
95
148
|
def ssl_wrap_socket_with_ocsp(*args: Any, **kwargs: Any) -> WrappedSocket:
|
|
96
|
-
#
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
del kwargs["ssl_context"]
|
|
117
|
-
# Fix ca certs location
|
|
118
|
-
ca_certs_index = get_args(ssl_.ssl_wrap_socket).args.index("ca_certs")
|
|
119
|
-
ca_certs_in_args = len(args) > ca_certs_index
|
|
120
|
-
if not ca_certs_in_args and not kwargs.get("ca_certs"):
|
|
121
|
-
kwargs["ca_certs"] = certifi.where()
|
|
122
|
-
|
|
123
|
-
ret = ssl_.ssl_wrap_socket(*args, **kwargs)
|
|
149
|
+
# Bind passed args/kwargs to the underlying signature to support both positional and keyword calls
|
|
150
|
+
bound = _sig(ssl_.ssl_wrap_socket).bind_partial(*args, **kwargs)
|
|
151
|
+
params = bound.arguments
|
|
152
|
+
|
|
153
|
+
server_hostname = params.get("server_hostname")
|
|
154
|
+
|
|
155
|
+
# Ensure CA bundle default if not provided
|
|
156
|
+
if not params.get("ca_certs"):
|
|
157
|
+
params["ca_certs"] = certifi.where()
|
|
158
|
+
|
|
159
|
+
# Ensure PyOpenSSL context with partial-chain is used if none or wrong type provided
|
|
160
|
+
provided_ctx = params.get("ssl_context")
|
|
161
|
+
if not isinstance(provided_ctx, PyOpenSSLContext):
|
|
162
|
+
cafile_for_ctx = _resolve_cafile(params)
|
|
163
|
+
params["ssl_context"] = _build_context_with_partial_chain(cafile_for_ctx)
|
|
164
|
+
else:
|
|
165
|
+
# If a PyOpenSSLContext is provided, ensure it trusts the provided CA and partial-chain is enabled
|
|
166
|
+
_ensure_partial_chain_on_context(provided_ctx, _resolve_cafile(params))
|
|
167
|
+
|
|
168
|
+
ret = ssl_.ssl_wrap_socket(**params)
|
|
124
169
|
|
|
125
170
|
log.debug(
|
|
126
|
-
"OCSP Mode: %s,
|
|
171
|
+
"OCSP Mode: %s, OCSP response cache file name: %s",
|
|
127
172
|
FEATURE_OCSP_MODE.name,
|
|
128
173
|
FEATURE_OCSP_RESPONSE_CACHE_FILE_NAME,
|
|
129
174
|
)
|
|
@@ -137,10 +182,7 @@ def ssl_wrap_socket_with_ocsp(*args: Any, **kwargs: Any) -> WrappedSocket:
|
|
|
137
182
|
).validate(server_hostname, ret.connection)
|
|
138
183
|
if not v:
|
|
139
184
|
raise OperationalError(
|
|
140
|
-
msg=
|
|
141
|
-
"The certificate is revoked or "
|
|
142
|
-
"could not be validated: hostname={}".format(server_hostname)
|
|
143
|
-
),
|
|
185
|
+
msg=f"The certificate is revoked or could not be validated: hostname={server_hostname}",
|
|
144
186
|
errno=ER_OCSP_RESPONSE_CERT_STATUS_REVOKED,
|
|
145
187
|
)
|
|
146
188
|
else:
|
|
@@ -41,6 +41,7 @@ is at <https://requests.readthedocs.io>.
|
|
|
41
41
|
import warnings
|
|
42
42
|
|
|
43
43
|
from .. import urllib3
|
|
44
|
+
|
|
44
45
|
from .exceptions import RequestsDependencyWarning
|
|
45
46
|
|
|
46
47
|
try:
|
|
@@ -82,7 +83,11 @@ def check_compatibility(urllib3_version, chardet_version, charset_normalizer_ver
|
|
|
82
83
|
# charset_normalizer >= 2.0.0 < 4.0.0
|
|
83
84
|
assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0)
|
|
84
85
|
else:
|
|
85
|
-
|
|
86
|
+
warnings.warn(
|
|
87
|
+
"Unable to find acceptable character detection dependency "
|
|
88
|
+
"(chardet or charset_normalizer).",
|
|
89
|
+
RequestsDependencyWarning,
|
|
90
|
+
)
|
|
86
91
|
|
|
87
92
|
|
|
88
93
|
def _check_cryptography(cryptography_version):
|
|
@@ -113,14 +118,24 @@ except (AssertionError, ValueError):
|
|
|
113
118
|
RequestsDependencyWarning,
|
|
114
119
|
)
|
|
115
120
|
|
|
116
|
-
# Attempt to enable urllib3's SNI support
|
|
121
|
+
# Attempt to enable urllib3's fallback for SNI support
|
|
122
|
+
# if the standard library doesn't support SNI or the
|
|
123
|
+
# 'ssl' library isn't available.
|
|
117
124
|
try:
|
|
118
|
-
|
|
119
|
-
|
|
125
|
+
try:
|
|
126
|
+
import ssl
|
|
127
|
+
except ImportError:
|
|
128
|
+
ssl = None
|
|
129
|
+
|
|
130
|
+
if not getattr(ssl, "HAS_SNI", False):
|
|
131
|
+
from ..urllib3.contrib import pyopenssl
|
|
132
|
+
|
|
133
|
+
pyopenssl.inject_into_urllib3()
|
|
134
|
+
|
|
135
|
+
# Check cryptography version
|
|
136
|
+
from cryptography import __version__ as cryptography_version
|
|
120
137
|
|
|
121
|
-
|
|
122
|
-
from cryptography import __version__ as cryptography_version
|
|
123
|
-
_check_cryptography(cryptography_version)
|
|
138
|
+
_check_cryptography(cryptography_version)
|
|
124
139
|
except ImportError:
|
|
125
140
|
pass
|
|
126
141
|
|
|
@@ -133,7 +148,7 @@ warnings.simplefilter("ignore", DependencyWarning)
|
|
|
133
148
|
import logging
|
|
134
149
|
from logging import NullHandler
|
|
135
150
|
|
|
136
|
-
from . import utils
|
|
151
|
+
from . import packages, utils
|
|
137
152
|
from .__version__ import (
|
|
138
153
|
__author__,
|
|
139
154
|
__author_email__,
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
__title__ = "requests"
|
|
6
6
|
__description__ = "Python HTTP for Humans."
|
|
7
7
|
__url__ = "https://requests.readthedocs.io"
|
|
8
|
-
__version__ = "2.
|
|
9
|
-
__build__ =
|
|
8
|
+
__version__ = "2.32.5"
|
|
9
|
+
__build__ = 0x023205
|
|
10
10
|
__author__ = "Kenneth Reitz"
|
|
11
11
|
__author_email__ = "me@kennethreitz.org"
|
|
12
|
-
__license__ = "Apache
|
|
12
|
+
__license__ = "Apache-2.0"
|
|
13
13
|
__copyright__ = "Copyright Kenneth Reitz"
|
|
14
14
|
__cake__ = "\u2728 \U0001f370 \u2728"
|
|
@@ -8,6 +8,8 @@ and maintain connections.
|
|
|
8
8
|
|
|
9
9
|
import os.path
|
|
10
10
|
import socket # noqa: F401
|
|
11
|
+
import typing
|
|
12
|
+
import warnings
|
|
11
13
|
|
|
12
14
|
from ..urllib3.exceptions import ClosedPoolError, ConnectTimeoutError
|
|
13
15
|
from ..urllib3.exceptions import HTTPError as _HTTPError
|
|
@@ -25,6 +27,7 @@ from ..urllib3.poolmanager import PoolManager, proxy_from_url
|
|
|
25
27
|
from ..urllib3.util import Timeout as TimeoutSauce
|
|
26
28
|
from ..urllib3.util import parse_url
|
|
27
29
|
from ..urllib3.util.retry import Retry
|
|
30
|
+
|
|
28
31
|
from .auth import _basic_auth_str
|
|
29
32
|
from .compat import basestring, urlparse
|
|
30
33
|
from .cookies import extract_cookies_to_jar
|
|
@@ -60,12 +63,53 @@ except ImportError:
|
|
|
60
63
|
raise InvalidSchema("Missing dependencies for SOCKS support.")
|
|
61
64
|
|
|
62
65
|
|
|
66
|
+
if typing.TYPE_CHECKING:
|
|
67
|
+
from .models import PreparedRequest
|
|
68
|
+
|
|
69
|
+
|
|
63
70
|
DEFAULT_POOLBLOCK = False
|
|
64
71
|
DEFAULT_POOLSIZE = 10
|
|
65
72
|
DEFAULT_RETRIES = 0
|
|
66
73
|
DEFAULT_POOL_TIMEOUT = None
|
|
67
74
|
|
|
68
75
|
|
|
76
|
+
def _urllib3_request_context(
|
|
77
|
+
request: "PreparedRequest",
|
|
78
|
+
verify: "bool | str | None",
|
|
79
|
+
client_cert: "typing.Tuple[str, str] | str | None",
|
|
80
|
+
poolmanager: "PoolManager",
|
|
81
|
+
) -> "(typing.Dict[str, typing.Any], typing.Dict[str, typing.Any])":
|
|
82
|
+
host_params = {}
|
|
83
|
+
pool_kwargs = {}
|
|
84
|
+
parsed_request_url = urlparse(request.url)
|
|
85
|
+
scheme = parsed_request_url.scheme.lower()
|
|
86
|
+
port = parsed_request_url.port
|
|
87
|
+
|
|
88
|
+
cert_reqs = "CERT_REQUIRED"
|
|
89
|
+
if verify is False:
|
|
90
|
+
cert_reqs = "CERT_NONE"
|
|
91
|
+
elif isinstance(verify, str):
|
|
92
|
+
if not os.path.isdir(verify):
|
|
93
|
+
pool_kwargs["ca_certs"] = verify
|
|
94
|
+
else:
|
|
95
|
+
pool_kwargs["ca_cert_dir"] = verify
|
|
96
|
+
pool_kwargs["cert_reqs"] = cert_reqs
|
|
97
|
+
if client_cert is not None:
|
|
98
|
+
if isinstance(client_cert, tuple) and len(client_cert) == 2:
|
|
99
|
+
pool_kwargs["cert_file"] = client_cert[0]
|
|
100
|
+
pool_kwargs["key_file"] = client_cert[1]
|
|
101
|
+
else:
|
|
102
|
+
# According to our docs, we allow users to specify just the client
|
|
103
|
+
# cert path
|
|
104
|
+
pool_kwargs["cert_file"] = client_cert
|
|
105
|
+
host_params = {
|
|
106
|
+
"scheme": scheme,
|
|
107
|
+
"host": parsed_request_url.hostname,
|
|
108
|
+
"port": port,
|
|
109
|
+
}
|
|
110
|
+
return host_params, pool_kwargs
|
|
111
|
+
|
|
112
|
+
|
|
69
113
|
class BaseAdapter:
|
|
70
114
|
"""The Base Transport Adapter"""
|
|
71
115
|
|
|
@@ -246,7 +290,6 @@ class HTTPAdapter(BaseAdapter):
|
|
|
246
290
|
:param cert: The SSL certificate to verify.
|
|
247
291
|
"""
|
|
248
292
|
if url.lower().startswith("https") and verify:
|
|
249
|
-
|
|
250
293
|
cert_loc = None
|
|
251
294
|
|
|
252
295
|
# Allow self-specified cert location.
|
|
@@ -327,8 +370,110 @@ class HTTPAdapter(BaseAdapter):
|
|
|
327
370
|
|
|
328
371
|
return response
|
|
329
372
|
|
|
373
|
+
def build_connection_pool_key_attributes(self, request, verify, cert=None):
|
|
374
|
+
"""Build the PoolKey attributes used by urllib3 to return a connection.
|
|
375
|
+
|
|
376
|
+
This looks at the PreparedRequest, the user-specified verify value,
|
|
377
|
+
and the value of the cert parameter to determine what PoolKey values
|
|
378
|
+
to use to select a connection from a given urllib3 Connection Pool.
|
|
379
|
+
|
|
380
|
+
The SSL related pool key arguments are not consistently set. As of
|
|
381
|
+
this writing, use the following to determine what keys may be in that
|
|
382
|
+
dictionary:
|
|
383
|
+
|
|
384
|
+
* If ``verify`` is ``True``, ``"ssl_context"`` will be set and will be the
|
|
385
|
+
default Requests SSL Context
|
|
386
|
+
* If ``verify`` is ``False``, ``"ssl_context"`` will not be set but
|
|
387
|
+
``"cert_reqs"`` will be set
|
|
388
|
+
* If ``verify`` is a string, (i.e., it is a user-specified trust bundle)
|
|
389
|
+
``"ca_certs"`` will be set if the string is not a directory recognized
|
|
390
|
+
by :py:func:`os.path.isdir`, otherwise ``"ca_cert_dir"`` will be
|
|
391
|
+
set.
|
|
392
|
+
* If ``"cert"`` is specified, ``"cert_file"`` will always be set. If
|
|
393
|
+
``"cert"`` is a tuple with a second item, ``"key_file"`` will also
|
|
394
|
+
be present
|
|
395
|
+
|
|
396
|
+
To override these settings, one may subclass this class, call this
|
|
397
|
+
method and use the above logic to change parameters as desired. For
|
|
398
|
+
example, if one wishes to use a custom :py:class:`ssl.SSLContext` one
|
|
399
|
+
must both set ``"ssl_context"`` and based on what else they require,
|
|
400
|
+
alter the other keys to ensure the desired behaviour.
|
|
401
|
+
|
|
402
|
+
:param request:
|
|
403
|
+
The PreparedReqest being sent over the connection.
|
|
404
|
+
:type request:
|
|
405
|
+
:class:`~requests.models.PreparedRequest`
|
|
406
|
+
:param verify:
|
|
407
|
+
Either a boolean, in which case it controls whether
|
|
408
|
+
we verify the server's TLS certificate, or a string, in which case it
|
|
409
|
+
must be a path to a CA bundle to use.
|
|
410
|
+
:param cert:
|
|
411
|
+
(optional) Any user-provided SSL certificate for client
|
|
412
|
+
authentication (a.k.a., mTLS). This may be a string (i.e., just
|
|
413
|
+
the path to a file which holds both certificate and key) or a
|
|
414
|
+
tuple of length 2 with the certificate file path and key file
|
|
415
|
+
path.
|
|
416
|
+
:returns:
|
|
417
|
+
A tuple of two dictionaries. The first is the "host parameters"
|
|
418
|
+
portion of the Pool Key including scheme, hostname, and port. The
|
|
419
|
+
second is a dictionary of SSLContext related parameters.
|
|
420
|
+
"""
|
|
421
|
+
return _urllib3_request_context(request, verify, cert, self.poolmanager)
|
|
422
|
+
|
|
423
|
+
def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
|
|
424
|
+
"""Returns a urllib3 connection for the given request and TLS settings.
|
|
425
|
+
This should not be called from user code, and is only exposed for use
|
|
426
|
+
when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
|
|
427
|
+
|
|
428
|
+
:param request:
|
|
429
|
+
The :class:`PreparedRequest <PreparedRequest>` object to be sent
|
|
430
|
+
over the connection.
|
|
431
|
+
:param verify:
|
|
432
|
+
Either a boolean, in which case it controls whether we verify the
|
|
433
|
+
server's TLS certificate, or a string, in which case it must be a
|
|
434
|
+
path to a CA bundle to use.
|
|
435
|
+
:param proxies:
|
|
436
|
+
(optional) The proxies dictionary to apply to the request.
|
|
437
|
+
:param cert:
|
|
438
|
+
(optional) Any user-provided SSL certificate to be used for client
|
|
439
|
+
authentication (a.k.a., mTLS).
|
|
440
|
+
:rtype:
|
|
441
|
+
urllib3.ConnectionPool
|
|
442
|
+
"""
|
|
443
|
+
proxy = select_proxy(request.url, proxies)
|
|
444
|
+
try:
|
|
445
|
+
host_params, pool_kwargs = self.build_connection_pool_key_attributes(
|
|
446
|
+
request,
|
|
447
|
+
verify,
|
|
448
|
+
cert,
|
|
449
|
+
)
|
|
450
|
+
except ValueError as e:
|
|
451
|
+
raise InvalidURL(e, request=request)
|
|
452
|
+
if proxy:
|
|
453
|
+
proxy = prepend_scheme_if_needed(proxy, "http")
|
|
454
|
+
proxy_url = parse_url(proxy)
|
|
455
|
+
if not proxy_url.host:
|
|
456
|
+
raise InvalidProxyURL(
|
|
457
|
+
"Please check proxy URL. It is malformed "
|
|
458
|
+
"and could be missing the host."
|
|
459
|
+
)
|
|
460
|
+
proxy_manager = self.proxy_manager_for(proxy)
|
|
461
|
+
conn = proxy_manager.connection_from_host(
|
|
462
|
+
**host_params, pool_kwargs=pool_kwargs
|
|
463
|
+
)
|
|
464
|
+
else:
|
|
465
|
+
# Only scheme should be lower case
|
|
466
|
+
conn = self.poolmanager.connection_from_host(
|
|
467
|
+
**host_params, pool_kwargs=pool_kwargs
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
return conn
|
|
471
|
+
|
|
330
472
|
def get_connection(self, url, proxies=None):
|
|
331
|
-
"""
|
|
473
|
+
"""DEPRECATED: Users should move to `get_connection_with_tls_context`
|
|
474
|
+
for all subclasses of HTTPAdapter using Requests>=2.32.2.
|
|
475
|
+
|
|
476
|
+
Returns a urllib3 connection for the given URL. This should not be
|
|
332
477
|
called from user code, and is only exposed for use when subclassing the
|
|
333
478
|
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
|
|
334
479
|
|
|
@@ -336,6 +481,15 @@ class HTTPAdapter(BaseAdapter):
|
|
|
336
481
|
:param proxies: (optional) A Requests-style dictionary of proxies used on this request.
|
|
337
482
|
:rtype: urllib3.ConnectionPool
|
|
338
483
|
"""
|
|
484
|
+
warnings.warn(
|
|
485
|
+
(
|
|
486
|
+
"`get_connection` has been deprecated in favor of "
|
|
487
|
+
"`get_connection_with_tls_context`. Custom HTTPAdapter subclasses "
|
|
488
|
+
"will need to migrate for Requests>=2.32.2. Please see "
|
|
489
|
+
"https://github.com/psf/requests/pull/6710 for more details."
|
|
490
|
+
),
|
|
491
|
+
DeprecationWarning,
|
|
492
|
+
)
|
|
339
493
|
proxy = select_proxy(url, proxies)
|
|
340
494
|
|
|
341
495
|
if proxy:
|
|
@@ -390,6 +544,9 @@ class HTTPAdapter(BaseAdapter):
|
|
|
390
544
|
using_socks_proxy = proxy_scheme.startswith("socks")
|
|
391
545
|
|
|
392
546
|
url = request.path_url
|
|
547
|
+
if url.startswith("//"): # Don't confuse urllib3
|
|
548
|
+
url = f"/{url.lstrip('/')}"
|
|
549
|
+
|
|
393
550
|
if is_proxied_http_request and not using_socks_proxy:
|
|
394
551
|
url = urldefragauth(request.url)
|
|
395
552
|
|
|
@@ -450,7 +607,9 @@ class HTTPAdapter(BaseAdapter):
|
|
|
450
607
|
"""
|
|
451
608
|
|
|
452
609
|
try:
|
|
453
|
-
conn = self.
|
|
610
|
+
conn = self.get_connection_with_tls_context(
|
|
611
|
+
request, verify, proxies=proxies, cert=cert
|
|
612
|
+
)
|
|
454
613
|
except LocationValueError as e:
|
|
455
614
|
raise InvalidURL(e, request=request)
|
|
456
615
|
|
|
@@ -25,7 +25,7 @@ def request(method, url, **kwargs):
|
|
|
25
25
|
:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
|
|
26
26
|
:param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
|
|
27
27
|
``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
|
|
28
|
-
or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'
|
|
28
|
+
or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string
|
|
29
29
|
defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
|
|
30
30
|
to add for the file.
|
|
31
31
|
:param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
|
|
@@ -258,7 +258,6 @@ class HTTPDigestAuth(AuthBase):
|
|
|
258
258
|
s_auth = r.headers.get("www-authenticate", "")
|
|
259
259
|
|
|
260
260
|
if "digest" in s_auth.lower() and self._thread_local.num_401_calls < 2:
|
|
261
|
-
|
|
262
261
|
self._thread_local.num_401_calls += 1
|
|
263
262
|
pat = re.compile(r"digest ", flags=re.IGNORECASE)
|
|
264
263
|
self._thread_local.chal = parse_dict_header(pat.sub("", s_auth, count=1))
|
|
@@ -7,12 +7,39 @@ between Python 2 and Python 3. It remains for backwards
|
|
|
7
7
|
compatibility until the next major version.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
import importlib
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
# -------
|
|
14
|
+
# urllib3
|
|
15
|
+
# -------
|
|
16
|
+
from ..urllib3 import __version__ as urllib3_version
|
|
17
|
+
|
|
18
|
+
# Detect which major version of urllib3 is being used.
|
|
10
19
|
try:
|
|
11
|
-
|
|
12
|
-
except
|
|
13
|
-
|
|
20
|
+
is_urllib3_1 = int(urllib3_version.split(".")[0]) == 1
|
|
21
|
+
except (TypeError, AttributeError):
|
|
22
|
+
# If we can't discern a version, prefer old functionality.
|
|
23
|
+
is_urllib3_1 = True
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
# -------------------
|
|
26
|
+
# Character Detection
|
|
27
|
+
# -------------------
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _resolve_char_detection():
|
|
31
|
+
"""Find supported character detection libraries."""
|
|
32
|
+
chardet = None
|
|
33
|
+
for lib in ("chardet", "charset_normalizer"):
|
|
34
|
+
if chardet is None:
|
|
35
|
+
try:
|
|
36
|
+
chardet = importlib.import_module(lib)
|
|
37
|
+
except ImportError:
|
|
38
|
+
pass
|
|
39
|
+
return chardet
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
chardet = _resolve_char_detection()
|
|
16
43
|
|
|
17
44
|
# -------
|
|
18
45
|
# Pythons
|