Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
version: 2
updates:
- package-ecosystem: pip
directory: /dependencies/default
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: main
- package-ecosystem: pip
directory: /dependencies/docs
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
Expand Down
56 changes: 32 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ env:
PYTHON_LATEST: 3.13

jobs:
lint:
name: Run linters
build:
name: Build package
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
Expand All @@ -30,23 +30,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_LATEST }}
- name: Install GitHub matcher for ActionLint checker
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Run pre-commit checks
run: pre-commit run --all-files --show-diff-on-failure
- name: Install check-wheel-content, and twine
run: python -m pip install build check-wheel-contents twine
- name: Build package
run: python -m build
- name: Install tox
run: python -m pip install tox
- name: Build package and check distributions
run: tox run -e build
- name: List result
run: ls -l dist
- name: Check wheel contents
run: check-wheel-contents dist/*.whl
- name: Check long_description
run: python -m twine check dist/*
- name: Install pytest-asyncio
run: pip install .
- name: Get version info
Expand All @@ -58,6 +47,25 @@ jobs:
name: dist
path: dist

lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_LATEST }}
- name: Install GitHub matcher for ActionLint checker
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Run pre-commit checks
run: pre-commit run --all-files --show-diff-on-failure

test:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
Expand Down Expand Up @@ -109,7 +117,7 @@ jobs:
check:
name: Check
if: always()
needs: [lint, test]
needs: [build, lint, test]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down Expand Up @@ -145,7 +153,7 @@ jobs:

create-github-release:
name: Create GitHub release
needs: [lint, check]
needs: [build, lint, check]
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -168,7 +176,7 @@ jobs:
if: ${{ !contains(github.ref, 'refs/tags/') }}
run: towncrier build --draft --version "${version}" > release-notes.rst
env:
version: ${{ needs.lint.outputs.version }}
version: ${{ needs.build.outputs.version }}
- name: Extract release notes from Git tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
Expand All @@ -194,16 +202,16 @@ jobs:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ncipollo/release-action@1c89adf39833729d8f85a31ccbc451b078733c80 # v1.19.1
with:
name: pytest-asyncio ${{ needs.lint.outputs.version }}
name: pytest-asyncio ${{ needs.build.outputs.version }}
artifacts: dist/*
bodyFile: release-notes.md
prerelease: ${{ needs.lint.outputs.prerelease }}
prerelease: ${{ needs.build.outputs.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}

publish-test-pypi:
name: Publish packages to test.pypi.org
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [lint, check]
needs: [build, lint, check]
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -222,7 +230,7 @@ jobs:
name: Publish packages to pypi.org
environment: release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: [lint, check]
needs: [build, lint, check]
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ repos:
hooks:
- id: pyproject-fmt
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
additional_dependencies: [tox>=4.9]
additional_dependencies: [tox>=4.28]
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.12.1
hooks:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+dc5bb56e.downstream.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump the minimum required version of tox to v4.28. This change is only relevant if you use the ``tox.ini`` file provided by pytest-asyncio to run tests.
66 changes: 66 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
alabaster==0.7.16
annotated-types-0.7.0
attrs==25.3.0
babel==2.17.0
backports.asyncio.runner==1.2.0
backports.tarfile==1.2.0
certifi==2025.8.3
charset-normalizer==3.4.3
check-wheel-contents==0.6.1
cffi==1.17.1
click==8.1.8
coverage==7.10.6
cryptography==45.0.6
docutils==0.21.2
exceptiongroup==1.3.0
hypothesis==6.138.13
iniconfig==2.1.0
id==1.5.0
idna==3.10
imagesize==1.4.1
importlib_metadata==8.7.0
iniconfig==2.1.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.3.0
jeepney==0.9.0
Jinja2==3.1.6
keyring==25.6.0
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mdurl==0.1.2
more-itertools==10.7.0
nh3==0.3.0
packaging==25.0
pluggy==1.6.0
Pygments==2.19.2
pycparser==2.22
pydantic==2.11.7
pydantic-core==2.33.2
pytest==8.4.1
readme-renderer==44.0
requests==2.32.4
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==14.1.0
SecretStorage==3.3.3
setuptools==80.9.0
setuptools-scm==8.3.0
snowballstemmer==3.0.1
sortedcontainers==2.4.0
Sphinx==8.0.2
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
twine==6.1.0
typing_extensions==4.15.0
typing-inspection==0.4.1
urllib3==2.5.0
wheel-filename==1.4.2
zipp==3.23.0
11 changes: 0 additions & 11 deletions dependencies/default/constraints.txt

This file was deleted.

3 changes: 0 additions & 3 deletions dependencies/default/requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions dependencies/docs/requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools==80.9",
"setuptools-scm==9.2",
"setuptools>=77",
"setuptools-scm[toml]>=6.2",
]

[project]
Expand Down
40 changes: 26 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,26 +1,41 @@
[tox]
minversion = 4.9.0
envlist = py39, py310, py311, py312, py313, py314, pytest-min, docs, pyright
minversion = 4.28.0
envlist = build, py39, py310, py311, py312, py313, py314, pytest-min, docs, pyright
isolated_build = true
passenv =
CI

[pkgenv]
constraints = constraints.txt

[testenv]
package = external
extras = testing
install_command = python -m pip install \
--requirement dependencies/default/requirements.txt \
--constraint dependencies/default/constraints.txt \
{opts} {packages}
constraints = constraints.txt
commands = make test
allowlist_externals =
make

[testenv:.pkg_external]
deps = build
package_glob = {toxinidir}{/}dist{/}*.whl
commands =
python -c 'import shutil; shutil.rmtree("{toxinidir}{/}dist", ignore_errors=True)'
pyproject-build --outdir {toxinidir}{/}dist .

[testenv:build]
description = Check distribution files
deps =
check-wheel-contents
twine
commands =
check-wheel-contents {toxinidir}{/}dist
twine check {toxinidir}{/}dist{/}*

[testenv:pytest-min]
extras = testing
install_command = python -m pip install \
--requirement dependencies/pytest-min/requirements.txt \
--constraint dependencies/pytest-min/constraints.txt \
{opts} {packages}
constraints = dependencies/pytest-min/constraints.txt
deps = -r dependencies/pytest-min/requirements.txt
commands = make test
allowlist_externals =
make
Expand All @@ -29,9 +44,6 @@ allowlist_externals =
allowlist_externals =
git
extras = docs
deps =
--requirement dependencies/docs/requirements.txt
--constraint dependencies/docs/constraints.txt
change_dir = docs
description = Build The Docs with {basepython}
commands =
Expand Down Expand Up @@ -78,7 +90,7 @@ skip_install = true

[gh-actions]
python =
3.9: py39, pytest-min
3.9: py39, pytest-min, build
3.10: py310
3.11: py311
3.12: py312
Expand Down
Loading