From ac21b58cd6490d614a89c8f172acdaab32091249 Mon Sep 17 00:00:00 2001 From: Brunno Vanelli Date: Mon, 16 Mar 2026 12:37:53 -0300 Subject: [PATCH 1/3] chore: Upgrade Python to 3.14. --- .github/workflows/publish.yaml | 14 +++++--------- .github/workflows/test.yaml | 26 ++++++++------------------ .github/workflows/try-build.yaml | 12 ++++++------ pyproject.toml | 13 ++++++++++--- requirements-dev.txt | 3 --- requirements.txt | 5 ----- 6 files changed, 29 insertions(+), 44 deletions(-) delete mode 100644 requirements-dev.txt delete mode 100644 requirements.txt diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 281a27c..fbd158f 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -14,16 +14,12 @@ jobs: permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - # taken from https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: - python-version: "3.11" - - name: Install pypa/build - run: python3 -m pip install build --user + python-version: "3.14" - name: Build a binary wheel and a source tarball - run: python3 -m build --sdist --wheel --outdir dist/ . - # retrieve your distributions here + run: uv build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 74e74cc..8357977 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,29 +10,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi + run: uv sync --extra dev - name: Lint with ruff run: | - # stop the build if there are Python syntax errors or undefined names - ruff check --select=E9,F63,F7,F82 --target-version=py39 . - # default set of ruff rules with GitHub Annotations - ruff check --target-version=py39 . + uv run ruff check --select=E9,F63,F7,F82 . + uv run ruff check . - name: Test with pytest - run: | - pytest - # - name: Upload coverage reports to Codecov - # uses: codecov/codecov-action@v4 - # with: - # token: ${{ secrets.CODECOV_TOKEN }} + run: uv run pytest diff --git a/.github/workflows/try-build.yaml b/.github/workflows/try-build.yaml index 062f10c..f5246b5 100644 --- a/.github/workflows/try-build.yaml +++ b/.github/workflows/try-build.yaml @@ -7,12 +7,12 @@ jobs: name: Tries to build the package and import it runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: - python-version: "3.11" + python-version: "3.14" - name: Install locally - run: python3 -m pip install . + run: uv pip install . - name: Test library import - run: cd / && python3 -c "from crpy import RegistryInfo" + run: cd / && uv run python -c "from crpy import RegistryInfo" diff --git a/pyproject.toml b/pyproject.toml index 9884a14..6469177 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,13 +9,19 @@ readme = "README.md" authors = [ { name = "Brunno Vanelli", email = "brunnovanelli@gmail.com" } ] -requires-python = ">=3.9.0" +requires-python = ">=3.10.0" dependencies = [ - "async-lru>=2", + "async-lru==2.1.0", "aiohttp>=3", - "async-lru>=2", "rich>=13.5", ] + +[project.optional-dependencies] +dev = [ + "pytest>=8", + "pytest-asyncio>=1", + "ruff>=0.12", +] classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -24,6 +30,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] keywords = ["docker", "oci", "container-registry", "api"] dynamic = ["version"] diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 66c9786..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest-asyncio>=1 -ruff>=0.12 -pytest>=8 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8d15c24..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -requests>=2 -async-lru>=2 -aiohttp>=3 -async-lru>=2 -rich>=13.5 From 6ed5f23d3e1515b093552b1806d4baa23f513ddd Mon Sep 17 00:00:00 2001 From: Brunno Vanelli Date: Mon, 16 Mar 2026 12:44:31 -0300 Subject: [PATCH 2/3] chore: Fix pyproject and workflows. --- .github/workflows/pre-commit.yaml | 6 +++--- .github/workflows/publish.yaml | 4 ++-- .github/workflows/test.yaml | 6 +++--- pyproject.toml | 18 +++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index c2f7e71..b1bd31e 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -9,6 +9,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.0 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + - uses: pre-commit/action@v3 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index fbd158f..6ad01b9 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -14,9 +14,9 @@ jobs: permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v7 with: python-version: "3.14" - name: Build a binary wheel and a source tarball diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8357977..70fed23 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,13 +13,13 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: uv sync --extra dev + run: uv sync --dev - name: Lint with ruff run: | uv run ruff check --select=E9,F63,F7,F82 . diff --git a/pyproject.toml b/pyproject.toml index 6469177..8220add 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,13 +15,8 @@ dependencies = [ "aiohttp>=3", "rich>=13.5", ] - -[project.optional-dependencies] -dev = [ - "pytest>=8", - "pytest-asyncio>=1", - "ruff>=0.12", -] +keywords = ["docker", "oci", "container-registry", "api"] +dynamic = ["version"] classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -32,8 +27,13 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", ] -keywords = ["docker", "oci", "container-registry", "api"] -dynamic = ["version"] + +[dependency-groups] +dev = [ + "pytest>=8", + "pytest-asyncio>=1", + "ruff>=0.12", +] [project.urls] Homepage = "https://github.com/bvanelli/crpy" From ba888fbaca29e1e38cd27829afde340501b3cf2e Mon Sep 17 00:00:00 2001 From: Brunno Vanelli Date: Mon, 16 Mar 2026 12:47:25 -0300 Subject: [PATCH 3/3] ci: Fix pre-commit versioning. --- .github/workflows/pre-commit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index b1bd31e..a9c2e93 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -11,4 +11,4 @@ jobs: steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 - - uses: pre-commit/action@v3 + - uses: pre-commit/action@v3.0.1