Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cleanup_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
exit 1

- name: Install Astral UV
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: "0.7.14"
version: "0.9.0"

- name: Run Cleanup
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
persist-credentials: false

- name: Install Astral UV
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: "0.7.14"
version: "0.9.0"
python-version: 3.9

- name: pre-commit (cache)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ jobs:
sudo apt-get -y install ccache

- name: Install Astral UV and enable the cache
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: "0.7.14"
version: "0.9.0"
python-version: 3.9
enable-cache: true
cache-suffix: -${{ github.workflow }}
Expand All @@ -79,7 +79,7 @@ jobs:
shell: bash
run: |
if [[ "${{ inputs.testsuite }}" == "all" ]]; then
uv run coverage run -m pytest ./tests --ignore=./tests/stubs
uv run coverage run -m pytest ./tests
elif [[ "${{ inputs.testsuite }}" == "fast" ]]; then
uv run coverage run -m pytest ./tests/fast
else
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/packaging_sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
run: echo "OVERRIDE_GIT_DESCRIBE=${{ inputs.set-version }}" >> $GITHUB_ENV

- name: Install Astral UV
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: "0.7.14"
version: "0.9.0"
python-version: 3.11

- name: Build sdist
Expand All @@ -80,7 +80,7 @@ jobs:
# run tests
tests_root="${{ github.workspace }}/tests"
tests_dir="${tests_root}${{ inputs.testsuite == 'fast' && '/fast' || '/' }}"
uv run --verbose pytest $tests_dir --verbose --ignore=${tests_root}/stubs
uv run --verbose pytest -c ${{ github.workspace }}/pyproject.toml $tests_dir

- id: versioning
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/packaging_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: [ cp39, cp310, cp311, cp312, cp313 ]
python: [ cp39, cp310, cp311, cp312, cp313, cp314 ]
platform:
- { os: windows-2025, arch: amd64, cibw_system: win }
- { os: ubuntu-24.04, arch: x86_64, cibw_system: manylinux }
Expand All @@ -50,10 +50,10 @@ jobs:
CIBW_TEST_SKIP: ${{ inputs.testsuite == 'none' && '*' || '*-macosx_universal2' }}
CIBW_TEST_SOURCES: tests
CIBW_BEFORE_TEST: >
uv export --only-group test --no-emit-project --output-file pylock.toml --directory {project} &&
uv export --only-group test --no-emit-project --quiet --output-file pylock.toml --directory {project} &&
uv pip install -r pylock.toml
CIBW_TEST_COMMAND: >
uv run -v pytest ${{ inputs.testsuite == 'fast' && './tests/fast' || './tests' }} --verbose --ignore=./tests/stubs
uv run -v pytest --rootdir $PWD -c {project}/pyproject.toml ${{ inputs.testsuite == 'fast' && './tests/fast' || './tests' }}

steps:
- name: Checkout DuckDB Python
Expand All @@ -78,14 +78,14 @@ jobs:
run: echo "CIBW_ENVIRONMENT=OVERRIDE_GIT_DESCRIBE=${{ inputs.set-version }}" >> $GITHUB_ENV

# Install Astral UV, which will be used as build-frontend for cibuildwheel
- uses: astral-sh/setup-uv@v6
- uses: astral-sh/setup-uv@v7
with:
version: "0.7.14"
version: "0.9.0"
enable-cache: false
cache-suffix: -${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}

- name: Build${{ inputs.testsuite != 'none' && ' and test ' || ' ' }}wheels
uses: pypa/cibuildwheel@v3.0
uses: pypa/cibuildwheel@v3.2
env:
CIBW_ARCHS: ${{ matrix.platform.arch == 'amd64' && 'AMD64' || matrix.platform.arch }}
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
Expand Down
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ all = [ # users can install duckdb with 'duckdb[all]', which will install this l
"fsspec", # used in duckdb.filesystem
"numpy", # used in duckdb.experimental.spark and in duckdb.fetchnumpy()
"pandas", # used for pandas dataframes all over the place
"pyarrow", # used for pyarrow support
"pyarrow; python_version < '3.14'", # used for pyarrow support
"adbc-driver-manager", # for the adbc driver
]

Expand Down Expand Up @@ -226,13 +226,16 @@ stubdeps = [ # dependencies used for typehints in the stubs
"fsspec",
"pandas",
"polars",
"pyarrow",
"pyarrow; python_version < '3.14'",
]
test = [ # dependencies used for running tests
"adbc-driver-manager",
"pytest",
"pytest-reraise",
"pytest-timeout",
"pytest-xdist",
#"pytest-randomly",
"pytest-timestamper",
"mypy",
"coverage",
"gcovr",
Expand All @@ -248,8 +251,8 @@ test = [ # dependencies used for running tests
"urllib3",
"fsspec>=2022.11.0",
"pandas>=2.0.0",
"pyarrow>=18.0.0",
"torch>=2.2.2; sys_platform != 'darwin' or platform_machine != 'x86_64' or python_version < '3.13'",
"pyarrow>=18.0.0; python_version < '3.14'",
"torch>=2.2.2; python_version < '3.14' and ( sys_platform != 'darwin' or platform_machine != 'x86_64' or python_version < '3.13' )",
"tensorflow==2.14.0; sys_platform == 'darwin' and python_version < '3.12'",
"tensorflow-cpu>=2.14.0; sys_platform == 'linux' and platform_machine != 'aarch64' and python_version < '3.12'",
"tensorflow-cpu>=2.14.0; sys_platform == 'win32' and python_version < '3.12'",
Expand All @@ -265,7 +268,7 @@ scripts = [ # dependencies used for running scripts
"pandas",
"pcpp",
"polars",
"pyarrow",
"pyarrow; python_version < '3.14'",
"pytz"
]
pypi = [ # dependencies used by the pypi cleanup script
Expand Down Expand Up @@ -302,7 +305,7 @@ dev = [ # tooling like uv will install this automatically when syncing the envir

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
addopts = "-ra --numprocesses 4 --dist loadfile --verbose"
testpaths = ["tests"]
filterwarnings = [
"error",
Expand Down
15 changes: 14 additions & 1 deletion scripts/cache_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,8 @@
"full_path": "typing",
"name": "typing",
"children": [
"typing._UnionGenericAlias"
"typing.Union",
"typing.get_origin"
]
},
"typing._UnionGenericAlias": {
Expand Down Expand Up @@ -793,5 +794,17 @@
"full_path": "pyarrow.decimal128",
"name": "decimal128",
"children": []
},
"typing.get_origin": {
"type": "attribute",
"full_path": "typing.get_origin",
"name": "get_origin",
"children": []
},
"typing.Union": {
"type": "attribute",
"full_path": "typing.Union",
"name": "Union",
"children": []
}
}
10 changes: 5 additions & 5 deletions scripts/generate_import_cache_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ def to_string(self):

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {{
{self.get_classes()}
Expand Down Expand Up @@ -230,7 +230,7 @@ def get_root_modules(files: list[ModuleFile]):


def get_module_file_path_includes(files: list[ModuleFile]):
template = '#include "duckdb_python/import_cache/modules/{}'
template = '#include "duckdb_python/import_cache/modules/{}"'
return "\n".join(template.format(f.file_name) for f in files)


Expand Down
3 changes: 2 additions & 1 deletion scripts/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@

import typing

typing._UnionGenericAlias
typing.Union
typing.get_origin

import uuid

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

//! Note: This class is generated using scripts.
//! If you need to add a new object to the cache you must:
//! 1. adjust tools/pythonpkg/scripts/imports.py
//! 2. run python3 tools/pythonpkg/scripts/generate_import_cache_json.py
//! 3. run python3 tools/pythonpkg/scripts/generate_import_cache_cpp.py
//! 4. run make format-main (the generator doesn't respect the formatting rules ;))
//! 1. adjust scripts/imports.py
//! 2. run python scripts/generate_import_cache_json.py
//! 3. run python scripts/generate_import_cache_cpp.py
//! 4. run pre-commit to fix formatting errors

namespace duckdb {

Expand Down
Loading