Skip to content

Commit bbb418b

Browse files
committed
Fix last failing tests and remove support for Python 3.9
1 parent f4a82b6 commit bbb418b

9 files changed

Lines changed: 23 additions & 25 deletions

File tree

.github/workflows/code_quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: astral-sh/setup-uv@v7
3333
with:
3434
version: "0.9.0"
35-
python-version: 3.9
35+
python-version: 3.10
3636

3737
- name: pre-commit (cache)
3838
uses: actions/cache@v4

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
uses: astral-sh/setup-uv@v7
7272
with:
7373
version: "0.9.0"
74-
python-version: 3.9
74+
python-version: 3.12
7575
enable-cache: true
7676
cache-suffix: -${{ github.workflow }}
7777

.github/workflows/packaging_sdist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
uses: astral-sh/setup-uv@v7
6060
with:
6161
version: "0.9.0"
62-
python-version: 3.11
62+
python-version: 3.12
6363

6464
- name: Build sdist
6565
run: uv build --sdist

.github/workflows/packaging_wheels.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
python: [ cp39, cp310, cp311, cp312, cp313, cp314 ]
33+
python: [ cp310, cp311, cp312, cp313, cp314 ]
3434
platform:
3535
- { os: windows-2025, arch: amd64, cibw_system: win }
3636
- { os: windows-11-arm, arch: ARM64, cibw_system: win } # cibw requires ARM64 to be uppercase
@@ -47,7 +47,6 @@ jobs:
4747
- { minimal: true, python: cp312 }
4848
- { minimal: true, python: cp313 }
4949
- { minimal: true, platform: { arch: universal2 } }
50-
- { python: cp39, platform: { os: windows-11-arm, arch: ARM64 } } # too many dependency problems for win arm64
5150
- { python: cp310, platform: { os: windows-11-arm, arch: ARM64 } } # too many dependency problems for win arm64
5251
runs-on: ${{ matrix.platform.os }}
5352
env:

.github/workflows/targeted_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ on:
1919
required: true
2020
type: choice
2121
options:
22-
- '3.9'
2322
- '3.10'
2423
- '3.11'
2524
- '3.12'

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2018-2025 Stichting DuckDB Foundation
1+
Copyright 2018-2026 Stichting DuckDB Foundation
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

pyproject.toml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dynamic = ["version"]
1010
description = "DuckDB in-process database"
1111
readme = "README.md"
1212
keywords = ["DuckDB", "Database", "SQL", "OLAP"]
13-
requires-python = ">=3.9.0"
13+
requires-python = ">=3.10.0"
1414
classifiers = [
1515
"Development Status :: 5 - Production/Stable",
1616
"License :: OSI Approved :: MIT License",
@@ -25,7 +25,6 @@ classifiers = [
2525
"Programming Language :: Python",
2626
"Programming Language :: Python :: 3",
2727
"Programming Language :: Python :: 3 :: Only",
28-
"Programming Language :: Python :: 3.9",
2928
"Programming Language :: Python :: 3.10",
3029
"Programming Language :: Python :: 3.11",
3130
"Programming Language :: Python :: 3.12",
@@ -176,12 +175,12 @@ exclude = [
176175
#
177176
# This section has dependency groups for testing and development. Tread carefully, the current setup makes sure that
178177
# test dependencies can be installed on as many platforms we build wheel for. Especially picky are:
179-
# - tensorflow: we can only run tests on cp39-cp311, for osx there is no tensorflow-cpu, for windows we need
178+
# - tensorflow: we can only run tests on cp310-cp311, for osx there is no tensorflow-cpu, for windows we need
180179
# tensorflow-cpu-aws and there is no distribution availalbe for Linux aarch64.
181180
# - torch: since we can't use gpu acceleration, we need to rely on torch-cpu, which isn't available on pypi. We use
182181
# `tool.uv.index` and `tool.uv.sources` to make sure the official pytorch index is used. Even there, we don't
183182
# have a wheel available for x86_64 OSX + cp313.
184-
# - numpy: tensorflow doesn't play nice with numpy>2 so for every platform that can run tensorflow (cp39-cp311) we use
183+
# - numpy: tensorflow doesn't play nice with numpy>2 so for every platform that can run tensorflow (cp310-cp311) we use
185184
# numpy<2. numpy<2 has no wheels for cp31[2|3], meaning an sdist will be used. However, on Windows amd64 +
186185
# cp313 this results in a segfault / access violation. To get around this, we install numpy>=2 on all >=cp312
187186
# platforms. Then for windows arm64, for which there is no tensorflow, we only allow numpy>=2.3 because that
@@ -195,20 +194,20 @@ default-groups = ["dev"]
195194
# build wheels for.
196195
# See https://docs.astral.sh/uv/concepts/resolution/#universal-resolution
197196
environments = [ # no need to resolve packages beyond these platforms with uv...
198-
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'",
199-
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'x86_64'",
200-
"python_version >= '3.9' and sys_platform == 'win32' and platform_machine == 'AMD64'",
197+
"python_version >= '3.10' and sys_platform == 'darwin' and platform_machine == 'arm64'",
198+
"python_version >= '3.10' and sys_platform == 'darwin' and platform_machine == 'x86_64'",
199+
"python_version >= '3.10' and sys_platform == 'win32' and platform_machine == 'AMD64'",
201200
"python_version >= '3.11' and sys_platform == 'win32' and platform_machine == 'ARM64'",
202-
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'x86_64'",
203-
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'",
201+
"python_version >= '3.10' and sys_platform == 'linux' and platform_machine == 'x86_64'",
202+
"python_version >= '3.10' and sys_platform == 'linux' and platform_machine == 'aarch64'",
204203
]
205204
required-environments = [ # ... but do always resolve for all of them
206-
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'",
207-
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'x86_64'",
208-
"python_version >= '3.9' and sys_platform == 'win32' and platform_machine == 'AMD64'",
205+
"python_version >= '3.10' and sys_platform == 'darwin' and platform_machine == 'arm64'",
206+
"python_version >= '3.10' and sys_platform == 'darwin' and platform_machine == 'x86_64'",
207+
"python_version >= '3.10' and sys_platform == 'win32' and platform_machine == 'AMD64'",
209208
"python_version >= '3.11' and sys_platform == 'win32' and platform_machine == 'ARM64'",
210-
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'x86_64'",
211-
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'",
209+
"python_version >= '3.10' and sys_platform == 'linux' and platform_machine == 'x86_64'",
210+
"python_version >= '3.10' and sys_platform == 'linux' and platform_machine == 'aarch64'",
212211
]
213212

214213
# We just need pytorch for tests, wihtout GPU acceleration. PyPI doesn't host a cpu-only version for Linux, so we have
@@ -330,7 +329,7 @@ packages = ["duckdb", "_duckdb"]
330329
strict = true
331330
warn_unreachable = true
332331
pretty = true
333-
python_version = "3.9"
332+
python_version = "3.10"
334333
exclude = [
335334
"duckdb/experimental/", # not checking the pyspark API
336335
"duckdb/query_graph/", # old and unmaintained (should probably remove)
@@ -363,7 +362,7 @@ source = ["duckdb"]
363362
[tool.ruff]
364363
line-length = 120
365364
indent-width = 4
366-
target-version = "py39"
365+
target-version = "py310"
367366
fix = true
368367
exclude = ['external/duckdb', 'sqllogic']
369368

tests/fast/test_filesystem.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import logging
22
import sys
3+
from collections.abc import Callable
34
from pathlib import Path, PurePosixPath
45
from shutil import copyfileobj
5-
from typing import Callable
66

77
import pytest
88

@@ -56,10 +56,12 @@ def add_file(fs, filename=FILENAME):
5656

5757

5858
class TestPythonFilesystem:
59+
@pytest.mark.xfail(reason="Unregister support was removed. Should be added back before release.")
5960
def test_unregister_non_existent_filesystem(self, duckdb_cursor: DuckDBPyConnection):
6061
with pytest.raises(InvalidInputException):
6162
duckdb_cursor.unregister_filesystem("fake")
6263

64+
@pytest.mark.xfail(reason="Unregister support was removed. Should be added back before release.")
6365
def test_memory_filesystem(self, duckdb_cursor: DuckDBPyConnection, memory: fsspec.AbstractFileSystem):
6466
duckdb_cursor.register_filesystem(memory)
6567

tests/fast/test_replacement_scan.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ def test_cte_with_joins(self, duckdb_cursor):
314314
res = rel.fetchall()
315315
assert res == [(2, 2, 2)]
316316

317-
@pytest.mark.xfail(reason="Bug in DuckDB core (MRE at #19154)")
318317
def test_same_name_cte(self, duckdb_cursor):
319318
query = """
320319
WITH df AS (

0 commit comments

Comments
 (0)