snowflake-connector-python 3.7.1__tar.gz → 3.8.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.
Files changed (235) hide show
  1. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/DESCRIPTION.md +21 -0
  2. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/PKG-INFO +23 -2
  3. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/setup.cfg +1 -1
  4. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/webbrowser.py +69 -4
  5. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/connection.py +39 -11
  6. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/connection_diagnostic.py +106 -64
  7. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/constants.py +68 -34
  8. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/cursor.py +25 -81
  9. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/local_storage_client.py +8 -3
  10. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/options.py +5 -0
  11. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/pandas_tools.py +8 -7
  12. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/secret_detector.py +1 -1
  13. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/version.py +1 -1
  14. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake_connector_python.egg-info/PKG-INFO +23 -2
  15. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake_connector_python.egg-info/requires.txt +1 -1
  16. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/CONTRIBUTING.md +0 -0
  17. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/LICENSE.txt +0 -0
  18. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/MANIFEST.in +0 -0
  19. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/NOTICE +0 -0
  20. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/README.md +0 -0
  21. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/SECURITY.md +0 -0
  22. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/pyproject.toml +0 -0
  23. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/setup.py +0 -0
  24. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/__init__.py +0 -0
  25. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/_query_context_cache.py +0 -0
  26. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/_sql_util.py +0 -0
  27. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/arrow_context.py +0 -0
  28. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/__init__.py +0 -0
  29. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/_auth.py +0 -0
  30. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/by_plugin.py +0 -0
  31. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/default.py +0 -0
  32. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/idtoken.py +0 -0
  33. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/keypair.py +0 -0
  34. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/oauth.py +0 -0
  35. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/okta.py +0 -0
  36. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/auth/usrpwdmfa.py +0 -0
  37. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/azure_storage_client.py +0 -0
  38. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/backoff_policies.py +0 -0
  39. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/bind_upload_agent.py +0 -0
  40. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/cache.py +0 -0
  41. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/compat.py +0 -0
  42. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/config_manager.py +0 -0
  43. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/converter.py +0 -0
  44. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/converter_issue23517.py +0 -0
  45. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/converter_null.py +0 -0
  46. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/converter_snowsql.py +0 -0
  47. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/dbapi.py +0 -0
  48. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/description.py +0 -0
  49. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/encryption_util.py +0 -0
  50. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/errorcode.py +0 -0
  51. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/errors.py +0 -0
  52. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/feature.py +0 -0
  53. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/file_compression_type.py +0 -0
  54. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/file_transfer_agent.py +0 -0
  55. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/file_util.py +0 -0
  56. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/gcs_storage_client.py +0 -0
  57. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/gzip_decoder.py +0 -0
  58. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.cpp +0 -0
  59. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.hpp +0 -0
  60. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.cpp +0 -0
  61. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.hpp +0 -0
  62. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.cpp +0 -0
  63. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.hpp +0 -0
  64. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.cpp +0 -0
  65. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.hpp +0 -0
  66. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.cpp +0 -0
  67. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.hpp +0 -0
  68. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.cpp +0 -0
  69. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.hpp +0 -0
  70. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.cpp +0 -0
  71. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.hpp +0 -0
  72. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.cpp +0 -0
  73. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.hpp +0 -0
  74. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.cpp +0 -0
  75. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.hpp +0 -0
  76. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.cpp +0 -0
  77. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.hpp +0 -0
  78. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IColumnConverter.hpp +0 -0
  79. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.cpp +0 -0
  80. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.hpp +0 -0
  81. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/LICENSE.txt +0 -0
  82. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.cpp +0 -0
  83. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.hpp +0 -0
  84. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.cpp +0 -0
  85. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.hpp +0 -0
  86. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.cpp +0 -0
  87. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.hpp +0 -0
  88. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.cpp +0 -0
  89. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.hpp +0 -0
  90. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.cpp +0 -0
  91. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.hpp +0 -0
  92. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.cpp +0 -0
  93. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.hpp +0 -0
  94. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.cpp +0 -0
  95. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.hpp +0 -0
  96. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.cpp +0 -0
  97. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.hpp +0 -0
  98. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/macros.hpp +0 -0
  99. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.cpp +0 -0
  100. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.hpp +0 -0
  101. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_accessors.h +0 -0
  102. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_alloc.h +0 -0
  103. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_assert.h +0 -0
  104. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_builder.h +0 -0
  105. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_emitter.h +0 -0
  106. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_endian.h +0 -0
  107. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_epilogue.h +0 -0
  108. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_flatbuffers.h +0 -0
  109. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_identifier.h +0 -0
  110. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_iov.h +0 -0
  111. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_prologue.h +0 -0
  112. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_refmap.h +0 -0
  113. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_rtconfig.h +0 -0
  114. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_types.h +0 -0
  115. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_verifier.h +0 -0
  116. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/flatcc_portable.h +0 -0
  117. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/paligned_alloc.h +0 -0
  118. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pattributes.h +0 -0
  119. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic.h +0 -0
  120. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_pop.h +0 -0
  121. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_push.h +0 -0
  122. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian.h +0 -0
  123. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian_detect.h +0 -0
  124. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinline.h +0 -0
  125. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinttypes.h +0 -0
  126. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable.h +0 -0
  127. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable_basic.h +0 -0
  128. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstatic_assert.h +0 -0
  129. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdalign.h +0 -0
  130. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdint.h +0 -0
  131. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/punaligned.h +0 -0
  132. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pversion.h +0 -0
  133. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pwarnings.h +0 -0
  134. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc.c +0 -0
  135. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.c +0 -0
  136. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.h +0 -0
  137. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.hpp +0 -0
  138. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_arrow_iterator.pyx +0 -0
  139. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.c +0 -0
  140. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.h +0 -0
  141. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.c +0 -0
  142. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.h +0 -0
  143. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.cpp +0 -0
  144. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.hpp +0 -0
  145. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/network.py +0 -0
  146. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/ocsp_asn1crypto.py +0 -0
  147. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/ocsp_snowflake.py +0 -0
  148. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/proxy.py +0 -0
  149. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/py.typed +0 -0
  150. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/result_batch.py +0 -0
  151. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/result_set.py +0 -0
  152. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/s3_storage_client.py +0 -0
  153. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/sf_dirs.py +0 -0
  154. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/sfbinaryformat.py +0 -0
  155. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/sfdatetime.py +0 -0
  156. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/snow_logging.py +0 -0
  157. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/sqlstate.py +0 -0
  158. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/ssd_internal_keys.py +0 -0
  159. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/ssl_wrap_socket.py +0 -0
  160. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/storage_client.py +0 -0
  161. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/telemetry.py +0 -0
  162. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/telemetry_oob.py +0 -0
  163. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/test_util.py +0 -0
  164. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/time_util.py +0 -0
  165. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/tool/__init__.py +0 -0
  166. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/tool/dump_certs.py +0 -0
  167. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/tool/dump_ocsp_response.py +0 -0
  168. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/tool/dump_ocsp_response_cache.py +0 -0
  169. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/tool/probe_connection.py +0 -0
  170. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/url_util.py +0 -0
  171. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/util_text.py +0 -0
  172. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/__init__.py +0 -0
  173. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/LICENSE +0 -0
  174. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/__init__.py +0 -0
  175. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/__version__.py +0 -0
  176. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/_internal_utils.py +0 -0
  177. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/adapters.py +0 -0
  178. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/api.py +0 -0
  179. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/auth.py +0 -0
  180. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/certs.py +0 -0
  181. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/compat.py +0 -0
  182. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/cookies.py +0 -0
  183. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/exceptions.py +0 -0
  184. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/help.py +0 -0
  185. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/hooks.py +0 -0
  186. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/models.py +0 -0
  187. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/sessions.py +0 -0
  188. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/status_codes.py +0 -0
  189. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/structures.py +0 -0
  190. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/requests/utils.py +0 -0
  191. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/LICENSE.txt +0 -0
  192. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/__init__.py +0 -0
  193. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/_collections.py +0 -0
  194. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/_version.py +0 -0
  195. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/connection.py +0 -0
  196. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/connectionpool.py +0 -0
  197. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/__init__.py +0 -0
  198. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/_appengine_environ.py +0 -0
  199. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/__init__.py +0 -0
  200. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/bindings.py +0 -0
  201. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/low_level.py +0 -0
  202. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/appengine.py +0 -0
  203. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/ntlmpool.py +0 -0
  204. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py +0 -0
  205. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/securetransport.py +0 -0
  206. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/contrib/socks.py +0 -0
  207. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/exceptions.py +0 -0
  208. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/fields.py +0 -0
  209. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/filepost.py +0 -0
  210. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/packages/__init__.py +0 -0
  211. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/packages/backports/__init__.py +0 -0
  212. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/packages/backports/makefile.py +0 -0
  213. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/packages/backports/weakref_finalize.py +0 -0
  214. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/packages/six.py +0 -0
  215. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/poolmanager.py +0 -0
  216. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/request.py +0 -0
  217. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/response.py +0 -0
  218. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/__init__.py +0 -0
  219. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/connection.py +0 -0
  220. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/proxy.py +0 -0
  221. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/queue.py +0 -0
  222. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/request.py +0 -0
  223. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/response.py +0 -0
  224. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/retry.py +0 -0
  225. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/ssl_.py +0 -0
  226. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/ssl_match_hostname.py +0 -0
  227. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/ssltransport.py +0 -0
  228. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/timeout.py +0 -0
  229. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/url.py +0 -0
  230. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake/connector/vendored/urllib3/util/wait.py +0 -0
  231. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake_connector_python.egg-info/SOURCES.txt +0 -0
  232. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake_connector_python.egg-info/dependency_links.txt +0 -0
  233. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake_connector_python.egg-info/entry_points.txt +0 -0
  234. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake_connector_python.egg-info/not-zip-safe +0 -0
  235. {snowflake-connector-python-3.7.1 → snowflake-connector-python-3.8.0}/src/snowflake_connector_python.egg-info/top_level.txt +0 -0
@@ -8,6 +8,26 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
8
8
 
9
9
  # Release Notes
10
10
 
11
+ - v3.8.0(April 04,2024)
12
+
13
+ - Improved `externalbrowser` auth in containerized environments
14
+ - Instruct browser to not fetch `/favicon` on success page
15
+ - Simple retry strategy on empty socket.recv
16
+ - Add `SNOWFLAKE_AUTH_SOCKET_REUSE_PORT` flag (usage: `SNOWFLAKE_AUTH_SOCKET_REUSE_PORT=true`) to set the underlying socket's `SO_REUSEPORT` flag (described in the [socket man page](https://man7.org/linux/man-pages/man7/socket.7.html))
17
+ - Useful when the randomized port used in the localhost callback url is being followed before the container engine completes port forwarding to host
18
+ - Statically map a port between your host and container and allow that port to be reused in rapid succession with:
19
+ `SF_AUTH_SOCKET_PORT=3037 SNOWFLAKE_AUTH_SOCKET_REUSE_PORT=true poetry run python somescript.py`
20
+ - Add `SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT` flag (usage: `SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT=true`) to make a non-blocking socket.recv call and retry on Error
21
+ - Consider using this if running in a containerized environment and externalbrowser auth frequently hangs while waiting for callback
22
+ - NOTE: this has not been tested extensively, but has been shown to improve the experience when using WSL
23
+ - Added support for parsing structured type information in schema queries.
24
+ - Bumped platformdirs from >=2.6.0,<4.0.0 to >=2.6.0,<5.0.0
25
+ - Updated diagnostics to use system$allowlist instead of system$whitelist.
26
+ - Updated `write_pandas` to skip TABLE IF NOT EXISTS in truncate mode.
27
+ - Improved cleanup logic for connection to rely on interpreter shutdown instead of the `__del__` method.
28
+ - Updated the logging level from INFO to DEBUG when logging the executed query using `SnowflakeCursor.execute`.
29
+ - Fixed a bug that the truncated password in log is not masked.
30
+
11
31
  - v3.7.1(February 21, 2024)
12
32
 
13
33
  - Bumped pandas dependency from >=1.0.0,<2.2.0 to >=1.0.0,<3.0.0.
@@ -62,6 +82,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
62
82
  - Added the `socket_timeout` argument to `snowflake.connector.connect` specifying socket read and connect timeout.
63
83
  - Fixed `login_timeout` and `network_timeout` behaviour. Retries of login and network requests are now properly halted after these timeouts expire.
64
84
  - Fixed bug for issue https://github.com/urllib3/urllib3/issues/1878 in vendored `urllib`.
85
+ - Add User-Agent header for diagnostic report for tracking.
65
86
 
66
87
  - v3.3.1(October 16,2023)
67
88
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snowflake-connector-python
3
- Version: 3.7.1
3
+ Version: 3.8.0
4
4
  Summary: Snowflake Connector for Python
5
5
  Home-page: https://www.snowflake.com/
6
6
  Author: Snowflake, Inc
@@ -54,7 +54,7 @@ Requires-Dist: certifi>=2017.4.17
54
54
  Requires-Dist: typing_extensions<5,>=4.3
55
55
  Requires-Dist: filelock<4,>=3.5
56
56
  Requires-Dist: sortedcontainers>=2.4.0
57
- Requires-Dist: platformdirs<4.0.0,>=2.6.0
57
+ Requires-Dist: platformdirs<5.0.0,>=2.6.0
58
58
  Requires-Dist: tomlkit
59
59
  Provides-Extra: development
60
60
  Requires-Dist: Cython; extra == "development"
@@ -85,6 +85,26 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
85
85
 
86
86
  # Release Notes
87
87
 
88
+ - v3.8.0(April 04,2024)
89
+
90
+ - Improved `externalbrowser` auth in containerized environments
91
+ - Instruct browser to not fetch `/favicon` on success page
92
+ - Simple retry strategy on empty socket.recv
93
+ - Add `SNOWFLAKE_AUTH_SOCKET_REUSE_PORT` flag (usage: `SNOWFLAKE_AUTH_SOCKET_REUSE_PORT=true`) to set the underlying socket's `SO_REUSEPORT` flag (described in the [socket man page](https://man7.org/linux/man-pages/man7/socket.7.html))
94
+ - Useful when the randomized port used in the localhost callback url is being followed before the container engine completes port forwarding to host
95
+ - Statically map a port between your host and container and allow that port to be reused in rapid succession with:
96
+ `SF_AUTH_SOCKET_PORT=3037 SNOWFLAKE_AUTH_SOCKET_REUSE_PORT=true poetry run python somescript.py`
97
+ - Add `SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT` flag (usage: `SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT=true`) to make a non-blocking socket.recv call and retry on Error
98
+ - Consider using this if running in a containerized environment and externalbrowser auth frequently hangs while waiting for callback
99
+ - NOTE: this has not been tested extensively, but has been shown to improve the experience when using WSL
100
+ - Added support for parsing structured type information in schema queries.
101
+ - Bumped platformdirs from >=2.6.0,<4.0.0 to >=2.6.0,<5.0.0
102
+ - Updated diagnostics to use system$allowlist instead of system$whitelist.
103
+ - Updated `write_pandas` to skip TABLE IF NOT EXISTS in truncate mode.
104
+ - Improved cleanup logic for connection to rely on interpreter shutdown instead of the `__del__` method.
105
+ - Updated the logging level from INFO to DEBUG when logging the executed query using `SnowflakeCursor.execute`.
106
+ - Fixed a bug that the truncated password in log is not masked.
107
+
88
108
  - v3.7.1(February 21, 2024)
89
109
 
90
110
  - Bumped pandas dependency from >=1.0.0,<2.2.0 to >=1.0.0,<3.0.0.
@@ -139,6 +159,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
139
159
  - Added the `socket_timeout` argument to `snowflake.connector.connect` specifying socket read and connect timeout.
140
160
  - Fixed `login_timeout` and `network_timeout` behaviour. Retries of login and network requests are now properly halted after these timeouts expire.
141
161
  - Fixed bug for issue https://github.com/urllib3/urllib3/issues/1878 in vendored `urllib`.
162
+ - Add User-Agent header for diagnostic report for tracking.
142
163
 
143
164
  - v3.3.1(October 16,2023)
144
165
 
@@ -59,7 +59,7 @@ install_requires =
59
59
  typing_extensions>=4.3,<5
60
60
  filelock>=3.5,<4
61
61
  sortedcontainers>=2.4.0
62
- platformdirs>=2.6.0,<4.0.0
62
+ platformdirs>=2.6.0,<5.0.0
63
63
  tomlkit
64
64
  include_package_data = True
65
65
  package_dir =
@@ -10,13 +10,14 @@ import json
10
10
  import logging
11
11
  import os
12
12
  import secrets
13
+ import select
13
14
  import socket
14
15
  import time
15
16
  import webbrowser
16
17
  from types import ModuleType
17
18
  from typing import TYPE_CHECKING, Any
18
19
 
19
- from ..compat import parse_qs, urlencode, urlparse, urlsplit
20
+ from ..compat import IS_WINDOWS, parse_qs, urlencode, urlparse, urlsplit
20
21
  from ..constants import (
21
22
  HTTP_HEADER_ACCEPT,
22
23
  HTTP_HEADER_CONTENT_TYPE,
@@ -116,6 +117,15 @@ class AuthByWebBrowser(AuthByPlugin):
116
117
  logger.debug("authenticating by Web Browser")
117
118
 
118
119
  socket_connection = self._socket(socket.AF_INET, socket.SOCK_STREAM)
120
+
121
+ if os.getenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "False").lower() == "true":
122
+ if IS_WINDOWS:
123
+ logger.warning(
124
+ "Configuration SNOWFLAKE_AUTH_SOCKET_REUSE_PORT is not available in Windows. Ignoring."
125
+ )
126
+ else:
127
+ socket_connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
128
+
119
129
  try:
120
130
  try:
121
131
  socket_connection.bind(
@@ -205,14 +215,68 @@ class AuthByWebBrowser(AuthByPlugin):
205
215
  def _receive_saml_token(self, conn: SnowflakeConnection, socket_connection) -> None:
206
216
  """Receives SAML token from web browser."""
207
217
  while True:
208
- socket_client, _ = socket_connection.accept()
209
218
  try:
210
- # Receive the data in small chunks and retransmit it
211
- data = socket_client.recv(BUF_SIZE).decode("utf-8").split("\r\n")
219
+ attempts = 0
220
+ raw_data = bytearray()
221
+ socket_client = None
222
+ max_attempts = 15
223
+
224
+ msg_dont_wait = (
225
+ os.getenv("SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT", "false").lower()
226
+ == "true"
227
+ )
228
+ if IS_WINDOWS:
229
+ if msg_dont_wait:
230
+ logger.warning(
231
+ "Configuration SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT is not available in Windows. Ignoring."
232
+ )
233
+ msg_dont_wait = False
234
+
235
+ # when running in a containerized environment, socket_client.recv ocassionally returns an empty byte array
236
+ # an immediate successive call to socket_client.recv gets the actual data
237
+ while len(raw_data) == 0 and attempts < max_attempts:
238
+ attempts += 1
239
+ read_sockets, _write_sockets, _exception_sockets = select.select(
240
+ [socket_connection], [], []
241
+ )
242
+
243
+ if read_sockets[0] is not None:
244
+ # Receive the data in small chunks and retransmit it
245
+ socket_client, _ = socket_connection.accept()
246
+
247
+ try:
248
+ if msg_dont_wait:
249
+ # WSL containerized environment sometimes causes socket_client.recv to hang indefinetly
250
+ # To avoid this, passing the socket.MSG_DONTWAIT flag which raises BlockingIOError if
251
+ # operation would block
252
+ logger.debug(
253
+ "Calling socket_client.recv with MSG_DONTWAIT flag due to SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT env var"
254
+ )
255
+ raw_data = socket_client.recv(
256
+ BUF_SIZE, socket.MSG_DONTWAIT
257
+ )
258
+ else:
259
+ raw_data = socket_client.recv(BUF_SIZE)
260
+
261
+ except BlockingIOError:
262
+ logger.debug(
263
+ "BlockingIOError raised from socket.recv while attempting to retrieve callback token request"
264
+ )
265
+ if attempts < max_attempts:
266
+ sleep_time = 0.25
267
+ logger.debug(
268
+ f"Waiting {sleep_time} seconds before trying again"
269
+ )
270
+ time.sleep(sleep_time)
271
+ else:
272
+ logger.debug("Exceeded retry count")
273
+
274
+ data = raw_data.decode("utf-8").split("\r\n")
212
275
 
213
276
  if not self._process_options(data, socket_client):
214
277
  self._process_receive_saml_token(conn, data, socket_client)
215
278
  break
279
+
216
280
  finally:
217
281
  socket_client.shutdown(socket.SHUT_RDWR)
218
282
  socket_client.close()
@@ -282,6 +346,7 @@ class AuthByWebBrowser(AuthByPlugin):
282
346
  else:
283
347
  msg = f"""
284
348
  <!DOCTYPE html><html><head><meta charset="UTF-8"/>
349
+ <link rel="icon" href="data:,">
285
350
  <title>SAML Response for Snowflake</title></head>
286
351
  <body>
287
352
  Your identity was confirmed and propagated to Snowflake {self._application}.
@@ -5,6 +5,7 @@
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
+ import atexit
8
9
  import logging
9
10
  import os
10
11
  import pathlib
@@ -16,6 +17,7 @@ import warnings
16
17
  import weakref
17
18
  from concurrent.futures import as_completed
18
19
  from concurrent.futures.thread import ThreadPoolExecutor
20
+ from contextlib import suppress
19
21
  from difflib import get_close_matches
20
22
  from functools import partial
21
23
  from io import StringIO
@@ -124,8 +126,10 @@ def DefaultConverterClass() -> type:
124
126
 
125
127
  def _get_private_bytes_from_file(
126
128
  private_key_file: str | bytes | os.PathLike[str] | os.PathLike[bytes],
127
- private_key_file_pwd: bytes | None = None,
129
+ private_key_file_pwd: bytes | str | None = None,
128
130
  ) -> bytes:
131
+ if private_key_file_pwd is not None and isinstance(private_key_file_pwd, str):
132
+ private_key_file_pwd = private_key_file_pwd.encode("utf-8")
129
133
  with open(private_key_file, "rb") as key:
130
134
  private_key = serialization.load_pem_private_key(
131
135
  key.read(),
@@ -178,7 +182,7 @@ DEFAULT_CONFIGURATION: dict[str, tuple[Any, type | tuple[type, ...]]] = {
178
182
  "passcode": (None, (type(None), str)), # Snowflake MFA
179
183
  "private_key": (None, (type(None), str, RSAPrivateKey)),
180
184
  "private_key_file": (None, (type(None), str)),
181
- "private_key_file_pwd": (None, (type(None), str)),
185
+ "private_key_file_pwd": (None, (type(None), str, bytes)),
182
186
  "token": (None, (type(None), str)), # OAuth or JWT Token
183
187
  "authenticator": (DEFAULT_AUTHENTICATOR, (type(None), str)),
184
188
  "mfa_callback": (None, (type(None), Callable)),
@@ -235,7 +239,11 @@ DEFAULT_CONFIGURATION: dict[str, tuple[Any, type | tuple[type, ...]]] = {
235
239
  "connection_diag_whitelist_path": (
236
240
  None,
237
241
  (type(None), str),
238
- ), # Path to connection diag whitelist json
242
+ ), # Path to connection diag whitelist json - Deprecated remove in future
243
+ "connection_diag_allowlist_path": (
244
+ None,
245
+ (type(None), str),
246
+ ), # Path to connection diag allowlist json
239
247
  "log_imported_packages_in_telemetry": (
240
248
  True,
241
249
  bool,
@@ -343,7 +351,8 @@ class SnowflakeConnection:
343
351
  enable_stage_s3_privatelink_for_us_east_1: when true, clients use regional s3 url to upload files.
344
352
  enable_connection_diag: when true, clients will generate a connectivity diagnostic report.
345
353
  connection_diag_log_path: path to location to create diag report with enable_connection_diag.
346
- connection_diag_whitelist_path: path to a whitelist.json file to test with enable_connection_diag.
354
+ connection_diag_whitelist_path: path to a whitelist.json file to test with enable_connection_diag - deprecated remove in future
355
+ connection_diag_allowlist_path: path to a allowlist.json file to test with enable_connection_diag.
347
356
  json_result_force_utf8_decoding: When true, json result will be decoded in utf-8,
348
357
  when false, the encoding of the content is auto-detected. Default value is false.
349
358
  This parameter is only effective when the result format is JSON.
@@ -432,12 +441,8 @@ class SnowflakeConnection:
432
441
 
433
442
  # get the imported modules from sys.modules
434
443
  self._log_telemetry_imported_packages()
435
-
436
- def __del__(self) -> None: # pragma: no cover
437
- try:
438
- self.close(retry=False)
439
- except Exception:
440
- pass
444
+ # check SNOW-1218851 for long term improvement plan to refactor ocsp code
445
+ atexit.register(self._close_at_exit)
441
446
 
442
447
  @property
443
448
  def insecure_mode(self) -> bool:
@@ -655,8 +660,23 @@ class SnowflakeConnection:
655
660
 
656
661
  @property
657
662
  def connection_diag_whitelist_path(self):
663
+ """
664
+ Old version of ``connection_diag_allowlist_path``.
665
+ This used to be the original name, but snowflake backend
666
+ deprecated whitelist for allowlist. This name will be
667
+ deprecated in the future.
668
+ """
669
+ warnings.warn(
670
+ "connection_diag_whitelist_path has been deprecated, use connection_diag_allowlist_path instead",
671
+ DeprecationWarning,
672
+ stacklevel=2,
673
+ )
658
674
  return self._connection_diag_whitelist_path
659
675
 
676
+ @property
677
+ def connection_diag_allowlist_path(self):
678
+ return self._connection_diag_allowlist_path
679
+
660
680
  @arrow_number_to_decimal.setter
661
681
  def arrow_number_to_decimal_setter(self, value: bool) -> None:
662
682
  self._arrow_number_to_decimal = value
@@ -689,7 +709,9 @@ class SnowflakeConnection:
689
709
  account=self.account,
690
710
  host=self.host,
691
711
  connection_diag_log_path=self.connection_diag_log_path,
692
- connection_diag_whitelist_path=self.connection_diag_whitelist_path,
712
+ connection_diag_allowlist_path=self.connection_diag_allowlist_path
713
+ if self.connection_diag_allowlist_path is not None
714
+ else self.connection_diag_whitelist_path,
693
715
  proxy_host=self.proxy_host,
694
716
  proxy_port=self.proxy_port,
695
717
  proxy_user=self.proxy_user,
@@ -720,6 +742,8 @@ class SnowflakeConnection:
720
742
 
721
743
  def close(self, retry: bool = True) -> None:
722
744
  """Closes the connection."""
745
+ # unregister to dereference connection object as it's already closed after the execution
746
+ atexit.unregister(self._close_at_exit)
723
747
  try:
724
748
  if not self.rest:
725
749
  logger.debug("Rest object has been destroyed, cannot close session")
@@ -1747,6 +1771,10 @@ class SnowflakeConnection:
1747
1771
  ) # Prevent KeyError when multiple threads try to remove the same query id
1748
1772
  self._done_async_sfqids[sf_qid] = None
1749
1773
 
1774
+ def _close_at_exit(self):
1775
+ with suppress(Exception):
1776
+ self.close(retry=False)
1777
+
1750
1778
  def get_query_status(self, sf_qid: str) -> QueryStatus:
1751
1779
  """Retrieves the status of query with sf_qid.
1752
1780
 
@@ -18,6 +18,7 @@ from pathlib import Path
18
18
  from typing import Any, AnyStr
19
19
  from urllib.request import getproxies
20
20
 
21
+ import certifi
21
22
  import OpenSSL
22
23
 
23
24
  from .compat import IS_WINDOWS, urlparse
@@ -30,8 +31,8 @@ if IS_WINDOWS:
30
31
  import winreg
31
32
 
32
33
 
33
- def _decode_dict(d):
34
- result = {}
34
+ def _decode_dict(d: dict[str, dict[str, Any]]):
35
+ result: dict[str, dict[str, Any]] = {}
35
36
  for key, value in d.items():
36
37
  if isinstance(key, bytes):
37
38
  key = key.decode()
@@ -43,6 +44,18 @@ def _decode_dict(d):
43
44
  return result
44
45
 
45
46
 
47
+ def _is_list_of_json_objects(allowlist: List[Dict[str, Any]]):
48
+ if isinstance(allowlist, list) and all(
49
+ isinstance(item, dict) for item in allowlist
50
+ ):
51
+ try:
52
+ json.dumps(allowlist)
53
+ return True
54
+ except TypeError:
55
+ return False
56
+ return False
57
+
58
+
46
59
  class ConnectionDiagnostic:
47
60
  """Implementation of a connection test utility for Snowflake connector
48
61
 
@@ -54,7 +67,7 @@ class ConnectionDiagnostic:
54
67
  account: str,
55
68
  host: str,
56
69
  connection_diag_log_path: str | None = None,
57
- connection_diag_whitelist_path: str | None = None,
70
+ connection_diag_allowlist_path: str | None = None,
58
71
  proxy_host: str | None = None,
59
72
  proxy_port: str | None = None,
60
73
  proxy_user: str | None = None,
@@ -117,9 +130,9 @@ class ConnectionDiagnostic:
117
130
  if connection_diag_log_path is not None
118
131
  else None
119
132
  )
120
- self.full_connection_diag_whitelist_path: Path | None = (
121
- Path(connection_diag_whitelist_path)
122
- if connection_diag_whitelist_path is not None
133
+ self.full_connection_diag_allowlist_path: Path | None = (
134
+ Path(connection_diag_allowlist_path)
135
+ if connection_diag_allowlist_path is not None
123
136
  else None
124
137
  )
125
138
  self.tmpdir: str = tempfile.gettempdir()
@@ -142,35 +155,35 @@ class ConnectionDiagnostic:
142
155
  )
143
156
  logger.info(f"Reporting to file {self.report_file}")
144
157
 
145
- if self.full_connection_diag_whitelist_path is not None:
146
- if not self.full_connection_diag_whitelist_path.is_absolute():
158
+ if self.full_connection_diag_allowlist_path is not None:
159
+ if not self.full_connection_diag_allowlist_path.is_absolute():
147
160
  logger.warning(
148
- f"Path '{self.full_connection_diag_whitelist_path}' for connection test whitelist is not absolute."
161
+ f"Path '{self.full_connection_diag_allowlist_path}' for connection test allowlist is not absolute."
149
162
  )
150
163
  logger.warning(
151
- "Will connect to Snowflake for whitelist json instead. If you did not provide a valid "
164
+ "Will connect to Snowflake for allowlist json instead. If you did not provide a valid "
152
165
  "password, please make sure to update and run again."
153
166
  )
154
- self.full_connection_diag_whitelist_path = None
155
- elif not self.full_connection_diag_whitelist_path.exists():
167
+ self.full_connection_diag_allowlist_path = None
168
+ elif not self.full_connection_diag_allowlist_path.exists():
156
169
  logger.warning(
157
- f"File '{self.full_connection_diag_whitelist_path}' for connection test whitelist does not exist."
170
+ f"File '{self.full_connection_diag_allowlist_path}' for connection test allowlist does not exist."
158
171
  )
159
172
  logger.warning(
160
- "Will connect to Snowflake for whitelist json instead. If you did not provide a valid "
173
+ "Will connect to Snowflake for allowlist json instead. If you did not provide a valid "
161
174
  "password, please make sure to update and run again."
162
175
  )
163
- self.full_connection_diag_whitelist_path = None
176
+ self.full_connection_diag_allowlist_path = None
164
177
 
165
- self.whitelist_sql: str = "select /* snowflake-connector-python:connection_diagnostics */ system$whitelist();"
178
+ self.allowlist_sql: str = "select /* snowflake-connector-python:connection_diagnostics */ system$allowlist();"
166
179
 
167
180
  if self.__is_privatelink():
168
181
  self.ocsp_urls.append(f"ocsp.{self.host}")
169
- self.whitelist_sql = "select system$whitelist_privatelink();"
182
+ self.allowlist_sql = "select system$allowlist_privatelink();"
170
183
  else:
171
184
  self.ocsp_urls.append("ocsp.snowflakecomputing.com")
172
185
 
173
- self.whitelist_retrieval_success: bool = False
186
+ self.allowlist_retrieval_success: bool = False
174
187
  self.cursor: SnowflakeCursor | None = None
175
188
 
176
189
  def __parse_proxy(self, proxy_url: str) -> tuple[str, str, str, str]:
@@ -212,8 +225,20 @@ class ConnectionDiagnostic:
212
225
  conn.recv(4096).decode("utf-8")
213
226
 
214
227
  context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
228
+ context.load_verify_locations(certifi.where())
215
229
  sock = context.wrap_socket(conn, server_hostname=host)
216
230
  certificate = ssl.DER_cert_to_PEM_cert(sock.getpeercert(True))
231
+ http_request = f"""GET / {host}:{port} HTTP/1.1\r\n
232
+ Host: {host}\r\n
233
+ User-Agent: snowflake-connector-python-diagnostic
234
+ \r\n\r\n"""
235
+ try:
236
+ sock.send(str.encode(http_request))
237
+ except Exception as e:
238
+ self.__append_message(
239
+ host_type,
240
+ f"{host}:{port}: URL Check: Failed: Unknown Exception: {e}",
241
+ )
217
242
  conn.close()
218
243
  return certificate
219
244
  else:
@@ -260,37 +285,52 @@ class ConnectionDiagnostic:
260
285
  return "SUCCESS"
261
286
 
262
287
  def run_post_test(self) -> None:
263
- results: list[str] = []
264
- if self.full_connection_diag_whitelist_path is None:
288
+ results: list[str] = None
289
+ if self.full_connection_diag_allowlist_path is None:
265
290
  if self.cursor is not None:
266
291
  try:
267
292
  results = self.cursor.execute(
268
- self.whitelist_sql, _is_internal=True
293
+ self.allowlist_sql, _is_internal=True
269
294
  ).fetchall()[0][0]
270
295
  results = json.loads(str(results))
271
- self.whitelist_retrieval_success = True
296
+ self.allowlist_retrieval_success = True
272
297
  except Exception as e:
273
- logger.warning(f"Unable to do whitelist checks: exception: {e}")
298
+ logger.warning(f"Unable to do allowlist checks: exception: {e}")
274
299
  else:
275
- results_file = open(self.full_connection_diag_whitelist_path)
276
- results = json.load(results_file)
277
- self.whitelist_retrieval_success = True
278
-
279
- for result in results:
280
- host_type = result["type"]
281
- host = result["host"]
282
- host_port = result["port"]
283
-
284
- if host_type in ("OCSP_RESPONDER"):
285
- if host not in self.ocsp_urls:
286
- self.__test_socket_get_cert(
287
- host, port=host_port, host_type=host_type
288
- )
289
- elif host_type in ("STAGE", "OUT_OF_BAND_TELEMETRY"):
290
- try:
291
- self.__https_host_report(host, port=host_port, host_type=host_type)
292
- except Exception:
293
- pass
300
+ results_file = open(self.full_connection_diag_allowlist_path)
301
+ try:
302
+ results = json.load(results_file)
303
+ self.allowlist_retrieval_success = True
304
+ except Exception as e:
305
+ self.__append_message(
306
+ "INITIAL",
307
+ f"Allowlist was not valid json: '{e}'. Please run 'select system$allowlist();' and validate the file {self.full_connection_diag_allowlist_path} is correct.",
308
+ )
309
+ pass
310
+
311
+ if _is_list_of_json_objects(results):
312
+ for result in results:
313
+ host_type = result["type"]
314
+ host = result["host"]
315
+ host_port = result["port"]
316
+
317
+ if host_type in ("OCSP_RESPONDER"):
318
+ if host not in self.ocsp_urls:
319
+ self.__test_socket_get_cert(
320
+ host, port=host_port, host_type=host_type
321
+ )
322
+ elif host_type in ("STAGE", "OUT_OF_BAND_TELEMETRY"):
323
+ try:
324
+ self.__https_host_report(
325
+ host, port=host_port, host_type=host_type
326
+ )
327
+ except Exception:
328
+ pass
329
+ else:
330
+ self.__append_message(
331
+ "INITIAL",
332
+ "Allowlist is not a valid list of json objects. Please run 'select system$allowlist();' and provide as a json file using the connection_diag_allowlist_path option.",
333
+ )
294
334
 
295
335
  def __is_privatelink(self) -> bool:
296
336
  return "privatelink" in self.host
@@ -490,23 +530,25 @@ class ConnectionDiagnostic:
490
530
  )
491
531
 
492
532
  check_pattern = f"(^{'|^'.join(cert_authorities)})"
493
- issuer = self.__get_issuer_string(self.cert_info[self.host]["issuer"])
494
- if not re.search(check_pattern, issuer):
495
- self.__append_message(
496
- host_type,
497
- f"There is likely a proxy because the issuer for {self.host} is "
498
- f"not correct. Got {issuer} and expected one of {cert_authorities}",
499
- )
533
+ if self.host in self.cert_info.keys():
534
+ issuer = self.__get_issuer_string(self.cert_info[self.host]["issuer"])
535
+ if not re.search(check_pattern, issuer):
536
+ self.__append_message(
537
+ host_type,
538
+ f"There is likely a proxy because the issuer for {self.host} is "
539
+ f"not correct. Got {issuer} and expected one of {cert_authorities}",
540
+ )
500
541
 
501
542
  test_host = "www.google.com"
502
543
  self.__https_host_report(test_host, port=443, host_type="IGNORE")
503
- issuer = self.__get_issuer_string(self.cert_info[test_host]["issuer"])
504
- if not re.search(check_pattern, issuer):
505
- self.__append_message(
506
- host_type,
507
- f"There is likely a proxy because the issuer for {test_host} is "
508
- f"not correct. Got {issuer} and expected one of {cert_authorities}",
509
- )
544
+ if test_host in self.cert_info.keys():
545
+ issuer = self.__get_issuer_string(self.cert_info[test_host]["issuer"])
546
+ if not re.search(check_pattern, issuer):
547
+ self.__append_message(
548
+ host_type,
549
+ f"There is likely a proxy because the issuer for {test_host} is "
550
+ f"not correct. Got {issuer} and expected one of {cert_authorities}",
551
+ )
510
552
 
511
553
  # Get Windows proxy info from Registry just in case:
512
554
  if IS_WINDOWS:
@@ -584,19 +626,19 @@ class ConnectionDiagnostic:
584
626
  f"{snowflake_url_joined_results}\n"
585
627
  )
586
628
 
587
- if self.whitelist_retrieval_success:
629
+ if self.allowlist_retrieval_success:
588
630
  snowflake_stage_joined_results = "\n".join(self.test_results["STAGE"])
589
631
  message = (
590
632
  f"{message}\n"
591
633
  "=========Snowflake Stage information===================================\n"
592
- "We retrieved stage info from the whitelist\n"
634
+ "We retrieved stage info from the allowlist\n"
593
635
  f"{snowflake_stage_joined_results}\n"
594
636
  )
595
637
  else:
596
638
  message = (
597
639
  f"{message}\n"
598
640
  "=========Snowflake Stage information - Unavailable=====================\n"
599
- "We could not connect to Snowflake to get whitelist, so we do not have stage\n"
641
+ "We could not connect to Snowflake to get allowlist, so we do not have stage\n"
600
642
  f"diagnostic info\n"
601
643
  )
602
644
 
@@ -605,21 +647,21 @@ class ConnectionDiagnostic:
605
647
  "=========Snowflake OCSP information===================================="
606
648
  )
607
649
  snowflake_ocsp_joined_results = "\n".join(self.test_results["OCSP_RESPONDER"])
608
- if self.whitelist_retrieval_success:
650
+ if self.allowlist_retrieval_success:
609
651
  message = (
610
652
  f"{message}\n"
611
- "We were able to retrieve system whitelist.\n"
612
- "These OCSP hosts came from the certificate and the whitelist."
653
+ "We were able to retrieve system allowlist.\n"
654
+ "These OCSP hosts came from the certificate and the allowlist."
613
655
  )
614
656
  else:
615
657
  message = (
616
658
  f"{message}\n"
617
- "We were unable to retrieve system whitelist.\n"
659
+ "We were unable to retrieve system allowlist.\n"
618
660
  "These OCSP hosts only came from the certificate."
619
661
  )
620
662
  message = f"{message}\n" f"{snowflake_ocsp_joined_results}\n"
621
663
 
622
- if self.whitelist_retrieval_success:
664
+ if self.allowlist_retrieval_success:
623
665
  snowflake_telemetry_joined_results = "\n".join(
624
666
  self.test_results["OUT_OF_BAND_TELEMETRY"]
625
667
  )