Skip to content

Commit 3c5b7bc

Browse files
Merge v1.4-andium into v1.5-variegata with breaking change fixes (duckdb#284)
- Merges the v1.4-andium branch into v1.5-variegata - Fixes integration issues caused by breaking changes in DuckDB core (logical type creation, transaction errors, identifier escaping in relation aggregations) - Fixes DECREF bug during interpreter shutdown - Adds support for Pandas 3.0.0 and its new string type / default backend changes - Drops Python 3.9 support and bumps Python version for CI workflows - Moves slow tests to dedicated slow test suite and fixes test errors when PyArrow is missing - Updates dependencies and fixes lazy attribute accessors
2 parents 443e192 + 11b65f0 commit 3c5b7bc

106 files changed

Lines changed: 1498 additions & 1538 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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.12"
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

adbc_driver_duckdb/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import enum
2121
import functools
2222
import importlib.util
23-
import typing
2423

2524
import adbc_driver_manager
2625

@@ -32,7 +31,7 @@ class StatementOptions(enum.Enum):
3231
BATCH_ROWS = "adbc.duckdb.query.batch_rows"
3332

3433

35-
def connect(path: typing.Optional[str] = None) -> adbc_driver_manager.AdbcDatabase:
34+
def connect(path: str | None = None) -> adbc_driver_manager.AdbcDatabase:
3635
"""Create a low level ADBC connection to DuckDB."""
3736
if path is None:
3837
return adbc_driver_manager.AdbcDatabase(driver=driver_path(), entrypoint="duckdb_adbc_init")

adbc_driver_duckdb/dbapi.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
"""DBAPI 2.0-compatible facade for the ADBC DuckDB driver."""
1919

20-
import typing
21-
2220
import adbc_driver_manager
2321
import adbc_driver_manager.dbapi
2422

@@ -91,7 +89,7 @@
9189
# Functions
9290

9391

94-
def connect(path: typing.Optional[str] = None, **kwargs) -> "Connection":
92+
def connect(path: str | None = None, **kwargs) -> "Connection":
9593
"""Connect to DuckDB via ADBC."""
9694
db = None
9795
conn = None

duckdb/bytes_io_wrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"""
3535

3636
from io import StringIO, TextIOBase
37-
from typing import Any, Union
37+
from typing import Any
3838

3939

4040
class BytesIOWrapper:
@@ -43,7 +43,7 @@ class BytesIOWrapper:
4343
Created for compat with pyarrow read_csv.
4444
"""
4545

46-
def __init__(self, buffer: Union[StringIO, TextIOBase], encoding: str = "utf-8") -> None: # noqa: D107
46+
def __init__(self, buffer: StringIO | TextIOBase, encoding: str = "utf-8") -> None: # noqa: D107
4747
self.buffer = buffer
4848
self.encoding = encoding
4949
# Because a character can be represented by more than 1 byte,
@@ -55,7 +55,7 @@ def __init__(self, buffer: Union[StringIO, TextIOBase], encoding: str = "utf-8")
5555
def __getattr__(self, attr: str) -> Any: # noqa: D105, ANN401
5656
return getattr(self.buffer, attr)
5757

58-
def read(self, n: Union[int, None] = -1) -> bytes: # noqa: D102
58+
def read(self, n: int | None = -1) -> bytes: # noqa: D102
5959
assert self.buffer is not None
6060
bytestring = self.buffer.read(n).encode(self.encoding)
6161
# When n=-1/n greater than remaining bytes: Read entire file/rest of file

duckdb/experimental/spark/_globals.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def foo(arg=pyducdkb.spark._NoValue):
3333

3434
__ALL__ = ["_NoValue"]
3535

36+
from typing_extensions import Self
3637

3738
# Disallow reloading this module so as to preserve the identities of the
3839
# classes defined here.
@@ -54,7 +55,7 @@ class _NoValueType:
5455

5556
__instance = None
5657

57-
def __new__(cls) -> "_NoValueType":
58+
def __new__(cls) -> Self:
5859
# ensure that only one instance exists
5960
if not cls.__instance:
6061
cls.__instance = super().__new__(cls)

0 commit comments

Comments
 (0)