snowflake-connector-python 3.11.0__tar.gz → 3.12.0__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.11.0 → snowflake_connector_python-3.12.0}/DESCRIPTION.md +9 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/PKG-INFO +11 -2
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/setup.cfg +1 -1
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/connection.py +21 -6
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/connection_diagnostic.py +12 -5
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/constants.py +13 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/cursor.py +7 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/network.py +10 -1
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/ocsp_snowflake.py +21 -10
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/result_set.py +55 -32
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/ssl_wrap_socket.py +1 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/storage_client.py +8 -1
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/telemetry_oob.py +3 -3
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/url_util.py +10 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/util_text.py +6 -1
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/version.py +1 -1
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake_connector_python.egg-info/PKG-INFO +11 -2
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake_connector_python.egg-info/requires.txt +1 -1
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/CONTRIBUTING.md +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/LICENSE.txt +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/MANIFEST.in +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/NOTICE +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/README.md +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/SECURITY.md +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/pyproject.toml +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/setup.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/_query_context_cache.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/_sql_util.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/arrow_context.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/_auth.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/by_plugin.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/default.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/idtoken.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/keypair.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/oauth.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/okta.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/usrpwdmfa.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/auth/webbrowser.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/azure_storage_client.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/backoff_policies.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/bind_upload_agent.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/cache.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/compat.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/config_manager.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/converter.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/converter_issue23517.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/converter_null.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/converter_snowsql.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/dbapi.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/description.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/encryption_util.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/errorcode.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/errors.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/feature.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/file_compression_type.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/file_transfer_agent.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/file_util.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/gcs_storage_client.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/gzip_decoder.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/local_storage_client.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/log_configuration.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IColumnConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/LICENSE.txt +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/macros.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_accessors.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_alloc.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_assert.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_builder.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_emitter.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_endian.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_epilogue.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_flatbuffers.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_identifier.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_iov.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_prologue.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_refmap.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_rtconfig.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_types.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_verifier.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/flatcc_portable.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/paligned_alloc.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pattributes.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_pop.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_push.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian_detect.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinline.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinttypes.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable_basic.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstatic_assert.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdalign.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdint.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/punaligned.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pversion.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pwarnings.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc.c +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.c +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_arrow_iterator.pyx +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.c +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.c +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.h +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.cpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.hpp +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/ocsp_asn1crypto.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/options.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/pandas_tools.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/proxy.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/py.typed +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/result_batch.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/s3_storage_client.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/secret_detector.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/sf_dirs.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/sfbinaryformat.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/sfdatetime.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/snow_logging.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/sqlstate.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/ssd_internal_keys.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/telemetry.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/test_util.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/time_util.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/tool/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/tool/dump_certs.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/tool/dump_ocsp_response.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/tool/dump_ocsp_response_cache.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/tool/probe_connection.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/LICENSE +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/__version__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/_internal_utils.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/adapters.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/api.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/auth.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/certs.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/compat.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/cookies.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/exceptions.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/help.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/hooks.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/models.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/sessions.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/status_codes.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/structures.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/requests/utils.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/LICENSE.txt +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/_collections.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/_version.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/connection.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/connectionpool.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/_appengine_environ.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/bindings.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/low_level.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/appengine.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/ntlmpool.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/securetransport.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/contrib/socks.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/exceptions.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/fields.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/filepost.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/packages/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/packages/backports/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/packages/backports/makefile.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/packages/backports/weakref_finalize.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/packages/six.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/poolmanager.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/request.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/response.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/__init__.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/connection.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/proxy.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/queue.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/request.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/response.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/retry.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/ssl_.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/ssl_match_hostname.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/ssltransport.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/timeout.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/url.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake/connector/vendored/urllib3/util/wait.py +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake_connector_python.egg-info/SOURCES.txt +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake_connector_python.egg-info/dependency_links.txt +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake_connector_python.egg-info/entry_points.txt +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake_connector_python.egg-info/not-zip-safe +0 -0
- {snowflake_connector_python-3.11.0 → snowflake_connector_python-3.12.0}/src/snowflake_connector_python.egg-info/top_level.txt +0 -0
|
@@ -8,6 +8,15 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
|
|
|
8
8
|
|
|
9
9
|
# Release Notes
|
|
10
10
|
|
|
11
|
+
- v3.12.0(July 24,2024)
|
|
12
|
+
- Set default connection timeout of 10 seconds and socket read timeout of 10 minutes for HTTP calls in file transfer.
|
|
13
|
+
- Optimized `to_pandas()` performance by fully parallel downloading logic.
|
|
14
|
+
- Fixed a bug that specifying client_session_keep_alive_heartbeat_frequency in snowflake-sqlalchemy could crash the connector.
|
|
15
|
+
- Fixed incorrect type hint of connection parameter `private_key`.
|
|
16
|
+
- Added support for connectivity to multiple domains.
|
|
17
|
+
- Bumped keyring dependency from >=23.1.0,<25.0.0 to >=23.1.0,<26.0.0.
|
|
18
|
+
- Disabled OOB Telemetry.
|
|
19
|
+
|
|
11
20
|
- v3.11.0(June 17,2024)
|
|
12
21
|
- Added support for `token_file_path` connection parameter to read an OAuth token from a file when connecting to Snowflake.
|
|
13
22
|
- Added support for `debug_arrow_chunk` connection parameter to allow debugging raw arrow data in case of arrow data parsing failure.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snowflake-connector-python
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.12.0
|
|
4
4
|
Summary: Snowflake Connector for Python
|
|
5
5
|
Home-page: https://www.snowflake.com/
|
|
6
6
|
Author: Snowflake, Inc
|
|
@@ -73,7 +73,7 @@ Provides-Extra: pandas
|
|
|
73
73
|
Requires-Dist: pandas<3.0.0,>=1.0.0; extra == "pandas"
|
|
74
74
|
Requires-Dist: pyarrow; extra == "pandas"
|
|
75
75
|
Provides-Extra: secure-local-storage
|
|
76
|
-
Requires-Dist: keyring<
|
|
76
|
+
Requires-Dist: keyring<26.0.0,>=23.1.0; extra == "secure-local-storage"
|
|
77
77
|
|
|
78
78
|
This package includes the Snowflake Connector for Python, which conforms to the Python DB API 2.0 specification:
|
|
79
79
|
https://www.python.org/dev/peps/pep-0249/
|
|
@@ -85,6 +85,15 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
|
|
|
85
85
|
|
|
86
86
|
# Release Notes
|
|
87
87
|
|
|
88
|
+
- v3.12.0(July 24,2024)
|
|
89
|
+
- Set default connection timeout of 10 seconds and socket read timeout of 10 minutes for HTTP calls in file transfer.
|
|
90
|
+
- Optimized `to_pandas()` performance by fully parallel downloading logic.
|
|
91
|
+
- Fixed a bug that specifying client_session_keep_alive_heartbeat_frequency in snowflake-sqlalchemy could crash the connector.
|
|
92
|
+
- Fixed incorrect type hint of connection parameter `private_key`.
|
|
93
|
+
- Added support for connectivity to multiple domains.
|
|
94
|
+
- Bumped keyring dependency from >=23.1.0,<25.0.0 to >=23.1.0,<26.0.0.
|
|
95
|
+
- Disabled OOB Telemetry.
|
|
96
|
+
|
|
88
97
|
- v3.11.0(June 17,2024)
|
|
89
98
|
- Added support for `token_file_path` connection parameter to read an OAuth token from a file when connecting to Snowflake.
|
|
90
99
|
- Added support for `debug_arrow_chunk` connection parameter to allow debugging raw arrow data in case of arrow data parsing failure.
|
|
@@ -52,6 +52,7 @@ from .compat import IS_LINUX, IS_WINDOWS, quote, urlencode
|
|
|
52
52
|
from .config_manager import CONFIG_MANAGER, _get_default_connection_params
|
|
53
53
|
from .connection_diagnostic import ConnectionDiagnostic
|
|
54
54
|
from .constants import (
|
|
55
|
+
_DOMAIN_NAME_MAP,
|
|
55
56
|
ENV_VAR_PARTNER,
|
|
56
57
|
PARAMETER_AUTOCOMMIT,
|
|
57
58
|
PARAMETER_CLIENT_PREFETCH_THREADS,
|
|
@@ -107,6 +108,7 @@ from .sqlstate import SQLSTATE_CONNECTION_NOT_EXISTS, SQLSTATE_FEATURE_NOT_SUPPO
|
|
|
107
108
|
from .telemetry import TelemetryClient, TelemetryData, TelemetryField
|
|
108
109
|
from .telemetry_oob import TelemetryService
|
|
109
110
|
from .time_util import HeartBeatTimer, get_time_millis
|
|
111
|
+
from .url_util import extract_top_level_domain_from_hostname
|
|
110
112
|
from .util_text import construct_hostname, parse_account, split_statements
|
|
111
113
|
|
|
112
114
|
DEFAULT_CLIENT_PREFETCH_THREADS = 4
|
|
@@ -181,7 +183,7 @@ DEFAULT_CONFIGURATION: dict[str, tuple[Any, type | tuple[type, ...]]] = {
|
|
|
181
183
|
"backoff_policy": (DEFAULT_BACKOFF_POLICY, Callable),
|
|
182
184
|
"passcode_in_password": (False, bool), # Snowflake MFA
|
|
183
185
|
"passcode": (None, (type(None), str)), # Snowflake MFA
|
|
184
|
-
"private_key": (None, (type(None),
|
|
186
|
+
"private_key": (None, (type(None), bytes, RSAPrivateKey)),
|
|
185
187
|
"private_key_file": (None, (type(None), str)),
|
|
186
188
|
"private_key_file_pwd": (None, (type(None), str, bytes)),
|
|
187
189
|
"token": (None, (type(None), str)), # OAuth or JWT Token
|
|
@@ -190,6 +192,10 @@ DEFAULT_CONFIGURATION: dict[str, tuple[Any, type | tuple[type, ...]]] = {
|
|
|
190
192
|
"password_callback": (None, (type(None), Callable)),
|
|
191
193
|
"auth_class": (None, (type(None), AuthByPlugin)),
|
|
192
194
|
"application": (CLIENT_NAME, (type(None), str)),
|
|
195
|
+
# internal_application_name/version is used to tell the server the type of client connecting to
|
|
196
|
+
# Snowflake. There are some functionalities (e.g., MFA, Arrow result format) that
|
|
197
|
+
# Snowflake server doesn't support for new client types, which requires developers to
|
|
198
|
+
# add the new client type to the server to support these features.
|
|
193
199
|
"internal_application_name": (CLIENT_NAME, (type(None), str)),
|
|
194
200
|
"internal_application_version": (CLIENT_VERSION, (type(None), str)),
|
|
195
201
|
"insecure_mode": (False, bool), # Error security fix requirement
|
|
@@ -931,7 +937,7 @@ class SnowflakeConnection:
|
|
|
931
937
|
os.environ["SF_OCSP_RESPONSE_CACHE_SERVER_URL"],
|
|
932
938
|
)
|
|
933
939
|
|
|
934
|
-
if
|
|
940
|
+
if ".privatelink.snowflakecomputing." in self.host:
|
|
935
941
|
SnowflakeConnection.setup_ocsp_privatelink(self.application, self.host)
|
|
936
942
|
else:
|
|
937
943
|
if "SF_OCSP_RESPONSE_CACHE_SERVER_URL" in os.environ:
|
|
@@ -1178,6 +1184,10 @@ class SnowflakeConnection:
|
|
|
1178
1184
|
if "protocol" not in kwargs:
|
|
1179
1185
|
self._protocol = "https"
|
|
1180
1186
|
|
|
1187
|
+
logger.info(
|
|
1188
|
+
f"Connecting to {_DOMAIN_NAME_MAP.get(extract_top_level_domain_from_hostname(self._host), 'GLOBAL')} Snowflake domain"
|
|
1189
|
+
)
|
|
1190
|
+
|
|
1181
1191
|
# If using a custom auth class, we should set the authenticator
|
|
1182
1192
|
# type to be the same as the custom auth class
|
|
1183
1193
|
if self._auth_class:
|
|
@@ -1287,6 +1297,7 @@ class SnowflakeConnection:
|
|
|
1287
1297
|
_update_current_object: bool = True,
|
|
1288
1298
|
_no_retry: bool = False,
|
|
1289
1299
|
timeout: int | None = None,
|
|
1300
|
+
dataframe_ast: str | None = None,
|
|
1290
1301
|
) -> dict[str, Any]:
|
|
1291
1302
|
"""Executes a query with a sequence counter."""
|
|
1292
1303
|
logger.debug("_cmd_query")
|
|
@@ -1296,6 +1307,8 @@ class SnowflakeConnection:
|
|
|
1296
1307
|
"sequenceId": sequence_counter,
|
|
1297
1308
|
"querySubmissionTime": get_time_millis(),
|
|
1298
1309
|
}
|
|
1310
|
+
if dataframe_ast is not None:
|
|
1311
|
+
data["dataframeAst"] = dataframe_ast
|
|
1299
1312
|
if statement_params is not None:
|
|
1300
1313
|
data["parameters"] = statement_params
|
|
1301
1314
|
if is_internal:
|
|
@@ -1670,6 +1683,12 @@ class SnowflakeConnection:
|
|
|
1670
1683
|
"""Validate and return heartbeat frequency in seconds."""
|
|
1671
1684
|
real_max = int(self.rest.master_validity_in_seconds / 4)
|
|
1672
1685
|
real_min = int(real_max / 4)
|
|
1686
|
+
|
|
1687
|
+
# ensure the type is integer
|
|
1688
|
+
self._client_session_keep_alive_heartbeat_frequency = int(
|
|
1689
|
+
self.client_session_keep_alive_heartbeat_frequency
|
|
1690
|
+
)
|
|
1691
|
+
|
|
1673
1692
|
if self.client_session_keep_alive_heartbeat_frequency is None:
|
|
1674
1693
|
# This is an unlikely scenario but covering it just in case.
|
|
1675
1694
|
self._client_session_keep_alive_heartbeat_frequency = real_min
|
|
@@ -1678,10 +1697,6 @@ class SnowflakeConnection:
|
|
|
1678
1697
|
elif self.client_session_keep_alive_heartbeat_frequency < real_min:
|
|
1679
1698
|
self._client_session_keep_alive_heartbeat_frequency = real_min
|
|
1680
1699
|
|
|
1681
|
-
# ensure the type is integer
|
|
1682
|
-
self._client_session_keep_alive_heartbeat_frequency = int(
|
|
1683
|
-
self.client_session_keep_alive_heartbeat_frequency
|
|
1684
|
-
)
|
|
1685
1700
|
return self.client_session_keep_alive_heartbeat_frequency
|
|
1686
1701
|
|
|
1687
1702
|
def _validate_client_prefetch_threads(self) -> int:
|
|
@@ -23,6 +23,7 @@ import OpenSSL
|
|
|
23
23
|
|
|
24
24
|
from .compat import IS_WINDOWS, urlparse
|
|
25
25
|
from .cursor import SnowflakeCursor
|
|
26
|
+
from .url_util import extract_top_level_domain_from_hostname
|
|
26
27
|
from .vendored import urllib3
|
|
27
28
|
|
|
28
29
|
logger = getLogger(__name__)
|
|
@@ -89,15 +90,21 @@ class ConnectionDiagnostic:
|
|
|
89
90
|
self.__append_message(
|
|
90
91
|
host_type, f"Host based on specified account: {self.host}"
|
|
91
92
|
)
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
top_level_domain = extract_top_level_domain_from_hostname(host)
|
|
95
|
+
if (
|
|
96
|
+
f".{top_level_domain}.snowflakecomputing.{top_level_domain}" in self.host
|
|
97
|
+
): # repeated domain name pattern
|
|
98
|
+
self.host = (
|
|
99
|
+
host.split(f".{top_level_domain}.snow", 1)[0] + f".{top_level_domain}"
|
|
100
|
+
)
|
|
94
101
|
logger.warning(
|
|
95
|
-
f"Account should not have snowflakecomputing.
|
|
102
|
+
f"Account should not have snowflakecomputing.{top_level_domain} in it. You provided {host}. "
|
|
96
103
|
f"Continuing with fixed host."
|
|
97
104
|
)
|
|
98
105
|
self.__append_message(
|
|
99
106
|
host_type,
|
|
100
|
-
f"We removed extra .snowflakecomputing.
|
|
107
|
+
f"We removed extra .snowflakecomputing.{top_level_domain} and will continue with host: "
|
|
101
108
|
f"{self.host}",
|
|
102
109
|
)
|
|
103
110
|
else:
|
|
@@ -183,7 +190,7 @@ class ConnectionDiagnostic:
|
|
|
183
190
|
self.ocsp_urls.append(f"ocsp.{self.host}")
|
|
184
191
|
self.allowlist_sql = "select system$allowlist_privatelink();"
|
|
185
192
|
else:
|
|
186
|
-
self.ocsp_urls.append("ocsp.snowflakecomputing.
|
|
193
|
+
self.ocsp_urls.append(f"ocsp.snowflakecomputing.{top_level_domain}")
|
|
187
194
|
|
|
188
195
|
self.allowlist_retrieval_success: bool = False
|
|
189
196
|
self.cursor: SnowflakeCursor | None = None
|
|
@@ -36,6 +36,11 @@ DBAPI_TYPE_BINARY = 1
|
|
|
36
36
|
DBAPI_TYPE_NUMBER = 2
|
|
37
37
|
DBAPI_TYPE_TIMESTAMP = 3
|
|
38
38
|
|
|
39
|
+
_DEFAULT_HOSTNAME_TLD = "com"
|
|
40
|
+
_CHINA_HOSTNAME_TLD = "cn"
|
|
41
|
+
_TOP_LEVEL_DOMAIN_REGEX = r"\.[a-zA-Z]{1,63}$"
|
|
42
|
+
_SNOWFLAKE_HOST_SUFFIX_REGEX = r"snowflakecomputing(\.[a-zA-Z]{1,63}){1,2}$"
|
|
43
|
+
|
|
39
44
|
|
|
40
45
|
class FieldType(NamedTuple):
|
|
41
46
|
name: str
|
|
@@ -399,6 +404,7 @@ class IterUnit(Enum):
|
|
|
399
404
|
TABLE_UNIT = "table"
|
|
400
405
|
|
|
401
406
|
|
|
407
|
+
# File Transfer
|
|
402
408
|
# Amazon S3 multipart upload limits
|
|
403
409
|
# https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html
|
|
404
410
|
S3_DEFAULT_CHUNK_SIZE = 8 * 1024**2
|
|
@@ -410,8 +416,15 @@ S3_MAX_PARTS = 10000
|
|
|
410
416
|
S3_CHUNK_SIZE = 8388608 # boto3 default
|
|
411
417
|
AZURE_CHUNK_SIZE = 4 * megabyte
|
|
412
418
|
|
|
419
|
+
# https://requests.readthedocs.io/en/latest/user/advanced/#timeouts
|
|
420
|
+
REQUEST_CONNECTION_TIMEOUT = 10
|
|
421
|
+
REQUEST_READ_TIMEOUT = 600
|
|
422
|
+
|
|
413
423
|
DAY_IN_SECONDS = 60 * 60 * 24
|
|
414
424
|
|
|
415
425
|
# TODO: all env variables definitions should be here
|
|
416
426
|
ENV_VAR_PARTNER = "SF_PARTNER"
|
|
417
427
|
ENV_VAR_TEST_MODE = "SNOWFLAKE_TEST_MODE"
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
_DOMAIN_NAME_MAP = {_DEFAULT_HOSTNAME_TLD: "GLOBAL", _CHINA_HOSTNAME_TLD: "CHINA"}
|
|
@@ -601,6 +601,7 @@ class SnowflakeCursor:
|
|
|
601
601
|
_no_results: bool = False,
|
|
602
602
|
_is_put_get=None,
|
|
603
603
|
_no_retry: bool = False,
|
|
604
|
+
dataframe_ast: str | None = None,
|
|
604
605
|
) -> dict[str, Any]:
|
|
605
606
|
del self.messages[:]
|
|
606
607
|
|
|
@@ -704,6 +705,7 @@ class SnowflakeCursor:
|
|
|
704
705
|
_no_results=_no_results,
|
|
705
706
|
_no_retry=_no_retry,
|
|
706
707
|
timeout=real_timeout,
|
|
708
|
+
dataframe_ast=dataframe_ast,
|
|
707
709
|
)
|
|
708
710
|
finally:
|
|
709
711
|
try:
|
|
@@ -809,6 +811,7 @@ class SnowflakeCursor:
|
|
|
809
811
|
_skip_upload_on_content_match: bool = False,
|
|
810
812
|
file_stream: IO[bytes] | None = None,
|
|
811
813
|
num_statements: int | None = None,
|
|
814
|
+
_dataframe_ast: str | None = None,
|
|
812
815
|
) -> Self | None: ...
|
|
813
816
|
|
|
814
817
|
@overload
|
|
@@ -838,6 +841,7 @@ class SnowflakeCursor:
|
|
|
838
841
|
_skip_upload_on_content_match: bool = False,
|
|
839
842
|
file_stream: IO[bytes] | None = None,
|
|
840
843
|
num_statements: int | None = None,
|
|
844
|
+
_dataframe_ast: str | None = None,
|
|
841
845
|
) -> dict[str, Any] | None: ...
|
|
842
846
|
|
|
843
847
|
def execute(
|
|
@@ -866,6 +870,7 @@ class SnowflakeCursor:
|
|
|
866
870
|
_skip_upload_on_content_match: bool = False,
|
|
867
871
|
file_stream: IO[bytes] | None = None,
|
|
868
872
|
num_statements: int | None = None,
|
|
873
|
+
_dataframe_ast: str | None = None,
|
|
869
874
|
) -> Self | dict[str, Any] | None:
|
|
870
875
|
"""Executes a command/query.
|
|
871
876
|
|
|
@@ -900,6 +905,7 @@ class SnowflakeCursor:
|
|
|
900
905
|
file_stream: File-like object to be uploaded with PUT
|
|
901
906
|
num_statements: Query level parameter submitted in _statement_params constraining exact number of
|
|
902
907
|
statements being submitted (or 0 if submitting an uncounted number) when using a multi-statement query.
|
|
908
|
+
_dataframe_ast: Base64-encoded dataframe request abstract syntax tree.
|
|
903
909
|
|
|
904
910
|
Returns:
|
|
905
911
|
The cursor itself, or None if some error happened, or the response returned
|
|
@@ -941,6 +947,7 @@ class SnowflakeCursor:
|
|
|
941
947
|
"_no_results": _no_results,
|
|
942
948
|
"_is_put_get": _is_put_get,
|
|
943
949
|
"_no_retry": _no_retry,
|
|
950
|
+
"dataframe_ast": _dataframe_ast,
|
|
944
951
|
}
|
|
945
952
|
|
|
946
953
|
if self._connection.is_pyformat:
|
|
@@ -11,6 +11,7 @@ import gzip
|
|
|
11
11
|
import itertools
|
|
12
12
|
import json
|
|
13
13
|
import logging
|
|
14
|
+
import re
|
|
14
15
|
import time
|
|
15
16
|
import traceback
|
|
16
17
|
import uuid
|
|
@@ -46,6 +47,7 @@ from .compat import (
|
|
|
46
47
|
urlparse,
|
|
47
48
|
)
|
|
48
49
|
from .constants import (
|
|
50
|
+
_SNOWFLAKE_HOST_SUFFIX_REGEX,
|
|
49
51
|
HTTP_HEADER_ACCEPT,
|
|
50
52
|
HTTP_HEADER_CONTENT_TYPE,
|
|
51
53
|
HTTP_HEADER_SERVICE_NAME,
|
|
@@ -156,6 +158,7 @@ REQUEST_ID = "requestId"
|
|
|
156
158
|
REQUEST_GUID = "request_guid"
|
|
157
159
|
SNOWFLAKE_HOST_SUFFIX = ".snowflakecomputing.com"
|
|
158
160
|
|
|
161
|
+
|
|
159
162
|
SNOWFLAKE_CONNECTOR_VERSION = SNOWFLAKE_CONNECTOR_VERSION
|
|
160
163
|
PYTHON_VERSION = PYTHON_VERSION
|
|
161
164
|
OPERATING_SYSTEM = OPERATING_SYSTEM
|
|
@@ -487,6 +490,12 @@ class SnowflakeRestful:
|
|
|
487
490
|
HTTP_HEADER_ACCEPT: accept_type,
|
|
488
491
|
HTTP_HEADER_USER_AGENT: PYTHON_CONNECTOR_USER_AGENT,
|
|
489
492
|
}
|
|
493
|
+
try:
|
|
494
|
+
from opentelemetry.propagate import inject
|
|
495
|
+
|
|
496
|
+
inject(headers)
|
|
497
|
+
except ModuleNotFoundError as e:
|
|
498
|
+
logger.debug(f"Opentelemtry otel injection failed because of: {e}")
|
|
490
499
|
if self._connection.service_name:
|
|
491
500
|
headers[HTTP_HEADER_SERVICE_NAME] = self._connection.service_name
|
|
492
501
|
if method == "post":
|
|
@@ -850,7 +859,7 @@ class SnowflakeRestful:
|
|
|
850
859
|
def add_request_guid(full_url: str) -> str:
|
|
851
860
|
"""Adds request_guid parameter for HTTP request tracing."""
|
|
852
861
|
parsed_url = urlparse(full_url)
|
|
853
|
-
if not parsed_url.hostname
|
|
862
|
+
if not re.search(_SNOWFLAKE_HOST_SUFFIX_REGEX, parsed_url.hostname):
|
|
854
863
|
return full_url
|
|
855
864
|
request_guid = str(uuid.uuid4())
|
|
856
865
|
suffix = urlencode({REQUEST_GUID: request_guid})
|
|
@@ -62,7 +62,7 @@ from . import constants
|
|
|
62
62
|
from .backoff_policies import exponential_backoff
|
|
63
63
|
from .cache import SFDictCache, SFDictFileCache
|
|
64
64
|
from .telemetry import TelemetryField, generate_telemetry_data_dict
|
|
65
|
-
from .url_util import url_encode_str
|
|
65
|
+
from .url_util import extract_top_level_domain_from_hostname, url_encode_str
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
class OCSPResponseValidationResult(NamedTuple):
|
|
@@ -268,15 +268,20 @@ class OCSPTelemetryData:
|
|
|
268
268
|
class OCSPServer:
|
|
269
269
|
MAX_RETRY = int(os.getenv("OCSP_MAX_RETRY", "3"))
|
|
270
270
|
|
|
271
|
-
def __init__(self) -> None:
|
|
272
|
-
|
|
271
|
+
def __init__(self, **kwargs) -> None:
|
|
272
|
+
top_level_domain = kwargs.pop(
|
|
273
|
+
"top_level_domain", constants._DEFAULT_HOSTNAME_TLD
|
|
274
|
+
)
|
|
275
|
+
self.DEFAULT_CACHE_SERVER_URL = (
|
|
276
|
+
f"http://ocsp.snowflakecomputing.{top_level_domain}"
|
|
277
|
+
)
|
|
273
278
|
"""
|
|
274
279
|
The following will change to something like
|
|
275
280
|
http://ocspssd.snowflakecomputing.com/ocsp/
|
|
276
281
|
once the endpoint is up in the backend
|
|
277
282
|
"""
|
|
278
283
|
self.NEW_DEFAULT_CACHE_SERVER_BASE_URL = (
|
|
279
|
-
"https://ocspssd.snowflakecomputing.
|
|
284
|
+
f"https://ocspssd.snowflakecomputing.{top_level_domain}/ocsp/"
|
|
280
285
|
)
|
|
281
286
|
if not OCSPServer.is_enabled_new_ocsp_endpoint():
|
|
282
287
|
self.CACHE_SERVER_URL = os.getenv(
|
|
@@ -307,12 +312,13 @@ class OCSPServer:
|
|
|
307
312
|
on the hostname the customer is trying to connect to. The deployment or in case of client failover, the
|
|
308
313
|
replication ID is copied from the hostname.
|
|
309
314
|
"""
|
|
310
|
-
|
|
315
|
+
top_level_domain = extract_top_level_domain_from_hostname(hname)
|
|
316
|
+
if "privatelink.snowflakecomputing." in hname:
|
|
311
317
|
temp_ocsp_endpoint = "".join(["https://ocspssd.", hname, "/ocsp/"])
|
|
312
|
-
elif
|
|
318
|
+
elif "global.snowflakecomputing." in hname:
|
|
313
319
|
rep_id_begin = hname[hname.find("-") :]
|
|
314
320
|
temp_ocsp_endpoint = "".join(["https://ocspssd", rep_id_begin, "/ocsp/"])
|
|
315
|
-
elif not hname.endswith("snowflakecomputing.
|
|
321
|
+
elif not hname.endswith(f"snowflakecomputing.{top_level_domain}"):
|
|
316
322
|
temp_ocsp_endpoint = self.NEW_DEFAULT_CACHE_SERVER_BASE_URL
|
|
317
323
|
else:
|
|
318
324
|
hname_wo_acc = hname[hname.find(".") :]
|
|
@@ -832,8 +838,8 @@ class SnowflakeOCSP:
|
|
|
832
838
|
|
|
833
839
|
OCSP_WHITELIST = re.compile(
|
|
834
840
|
r"^"
|
|
835
|
-
r"(.*\.snowflakecomputing\.
|
|
836
|
-
r"|(?:|.*\.)s3.*\.amazonaws\.
|
|
841
|
+
r"(.*\.snowflakecomputing(\.[a-zA-Z]{1,63}){1,2}$"
|
|
842
|
+
r"|(?:|.*\.)s3.*\.amazonaws(\.[a-zA-Z]{1,63}){1,2}$" # start with s3 or .s3 in the middle
|
|
837
843
|
r"|.*\.okta\.com$"
|
|
838
844
|
r"|(?:|.*\.)storage\.googleapis\.com$"
|
|
839
845
|
r"|.*\.blob\.core\.windows\.net$"
|
|
@@ -881,6 +887,7 @@ class SnowflakeOCSP:
|
|
|
881
887
|
use_ocsp_cache_server=None,
|
|
882
888
|
use_post_method: bool = True,
|
|
883
889
|
use_fail_open: bool = True,
|
|
890
|
+
**kwargs,
|
|
884
891
|
) -> None:
|
|
885
892
|
self.test_mode = os.getenv("SF_OCSP_TEST_MODE", None)
|
|
886
893
|
|
|
@@ -888,7 +895,11 @@ class SnowflakeOCSP:
|
|
|
888
895
|
logger.debug("WARNING - DRIVER CONFIGURED IN TEST MODE")
|
|
889
896
|
|
|
890
897
|
self._use_post_method = use_post_method
|
|
891
|
-
self.OCSP_CACHE_SERVER = OCSPServer(
|
|
898
|
+
self.OCSP_CACHE_SERVER = OCSPServer(
|
|
899
|
+
top_level_domain=extract_top_level_domain_from_hostname(
|
|
900
|
+
kwargs.pop("hostname", None)
|
|
901
|
+
)
|
|
902
|
+
)
|
|
892
903
|
|
|
893
904
|
self.debug_ocsp_failure_url = None
|
|
894
905
|
|
|
@@ -6,7 +6,7 @@ from __future__ import annotations
|
|
|
6
6
|
|
|
7
7
|
import inspect
|
|
8
8
|
from collections import deque
|
|
9
|
-
from concurrent.futures import Future
|
|
9
|
+
from concurrent.futures import ALL_COMPLETED, Future, wait
|
|
10
10
|
from concurrent.futures.thread import ThreadPoolExecutor
|
|
11
11
|
from logging import getLogger
|
|
12
12
|
from typing import (
|
|
@@ -61,45 +61,64 @@ def result_set_iterator(
|
|
|
61
61
|
Just like ``ResultBatch`` iterator, this might yield an ``Exception`` to allow users
|
|
62
62
|
to continue iterating through the rest of the ``ResultBatch``.
|
|
63
63
|
"""
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for _ in range(min(prefetch_thread_num, len(unfetched_batches))):
|
|
71
|
-
logger.debug(
|
|
72
|
-
f"queuing download of result batch id: {unfetched_batches[0].id}"
|
|
73
|
-
)
|
|
74
|
-
unconsumed_batches.append(
|
|
75
|
-
pool.submit(unfetched_batches.popleft().create_iter, **kw)
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
yield from first_batch_iter
|
|
79
|
-
|
|
80
|
-
i = 1
|
|
81
|
-
while unconsumed_batches:
|
|
82
|
-
logger.debug(f"user requesting to consume result batch {i}")
|
|
83
|
-
|
|
84
|
-
# Submit the next un-fetched batch to the pool
|
|
85
|
-
if unfetched_batches:
|
|
64
|
+
is_fetch_all = kw.pop("is_fetch_all", False)
|
|
65
|
+
if is_fetch_all:
|
|
66
|
+
with ThreadPoolExecutor(prefetch_thread_num) as pool:
|
|
67
|
+
logger.debug("beginning to schedule result batch downloads")
|
|
68
|
+
yield from first_batch_iter
|
|
69
|
+
while unfetched_batches:
|
|
86
70
|
logger.debug(
|
|
87
71
|
f"queuing download of result batch id: {unfetched_batches[0].id}"
|
|
88
72
|
)
|
|
89
73
|
future = pool.submit(unfetched_batches.popleft().create_iter, **kw)
|
|
90
74
|
unconsumed_batches.append(future)
|
|
75
|
+
_, _ = wait(unconsumed_batches, return_when=ALL_COMPLETED)
|
|
76
|
+
i = 1
|
|
77
|
+
while unconsumed_batches:
|
|
78
|
+
logger.debug(f"user began consuming result batch {i}")
|
|
79
|
+
yield from unconsumed_batches.popleft().result()
|
|
80
|
+
logger.debug(f"user began consuming result batch {i}")
|
|
81
|
+
i += 1
|
|
82
|
+
final()
|
|
83
|
+
else:
|
|
84
|
+
with ThreadPoolExecutor(prefetch_thread_num) as pool:
|
|
85
|
+
# Fill up window
|
|
86
|
+
|
|
87
|
+
logger.debug("beginning to schedule result batch downloads")
|
|
88
|
+
|
|
89
|
+
for _ in range(min(prefetch_thread_num, len(unfetched_batches))):
|
|
90
|
+
logger.debug(
|
|
91
|
+
f"queuing download of result batch id: {unfetched_batches[0].id}"
|
|
92
|
+
)
|
|
93
|
+
unconsumed_batches.append(
|
|
94
|
+
pool.submit(unfetched_batches.popleft().create_iter, **kw)
|
|
95
|
+
)
|
|
91
96
|
|
|
92
|
-
|
|
97
|
+
yield from first_batch_iter
|
|
93
98
|
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
i = 1
|
|
100
|
+
while unconsumed_batches:
|
|
101
|
+
logger.debug(f"user requesting to consume result batch {i}")
|
|
96
102
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
# Submit the next un-fetched batch to the pool
|
|
104
|
+
if unfetched_batches:
|
|
105
|
+
logger.debug(
|
|
106
|
+
f"queuing download of result batch id: {unfetched_batches[0].id}"
|
|
107
|
+
)
|
|
108
|
+
future = pool.submit(unfetched_batches.popleft().create_iter, **kw)
|
|
109
|
+
unconsumed_batches.append(future)
|
|
100
110
|
|
|
101
|
-
|
|
102
|
-
|
|
111
|
+
future = unconsumed_batches.popleft()
|
|
112
|
+
|
|
113
|
+
# this will raise an exception if one has occurred
|
|
114
|
+
batch_iterator = future.result()
|
|
115
|
+
|
|
116
|
+
logger.debug(f"user began consuming result batch {i}")
|
|
117
|
+
yield from batch_iterator
|
|
118
|
+
logger.debug(f"user finished consuming result batch {i}")
|
|
119
|
+
|
|
120
|
+
i += 1
|
|
121
|
+
final()
|
|
103
122
|
|
|
104
123
|
|
|
105
124
|
class ResultSet(Iterable[list]):
|
|
@@ -202,7 +221,7 @@ class ResultSet(Iterable[list]):
|
|
|
202
221
|
"""Fetches a single Pandas dataframe."""
|
|
203
222
|
concat_args = list(inspect.signature(pandas.concat).parameters)
|
|
204
223
|
concat_kwargs = {k: kwargs.pop(k) for k in dict(kwargs) if k in concat_args}
|
|
205
|
-
dataframes = list(self._fetch_pandas_batches(**kwargs))
|
|
224
|
+
dataframes = list(self._fetch_pandas_batches(is_fetch_all=True, **kwargs))
|
|
206
225
|
if dataframes:
|
|
207
226
|
return pandas.concat(
|
|
208
227
|
dataframes,
|
|
@@ -238,6 +257,9 @@ class ResultSet(Iterable[list]):
|
|
|
238
257
|
This function is a helper function to ``__iter__`` and it was introduced for the
|
|
239
258
|
cases where we need to propagate some values to later ``_download`` calls.
|
|
240
259
|
"""
|
|
260
|
+
# pop is_fetch_all and pass it to result_set_iterator
|
|
261
|
+
is_fetch_all = kwargs.pop("is_fetch_all", False)
|
|
262
|
+
|
|
241
263
|
# add connection so that result batches can use sessions
|
|
242
264
|
kwargs["connection"] = self._cursor.connection
|
|
243
265
|
|
|
@@ -257,6 +279,7 @@ class ResultSet(Iterable[list]):
|
|
|
257
279
|
unfetched_batches,
|
|
258
280
|
self._finish_iterating,
|
|
259
281
|
self.prefetch_thread_num,
|
|
282
|
+
is_fetch_all=is_fetch_all,
|
|
260
283
|
**kwargs,
|
|
261
284
|
)
|
|
262
285
|
|
|
@@ -87,6 +87,7 @@ def ssl_wrap_socket_with_ocsp(*args: Any, **kwargs: Any) -> WrappedSocket:
|
|
|
87
87
|
v = SFOCSP(
|
|
88
88
|
ocsp_response_cache_uri=FEATURE_OCSP_RESPONSE_CACHE_FILE_NAME,
|
|
89
89
|
use_fail_open=FEATURE_OCSP_MODE == OCSPMode.FAIL_OPEN,
|
|
90
|
+
hostname=server_hostname,
|
|
90
91
|
).validate(server_hostname, ret.connection)
|
|
91
92
|
if not v:
|
|
92
93
|
raise OperationalError(
|
|
@@ -19,7 +19,13 @@ from typing import TYPE_CHECKING, Any, Callable, NamedTuple
|
|
|
19
19
|
|
|
20
20
|
import OpenSSL
|
|
21
21
|
|
|
22
|
-
from .constants import
|
|
22
|
+
from .constants import (
|
|
23
|
+
HTTP_HEADER_CONTENT_ENCODING,
|
|
24
|
+
REQUEST_CONNECTION_TIMEOUT,
|
|
25
|
+
REQUEST_READ_TIMEOUT,
|
|
26
|
+
FileHeader,
|
|
27
|
+
ResultStatus,
|
|
28
|
+
)
|
|
23
29
|
from .encryption_util import EncryptionMetadata, SnowflakeEncryptionUtil
|
|
24
30
|
from .errors import RequestExceedMaxRetryError
|
|
25
31
|
from .file_util import SnowflakeFileUtil
|
|
@@ -280,6 +286,7 @@ class SnowflakeStorageClient(ABC):
|
|
|
280
286
|
while self.retry_count[retry_id] < self.max_retry:
|
|
281
287
|
cur_timestamp = self.credentials.timestamp
|
|
282
288
|
url, rest_kwargs = get_request_args()
|
|
289
|
+
rest_kwargs["timeout"] = (REQUEST_CONNECTION_TIMEOUT, REQUEST_READ_TIMEOUT)
|
|
283
290
|
try:
|
|
284
291
|
if conn:
|
|
285
292
|
with conn._rest._use_requests_session(url) as session:
|
|
@@ -172,7 +172,7 @@ class TelemetryService:
|
|
|
172
172
|
raise Exception("This class is a singleton!")
|
|
173
173
|
else:
|
|
174
174
|
TelemetryService.__instance = self
|
|
175
|
-
self._enabled =
|
|
175
|
+
self._enabled = False
|
|
176
176
|
self._queue = Queue()
|
|
177
177
|
self.batch_size = DEFAULT_BATCH_SIZE
|
|
178
178
|
self.num_of_retry_to_trigger_telemetry = (
|
|
@@ -192,11 +192,11 @@ class TelemetryService:
|
|
|
192
192
|
@property
|
|
193
193
|
def enabled(self) -> bool:
|
|
194
194
|
"""Whether the Telemetry service is enabled or not."""
|
|
195
|
-
return
|
|
195
|
+
return False
|
|
196
196
|
|
|
197
197
|
def enable(self) -> None:
|
|
198
198
|
"""Enable Telemetry Service."""
|
|
199
|
-
self._enabled =
|
|
199
|
+
self._enabled = False
|
|
200
200
|
|
|
201
201
|
def disable(self) -> None:
|
|
202
202
|
"""Disable Telemetry Service."""
|
|
@@ -8,6 +8,8 @@ import re
|
|
|
8
8
|
import urllib.parse
|
|
9
9
|
from logging import getLogger
|
|
10
10
|
|
|
11
|
+
from .constants import _TOP_LEVEL_DOMAIN_REGEX
|
|
12
|
+
|
|
11
13
|
logger = getLogger(__name__)
|
|
12
14
|
|
|
13
15
|
|
|
@@ -41,3 +43,11 @@ def url_encode_str(target: str | None) -> str:
|
|
|
41
43
|
logger.debug("The string to be URL encoded is None")
|
|
42
44
|
return ""
|
|
43
45
|
return urllib.parse.quote_plus(target, safe="")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def extract_top_level_domain_from_hostname(hostname: str | None = None) -> str:
|
|
49
|
+
if not hostname:
|
|
50
|
+
return "com"
|
|
51
|
+
# RFC1034 for TLD spec, and https://data.iana.org/TLD/tlds-alpha-by-domain.txt for full TLD list
|
|
52
|
+
match = re.search(_TOP_LEVEL_DOMAIN_REGEX, hostname)
|
|
53
|
+
return (match.group(0)[1:] if match else "com").lower()
|
|
@@ -240,7 +240,12 @@ def construct_hostname(region: str | None, account: str) -> str:
|
|
|
240
240
|
if region:
|
|
241
241
|
if account.find(".") > 0:
|
|
242
242
|
account = account[0 : account.find(".")]
|
|
243
|
-
|
|
243
|
+
top_level_domain = (
|
|
244
|
+
"com"
|
|
245
|
+
if not any(substring in region for substring in ["cn-", "CN-"])
|
|
246
|
+
else "cn"
|
|
247
|
+
)
|
|
248
|
+
host = f"{account}.{region}.snowflakecomputing.{top_level_domain}"
|
|
244
249
|
else:
|
|
245
250
|
host = f"{account}.snowflakecomputing.com"
|
|
246
251
|
return host
|