duckdb-sqlalchemy 0.19.1__py3-none-any.whl → 0.19.2__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.
@@ -60,7 +60,7 @@ try:
60
60
  except ImportError: # pragma: no cover - fallback for older SQLAlchemy
61
61
  PGExecutionContext = DefaultExecutionContext
62
62
 
63
- __version__ = "0.19.1"
63
+ __version__ = "0.19.2"
64
64
  sqlalchemy_version = sqlalchemy.__version__
65
65
  SQLALCHEMY_VERSION = Version(sqlalchemy_version)
66
66
  SQLALCHEMY_2 = SQLALCHEMY_VERSION >= Version("2.0.0")
@@ -583,6 +583,8 @@ class Dialect(PGDialect_psycopg2):
583
583
  config.update(cparams.pop("url_config", {}))
584
584
  for key in DIALECT_QUERY_KEYS:
585
585
  config.pop(key, None)
586
+ if cparams.get("database") in {None, ""}:
587
+ cparams["database"] = ":memory:"
586
588
  _apply_motherduck_defaults(config, cparams.get("database"))
587
589
  path_query = extract_path_query_from_config(config)
588
590
  if path_query:
@@ -626,6 +628,8 @@ class Dialect(PGDialect_psycopg2):
626
628
  return pool.SingletonThreadPool
627
629
  if pool_override in {"null", "nullpool"}:
628
630
  return pool.NullPool
631
+ if not url.database:
632
+ return pool.SingletonThreadPool
629
633
  if url.database and url.database.startswith(":memory:"):
630
634
  return pool.SingletonThreadPool
631
635
  if _looks_like_motherduck(url.database, dict(url.query)):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duckdb-sqlalchemy
3
- Version: 0.19.1
3
+ Version: 0.19.2
4
4
  Summary: SQLAlchemy driver for duckdb
5
5
  Project-URL: Bug Tracker, https://github.com/leonardovida/duckdb-sqlalchemy/issues
6
6
  Project-URL: Changelog, https://github.com/leonardovida/duckdb-sqlalchemy/releases
@@ -41,16 +41,16 @@ Description-Content-Type: text/markdown
41
41
  [![PyPI Downloads](https://img.shields.io/pypi/dm/duckdb-sqlalchemy.svg)](https://pypi.org/project/duckdb-sqlalchemy/)
42
42
  [![codecov](https://codecov.io/gh/leonardovida/duckdb-sqlalchemy/graph/badge.svg)](https://codecov.io/gh/leonardovida/duckdb-sqlalchemy)
43
43
 
44
- The production-grade SQLAlchemy dialect for DuckDB and MotherDuck. Use the full SQLAlchemy Core and ORM APIs with DuckDB's analytical engine, locally or in the cloud via MotherDuck.
44
+ A production-ready SQLAlchemy dialect for DuckDB and MotherDuck. It supports SQLAlchemy Core and ORM APIs against DuckDB locally or in MotherDuck.
45
45
 
46
- This dialect handles connection pooling, bulk inserts, type mappings, and cloud-specific configuration so you can focus on queries instead of driver quirks.
46
+ The dialect handles pooling defaults, bulk inserts, type mappings, and cloud-specific configuration.
47
47
 
48
48
  ## Why this dialect
49
49
 
50
- - **Full SQLAlchemy compatibility**: Core, ORM, Alembic migrations, and reflection work out of the box.
51
- - **MotherDuck support**: Automatic token handling, attach modes, session hints, and read scaling helpers.
52
- - **Production defaults**: Sensible pooling, transient retry for reads, and bulk insert optimization via Arrow/DataFrame registration.
53
- - **Actively maintained**: Tracks current DuckDB releases with long-term support commitment.
50
+ - **SQLAlchemy compatibility**: Core, ORM, Alembic, and reflection.
51
+ - **MotherDuck support**: Token handling, attach modes, session hints, and read scaling helpers.
52
+ - **Operational defaults**: Pooling defaults, transient retry for reads, and bulk insert optimization via Arrow/DataFrame registration.
53
+ - **Maintained**: Tracks current DuckDB releases with a long-term support posture.
54
54
 
55
55
  ## Compatibility
56
56
 
@@ -133,7 +133,7 @@ md_url = MotherDuckURL(database="md:my_db", attach_mode="single")
133
133
 
134
134
  ## Configuration and pooling
135
135
 
136
- This dialect ships with sensible defaults (NullPool for file/MotherDuck connections, SingletonThreadPool for `:memory:`) and lets you override pooling explicitly. For production services, use the MotherDuck performance helper or configure `QueuePool`, `pool_pre_ping`, and `pool_recycle`.
136
+ This dialect defaults to `NullPool` for file/MotherDuck connections and `SingletonThreadPool` for `:memory:`. You can override pooling explicitly. For long-lived MotherDuck pools, use the performance helper or configure `QueuePool`, `pool_pre_ping`, and `pool_recycle`.
137
137
 
138
138
  See `docs/configuration.md` and `docs/motherduck.md` for detailed guidance.
139
139
 
@@ -159,10 +159,10 @@ See `docs/configuration.md` and `docs/motherduck.md` for detailed guidance.
159
159
 
160
160
  ## Release and support policy
161
161
 
162
- - Long-term maintenance: this project is intended to remain supported indefinitely.
163
- - Compatibility: we track current DuckDB and SQLAlchemy releases while preserving SQLAlchemy semantics.
162
+ - Long-term maintenance: intended to remain supported.
163
+ - Compatibility: track current DuckDB and SQLAlchemy releases while preserving SQLAlchemy semantics.
164
164
  - Breaking changes: only in major/minor releases with explicit notes in `CHANGELOG.md`.
165
- - Security: please open an issue with details; we will prioritize fixes.
165
+ - Security: open an issue with details; fixes are prioritized.
166
166
 
167
167
  ## Changelog and roadmap
168
168
 
@@ -1,4 +1,4 @@
1
- duckdb_sqlalchemy/__init__.py,sha256=78p0lVyEZVA_Zl9xnSmJx-00qRPX2G867Grqcs8hc24,49824
1
+ duckdb_sqlalchemy/__init__.py,sha256=ozIZSz_zrMeg7r742If64RY_f946gF_IW_U2n0oUmdc,49992
2
2
  duckdb_sqlalchemy/_supports.py,sha256=GCOH9nFB4MitnjYKx5V4BsDSCxIfTyXqm6W-BDkgbfE,598
3
3
  duckdb_sqlalchemy/bulk.py,sha256=lc6T258-BYQ8fp8xwNVePIrJorjFhg_1FGiEROHKqb8,5209
4
4
  duckdb_sqlalchemy/capabilities.py,sha256=Y9l-FaVPMw9CTpsG-42tiqltXECFXqIeTQdXPfSuxPY,719
@@ -24,8 +24,8 @@ duckdb_sqlalchemy/tests/util.py,sha256=YHTtB19mxQO--nq1tCnQELcKL_Qh73T9mvdnH6rVl
24
24
  duckdb_sqlalchemy/tests/snapshots/test_datatypes/test_interval/schema.sql,sha256=ZXscZo4xepli7WSjbhWqTufIciscCDLoRznaA6KGiOI,47
25
25
  duckdb_sqlalchemy/tests/sqlalchemy_suite/conftest.py,sha256=BVvwaWDIXobKa-ziFyhmjkIkCd5vz0TbT77AFOPCHHc,263
26
26
  duckdb_sqlalchemy/tests/sqlalchemy_suite/test_suite.py,sha256=O2O52uLfENDAU_xl2_iZZgigLP1DB8IYaULqCEOnIA8,58
27
- duckdb_sqlalchemy-0.19.1.dist-info/METADATA,sha256=U4WaQ-EvMa7ua2iRLIXD8bI1ZanrrfvQWosyocSYpUs,6740
28
- duckdb_sqlalchemy-0.19.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
29
- duckdb_sqlalchemy-0.19.1.dist-info/entry_points.txt,sha256=MyXbmaqEhyBLIL2NnHrweY6EJ_Rke2HnVZR1wCz08cM,57
30
- duckdb_sqlalchemy-0.19.1.dist-info/licenses/LICENSE.txt,sha256=nhRQcy_ZV2R-xzl3MPltQuQ53bcURavT0N6mC3VdDE8,1076
31
- duckdb_sqlalchemy-0.19.1.dist-info/RECORD,,
27
+ duckdb_sqlalchemy-0.19.2.dist-info/METADATA,sha256=SjwhxoPg7_bVEd-sBcg22_noGTK_35_Y_9q_hipeMsI,6533
28
+ duckdb_sqlalchemy-0.19.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
29
+ duckdb_sqlalchemy-0.19.2.dist-info/entry_points.txt,sha256=MyXbmaqEhyBLIL2NnHrweY6EJ_Rke2HnVZR1wCz08cM,57
30
+ duckdb_sqlalchemy-0.19.2.dist-info/licenses/LICENSE.txt,sha256=nhRQcy_ZV2R-xzl3MPltQuQ53bcURavT0N6mC3VdDE8,1076
31
+ duckdb_sqlalchemy-0.19.2.dist-info/RECORD,,