pypi duckdb 1.5.0
DuckDB Python 1.5.0 "Variegata"

10 hours ago

This is the 1.5.0 release of DuckDB's Python bindings. For a list of changes in DuckDB core, have a look at the DuckDB release notes and the blogpost.

Breaking Changes

  • Dropped Python 3.9 support. The minimum supported version is now Python 3.10.
  • Removed deprecated duckdb.typing and duckdb.functional modules. These were deprecated in 1.4.0. Use duckdb.sqltypes and duckdb.func instead.
  • Renamed column parameter to expression in relational API functions (e.g., min, max, sum, mean, etc.) to better reflect that these accept expressions, not just column names.
  • Deprecated fetch_arrow_table() and fetch_record_batch() on connections and relations. Use the new to_arrow_table() and to_arrow_reader() methods instead.

New Features

  • Polars LazyFrame projection and filter pushdown. DuckDB can now push down projections and filters when scanning Polars LazyFrames, including support for cast nodes and unstrict casts.
  • Polars Int128 / UInt128 support.
  • VARIANT type support — Python conversion, NumPy array wrapping, and type stubs.
  • TIME_NS type support — nanosecond-precision time values across Python, NumPy, and Spark type systems.
  • Profiling API — new get_profiling_info() and get_profiling_json() methods on connections, plus a refactored query_graph module with improved HTML visualization (dark mode, expandable phases, depth).
  • to_arrow_table() and to_arrow_reader() — new methods on connections and relations as the preferred Arrow export API.

Performance

  • __arrow_c_stream__ on relations — relations now export via the Arrow PyCapsule interface using PhysicalArrowCollector for zero-copy streaming.
  • Unified Arrow stream scanning via __arrow_c_stream__, with filter pushdown only when pyarrow is present.
  • Arrow schema caching to avoid repeated lookups during scanning.
  • Arrow object type caching to avoid repeated detection.
  • Empty params treated as None for .sql() — avoids unnecessary parameter binding overhead.
  • Simplified GIL management for FetchRow.

Bug Fixes

  • Fixed Python object leak in scalar UDFsPyObject_CallObject return values are now properly stolen to avoid reference count leaks.
  • Fixed reference cycle between connections and relations that could prevent garbage collection.
  • Relations now hold a reference to their connection, preventing premature connection closure.
  • Fixed fsspec race condition in the Python filesystem implementation.
  • Fixed numeric conversion logic — improved handling of large integers (fallback to VARCHAR) and UNION types.
  • pyarrow.dataset import is now optional — no longer fails if pyarrow is installed without the dataset module.
  • Thrown a reasonable error when an Arrow array stream has already been consumed.

Build & Packaging

  • jemalloc enabled on Linux x86_64 only (aligned with DuckDB core), removed as a separately bundled extension.
  • MSVC runtime linked statically on Windows — eliminates the VS2019 workaround from duckdb/duckdb#17991.

Don't miss a new duckdb release

NewReleases is sending notifications on new releases.