From 3c7bc5a2e4f4f1b87fa885ff63c388b468b0668f Mon Sep 17 00:00:00 2001 From: David Brochart Date: Fri, 14 Nov 2025 17:00:28 +0100 Subject: [PATCH] Update --- .github/workflows/publish.yml | 18 +++++----- .github/workflows/test.yml | 32 +++++++++--------- pyproject.toml | 62 +++++++++++++++++------------------ 3 files changed, 55 insertions(+), 57 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9326b84..e08afee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,13 +12,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: astral-sh/setup-uv@v7 with: - python-version: 3.13 - - run: | - pip install hatch "hatchling!=1.26.0" - hatch build + python-version: 3.14 + activate-environment: "true" + - run: uv build - uses: actions/upload-artifact@v4 with: name: dist @@ -33,7 +32,10 @@ jobs: id-token: write steps: - name: Retrieve packages - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 + with: + name: dist + path: dist - name: Upload packages uses: pypa/gh-action-pypi-publish@release/v1 @@ -44,7 +46,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - id: changelog uses: agronholm/release-notes@v1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6d8873..9ac8986 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,35 +15,33 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] python-version: - - '3.9' - '3.10' - '3.11' - '3.12' - '3.13' - - 'pypy-3.9' + - '3.14' - 'pypy-3.10' - 'pypy-3.11' steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: pip install -e ".[test]" + activate-environment: "true" + - name: Install zmq-anyio + run: uv pip install -e . --group test - name: Check with mypy and ruff - if: ${{ (matrix.python-version == '3.13') && (matrix.os == 'ubuntu-latest') }} + if: ${{ (matrix.python-version == '3.14') && (matrix.os == 'ubuntu-latest') }} run: | - mypy src/zmq_anyio - ruff format --check src - ruff check src + uv run mypy src/zmq_anyio + uv run ruff format --check src + uv run ruff check src - name: Run tests - if: ${{ !((matrix.python-version == '3.13') && (matrix.os == 'ubuntu-latest')) }} - run: pytest --color=yes -v tests + if: ${{ !((matrix.python-version == '3.14') && (matrix.os == 'ubuntu-latest')) }} + run: uv run pytest --color=yes -v tests - name: Run code coverage - if: ${{ (matrix.python-version == '3.13') && (matrix.os == 'ubuntu-latest') }} + if: ${{ (matrix.python-version == '3.14') && (matrix.os == 'ubuntu-latest') }} run: | - coverage run -m pytest --color=yes -v tests - coverage report + uv run coverage run -m pytest --color=yes -v tests + uv run coverage report diff --git a/pyproject.toml b/pyproject.toml index 7526fa6..1610bf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build"] +build-backend = "uv_build" [project] name = "zmq-anyio" @@ -8,47 +8,45 @@ version = "0.3.11" description = "Asynchronous API for ZMQ using AnyIO" readme = "README.md" authors = [ - {name = "David Brochart", email = "david.brochart@gmail.com"}, + {name = "David Brochart", email = "david.brochart@gmail.com"}, ] license = {file = "LICENSE"} classifiers = [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Typing :: Typed", - "Topic :: System :: Networking", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Typing :: Typed", + "Topic :: System :: Networking", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", ] -requires-python = ">= 3.9" +requires-python = ">= 3.10" dependencies = [ - "anyio >=4.10.0,<5.0.0", - "anyioutils >=0.7.1,<0.8.0", - "pyzmq >=26.0.0,<28.0.0", + "anyio >=4.10.0,<5.0.0", + "anyioutils >=0.7.1,<0.8.0", + "pyzmq >=26.0.0,<28.0.0", ] -[project.optional-dependencies] +[dependency-groups] test = [ - "pytest >=8,<9", - "pytest-timeout", - "anyio[trio]", - "mypy", - "ruff", - "coverage[toml] >=7,<8", + "pytest >=9,<10", + "pytest-timeout", + "anyio[trio]", + "mypy", + "ruff", + "coverage >=7,<8", ] [project.urls] -Source = "https://github.com/davidbrochart/zmq-anyio" -Issues = "https://github.com/davidbrochart/zmq-anyio/issues" - -[tool.hatch.build.targets.wheel] -ignore-vcs = true -packages = ["src/zmq_anyio"] +Source = "https://github.com/QuantStack/zmq-anyio" +Issues = "https://github.com/QuantStack/zmq-anyio/issues" [tool.coverage.run] source = ["zmq_anyio", "tests"]