chalkpy 2.94.3__py3-none-any.whl → 2.94.4__py3-none-any.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.
- chalk/_version.py +1 -1
- chalk/sql/_internal/sql_source.py +35 -2
- {chalkpy-2.94.3.dist-info → chalkpy-2.94.4.dist-info}/METADATA +1 -1
- {chalkpy-2.94.3.dist-info → chalkpy-2.94.4.dist-info}/RECORD +7 -7
- {chalkpy-2.94.3.dist-info → chalkpy-2.94.4.dist-info}/WHEEL +0 -0
- {chalkpy-2.94.3.dist-info → chalkpy-2.94.4.dist-info}/entry_points.txt +0 -0
- {chalkpy-2.94.3.dist-info → chalkpy-2.94.4.dist-info}/top_level.txt +0 -0
chalk/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.94.
|
|
1
|
+
__version__ = "2.94.4"
|
|
@@ -214,11 +214,32 @@ class BaseSQLSource(BaseSQLSourceProtocol):
|
|
|
214
214
|
if getattr(self, "kind", None) != SQLSourceKind.trino:
|
|
215
215
|
engine_args.setdefault("pool_pre_ping", env_var_bool("USE_CLIENT_POOL_PRE_PING"))
|
|
216
216
|
async_engine_args.setdefault("pool_pre_ping", env_var_bool("USE_CLIENT_POOL_PRE_PING"))
|
|
217
|
-
|
|
218
|
-
self.
|
|
217
|
+
# Store raw args internally, expose filtered versions via properties
|
|
218
|
+
self._raw_engine_args = engine_args
|
|
219
|
+
self._raw_async_engine_args = async_engine_args
|
|
219
220
|
self._engine = None
|
|
220
221
|
self._async_engine = None
|
|
221
222
|
|
|
223
|
+
@property
|
|
224
|
+
def engine_args(self) -> Dict[str, Any]:
|
|
225
|
+
"""Engine arguments with native_args filtered out for SQLAlchemy."""
|
|
226
|
+
return {k: v for k, v in self._raw_engine_args.items() if k != "native_args"}
|
|
227
|
+
|
|
228
|
+
@engine_args.setter
|
|
229
|
+
def engine_args(self, args: dict[str, Any]):
|
|
230
|
+
"""Set raw engine args (for backward compatibility)."""
|
|
231
|
+
self._raw_engine_args = args
|
|
232
|
+
|
|
233
|
+
@property
|
|
234
|
+
def async_engine_args(self) -> Dict[str, Any]:
|
|
235
|
+
"""Async engine arguments with native_args filtered out for SQLAlchemy."""
|
|
236
|
+
return {k: v for k, v in self._raw_async_engine_args.items() if k != "native_args"}
|
|
237
|
+
|
|
238
|
+
@async_engine_args.setter
|
|
239
|
+
def async_engine_args(self, args: dict[str, Any]):
|
|
240
|
+
"""Set raw async engine args (for backward compatibility)."""
|
|
241
|
+
self._raw_async_engine_args = args
|
|
242
|
+
|
|
222
243
|
@property
|
|
223
244
|
def _engine_args(self):
|
|
224
245
|
"""Backcompat support for private subclassing of BaseSQLSource"""
|
|
@@ -239,6 +260,16 @@ class BaseSQLSource(BaseSQLSourceProtocol):
|
|
|
239
260
|
"""Backcompat support for private subclassing of BaseSQLSource"""
|
|
240
261
|
self.async_engine_args = args
|
|
241
262
|
|
|
263
|
+
@property
|
|
264
|
+
def native_args(self) -> Dict[str, Any]:
|
|
265
|
+
"""Native arguments to be passed to the underlying database driver.
|
|
266
|
+
|
|
267
|
+
These arguments are extracted from engine_args and async_engine_args
|
|
268
|
+
and are not passed to SQLAlchemy's create_engine or create_async_engine.
|
|
269
|
+
Instead, they should be used by subclasses to configure native driver connections.
|
|
270
|
+
"""
|
|
271
|
+
return self._raw_engine_args.get("native_args", {})
|
|
272
|
+
|
|
242
273
|
def get_sqlglot_dialect(self) -> Union[str, None]:
|
|
243
274
|
"""Returns the name of the SQL dialect (if it has one) for `sqlglot` to parse the SQL string.
|
|
244
275
|
This allows for use of dialect-specific syntax while parsing and modifying queries."""
|
|
@@ -832,6 +863,7 @@ class BaseSQLSource(BaseSQLSourceProtocol):
|
|
|
832
863
|
if self._engine is None:
|
|
833
864
|
self.register_sqlalchemy_compiler_overrides()
|
|
834
865
|
self._check_engine_isolation_level()
|
|
866
|
+
# engine_args property already filters out native_args
|
|
835
867
|
self._engine = create_engine(url=self.local_engine_url(), **self.engine_args)
|
|
836
868
|
return self._engine
|
|
837
869
|
|
|
@@ -841,6 +873,7 @@ class BaseSQLSource(BaseSQLSourceProtocol):
|
|
|
841
873
|
if self._async_engine is None:
|
|
842
874
|
self.register_sqlalchemy_compiler_overrides()
|
|
843
875
|
self._check_engine_isolation_level()
|
|
876
|
+
# async_engine_args property already filters out native_args
|
|
844
877
|
self._async_engine = create_async_engine(url=self.async_local_engine_url(), **self.async_engine_args)
|
|
845
878
|
return self._async_engine
|
|
846
879
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
chalk/__init__.py,sha256=vKsx9-cl5kImlVWGHVRYO6bweBm79NAzGs3l36u71wM,2657
|
|
2
|
-
chalk/_version.py,sha256=
|
|
2
|
+
chalk/_version.py,sha256=luYLQQ9SuJMxCYjx5Y4oiVD-k1_vNu6P83uTjbtFHlI,23
|
|
3
3
|
chalk/cli.py,sha256=ckqqfOI-A2mT23-rnZzDMmblYj-2x1VBX8ebHlIEn9A,5873
|
|
4
4
|
chalk/importer.py,sha256=m4lMn1lSYj_euDq8CS7LYTBnek9JOcjGJf9-82dJHbA,64441
|
|
5
5
|
chalk/prompts.py,sha256=2H9UomLAamdfRTNUdKs9i3VTpiossuyRhntqsAXUhhg,16117
|
|
@@ -729,7 +729,7 @@ chalk/sql/_internal/query_execution_parameters.py,sha256=FT0GixOryGeKR1x7UrQNoGF
|
|
|
729
729
|
chalk/sql/_internal/query_registry.py,sha256=jOk2x9NvW2pZocI_iTvgd9DyOlr4-ajz8rTi0kkLSaI,3005
|
|
730
730
|
chalk/sql/_internal/sql_file_resolver.py,sha256=BCGTpe3tVLQTWNSrfyUFsg8VfO-pupeN8yxGpiSmy5E,77817
|
|
731
731
|
chalk/sql/_internal/sql_settings.py,sha256=9lcpHNrmEhr1Zxl_Ct7U0p0AbLUvlpSayxHEPmyqu8E,543
|
|
732
|
-
chalk/sql/_internal/sql_source.py,sha256=
|
|
732
|
+
chalk/sql/_internal/sql_source.py,sha256=083tGM7YzSsL-AhwTAtCzvGSjKxGVH_R5pILEpe5g1c,43825
|
|
733
733
|
chalk/sql/_internal/sql_source_group.py,sha256=RIMEjEG3oSGwign37w9avpCRdVfVQepR8SPVv6JoOx0,5562
|
|
734
734
|
chalk/sql/_internal/string_chalk_query.py,sha256=mfPoyP_-nUx8B_RvqJtIMoI0orGPknW7QYEHOb_jQII,4342
|
|
735
735
|
chalk/sql/_internal/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -803,8 +803,8 @@ chalk/utils/tracing.py,sha256=ye5z6UCEsrxXC3ofXUNCDdUCf8ydPahEO92qQTd0AIA,11383
|
|
|
803
803
|
chalk/utils/weak_set_by_identity.py,sha256=VmikA_laYwFeOphCwXJIuyOIkrdlQe0bSzaXq7onoQw,953
|
|
804
804
|
chalk/utils/pydanticutil/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
805
805
|
chalk/utils/pydanticutil/pydantic_compat.py,sha256=O575lLYJ5GvZC4HMzR9yATxf9XwjC6NrDUXbNwZidlE,3031
|
|
806
|
-
chalkpy-2.94.
|
|
807
|
-
chalkpy-2.94.
|
|
808
|
-
chalkpy-2.94.
|
|
809
|
-
chalkpy-2.94.
|
|
810
|
-
chalkpy-2.94.
|
|
806
|
+
chalkpy-2.94.4.dist-info/METADATA,sha256=H4Au5kWLocgZWNgy9_jBffgCfWQPqJZvdNBVWBaZHys,27494
|
|
807
|
+
chalkpy-2.94.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
808
|
+
chalkpy-2.94.4.dist-info/entry_points.txt,sha256=Vg23sd8icwq-morJrljVFr-kQnMbm95rZfZj5wsZGis,42
|
|
809
|
+
chalkpy-2.94.4.dist-info/top_level.txt,sha256=1Q6_19IGYfNxSw50W8tYKEJ2t5HKQ3W9Wiw4ia5yg2c,6
|
|
810
|
+
chalkpy-2.94.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|