duckdb 1.4.1.dev125__cp313-cp313-win_amd64.whl → 1.5.0.dev94__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of duckdb might be problematic. Click here for more details.
- _duckdb-stubs/__init__.pyi +1443 -0
- _duckdb-stubs/_func.pyi +46 -0
- _duckdb-stubs/_sqltypes.pyi +75 -0
- _duckdb.cp313-win_amd64.pyd +0 -0
- adbc_driver_duckdb/__init__.py +1 -2
- duckdb/__init__.py +248 -341
- duckdb/_dbapi_type_object.py +231 -0
- duckdb/_version.py +22 -0
- duckdb/bytes_io_wrapper.py +10 -6
- duckdb/experimental/spark/sql/column.py +1 -1
- duckdb/experimental/spark/sql/type_utils.py +1 -1
- duckdb/experimental/spark/sql/types.py +1 -1
- duckdb/filesystem.py +20 -15
- duckdb/func/__init__.py +3 -0
- duckdb/functional/__init__.py +11 -1
- duckdb/polars_io.py +81 -43
- duckdb/sqltypes/__init__.py +63 -0
- duckdb/typing/__init__.py +11 -1
- duckdb/udf.py +2 -2
- duckdb/value/constant/__init__.py +1 -1
- duckdb-1.5.0.dev94.dist-info/METADATA +88 -0
- {duckdb-1.4.1.dev125.dist-info → duckdb-1.5.0.dev94.dist-info}/RECORD +25 -22
- duckdb/__init__.pyi +0 -1137
- duckdb/functional/__init__.pyi +0 -31
- duckdb/typing/__init__.pyi +0 -38
- duckdb/value/constant/__init__.pyi +0 -114
- duckdb-1.4.1.dev125.dist-info/METADATA +0 -326
- /duckdb/{value/__init__.pyi → py.typed} +0 -0
- {duckdb-1.4.1.dev125.dist-info → duckdb-1.5.0.dev94.dist-info}/WHEEL +0 -0
- {duckdb-1.4.1.dev125.dist-info → duckdb-1.5.0.dev94.dist-info}/licenses/LICENSE +0 -0
duckdb/functional/__init__.pyi
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
from typing import Dict
|
|
2
|
-
|
|
3
|
-
SPECIAL: FunctionNullHandling
|
|
4
|
-
DEFAULT: FunctionNullHandling
|
|
5
|
-
|
|
6
|
-
NATIVE: PythonUDFType
|
|
7
|
-
ARROW: PythonUDFType
|
|
8
|
-
|
|
9
|
-
class FunctionNullHandling:
|
|
10
|
-
DEFAULT: FunctionNullHandling
|
|
11
|
-
SPECIAL: FunctionNullHandling
|
|
12
|
-
def __int__(self) -> int: ...
|
|
13
|
-
def __index__(self) -> int: ...
|
|
14
|
-
@property
|
|
15
|
-
def __members__(self) -> Dict[str, FunctionNullHandling]: ...
|
|
16
|
-
@property
|
|
17
|
-
def name(self) -> str: ...
|
|
18
|
-
@property
|
|
19
|
-
def value(self) -> int: ...
|
|
20
|
-
|
|
21
|
-
class PythonUDFType:
|
|
22
|
-
NATIVE: PythonUDFType
|
|
23
|
-
ARROW: PythonUDFType
|
|
24
|
-
def __int__(self) -> int: ...
|
|
25
|
-
def __index__(self) -> int: ...
|
|
26
|
-
@property
|
|
27
|
-
def __members__(self) -> Dict[str, PythonUDFType]: ...
|
|
28
|
-
@property
|
|
29
|
-
def name(self) -> str: ...
|
|
30
|
-
@property
|
|
31
|
-
def value(self) -> int: ...
|
duckdb/typing/__init__.pyi
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
from duckdb import DuckDBPyConnection
|
|
2
|
-
|
|
3
|
-
SQLNULL: DuckDBPyType
|
|
4
|
-
BOOLEAN: DuckDBPyType
|
|
5
|
-
TINYINT: DuckDBPyType
|
|
6
|
-
UTINYINT: DuckDBPyType
|
|
7
|
-
SMALLINT: DuckDBPyType
|
|
8
|
-
USMALLINT: DuckDBPyType
|
|
9
|
-
INTEGER: DuckDBPyType
|
|
10
|
-
UINTEGER: DuckDBPyType
|
|
11
|
-
BIGINT: DuckDBPyType
|
|
12
|
-
UBIGINT: DuckDBPyType
|
|
13
|
-
HUGEINT: DuckDBPyType
|
|
14
|
-
UHUGEINT: DuckDBPyType
|
|
15
|
-
UUID: DuckDBPyType
|
|
16
|
-
FLOAT: DuckDBPyType
|
|
17
|
-
DOUBLE: DuckDBPyType
|
|
18
|
-
DATE: DuckDBPyType
|
|
19
|
-
TIMESTAMP: DuckDBPyType
|
|
20
|
-
TIMESTAMP_MS: DuckDBPyType
|
|
21
|
-
TIMESTAMP_NS: DuckDBPyType
|
|
22
|
-
TIMESTAMP_S: DuckDBPyType
|
|
23
|
-
TIME: DuckDBPyType
|
|
24
|
-
TIME_TZ: DuckDBPyType
|
|
25
|
-
TIMESTAMP_TZ: DuckDBPyType
|
|
26
|
-
VARCHAR: DuckDBPyType
|
|
27
|
-
BLOB: DuckDBPyType
|
|
28
|
-
BIT: DuckDBPyType
|
|
29
|
-
INTERVAL: DuckDBPyType
|
|
30
|
-
|
|
31
|
-
class DuckDBPyType:
|
|
32
|
-
def __init__(self, type_str: str, connection: DuckDBPyConnection = ...) -> None: ...
|
|
33
|
-
def __repr__(self) -> str: ...
|
|
34
|
-
def __eq__(self, other) -> bool: ...
|
|
35
|
-
def __getattr__(self, name: str):
|
|
36
|
-
DuckDBPyType
|
|
37
|
-
def __getitem__(self, name: str):
|
|
38
|
-
DuckDBPyType
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
from duckdb.typing import DuckDBPyType
|
|
2
|
-
from typing import Any
|
|
3
|
-
|
|
4
|
-
class NullValue(Value):
|
|
5
|
-
def __init__(self) -> None: ...
|
|
6
|
-
def __repr__(self) -> str: ...
|
|
7
|
-
|
|
8
|
-
class BooleanValue(Value):
|
|
9
|
-
def __init__(self, object: Any) -> None: ...
|
|
10
|
-
def __repr__(self) -> str: ...
|
|
11
|
-
|
|
12
|
-
class UnsignedBinaryValue(Value):
|
|
13
|
-
def __init__(self, object: Any) -> None: ...
|
|
14
|
-
def __repr__(self) -> str: ...
|
|
15
|
-
|
|
16
|
-
class UnsignedShortValue(Value):
|
|
17
|
-
def __init__(self, object: Any) -> None: ...
|
|
18
|
-
def __repr__(self) -> str: ...
|
|
19
|
-
|
|
20
|
-
class UnsignedIntegerValue(Value):
|
|
21
|
-
def __init__(self, object: Any) -> None: ...
|
|
22
|
-
def __repr__(self) -> str: ...
|
|
23
|
-
|
|
24
|
-
class UnsignedLongValue(Value):
|
|
25
|
-
def __init__(self, object: Any) -> None: ...
|
|
26
|
-
def __repr__(self) -> str: ...
|
|
27
|
-
|
|
28
|
-
class BinaryValue(Value):
|
|
29
|
-
def __init__(self, object: Any) -> None: ...
|
|
30
|
-
def __repr__(self) -> str: ...
|
|
31
|
-
|
|
32
|
-
class ShortValue(Value):
|
|
33
|
-
def __init__(self, object: Any) -> None: ...
|
|
34
|
-
def __repr__(self) -> str: ...
|
|
35
|
-
|
|
36
|
-
class IntegerValue(Value):
|
|
37
|
-
def __init__(self, object: Any) -> None: ...
|
|
38
|
-
def __repr__(self) -> str: ...
|
|
39
|
-
|
|
40
|
-
class LongValue(Value):
|
|
41
|
-
def __init__(self, object: Any) -> None: ...
|
|
42
|
-
def __repr__(self) -> str: ...
|
|
43
|
-
|
|
44
|
-
class HugeIntegerValue(Value):
|
|
45
|
-
def __init__(self, object: Any) -> None: ...
|
|
46
|
-
def __repr__(self) -> str: ...
|
|
47
|
-
|
|
48
|
-
class FloatValue(Value):
|
|
49
|
-
def __init__(self, object: Any) -> None: ...
|
|
50
|
-
def __repr__(self) -> str: ...
|
|
51
|
-
|
|
52
|
-
class DoubleValue(Value):
|
|
53
|
-
def __init__(self, object: Any) -> None: ...
|
|
54
|
-
def __repr__(self) -> str: ...
|
|
55
|
-
|
|
56
|
-
class DecimalValue(Value):
|
|
57
|
-
def __init__(self, object: Any, width: int, scale: int) -> None: ...
|
|
58
|
-
def __repr__(self) -> str: ...
|
|
59
|
-
|
|
60
|
-
class StringValue(Value):
|
|
61
|
-
def __init__(self, object: Any) -> None: ...
|
|
62
|
-
def __repr__(self) -> str: ...
|
|
63
|
-
|
|
64
|
-
class UUIDValue(Value):
|
|
65
|
-
def __init__(self, object: Any) -> None: ...
|
|
66
|
-
def __repr__(self) -> str: ...
|
|
67
|
-
|
|
68
|
-
class BitValue(Value):
|
|
69
|
-
def __init__(self, object: Any) -> None: ...
|
|
70
|
-
def __repr__(self) -> str: ...
|
|
71
|
-
|
|
72
|
-
class BlobValue(Value):
|
|
73
|
-
def __init__(self, object: Any) -> None: ...
|
|
74
|
-
def __repr__(self) -> str: ...
|
|
75
|
-
|
|
76
|
-
class DateValue(Value):
|
|
77
|
-
def __init__(self, object: Any) -> None: ...
|
|
78
|
-
def __repr__(self) -> str: ...
|
|
79
|
-
|
|
80
|
-
class IntervalValue(Value):
|
|
81
|
-
def __init__(self, object: Any) -> None: ...
|
|
82
|
-
def __repr__(self) -> str: ...
|
|
83
|
-
|
|
84
|
-
class TimestampValue(Value):
|
|
85
|
-
def __init__(self, object: Any) -> None: ...
|
|
86
|
-
def __repr__(self) -> str: ...
|
|
87
|
-
|
|
88
|
-
class TimestampSecondValue(Value):
|
|
89
|
-
def __init__(self, object: Any) -> None: ...
|
|
90
|
-
def __repr__(self) -> str: ...
|
|
91
|
-
|
|
92
|
-
class TimestampMilisecondValue(Value):
|
|
93
|
-
def __init__(self, object: Any) -> None: ...
|
|
94
|
-
def __repr__(self) -> str: ...
|
|
95
|
-
|
|
96
|
-
class TimestampNanosecondValue(Value):
|
|
97
|
-
def __init__(self, object: Any) -> None: ...
|
|
98
|
-
def __repr__(self) -> str: ...
|
|
99
|
-
|
|
100
|
-
class TimestampTimeZoneValue(Value):
|
|
101
|
-
def __init__(self, object: Any) -> None: ...
|
|
102
|
-
def __repr__(self) -> str: ...
|
|
103
|
-
|
|
104
|
-
class TimeValue(Value):
|
|
105
|
-
def __init__(self, object: Any) -> None: ...
|
|
106
|
-
def __repr__(self) -> str: ...
|
|
107
|
-
|
|
108
|
-
class TimeTimeZoneValue(Value):
|
|
109
|
-
def __init__(self, object: Any) -> None: ...
|
|
110
|
-
def __repr__(self) -> str: ...
|
|
111
|
-
|
|
112
|
-
class Value:
|
|
113
|
-
def __init__(self, object: Any, type: DuckDBPyType) -> None: ...
|
|
114
|
-
def __repr__(self) -> str: ...
|
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: duckdb
|
|
3
|
-
Version: 1.4.1.dev125
|
|
4
|
-
Summary: DuckDB in-process database
|
|
5
|
-
Keywords: DuckDB,Database,SQL,OLAP
|
|
6
|
-
Author: DuckDB Foundation
|
|
7
|
-
Maintainer: DuckDB Foundation
|
|
8
|
-
Classifier: Development Status :: 3 - Alpha
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Classifier: Topic :: Database
|
|
12
|
-
Classifier: Topic :: Database :: Database Engines/Servers
|
|
13
|
-
Classifier: Topic :: Scientific/Engineering
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Intended Audience :: Education
|
|
16
|
-
Classifier: Intended Audience :: Information Technology
|
|
17
|
-
Classifier: Intended Audience :: Science/Research
|
|
18
|
-
Classifier: Programming Language :: Python
|
|
19
|
-
Classifier: Programming Language :: Python :: 3
|
|
20
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
-
Classifier: Programming Language :: C++
|
|
27
|
-
Project-URL: Documentation, https://duckdb.org/docs/stable/clients/python/overview
|
|
28
|
-
Project-URL: Source, https://github.com/duckdb/duckdb-python
|
|
29
|
-
Project-URL: Issues, https://github.com/duckdb/duckdb-python/issues
|
|
30
|
-
Project-URL: Changelog, https://github.com/duckdb/duckdb/releases
|
|
31
|
-
Requires-Python: >=3.9.0
|
|
32
|
-
Provides-Extra: all
|
|
33
|
-
Requires-Dist: ipython; extra == "all"
|
|
34
|
-
Requires-Dist: fsspec; extra == "all"
|
|
35
|
-
Requires-Dist: numpy; extra == "all"
|
|
36
|
-
Requires-Dist: pandas; extra == "all"
|
|
37
|
-
Requires-Dist: pyarrow; extra == "all"
|
|
38
|
-
Requires-Dist: adbc-driver-manager; extra == "all"
|
|
39
|
-
Description-Content-Type: text/markdown
|
|
40
|
-
|
|
41
|
-
<div align="center">
|
|
42
|
-
<picture>
|
|
43
|
-
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/duckdb/duckdb/refs/heads/main/logo/DuckDB_Logo-horizontal.svg">
|
|
44
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/duckdb/duckdb/refs/heads/main/logo/DuckDB_Logo-horizontal-dark-mode.svg">
|
|
45
|
-
<img alt="DuckDB logo" src="https://raw.githubusercontent.com/duckdb/duckdb/refs/heads/main/logo/DuckDB_Logo-horizontal.svg" height="100">
|
|
46
|
-
</picture>
|
|
47
|
-
</div>
|
|
48
|
-
<br />
|
|
49
|
-
<p align="center">
|
|
50
|
-
<a href="https://discord.gg/tcvwpjfnZx"><img src="https://shields.io/discord/909674491309850675" alt="Discord" /></a>
|
|
51
|
-
<a href="https://pypi.org/project/duckdb/"><img src="https://img.shields.io/pypi/v/duckdb.svg" alt="PyPI Latest Release"/></a>
|
|
52
|
-
</p>
|
|
53
|
-
<br />
|
|
54
|
-
<p align="center">
|
|
55
|
-
<a href="https://duckdb.org">DuckDB.org</a>
|
|
56
|
-
|
|
|
57
|
-
<a href="https://duckdb.org/docs/stable/guides/python/install">User Guide (Python)</a>
|
|
58
|
-
-
|
|
59
|
-
<a href="https://duckdb.org/docs/stable/clients/python/overview">API Docs (Python)</a>
|
|
60
|
-
</p>
|
|
61
|
-
|
|
62
|
-
# DuckDB: A Fast, In-Process, Portable, Open Source, Analytical Database System
|
|
63
|
-
|
|
64
|
-
* **Simple**: DuckDB is easy to install and deploy. It has zero external dependencies and runs in-process in its host application or as a single binary.
|
|
65
|
-
* **Portable**: DuckDB runs on Linux, macOS, Windows, Android, iOS and all popular hardware architectures. It has idiomatic client APIs for major programming languages.
|
|
66
|
-
* **Feature-rich**: DuckDB offers a rich SQL dialect. It can read and write file formats such as CSV, Parquet, and JSON, to and from the local file system and remote endpoints such as S3 buckets.
|
|
67
|
-
* **Fast**: DuckDB runs analytical queries at blazing speed thanks to its columnar engine, which supports parallel execution and can process larger-than-memory workloads.
|
|
68
|
-
* **Extensible**: DuckDB is extensible by third-party features such as new data types, functions, file formats and new SQL syntax. User contributions are available as community extensions.
|
|
69
|
-
* **Free**: DuckDB and its core extensions are open-source under the permissive MIT License. The intellectual property of the project is held by the DuckDB Foundation.
|
|
70
|
-
|
|
71
|
-
## Installation
|
|
72
|
-
|
|
73
|
-
Install the latest release of DuckDB directly from [PyPI](https://pypi.org/project/duckdb/):
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
pip install duckdb
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Install with all optional dependencies:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
pip install 'duckdb[all]'
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Development
|
|
86
|
-
|
|
87
|
-
Start by <a href="https://github.com/duckdb/duckdb-python/fork"><svg height="16" viewBox="0 0 16 16" version="1.1" width="16">
|
|
88
|
-
<path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878z"></path>
|
|
89
|
-
</svg>forking duckdb-python</a>.
|
|
90
|
-
|
|
91
|
-
### Cloning
|
|
92
|
-
|
|
93
|
-
After forking the duckdb-python repo we recommend you clone your fork as follows:
|
|
94
|
-
```shell
|
|
95
|
-
git clone --recurse-submodules $REPO_URL
|
|
96
|
-
git remote add upstream https://github.com/duckdb/duckdb-python.git
|
|
97
|
-
git fetch --all
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
... or, if you have already cloned your fork:
|
|
101
|
-
```shell
|
|
102
|
-
git submodule update --init --recursive
|
|
103
|
-
git remote add upstream https://github.com/duckdb/duckdb-python.git
|
|
104
|
-
git fetch --all
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Submodule update hook
|
|
108
|
-
|
|
109
|
-
If you'll be switching between branches that are have the submodule set to different refs, then make your life
|
|
110
|
-
easier and add the git hooks in the .githooks directory to your git hooks:
|
|
111
|
-
```shell
|
|
112
|
-
cp .githooks/post-checkout .git/hooks/
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Editable installs (general)
|
|
117
|
-
|
|
118
|
-
It's good to be aware of the following when performing an editable install:
|
|
119
|
-
- `uv sync` or `uv run [tool]` perform an editable install by default. We have
|
|
120
|
-
configured the project so that scikit-build-core will use a persistent build-dir, but since the build itself
|
|
121
|
-
happens in an isolated, ephemeral environment, cmake's paths will point to non-existing directories. CMake itself
|
|
122
|
-
will be missing.
|
|
123
|
-
- You should install all development dependencies, and then build the project without build isolation, in two separate
|
|
124
|
-
steps. After this you can happily keep building and running, as long as you don't forget to pass in the
|
|
125
|
-
`--no-build-isolation` flag.
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# install all dev dependencies without building the project (needed once)
|
|
129
|
-
uv sync -p 3.11 --no-install-project
|
|
130
|
-
# build and install without build isolation
|
|
131
|
-
uv sync --no-build-isolation
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Editable installs (IDEs)
|
|
135
|
-
|
|
136
|
-
If you're using an IDE then life is a little simpler. You install build dependencies and the project in the two
|
|
137
|
-
steps outlined above, and from that point on you can rely on e.g. CLion's cmake capabilities to do incremental
|
|
138
|
-
compilation and editable rebuilds. This will skip scikit-build-core's build backend and all of uv's dependency
|
|
139
|
-
management, so for "real" builds you better revert to the CLI. However, this should work fine for coding and debugging.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
### Cleaning
|
|
143
|
-
|
|
144
|
-
```shell
|
|
145
|
-
uv cache clean
|
|
146
|
-
rm -rf build .venv uv.lock
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
### Building wheels and sdists
|
|
151
|
-
|
|
152
|
-
To build a wheel and sdist for your system and the default Python version:
|
|
153
|
-
```bash
|
|
154
|
-
uv build
|
|
155
|
-
````
|
|
156
|
-
|
|
157
|
-
To build a wheel for a different Python version:
|
|
158
|
-
```bash
|
|
159
|
-
# E.g. for Python 3.9
|
|
160
|
-
uv build -p 3.9
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Running tests
|
|
164
|
-
|
|
165
|
-
Run all pytests:
|
|
166
|
-
```bash
|
|
167
|
-
uv run --no-build-isolation pytest ./tests --verbose
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Exclude the test/slow directory:
|
|
171
|
-
```bash
|
|
172
|
-
uv run --no-build-isolation pytest ./tests --verbose --ignore=./tests/slow
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Test coverage
|
|
176
|
-
|
|
177
|
-
Run with coverage (during development you probably want to specify which tests to run):
|
|
178
|
-
```bash
|
|
179
|
-
COVERAGE=1 uv run --no-build-isolation coverage run -m pytest ./tests --verbose
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
The `COVERAGE` env var will compile the extension with `--coverage`, allowing us to collect coverage stats of C++
|
|
183
|
-
code as well as Python code.
|
|
184
|
-
|
|
185
|
-
Check coverage for Python code:
|
|
186
|
-
```bash
|
|
187
|
-
uvx coverage html -d htmlcov-python
|
|
188
|
-
uvx coverage report --format=markdown
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
Check coverage for C++ code (note: this will clutter your project dir with html files, consider saving them in some
|
|
192
|
-
other place):
|
|
193
|
-
```bash
|
|
194
|
-
uvx gcovr \
|
|
195
|
-
--gcov-ignore-errors all \
|
|
196
|
-
--root "$PWD" \
|
|
197
|
-
--filter "${PWD}/src/duckdb_py" \
|
|
198
|
-
--exclude '.*/\.cache/.*' \
|
|
199
|
-
--gcov-exclude '.*/\.cache/.*' \
|
|
200
|
-
--gcov-exclude '.*/external/.*' \
|
|
201
|
-
--gcov-exclude '.*/site-packages/.*' \
|
|
202
|
-
--exclude-unreachable-branches \
|
|
203
|
-
--exclude-throw-branches \
|
|
204
|
-
--html --html-details -o coverage-cpp.html \
|
|
205
|
-
build/coverage/src/duckdb_py \
|
|
206
|
-
--print-summary
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### Typechecking and linting
|
|
210
|
-
|
|
211
|
-
- We're not running any mypy typechecking tests at the moment
|
|
212
|
-
- We're not running any Ruff / linting / formatting at the moment
|
|
213
|
-
|
|
214
|
-
### Cibuildwheel
|
|
215
|
-
|
|
216
|
-
You can run cibuildwheel locally for Linux. E.g. limited to Python 3.9:
|
|
217
|
-
```bash
|
|
218
|
-
CIBW_BUILD='cp39-*' uvx cibuildwheel --platform linux .
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Code conventions
|
|
222
|
-
|
|
223
|
-
* Follow the [Google Python styleguide](https://google.github.io/styleguide/pyguide.html)
|
|
224
|
-
* See the section on [Comments and Docstrings](https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings)
|
|
225
|
-
|
|
226
|
-
### Tooling
|
|
227
|
-
|
|
228
|
-
This codebase is developed with the following tools:
|
|
229
|
-
- [Astral uv](https://docs.astral.sh/uv/) - for dependency management across all platforms we provide wheels for,
|
|
230
|
-
and for Python environment management. It will be hard to work on this codebase without having UV installed.
|
|
231
|
-
- [Scikit-build-core](https://scikit-build-core.readthedocs.io/en/latest/index.html) - the build backend for
|
|
232
|
-
building the extension. On the background, scikit-build-core uses cmake and ninja for compilation.
|
|
233
|
-
- [pybind11](https://pybind11.readthedocs.io/en/stable/index.html) - a bridge between C++ and Python.
|
|
234
|
-
- [CMake](https://cmake.org/) - the build system for both DuckDB itself and the DuckDB Python module.
|
|
235
|
-
- Cibuildwheel
|
|
236
|
-
|
|
237
|
-
### Merging changes to pythonpkg from duckdb main
|
|
238
|
-
|
|
239
|
-
1. Checkout main
|
|
240
|
-
2Identify the merge commits that brought in tags to main:
|
|
241
|
-
```bash
|
|
242
|
-
git log --graph --oneline --decorate main --simplify-by-decoration
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
3. Get the log of commits
|
|
246
|
-
```bash
|
|
247
|
-
git log --oneline 71c5c07cdd..c9254ecff2 -- tools/pythonpkg/
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
4. Checkout v1.3-ossivalis
|
|
251
|
-
5. Get the log of commits
|
|
252
|
-
```bash
|
|
253
|
-
git log --oneline v1.3.0..v1.3.1 -- tools/pythonpkg/
|
|
254
|
-
```
|
|
255
|
-
git diff --name-status 71c5c07cdd c9254ecff2 -- tools/pythonpkg/
|
|
256
|
-
|
|
257
|
-
```bash
|
|
258
|
-
git log --oneline 71c5c07cdd..c9254ecff2 -- tools/pythonpkg/
|
|
259
|
-
git diff --name-status <HASH_A> <HASH_B> -- tools/pythonpkg/
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
## Versioning and Releases
|
|
264
|
-
|
|
265
|
-
The DuckDB Python package versioning and release scheme follows that of DuckDB itself. This means that a `X.Y.Z[.
|
|
266
|
-
postN]` release of the Python package ships the DuckDB stable release `X.Y.Z`. The optional `.postN` releases ship the same stable release of DuckDB as their predecessors plus Python package-specific fixes and / or features.
|
|
267
|
-
|
|
268
|
-
| Types | DuckDB Version | Resulting Python Extension Version |
|
|
269
|
-
|------------------------------------------------------------------------|----------------|------------------------------------|
|
|
270
|
-
| Stable release: DuckDB stable release | `1.3.1` | `1.3.1` |
|
|
271
|
-
| Stable post release: DuckDB stable release + Python fixes and features | `1.3.1` | `1.3.1.postX` |
|
|
272
|
-
| Nightly micro: DuckDB next micro nightly + Python next micro nightly | `1.3.2.devM` | `1.3.2.devN` |
|
|
273
|
-
| Nightly minor: DuckDB next minor nightly + Python next minor nightly | `1.4.0.devM` | `1.4.0.devN` |
|
|
274
|
-
|
|
275
|
-
Note that we do not ship nightly post releases (e.g. we don't ship `1.3.1.post2.dev3`).
|
|
276
|
-
|
|
277
|
-
### Branch and Tag Strategy
|
|
278
|
-
|
|
279
|
-
We cut releases as follows:
|
|
280
|
-
|
|
281
|
-
| Type | Tag | How |
|
|
282
|
-
|----------------------|--------------|---------------------------------------------------------------------------------|
|
|
283
|
-
| Stable minor release | vX.Y.0 | Adding a tag on `main` |
|
|
284
|
-
| Stable micro release | vX.Y.Z | Adding a tag on a minor release branch (e.g. `v1.3-ossivalis`) |
|
|
285
|
-
| Stable post release | vX.Y.Z-postN | Adding a tag on a post release branch (e.g. `v1.3.1-post`) |
|
|
286
|
-
| Nightly micro | _not tagged_ | Combining HEAD of the _micro_ release branches of DuckDB and the Python package |
|
|
287
|
-
| Nightly minor | _not tagged_ | Combining HEAD of the _minor_ release branches of DuckDB and the Python package |
|
|
288
|
-
|
|
289
|
-
### Release Runbooks
|
|
290
|
-
|
|
291
|
-
We cut a new **stable minor release** with the following steps:
|
|
292
|
-
1. Create a PR on `main` to pin the DuckDB submodule to the tag of its current release.
|
|
293
|
-
1. Iff all tests pass in CI, merge the PR.
|
|
294
|
-
1. Manually start the release workflow with the hash of this commit, and the tag name.
|
|
295
|
-
1. Iff all goes well, create a new PR to let the submodule track DuckDB main.
|
|
296
|
-
|
|
297
|
-
We cut a new **stable micro release** with the following steps:
|
|
298
|
-
1. Create a PR on the minor release branch to pin the DuckDB submodule to the tag of its current release.
|
|
299
|
-
1. Iff all tests pass in CI, merge the PR.
|
|
300
|
-
1. Manually start the release workflow with the hash of this commit, and the tag name.
|
|
301
|
-
1. Iff all goes well, create a new PR to let the submodule track DuckDB's minor release branch.
|
|
302
|
-
|
|
303
|
-
We cut a new **stable post release** with the following steps:
|
|
304
|
-
1. Create a PR on the post release branch to pin the DuckDB submodule to the tag of its current release.
|
|
305
|
-
1. Iff all tests pass in CI, merge the PR.
|
|
306
|
-
1. Manually start the release workflow with the hash of this commit, and the tag name.
|
|
307
|
-
1. Iff all goes well, create a new PR to let the submodule track DuckDB's minor release branch.
|
|
308
|
-
|
|
309
|
-
### Dynamic Versioning Integration
|
|
310
|
-
|
|
311
|
-
The package uses `setuptools_scm` with `scikit-build` for automatic version determination, and implements a custom
|
|
312
|
-
versioning scheme.
|
|
313
|
-
|
|
314
|
-
- **pyproject.toml configuration**:
|
|
315
|
-
```toml
|
|
316
|
-
[tool.scikit-build]
|
|
317
|
-
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
|
|
318
|
-
|
|
319
|
-
[tool.setuptools_scm]
|
|
320
|
-
version_scheme = "duckdb_packaging._setuptools_scm_version:version_scheme"
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
- **Environment variables**:
|
|
324
|
-
- `MAIN_BRANCH_VERSIONING=0`: Use release branch versioning (patch increments)
|
|
325
|
-
- `MAIN_BRANCH_VERSIONING=1`: Use main branch versioning (minor increments)
|
|
326
|
-
- `OVERRIDE_GIT_DESCRIBE`: Override version detection
|
|
File without changes
|
|
File without changes
|
|
File without changes
|