From 3ccf8439f6e3fd54b47172b4b5c4706ad56b7490 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 3 Mar 2026 11:59:31 +0100 Subject: [PATCH 1/3] Project: Drop `requires-python` attribute for less obstacles While earlier releases of Python might be EOL, it is certainly running on many systems where people can't upgrade. Why leave them behind when it's not strictly needed? --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2490f2ff..f8190cf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,6 @@ name = "crate" dynamic = ["version"] description = "CrateDB Python Client" authors = [{ name = "Crate.io", email = "office@crate.io" }] -requires-python = ">=3.10" readme = "README.rst" license = "Apache-2.0" classifiers = [ From 64656f0a722b5cb900eddf3279cc5a43ba02e560 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 3 Mar 2026 11:28:34 +0100 Subject: [PATCH 2/3] Documentation: Update information about release procedure --- DEVELOP.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DEVELOP.rst b/DEVELOP.rst index 6675cad5..d39affdb 100644 --- a/DEVELOP.rst +++ b/DEVELOP.rst @@ -70,12 +70,14 @@ In the release branch: - Add a section for the new version in the ``CHANGES.rst`` file -- Commit your changes with a message like "prepare release x.y.z" +- Commit your changes with a message like "Release x.y.z" - Push to origin/ - Create a tag by running ``git tag -s `` and push it ``git push --tags``. - This will trigger a Github action which releases the new version to PyPi. + This will trigger a Github action which releases the new version to PyPI. + +- Announce the new release on the `GitHub Releases`_ page. On branch ``main``: @@ -113,7 +115,7 @@ The docs are automatically built from Git by `Read the Docs`_ and there is nothing special you need to do to get the live docs to update. .. _@crate/docs: https://github.com/orgs/crate/teams/docs -.. _buildout: https://pypi.python.org/pypi/zc.buildout +.. _GitHub Releases: https://github.com/crate/crate-python/releases .. _PyPI: https://pypi.python.org/pypi .. _Python versions: https://docs.astral.sh/uv/concepts/python-versions/ .. _Read the Docs: http://readthedocs.org From 417e3ff2054c5c0ad6086ad0bf9bcff7099b24b0 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 3 Mar 2026 11:28:14 +0100 Subject: [PATCH 3/3] CI: Fix packaging by using `hatch build` instead of `uv build` - Using `uv build` creates a wheel package without any code. - Use Twine for validating the package. --- .github/workflows/release.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79bd7b5c..e8524c9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,13 +15,25 @@ jobs: steps: - uses: actions/checkout@v6 with: + fetch-depth: 0 + fetch-tags: true persist-credentials: false - name: Set up uv uses: astral-sh/setup-uv@v7 + with: + activate-environment: true + enable-cache: true + python-version: "3.14" + + - name: Set up Hatch and Twine + run: uv pip install hatch twine - name: Build package - run: uv build + run: hatch build + + - name: Validate package + run: twine check dist/* - name: Publish package to PyPI if: startsWith(github.event.ref, 'refs/tags')