Skip to content

Commit 94afe8a

Browse files
Move unsafe_file_write parameter to DEFAULT_CONFIGURATION (#2413)
1 parent 56e524e commit 94afe8a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/snowflake/connector/connection.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ def _get_private_bytes_from_file(
373373
str,
374374
# SNOW-2096721: External (Spark) session ID
375375
),
376+
"unsafe_file_write": (
377+
False,
378+
bool,
379+
), # SNOW-1944208: add unsafe write flag
376380
_VARIABLE_NAME_SERVER_DOP_CAP_FOR_FILE_TRANSFER: (
377381
_DEFAULT_VALUE_SERVER_DOP_CAP_FOR_FILE_TRANSFER, # default value
378382
int, # type
@@ -1410,11 +1414,6 @@ def __config(self, **kwargs):
14101414
if "host" not in kwargs:
14111415
self._host = construct_hostname(kwargs.get("region"), self._account)
14121416

1413-
if "unsafe_file_write" in kwargs:
1414-
self._unsafe_file_write = kwargs["unsafe_file_write"]
1415-
else:
1416-
self._unsafe_file_write = False
1417-
14181417
logger.info(
14191418
f"Connecting to {_DOMAIN_NAME_MAP.get(extract_top_level_domain_from_hostname(self._host), 'GLOBAL')} Snowflake domain"
14201419
)

0 commit comments

Comments
 (0)