Skip to content

Commit 693976a

Browse files
authored
Stabilising changes for version 3.0.0 (#108)
1 parent 76172d4 commit 693976a

Some content is hidden

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

42 files changed

+1857
-1201
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 28 deletions
This file was deleted.

.bumpversion.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[tool.bumpversion]
2+
current_version = "3.0.0"
3+
commit = false
4+
tag = false
5+
6+
[[tool.bumpversion.files]]
7+
filename = "pyproject.toml"
8+
search = "version = \"{current_version}\""
9+
replace = "version = \"{new_version}\""
10+
11+
[[tool.bumpversion.files]]
12+
filename = "setup.py"
13+
search = "version='{current_version}'"
14+
replace = "version='{new_version}'"
15+
16+
[[tool.bumpversion.files]]
17+
filename = "README.rst"
18+
search = "library is {current_version}"
19+
replace = "library is {new_version}"
20+
21+
[[tool.bumpversion.files]]
22+
filename = "docs/conf.py"
23+
search = "version = release = '{current_version}'"
24+
replace = "version = release = '{new_version}'"
25+
26+
[[tool.bumpversion.files]]
27+
filename = "src/questdb/__init__.py"
28+
search = "__version__ = '{current_version}'"
29+
replace = "__version__ = '{new_version}'"
30+
31+
[[tool.bumpversion.files]]
32+
filename = "src/questdb/ingress.pyx"
33+
search = "VERSION = '{current_version}'"
34+
replace = "VERSION = '{new_version}'"
35+
36+
[[tool.bumpversion.files]]
37+
filename = ".bumpversion.toml"
38+
search = "current_version = \"{current_version}\""
39+
replace = "current_version = \"{new_version}\""

CHANGELOG.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,76 @@ Changelog
55

66
=========
77

8+
3.0.0 (2025-07-07)
9+
------------------
10+
11+
Features
12+
~~~~~~~~
13+
14+
This is the first major release of the QuestDB Python client library
15+
which supports n-dimensional arrays of doubles for QuestDB servers 9.0.0 and up.
16+
17+
.. code-block:: python
18+
19+
import numpy as np
20+
21+
# Create 2D numpy array
22+
array_2d = np.array([
23+
[1.1, 2.2, 3.3],
24+
[4.4, 5.5, 6.6]], dtype=np.float64)
25+
26+
sender.row(
27+
'table',
28+
columns={'array_2d': array_2d},
29+
at=timestamp)
30+
31+
The array data is sent over a new protocol version (2) that is auto-negotiated
32+
when using HTTP(s), or can be specified explicitly via the ``protocol_version=2``
33+
parameter when using TCP(s).
34+
35+
We recommend using HTTP(s), but here is an TCP example, should you need it::
36+
37+
tcp::addr=localhost:9009;protocol_version=2;
38+
39+
When using ``protocol_version=2`` (with either TCP(s) or HTTP(s)), the sender
40+
will now also serialize ``float`` (double-precision) columns as binary.
41+
You might see a performance uplift if this is a dominant data type in your
42+
ingestion workload.
43+
44+
When compared to 2.0.4, this release includes all the changes from 3.0.0rc1 and
45+
additionally:
46+
47+
* Has optimised ingestion performance from C-style contiguous NumPy arrays.
48+
49+
* Warns at most every 10 minutes when burst of reconnections are detected.
50+
This is to warn about code patterns that may lead to performance issues, such as
51+
52+
.. code-block:: python
53+
54+
# Don't do this! Sender objects should be reused.
55+
for row_fields in data:
56+
with Sender.from_conf(conf) as sender:
57+
sender.row(**row_fields)
58+
59+
This feature can be disabled in code by setting:
60+
61+
.. code-block:: python
62+
63+
import questdb.ingress as qi
64+
qi.WARN_HIGH_RECONNECTS = False
65+
66+
* Fixed ILP/TCP connection shutdown on Windows where some rows could be
67+
lost when closing the ``Sender``, even if explicitly flushed.
68+
69+
* Added a "Good Practices" section to the "Sending Data over ILP" section of
70+
the documentation.
71+
72+
Breaking Changes
73+
~~~~~~~~~~~~~~~~
74+
Refer to the release notes for 3.0.0rc1 for the breaking changes introduced
75+
in this release compared to 2.x.x.
76+
77+
878
3.0.0rc1 (2025-06-02)
979
---------------------
1080

@@ -16,6 +86,10 @@ Features
1686
* Array Data Type Support. Adds native support for NumPy arrays
1787
(currently only for ``np.float64`` element type and up to 32 dimensions).
1888

89+
.. note::
90+
**Server Requirement**: This feature requires QuestDB server version 9.0.0 or higher.
91+
Ensure your server is upgraded before ingesting array types, otherwise data ingestion will fail.
92+
1993
.. code-block:: python
2094
2195
import numpy as np

DEV_NOTES.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ The development requirements are these if you prefer to install them one by one:
5555
python3 -m pip install wheel
5656
python3 -m pip install twine
5757
python3 -m pip install cibuildwheel
58-
python3 -m pip install bump2version
5958
6059
6160
Building and packaging

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ recursive-include src *.py
1515
recursive-include src *.md
1616
recursive-include src *.pxi
1717
recursive-include src *.c
18-
graft pystr-to-utf8
18+
graft rpyutils
1919
graft c-questdb-client
2020
prune c-questdb-client/src/tests/json_tests.rs
2121
prune c-questdb-client/.git

README.rst

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ QuestDB Client Library for Python
55
This is the official Python client library for `QuestDB <https://questdb.io>`_.
66

77
This client library implements QuestDB's variant of the
8-
`Ingestion Line Protocol <https://questdb.io/docs/reference/api/ilp/overview/>`_
8+
`InfluxDB Line Protocol <https://questdb.io/docs/reference/api/ilp/overview/>`_
99
(ILP) over HTTP and TCP.
1010

1111
ILP provides the fastest way to insert data into QuestDB.
@@ -18,21 +18,12 @@ and full-connection encryption with
1818
Install
1919
=======
2020

21-
The latest *stable* version of the library is **2.0.4** (`changelog <https://py-questdb-client.readthedocs.io/en/latest/changelog.html>`_).
21+
The latest version of the library is **3.0.0** (`changelog <https://py-questdb-client.readthedocs.io/en/latest/changelog.html>`_).
2222

2323
::
2424

2525
python3 -m pip install -U questdb[dataframe]
2626

27-
28-
The latest *pre-release* version of the library is **3.0.0r1** (`changelog <https://py-questdb-client.readthedocs.io/en/latest/changelog.html>`_).
29-
This release supports NumPy float64 arrays which are transmitted over a new
30-
protocol version supported by QuestDB 8.4.0 or later.
31-
32-
::
33-
34-
python3 -m pip install --pre -U questdb[dataframe]
35-
3627
Quickstart
3728
==========
3829

@@ -53,6 +44,7 @@ The most common way to insert data is from a Pandas dataframe.
5344
'amount': [0.00044, 0.001],
5445
5546
# NumPy float64 arrays are supported from v3.0.0rc1 onwards.
47+
# Note that requires QuestDB server >= 9.0.0 for array support
5648
'ord_book_bids': [
5749
np.array([2615.54, 2618.63]),
5850
np.array([39269.98, 39270.00])
@@ -82,6 +74,7 @@ You can also send individual rows. This only requires a more minimal installatio
8274
'amount': 0.00044,
8375
8476
# NumPy float64 arrays are supported from v3.0.0rc1 onwards.
77+
# Note that requires QuestDB server >= 9.0.0 for array support
8578
'ord_book_bids': np.array([2615.54, 2618.63]),
8679
},
8780
at=TimestampNanos.now())

RELEASING.rst

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,17 @@ Create a new PR with the new changes in ``CHANGELOG.rst``.
2020

2121
Make a commit and push the changes to a new branch.
2222

23-
You also want to bump the version.
23+
You also want to bump the version. This process is semi-automated.
2424

25-
This process is automated by the following command:
25+
* Ensure you have `uv` and `bump-my-version` installed:
26+
* `curl -LsSf https://astral.sh/uv/install.sh | sh` : see https://docs.astral.sh/uv/getting-started/installation/
27+
* `uv tool install bump-my-version`: see https://github.com/callowayproject/bump-my-version.
2628

27-
.. code-block:: bash
28-
29-
bump2version --config-file .bumpversion.cfg --no-tag patch
30-
31-
Here use:
32-
33-
* ``patch`` to bump the version to the next patch version, e.g. 1.0.0 -> 1.0.1
34-
35-
* ``minor`` to bump the version to the next minor version, e.g. 1.0.0 -> 1.1.0
29+
```console
30+
bump-my-version replace --new-version NEW_VERSION
31+
```
3632

37-
* ``major`` to bump the version to the next major version, e.g. 1.0.0 -> 2.0.0
33+
If you're unsure, append `--dry-run` to preview changes.
3834

3935
Now merge the PR with the title "Bump version: V.V.V → W.W.W".
4036

c-questdb-client

Submodule c-questdb-client updated 66 files

ci/cibuildwheel.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ stages:
122122
displayName: Build wheels
123123
env:
124124
CIBW_BUILD: pp*
125+
CIBW_ENABLE: pypy pypy-eol
125126
- task: PublishBuildArtifacts@1
126127
inputs: {pathtoPublish: 'wheelhouse'}
127128

ci/pip_install_deps.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def main(args):
7373
ensure_timezone()
7474
pip_install('pip')
7575
pip_install('setuptools')
76+
pip_install('packaging')
7677
if args.pandas_version is not None and args.pandas_version != '':
7778
install_old_pandas_and_numpy(args)
7879
else:
@@ -92,9 +93,7 @@ def main(args):
9293
import pandas
9394
import numpy
9495
import pyarrow
95-
if (sys.version_info >= (3, 8) and sys.version_info < (3, 13)):
96-
# As of this commit, fastparquet does not have a binary built for 3.13
97-
import fastparquet
96+
import fastparquet
9897

9998

10099
if __name__ == "__main__":

0 commit comments

Comments
 (0)