Skip to content

Update torch constraint to support Python 3.14 dev environments#379

Open
wavebyrd wants to merge 612 commits intoduckdb:mainfrom
wavebyrd:fix-python314-dev
Open

Update torch constraint to support Python 3.14 dev environments#379
wavebyrd wants to merge 612 commits intoduckdb:mainfrom
wavebyrd:fix-python314-dev

Conversation

@wavebyrd
Copy link

Fixes #373.

The torch dependency in the test group has python_version < '3.14', which blocks uv sync --no-install-project --python 3.14 from resolving.

PyTorch 2.10.0 added Python 3.14 support (see pytorch/pytorch#156856), so this adds a second torch entry for python_version >= '3.14' requiring torch>=2.10.0. The original entry for python_version < '3.14' is unchanged.

The new entry keeps the existing platform exclusions:

  • x86_64 macOS is excluded (no torch wheels for that arch)
  • win32 ARM64 is excluded (no torch wheels there either)

evertlammerts and others added 30 commits September 18, 2025 19:02
…ckdb#55)

Redo of duckdb#54 but now actually
pulling from my feature branch, not main, as I mistakenly did.

Includes the fix for the changes requested at
duckdb#54 (comment)
In this PR:
* Using an extensive set of rules (see pyproject.toml), fixed lots and
lots of linting errors with ruff
* Added pre-commit as a dev dependency, with support for ruff,
clang-format and cmake-format
* Added a linting step to the on-pr job
* Added the post-checkout hook as well that automatically updates the
git submodule.

Soon:
* add dev docs
* plug into on-pr workflow
* plug into nightly release workflow as sanity check (because why not:
it's fast)

This is step 1 in fixing some of the devexp issues we have since v1.4.0.

See duckdb#62
duckdb#57 and
duckdb#47
Fixes duckdb#74 

This PR:
- exports the `adbc_driver_duckdb` package so you can use it after `pip
install duckdb`
- doesn't just skip the tests if the package can't be found
- limits the exported symbols to the only two that are ever needed:
`duckdb_adbc_init` and `PyInit__duckdb`:

❯ nm -g -C -P
.venv/lib/python3.11/site-packages/_duckdb.cpython-311-darwin.so | ag -v
' U '
        _PyInit__duckdb T 41900 0
        _duckdb_adbc_init T 1054e6c 0
Schwarf and others added 29 commits January 3, 2026 20:10
…ues to avoid leaking Python objects during scalar UDF execution.
Fixes ADBC tests to align with changes made in
duckdb/duckdb#20344
Fixes duckdb/duckdb#20329

`DuckDBPyRelation.select_dtypes` failed for relations with column names
that
require quoting (e.g., names containing spaces). The projection builder
did
not correctly quote identifiers, leading to binder errors.

This change ensures identifiers are quoted consistently and adds a
regression
test to cover the reported case.
This fixes a bug in the cmake function that checks whether we should
include jemalloc in our extension list. Should make sure that jemalloc
not included on Windows.
The jemalloc extension's symbols can't be found. There might be a deeper
issue at play here, but there isn't really any reason to use jemalloc by
default, so let's remove that first.
This change makes all CMake targets to use `-MT`/`-MTd` compilation
flags for Windows MSVC builds. This way the MSVC runtime library is
linked statically and the workaround for VS2019 described in
duckdb/duckdb#17991 is no longer necessary.

`extension-ci-tools` PR: duckdb/extension-ci-tools#276

Ref: duckdblabs/duckdb-internal#2036
Fixes duckdb#209

The type stub for `DuckDBPyRelation.aggregate` incorrectly restricts the
`aggr_expr` parameter to `Expression | str`. However, the DuckDB Python
API
and runtime behavior also support passing a list of `Expression` objects
for
multiple aggregations.

The fix extends the type annotation to include `list[Expression]`,
aligning
the stub definition with the actual supported API behavior.
``` 
   def aggregate(
        self, aggr_expr: Expression | str | list[Expression], group_expr: Expression | str = ""
    ) -> DuckDBPyRelation: ...
```
Fixes duckdb#224 
Fixes the memory leak reported in
[https://github.com/duckdb/duckdb-python/issues/224](https://github.com/duckdb/duckdb-python/issues/224)

The issue was caused by Python UDF return values not being released
after conversion. While this affected all return types, it was only
observable for large VARCHAR/bytes values due to their size. The fix
ensures correct reference management using
`py::reinterpret_steal<py::object>.`

A regression test was added to detect refcount leaks in Python scalar
UDF execution.
@wavebyrd wavebyrd force-pushed the fix-python314-dev branch from 0c03478 to 36f6527 Compare March 13, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow python 3.14 in dev environments