snowflake-connector-python 5.2.0__cp315-cp315-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- snowflake/connector/__init__.py +148 -0
- snowflake/connector/_common/__init__.py +0 -0
- snowflake/connector/_common/extras.py +134 -0
- snowflake/connector/_common/telemetry.py +221 -0
- snowflake/connector/_common/wif_util.py +92 -0
- snowflake/connector/_core/sf_core_python.cp315-win_amd64.pyd +0 -0
- snowflake/connector/_core/sf_core_python.pyi +79 -0
- snowflake/connector/_internal/__init__.py +6 -0
- snowflake/connector/_internal/_private_key_helper.py +31 -0
- snowflake/connector/_internal/api_client/__init__.py +93 -0
- snowflake/connector/_internal/api_client/bridge.py +41 -0
- snowflake/connector/_internal/api_client/client_api.py +976 -0
- snowflake/connector/_internal/arrow.py +47 -0
- snowflake/connector/_internal/arrow_context.py +240 -0
- snowflake/connector/_internal/arrow_stream_async.py +266 -0
- snowflake/connector/_internal/arrow_stream_iterator.cp311-win_amd64.pyd +0 -0
- snowflake/connector/_internal/arrow_stream_iterator.cp312-win_amd64.pyd +0 -0
- snowflake/connector/_internal/arrow_stream_iterator.cp313-win_amd64.pyd +0 -0
- snowflake/connector/_internal/arrow_stream_iterator.cp314-win_amd64.pyd +0 -0
- snowflake/connector/_internal/arrow_stream_iterator.cp314t-win_amd64.pyd +0 -0
- snowflake/connector/_internal/arrow_stream_iterator.cp315-win_amd64.pyd +0 -0
- snowflake/connector/_internal/arrow_stream_iterator.pyi +42 -0
- snowflake/connector/_internal/arrow_stream_utils.py +171 -0
- snowflake/connector/_internal/authenticator_type.py +53 -0
- snowflake/connector/_internal/backward_compatibility.py +245 -0
- snowflake/connector/_internal/binding_converters.py +741 -0
- snowflake/connector/_internal/config_utils.py +71 -0
- snowflake/connector/_internal/connection/__init__.py +39 -0
- snowflake/connector/_internal/connection/connection.py +616 -0
- snowflake/connector/_internal/connection/connection_types.py +13 -0
- snowflake/connector/_internal/connection/constants.py +25 -0
- snowflake/connector/_internal/connection/decorators.py +31 -0
- snowflake/connector/_internal/connection/freezable_proxy.py +104 -0
- snowflake/connector/_internal/connection/queries.py +10 -0
- snowflake/connector/_internal/connection_config_mixin.py +755 -0
- snowflake/connector/_internal/cursor/__init__.py +25 -0
- snowflake/connector/_internal/cursor/base.py +732 -0
- snowflake/connector/_internal/cursor/cursor_types.py +13 -0
- snowflake/connector/_internal/cursor/decorators.py +56 -0
- snowflake/connector/_internal/cursor/query_result.py +202 -0
- snowflake/connector/_internal/cursor/query_result_waiter.py +98 -0
- snowflake/connector/_internal/cursor/result_metadata.py +255 -0
- snowflake/connector/_internal/cursor/result_set_wrapper.py +66 -0
- snowflake/connector/_internal/decorators.py +539 -0
- snowflake/connector/_internal/error_kinds.py +111 -0
- snowflake/connector/_internal/errorcode.py +35 -0
- snowflake/connector/_internal/errorhandler.py +278 -0
- snowflake/connector/_internal/fips.py +28 -0
- snowflake/connector/_internal/logging/__init__.py +52 -0
- snowflake/connector/_internal/logging/config.py +134 -0
- snowflake/connector/_internal/logging/core_logger.py +218 -0
- snowflake/connector/_internal/logging/native_extension_logger.py +144 -0
- snowflake/connector/_internal/logout_config_mapping.py +187 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ArrayConverter.cpp +57 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ArrayConverter.hpp +29 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ArrowTableConverter.cpp +943 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ArrowTableConverter.hpp +63 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/BinaryConverter.cpp +18 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/BinaryConverter.hpp +26 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/BooleanConverter.cpp +21 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/BooleanConverter.hpp +23 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/CArrowIterator.cpp +118 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/CArrowIterator.hpp +116 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/CArrowStreamIterator.cpp +323 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/CArrowStreamIterator.hpp +133 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/CArrowStreamTableIterator.cpp +275 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/CArrowStreamTableIterator.hpp +168 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ConverterUtil.cpp +439 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ConverterUtil.hpp +30 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/DateConverter.cpp +48 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/DateConverter.hpp +46 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/DecFloatConverter.cpp +76 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/DecFloatConverter.hpp +35 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/DecimalConverter.cpp +90 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/DecimalConverter.hpp +63 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.cpp +62 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.hpp +28 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/FloatConverter.cpp +29 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/FloatConverter.hpp +35 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/IColumnConverter.hpp +17 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/IntConverter.cpp +23 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/IntConverter.hpp +41 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/IntervalConverter.cpp +65 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/IntervalConverter.hpp +54 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/LICENSE.txt +209 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/MapConverter.cpp +79 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/MapConverter.hpp +30 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ObjectConverter.cpp +52 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/ObjectConverter.hpp +29 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/Python/Common.cpp +8 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/Python/Common.hpp +117 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/Python/Helpers.cpp +54 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/Python/Helpers.hpp +34 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/SnowflakeType.cpp +33 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/SnowflakeType.hpp +48 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/StringConverter.cpp +18 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/StringConverter.hpp +26 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/TimeConverter.cpp +39 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/TimeConverter.hpp +31 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/TimeStampConverter.cpp +326 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/TimeStampConverter.hpp +138 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/Util/macros.hpp +14 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/Util/time.cpp +65 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/Util/time.hpp +68 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/arrow_stream_iterator.cpp +13278 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/arrow_stream_iterator.pyx +204 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_accessors.h +109 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_alloc.h +125 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_assert.h +45 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_builder.h +1914 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_emitter.h +208 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_endian.h +128 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_epilogue.h +7 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_flatbuffers.h +58 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_identifier.h +144 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_iov.h +31 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_prologue.h +8 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_refmap.h +144 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_rtconfig.h +160 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_types.h +98 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_verifier.h +243 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/flatcc_portable.h +14 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/paligned_alloc.h +207 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pattributes.h +80 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic.h +83 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_pop.h +20 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_push.h +51 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian.h +201 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian_detect.h +108 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinline.h +19 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinttypes.h +52 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable.h +2 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable_basic.h +25 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstatic_assert.h +67 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdalign.h +164 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdint.h +926 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/punaligned.h +182 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pversion.h +6 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc/portable/pwarnings.h +52 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/flatcc.c +3052 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/nanoarrow.c +3019 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/nanoarrow.h +3354 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/nanoarrow.hpp +344 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.c +29305 -0
- snowflake/connector/_internal/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.h +381 -0
- snowflake/connector/_internal/nanoarrow_cpp/Logging/logging.cpp +108 -0
- snowflake/connector/_internal/nanoarrow_cpp/Logging/logging.hpp +47 -0
- snowflake/connector/_internal/nanoarrow_cpp/scripts/.clang-format +8 -0
- snowflake/connector/_internal/nanoarrow_cpp/scripts/format.sh +8 -0
- snowflake/connector/_internal/protobuf_gen/__init__.py +0 -0
- snowflake/connector/_internal/protobuf_gen/database_driver_v1_pb2.py +408 -0
- snowflake/connector/_internal/protobuf_gen/database_driver_v1_pb2.pyi +4487 -0
- snowflake/connector/_internal/protobuf_gen/database_driver_v1_services.py +2088 -0
- snowflake/connector/_internal/protobuf_gen/proto_exception.py +17 -0
- snowflake/connector/_internal/result_batch.py +150 -0
- snowflake/connector/_internal/snowflake_restful.py +222 -0
- snowflake/connector/_internal/snowpark_backcompat_helpers.py +31 -0
- snowflake/connector/_internal/sqlstate.py +11 -0
- snowflake/connector/_internal/statement_utils.py +207 -0
- snowflake/connector/_internal/text_utils.py +112 -0
- snowflake/connector/_internal/type_codes.py +139 -0
- snowflake/connector/_internal/utils.py +65 -0
- snowflake/connector/_internal/write_pandas_operation.py +657 -0
- snowflake/connector/aio/README.md +168 -0
- snowflake/connector/aio/__init__.py +37 -0
- snowflake/connector/aio/connection/__init__.py +17 -0
- snowflake/connector/aio/connection/_connection.py +506 -0
- snowflake/connector/aio/cursor/__init__.py +35 -0
- snowflake/connector/aio/cursor/_base.py +1034 -0
- snowflake/connector/aio/cursor/_dict_cursor.py +78 -0
- snowflake/connector/aio/cursor/_result_set_wrapper.py +35 -0
- snowflake/connector/aio/cursor/_snowflake_cursor.py +72 -0
- snowflake/connector/aio/pandas_tools.py +279 -0
- snowflake/connector/aio/result_batch.py +165 -0
- snowflake/connector/auth/__init__.py +0 -0
- snowflake/connector/auth/workload_identity.py +5 -0
- snowflake/connector/compat.py +22 -0
- snowflake/connector/config_manager.py +392 -0
- snowflake/connector/connection/__init__.py +30 -0
- snowflake/connector/connection/_connection.py +641 -0
- snowflake/connector/connection_config.py +517 -0
- snowflake/connector/constants.py +52 -0
- snowflake/connector/cursor/__init__.py +37 -0
- snowflake/connector/cursor/_base.py +1169 -0
- snowflake/connector/cursor/_chunked_download_reader.py +75 -0
- snowflake/connector/cursor/_dict_cursor.py +78 -0
- snowflake/connector/cursor/_result_set_wrapper.py +35 -0
- snowflake/connector/cursor/_snowflake_cursor.py +72 -0
- snowflake/connector/description.py +7 -0
- snowflake/connector/errors.py +492 -0
- snowflake/connector/network.py +71 -0
- snowflake/connector/pandas_tools.py +191 -0
- snowflake/connector/py.typed +0 -0
- snowflake/connector/result_batch.py +216 -0
- snowflake/connector/telemetry.py +40 -0
- snowflake/connector/time_util.py +11 -0
- snowflake/connector/types.py +134 -0
- snowflake/connector/util_text.py +3 -0
- snowflake/connector/version.py +23 -0
- snowflake_connector_python-5.2.0.dist-info/DELVEWHEEL +2 -0
- snowflake_connector_python-5.2.0.dist-info/METADATA +190 -0
- snowflake_connector_python-5.2.0.dist-info/RECORD +204 -0
- snowflake_connector_python-5.2.0.dist-info/WHEEL +4 -0
- snowflake_connector_python.libs/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll +0 -0
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
"""
|
|
2
|
+
PEP 249 Database API 2.0 Exception Classes
|
|
3
|
+
|
|
4
|
+
This module defines the exception hierarchy for the Snowflake connector.
|
|
5
|
+
|
|
6
|
+
The **active** exceptions (raised at runtime) are the PEP 249 hierarchy plus a
|
|
7
|
+
handful of driver-specific types (``MissingDependencyError``, config errors,
|
|
8
|
+
``ReauthenticationRequest``). These are what ``sf_core`` error kinds map to via
|
|
9
|
+
``KIND_TO_EXCEPTION``.
|
|
10
|
+
|
|
11
|
+
Everything after the "Backward compatibility" section below exists solely so
|
|
12
|
+
that ``from snowflake.connector.errors import BadGatewayError`` (etc.) does not
|
|
13
|
+
break user code written against the old ``snowflake-connector-python`` driver.
|
|
14
|
+
None of these classes are raised by the universal core at runtime:
|
|
15
|
+
|
|
16
|
+
- **HTTP exceptions** (``BadRequest``, ``ServiceUnavailableError``, ...):
|
|
17
|
+
In the old driver, Python's ``requests`` library returned HTTP status codes
|
|
18
|
+
that were wrapped into typed exceptions and used as internal retry-loop
|
|
19
|
+
control flow signals. They leaked to users only when retries were
|
|
20
|
+
exhausted. In the universal core, the Rust core handles HTTP retries
|
|
21
|
+
internally; by the time an error reaches Python it is already mapped to a
|
|
22
|
+
PEP 249 type via ``ErrorKind``.
|
|
23
|
+
|
|
24
|
+
- **Auth / token exceptions** (``RefreshTokenError``, ``TokenExpiredError``):
|
|
25
|
+
Used in the old driver as internal signals between the OKTA authenticator
|
|
26
|
+
and the retry loop. The universal core handles token refresh in Rust.
|
|
27
|
+
|
|
28
|
+
- **TLS exception** (``RevocationCheckError``):
|
|
29
|
+
OCSP/CRL verification runs inside the Rust TLS layer.
|
|
30
|
+
|
|
31
|
+
- **File-transfer exceptions** (``BindUploadError``, ``RequestExceedMaxRetryError``,
|
|
32
|
+
``PresignedUrlExpiredError``):
|
|
33
|
+
Stage upload/download retry logic is internal to the Rust core.
|
|
34
|
+
|
|
35
|
+
All backward-compatibility classes are marked with ``@backward_compatibility``.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
from __future__ import annotations
|
|
39
|
+
|
|
40
|
+
import warnings
|
|
41
|
+
|
|
42
|
+
from typing import TYPE_CHECKING, Any, Protocol, TypedDict
|
|
43
|
+
|
|
44
|
+
from ._internal.backward_compatibility import install_backward_compatibility_getattr
|
|
45
|
+
from ._internal.decorators import backward_compatibility
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
if TYPE_CHECKING:
|
|
49
|
+
from .aio.connection import Connection as AsyncConnection
|
|
50
|
+
from .aio.cursor import SnowflakeCursorBase as AsyncSnowflakeCursorBase
|
|
51
|
+
from .connection import Connection
|
|
52
|
+
from .cursor import SnowflakeCursorBase
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class ErrorDetails(TypedDict, total=False):
|
|
56
|
+
msg: str
|
|
57
|
+
errno: int
|
|
58
|
+
sqlstate: str | None
|
|
59
|
+
sfqid: str | None
|
|
60
|
+
query: str | None
|
|
61
|
+
request_id: str | None
|
|
62
|
+
parameter: str | None
|
|
63
|
+
validation_code: int | None
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class StructuredErrorHandler(Protocol):
|
|
67
|
+
def __call__(
|
|
68
|
+
self,
|
|
69
|
+
connection: Connection | AsyncConnection | None,
|
|
70
|
+
cursor: SnowflakeCursorBase | AsyncSnowflakeCursorBase | None,
|
|
71
|
+
error_class: type[Error],
|
|
72
|
+
error_value: ErrorDetails,
|
|
73
|
+
) -> None: ...
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
ErrorValue = ErrorDetails
|
|
77
|
+
|
|
78
|
+
# ---------------------------------------------------------------------------
|
|
79
|
+
# PEP 249 exception hierarchy (active — raised at runtime)
|
|
80
|
+
# ---------------------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class Warning(Warning): # type: ignore[misc]
|
|
84
|
+
"""Exception raised for important warnings like data truncations while inserting, etc."""
|
|
85
|
+
|
|
86
|
+
pass
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class Error(Exception):
|
|
90
|
+
"""Exception that is the base class of all other error exceptions.
|
|
91
|
+
|
|
92
|
+
In addition to being a standard PEP 249 exception base, this class provides
|
|
93
|
+
the **error-handler protocol** used throughout the driver to raise errors in
|
|
94
|
+
a way that is consistent with PEP 249 and backward-compatible with the old
|
|
95
|
+
``snowflake-connector-python`` driver.
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
def __init__(
|
|
99
|
+
self,
|
|
100
|
+
msg: str = "",
|
|
101
|
+
errno: int = -1,
|
|
102
|
+
sqlstate: str | None = None,
|
|
103
|
+
sfqid: str | None = None,
|
|
104
|
+
query: str | None = None,
|
|
105
|
+
request_id: str | None = None,
|
|
106
|
+
parameter: str | None = None,
|
|
107
|
+
validation_code: int | None = None,
|
|
108
|
+
**kwargs: Any, # absorbs extra keys for backward compatibility with old driver code
|
|
109
|
+
) -> None:
|
|
110
|
+
self.errno = errno
|
|
111
|
+
self.sqlstate = sqlstate
|
|
112
|
+
self.sfqid = sfqid
|
|
113
|
+
self.query = query
|
|
114
|
+
# Client-generated ``requestId`` sent on the query submission request.
|
|
115
|
+
# Populated for errors that originate from a query execution attempt;
|
|
116
|
+
# ``None`` for non-query errors (auth, config, transport).
|
|
117
|
+
self.request_id = request_id
|
|
118
|
+
self.raw_msg = msg
|
|
119
|
+
self.msg = self._format_message(msg)
|
|
120
|
+
# The offending config parameter and structured sf_core ValidationCode
|
|
121
|
+
# (see protobuf_gen's ValidationCode enum), when the error originated
|
|
122
|
+
# from a connection-config validation failure. None otherwise.
|
|
123
|
+
self.parameter = parameter
|
|
124
|
+
self.validation_code = validation_code
|
|
125
|
+
super().__init__(self.msg)
|
|
126
|
+
|
|
127
|
+
def __repr__(self) -> str:
|
|
128
|
+
return self.__str__()
|
|
129
|
+
|
|
130
|
+
def __str__(self) -> str:
|
|
131
|
+
if not self.msg:
|
|
132
|
+
return self.msg
|
|
133
|
+
ids = []
|
|
134
|
+
if self.request_id:
|
|
135
|
+
ids.append(f"request_id={self.request_id}")
|
|
136
|
+
if self.sfqid:
|
|
137
|
+
ids.append(f"sfqid={self.sfqid}")
|
|
138
|
+
return f"{self.msg} ({', '.join(ids)})" if ids else self.msg
|
|
139
|
+
|
|
140
|
+
def _format_message(self, msg: str) -> str:
|
|
141
|
+
code_str = f"{self.errno:06d}" if isinstance(self.errno, int) and self.errno >= 0 else "------"
|
|
142
|
+
sqlstate_str = f" ({self.sqlstate})" if self.sqlstate else ""
|
|
143
|
+
return f"{code_str}{sqlstate_str}: {msg}" if msg else ""
|
|
144
|
+
|
|
145
|
+
# ------------------------------------------------------------------
|
|
146
|
+
# Error-handler protocol (PEP 249 / backward compatible)
|
|
147
|
+
# ------------------------------------------------------------------
|
|
148
|
+
|
|
149
|
+
@staticmethod
|
|
150
|
+
def errorhandler_wrapper(
|
|
151
|
+
connection: Connection | AsyncConnection | None,
|
|
152
|
+
cursor: SnowflakeCursorBase | AsyncSnowflakeCursorBase | None,
|
|
153
|
+
error_class: type[Error],
|
|
154
|
+
error_value: ErrorDetails,
|
|
155
|
+
) -> None:
|
|
156
|
+
"""Raise an error through the error-handler chain.
|
|
157
|
+
|
|
158
|
+
This is the **single entry point** that all driver code should use to
|
|
159
|
+
report errors originating from connection or cursor operations.
|
|
160
|
+
|
|
161
|
+
The method first tries to hand the error to a user-supplied handler via
|
|
162
|
+
:pyfunc:`hand_to_other_handler`. If no handler was available (both
|
|
163
|
+
*connection* and *cursor* are ``None``), it falls back to creating and
|
|
164
|
+
raising the exception directly.
|
|
165
|
+
"""
|
|
166
|
+
handed_over = Error.hand_to_other_handler(connection, cursor, error_class, error_value)
|
|
167
|
+
if not handed_over:
|
|
168
|
+
raise Error.errorhandler_make_exception(error_class, error_value)
|
|
169
|
+
|
|
170
|
+
@staticmethod
|
|
171
|
+
def hand_to_other_handler(
|
|
172
|
+
connection: Connection | AsyncConnection | None,
|
|
173
|
+
cursor: SnowflakeCursorBase | AsyncSnowflakeCursorBase | None,
|
|
174
|
+
error_class: type[Error],
|
|
175
|
+
error_value: ErrorDetails,
|
|
176
|
+
) -> bool:
|
|
177
|
+
"""Try to delegate the error to a connection's or cursor's error handler.
|
|
178
|
+
|
|
179
|
+
Records the error in the ``messages`` list of both the connection and
|
|
180
|
+
the cursor (when present), then invokes the first available handler.
|
|
181
|
+
|
|
182
|
+
Returns:
|
|
183
|
+
``True`` if a handler was invoked, ``False`` if both *connection*
|
|
184
|
+
and *cursor* were ``None``.
|
|
185
|
+
"""
|
|
186
|
+
if connection is not None:
|
|
187
|
+
connection.messages.append((error_class, error_value))
|
|
188
|
+
if cursor is not None:
|
|
189
|
+
cursor.messages.append((error_class, error_value))
|
|
190
|
+
cursor.errorhandler(connection, cursor, error_class, error_value)
|
|
191
|
+
return True
|
|
192
|
+
elif connection is not None:
|
|
193
|
+
connection.errorhandler(connection, cursor, error_class, error_value)
|
|
194
|
+
return True
|
|
195
|
+
return False
|
|
196
|
+
|
|
197
|
+
@staticmethod
|
|
198
|
+
def errorhandler_make_exception(
|
|
199
|
+
error_class: type[Error],
|
|
200
|
+
error_value: ErrorDetails,
|
|
201
|
+
) -> Error:
|
|
202
|
+
"""Create an exception instance from *error_class* and *error_value*.
|
|
203
|
+
|
|
204
|
+
Used as a fallback when no connection/cursor handler is available.
|
|
205
|
+
"""
|
|
206
|
+
return error_class(
|
|
207
|
+
msg=error_value.get("msg", ""),
|
|
208
|
+
errno=error_value.get("errno", -1),
|
|
209
|
+
sqlstate=error_value.get("sqlstate"),
|
|
210
|
+
sfqid=error_value.get("sfqid"),
|
|
211
|
+
query=error_value.get("query"),
|
|
212
|
+
request_id=error_value.get("request_id"),
|
|
213
|
+
parameter=error_value.get("parameter"),
|
|
214
|
+
validation_code=error_value.get("validation_code"),
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
@staticmethod
|
|
218
|
+
def default_errorhandler(
|
|
219
|
+
connection: Connection | AsyncConnection | None,
|
|
220
|
+
cursor: SnowflakeCursorBase | AsyncSnowflakeCursorBase | None,
|
|
221
|
+
error_class: type[Error],
|
|
222
|
+
error_value: ErrorDetails,
|
|
223
|
+
) -> None:
|
|
224
|
+
"""Default error handler that simply raises the error.
|
|
225
|
+
|
|
226
|
+
This is the handler installed on every new ``Connection`` and ``Cursor``
|
|
227
|
+
unless the user overrides ``errorhandler``.
|
|
228
|
+
"""
|
|
229
|
+
# circular-import: errorhandler.py imports Error from this module at top
|
|
230
|
+
# level, so this helper is imported at call time to avoid the cycle.
|
|
231
|
+
from ._internal.errorhandler import _mark_errorhandler_routed
|
|
232
|
+
|
|
233
|
+
new_exc = Error.errorhandler_make_exception(error_class, error_value)
|
|
234
|
+
# The reconstructed exception must carry the routed flag so a
|
|
235
|
+
# @simplified_error_handling caller does not PEP route twice
|
|
236
|
+
_mark_errorhandler_routed(new_exc)
|
|
237
|
+
raise new_exc
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
class InterfaceError(Error):
|
|
241
|
+
"""
|
|
242
|
+
Exception raised for errors that are related to the database interface
|
|
243
|
+
rather than the database itself.
|
|
244
|
+
"""
|
|
245
|
+
|
|
246
|
+
pass
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
class DatabaseError(Error):
|
|
250
|
+
"""Exception raised for errors that are related to the database."""
|
|
251
|
+
|
|
252
|
+
pass
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class DataError(DatabaseError):
|
|
256
|
+
"""
|
|
257
|
+
Exception raised for errors that are due to problems with the processed data
|
|
258
|
+
like division by zero, numeric value out of range, etc.
|
|
259
|
+
"""
|
|
260
|
+
|
|
261
|
+
pass
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
class OperationalError(DatabaseError):
|
|
265
|
+
"""
|
|
266
|
+
Exception raised for errors that are related to the database's operation
|
|
267
|
+
and not necessarily under the control of the programmer.
|
|
268
|
+
"""
|
|
269
|
+
|
|
270
|
+
#: HTTP status code, set when this error represents a raw HTTP failure
|
|
271
|
+
#: surfaced by ``SnowflakeRestful.fetch(..., raise_raw_http_failure=True)``.
|
|
272
|
+
#: ``None`` for operational errors that are not HTTP failures.
|
|
273
|
+
http_status: int | None = None
|
|
274
|
+
|
|
275
|
+
@classmethod
|
|
276
|
+
def from_http_response(cls, status_code: int, response_body: bytes) -> OperationalError:
|
|
277
|
+
"""Build an error representing a raw HTTP failure (status >= 400).
|
|
278
|
+
|
|
279
|
+
The HTTP status is attached as :attr:`http_status` so consumers can
|
|
280
|
+
branch on it without parsing the message string. (The old driver raised
|
|
281
|
+
a vendored ``requests`` ``HTTPError`` carrying ``.response.status_code``;
|
|
282
|
+
this is the universal-driver equivalent.)
|
|
283
|
+
"""
|
|
284
|
+
# Truncate body to avoid flooding error messages with large payloads.
|
|
285
|
+
error = cls(msg=f"HTTP {status_code}: {response_body[:200]!r}")
|
|
286
|
+
error.http_status = status_code
|
|
287
|
+
return error
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
class IntegrityError(DatabaseError):
|
|
291
|
+
"""
|
|
292
|
+
Exception raised when the relational integrity of the database is affected,
|
|
293
|
+
e.g. a foreign key check fails.
|
|
294
|
+
"""
|
|
295
|
+
|
|
296
|
+
pass
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
class InternalError(DatabaseError):
|
|
300
|
+
"""Exception raised when the database encounters an internal error."""
|
|
301
|
+
|
|
302
|
+
pass
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
class ProgrammingError(DatabaseError):
|
|
306
|
+
"""
|
|
307
|
+
Exception raised for programming errors, e.g. table not found or already exists,
|
|
308
|
+
syntax error in the SQL statement, wrong number of parameters specified, etc.
|
|
309
|
+
"""
|
|
310
|
+
|
|
311
|
+
pass
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
class NotSupportedError(DatabaseError):
|
|
315
|
+
"""
|
|
316
|
+
Exception raised in case a method or database API was used which is not
|
|
317
|
+
supported by the database.
|
|
318
|
+
"""
|
|
319
|
+
|
|
320
|
+
pass
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
# ---------------------------------------------------------------------------
|
|
324
|
+
# Driver-specific exceptions (active — raised at runtime)
|
|
325
|
+
# ---------------------------------------------------------------------------
|
|
326
|
+
|
|
327
|
+
_FUTURE_BASE_CHANGE_WARNED = False
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
def _warn_future_base_change() -> None:
|
|
331
|
+
"""Advise callers that ``ReauthenticationRequest``'s base will change.
|
|
332
|
+
|
|
333
|
+
An advisory must never shadow the failure it is advising about: wrapped in
|
|
334
|
+
try/except so a caller's ``filterwarnings("error")`` can't turn this into
|
|
335
|
+
the exception the caller receives instead of ``ReauthenticationRequest``.
|
|
336
|
+
Deduped once per process so a retry loop doesn't flood stderr.
|
|
337
|
+
"""
|
|
338
|
+
global _FUTURE_BASE_CHANGE_WARNED
|
|
339
|
+
if _FUTURE_BASE_CHANGE_WARNED:
|
|
340
|
+
return
|
|
341
|
+
_FUTURE_BASE_CHANGE_WARNED = True
|
|
342
|
+
try:
|
|
343
|
+
warnings.warn(
|
|
344
|
+
"`ReauthenticationRequest` currently subclasses `ProgrammingError` for "
|
|
345
|
+
"compatibility with `snowflake-connector-python`. In a future major "
|
|
346
|
+
"release its base will change to `OperationalError`. If you catch this "
|
|
347
|
+
"via `except ProgrammingError`, switch to `except ReauthenticationRequest` "
|
|
348
|
+
"(or `except DatabaseError`) to stay correct across that change.",
|
|
349
|
+
FutureWarning,
|
|
350
|
+
stacklevel=3,
|
|
351
|
+
)
|
|
352
|
+
except Exception:
|
|
353
|
+
pass
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
# `ProgrammingError` isn't the PEP 249-correct base for token expiry (that's
|
|
357
|
+
# `OperationalError`), but it's what legacy raised, and `except ProgrammingError`
|
|
358
|
+
# is how existing callers catch this. Base changes to `OperationalError` in a
|
|
359
|
+
# future major release: TODO(SNOW-3965765).
|
|
360
|
+
class ReauthenticationRequest(ProgrammingError):
|
|
361
|
+
"""Raised when the session cannot be renewed; open a new connection.
|
|
362
|
+
|
|
363
|
+
Catch this class directly, or `DatabaseError`, to stay correct once the
|
|
364
|
+
base changes to `OperationalError`.
|
|
365
|
+
"""
|
|
366
|
+
|
|
367
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
368
|
+
super().__init__(*args, **kwargs)
|
|
369
|
+
# Snowpark reads ``ex.cause``; the old driver stored a ProgrammingError.
|
|
370
|
+
self.cause = ProgrammingError(*args, **kwargs)
|
|
371
|
+
_warn_future_base_change()
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
class MissingDependencyError(Error):
|
|
375
|
+
"""Exception for missing extras dependencies."""
|
|
376
|
+
|
|
377
|
+
def __init__(self, dependency: str) -> None:
|
|
378
|
+
super().__init__(msg=f"Missing optional dependency: {dependency}")
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
class ConfigManagerError(Error):
|
|
382
|
+
"""Exception raised for configuration manager errors."""
|
|
383
|
+
|
|
384
|
+
pass
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
class ConfigSourceError(Error):
|
|
388
|
+
"""Exception raised when a configuration source has invalid values."""
|
|
389
|
+
|
|
390
|
+
pass
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
class MissingConfigOptionError(ConfigSourceError):
|
|
394
|
+
"""Exception raised when a required configuration option is missing."""
|
|
395
|
+
|
|
396
|
+
pass
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
# ---------------------------------------------------------------------------
|
|
400
|
+
# Backward compatibility (importable, never raised by the universal core)
|
|
401
|
+
#
|
|
402
|
+
# See module docstring for rationale.
|
|
403
|
+
# ---------------------------------------------------------------------------
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
@backward_compatibility
|
|
407
|
+
class HttpError(Error):
|
|
408
|
+
"""Old-driver general HTTP exception."""
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
@backward_compatibility
|
|
412
|
+
class BadRequest(Error):
|
|
413
|
+
"""Old-driver exception for HTTP 400."""
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
@backward_compatibility
|
|
417
|
+
class ForbiddenError(Error):
|
|
418
|
+
"""Old-driver exception for HTTP 403."""
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
@backward_compatibility
|
|
422
|
+
class MethodNotAllowed(Error):
|
|
423
|
+
"""Old-driver exception for HTTP 405."""
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
@backward_compatibility
|
|
427
|
+
class RequestTimeoutError(Error):
|
|
428
|
+
"""Old-driver exception for HTTP 408."""
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
@backward_compatibility
|
|
432
|
+
class TooManyRequests(Error):
|
|
433
|
+
"""Old-driver exception for HTTP 429."""
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
@backward_compatibility
|
|
437
|
+
class InternalServerError(Error):
|
|
438
|
+
"""Old-driver exception for HTTP 500."""
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
@backward_compatibility
|
|
442
|
+
class BadGatewayError(Error):
|
|
443
|
+
"""Old-driver exception for HTTP 502."""
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
@backward_compatibility
|
|
447
|
+
class ServiceUnavailableError(Error):
|
|
448
|
+
"""Old-driver exception for HTTP 503."""
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
@backward_compatibility
|
|
452
|
+
class GatewayTimeoutError(Error):
|
|
453
|
+
"""Old-driver exception for HTTP 504."""
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
@backward_compatibility
|
|
457
|
+
class OtherHTTPRetryableError(Error):
|
|
458
|
+
"""Old-driver exception for unclassified retryable HTTP errors."""
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
@backward_compatibility
|
|
462
|
+
class RefreshTokenError(Error):
|
|
463
|
+
"""Old-driver internal signal for OAuth token refresh."""
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
@backward_compatibility
|
|
467
|
+
class TokenExpiredError(Error):
|
|
468
|
+
"""Old-driver internal signal for expired session tokens."""
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
@backward_compatibility
|
|
472
|
+
class RevocationCheckError(OperationalError):
|
|
473
|
+
"""Old-driver exception for OCSP/CRL revocation check failures."""
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
@backward_compatibility
|
|
477
|
+
class BindUploadError(Error):
|
|
478
|
+
"""Old-driver exception for stage upload failures during array binding."""
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
@backward_compatibility
|
|
482
|
+
class RequestExceedMaxRetryError(Error):
|
|
483
|
+
"""Old-driver exception for cloud storage REST calls exceeding max retries."""
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
@backward_compatibility
|
|
487
|
+
class PresignedUrlExpiredError(Error):
|
|
488
|
+
"""Old-driver exception for expired cloud storage presigned URLs."""
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
# Must be the last statement; see ``install_backward_compatibility_getattr``.
|
|
492
|
+
install_backward_compatibility_getattr(__name__)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""BACKWARD COMPATIBILITY MODULE ONLY — legacy authenticator-type constants.
|
|
2
|
+
|
|
3
|
+
This module is itself deprecated and exists only for backward compatibility:
|
|
4
|
+
it re-exports legacy flat authenticator-type constants for drop-in parity
|
|
5
|
+
with snowflake-connector-python's ``network.py``. None of these are used by
|
|
6
|
+
the Universal Driver; they are retained so downstream consumers that import
|
|
7
|
+
them at module load (e.g. dbt-adapters' Workload Identity Federation support)
|
|
8
|
+
keep working. Each warns once on first external access, like the legacy
|
|
9
|
+
classes in ``errors.py`` / ``result_batch.py``. There is no non-deprecated
|
|
10
|
+
successor to migrate to: pass the raw authenticator string (e.g.
|
|
11
|
+
``"OAUTH"``) to ``authenticator=`` directly, or use
|
|
12
|
+
``snowflake.connector.constants.AuthenticatorType`` — also retained only
|
|
13
|
+
for compatibility with the enum-based style — if a typed value is more
|
|
14
|
+
convenient.
|
|
15
|
+
|
|
16
|
+
The values here are not written out again: each is taken from
|
|
17
|
+
:class:`~snowflake.connector._internal.authenticator_type.AuthenticatorType`,
|
|
18
|
+
which is the one place the list lives on the Python side and which carries the
|
|
19
|
+
note on keeping it in sync with the Rust core. Add or change a value there, not
|
|
20
|
+
here.
|
|
21
|
+
|
|
22
|
+
``ReauthenticationRequest`` is the exception to that: Snowpark still imports
|
|
23
|
+
it from this module, so it is re-exported without a deprecation warning.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
from __future__ import annotations
|
|
27
|
+
|
|
28
|
+
from ._internal.backward_compatibility import install_backward_compatibility_getattr
|
|
29
|
+
from ._internal.decorators import backward_compatibility
|
|
30
|
+
from .constants import AuthenticatorType
|
|
31
|
+
from .errors import ReauthenticationRequest
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# ``.value`` (a plain ``str``) rather than the enum member: matches the upstream
|
|
35
|
+
# snowflake-connector-python driver, which had these as plain string constants
|
|
36
|
+
# (e.g. ``DEFAULT_AUTHENTICATOR = "SNOWFLAKE"``), not enum members — so this is
|
|
37
|
+
# drop-in type parity, not just an implementation detail. It also sidesteps a
|
|
38
|
+
# subtlety in ``TestNoInternalImportsOfBackwardCompatNames``: that guard test
|
|
39
|
+
# flags a marked value whose ``__module__`` differs from the module it's found
|
|
40
|
+
# in, and an enum member inherits ``__module__`` from wherever
|
|
41
|
+
# ``AuthenticatorType`` is defined (``_internal.authenticator_type``, not
|
|
42
|
+
# ``network``). A plain ``str`` has no ``__module__`` at all, so it can't trip
|
|
43
|
+
# that check.
|
|
44
|
+
DEFAULT_AUTHENTICATOR = backward_compatibility(AuthenticatorType.DEFAULT.value)
|
|
45
|
+
EXTERNAL_BROWSER_AUTHENTICATOR = backward_compatibility(AuthenticatorType.EXTERNAL_BROWSER.value)
|
|
46
|
+
KEY_PAIR_AUTHENTICATOR = backward_compatibility(AuthenticatorType.KEY_PAIR.value)
|
|
47
|
+
OAUTH_AUTHENTICATOR = backward_compatibility(AuthenticatorType.OAUTH.value)
|
|
48
|
+
OAUTH_AUTHORIZATION_CODE = backward_compatibility(AuthenticatorType.OAUTH_AUTHORIZATION_CODE.value)
|
|
49
|
+
OAUTH_CLIENT_CREDENTIALS = backward_compatibility(AuthenticatorType.OAUTH_CLIENT_CREDENTIALS.value)
|
|
50
|
+
USR_PWD_MFA_AUTHENTICATOR = backward_compatibility(AuthenticatorType.USERNAME_PASSWORD_MFA.value)
|
|
51
|
+
PROGRAMMATIC_ACCESS_TOKEN = backward_compatibility(AuthenticatorType.PROGRAMMATIC_ACCESS_TOKEN.value)
|
|
52
|
+
PAT_WITH_EXTERNAL_SESSION = backward_compatibility(AuthenticatorType.PAT_WITH_EXTERNAL_SESSION.value)
|
|
53
|
+
WORKLOAD_IDENTITY_AUTHENTICATOR = backward_compatibility(AuthenticatorType.WORKLOAD_IDENTITY.value)
|
|
54
|
+
|
|
55
|
+
__all__ = [
|
|
56
|
+
"AuthenticatorType",
|
|
57
|
+
"DEFAULT_AUTHENTICATOR",
|
|
58
|
+
"EXTERNAL_BROWSER_AUTHENTICATOR",
|
|
59
|
+
"KEY_PAIR_AUTHENTICATOR",
|
|
60
|
+
"OAUTH_AUTHENTICATOR",
|
|
61
|
+
"OAUTH_AUTHORIZATION_CODE",
|
|
62
|
+
"OAUTH_CLIENT_CREDENTIALS",
|
|
63
|
+
"USR_PWD_MFA_AUTHENTICATOR",
|
|
64
|
+
"PROGRAMMATIC_ACCESS_TOKEN",
|
|
65
|
+
"PAT_WITH_EXTERNAL_SESSION",
|
|
66
|
+
"WORKLOAD_IDENTITY_AUTHENTICATOR",
|
|
67
|
+
"ReauthenticationRequest",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
# Must be the last statement; see ``install_backward_compatibility_getattr``.
|
|
71
|
+
install_backward_compatibility_getattr(__name__)
|