From 7779c9d97bf6c8bb3983ea6360c82bf2887bbf41 Mon Sep 17 00:00:00 2001 From: Miwory Date: Wed, 10 Dec 2025 13:13:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B8?= =?UTF-8?q?=20=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D1=86=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/latest.yaml | 65 ++++++++++++++++++++++++++++++++++++ pyproject.toml | 16 ++++++--- 2 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 .gitea/workflows/latest.yaml diff --git a/.gitea/workflows/latest.yaml b/.gitea/workflows/latest.yaml new file mode 100644 index 0000000..d510077 --- /dev/null +++ b/.gitea/workflows/latest.yaml @@ -0,0 +1,65 @@ +name: Build And Push +run-name: ${{ github.actor }} builds and pushes production-ready image +on: + push: + branches: + - latest + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Cache uv binary + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/uv + key: uv-${{ runner.os }} + restore-keys: uv-${{ runner.os }} + + - name: Cache uv dependencies + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.cache/uv + key: uv-${{ runner.os }} + restore-keys: uv-${{ runner.os }} + + - name: Cache pre-commit + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: pre-commit-cache-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: pre-commit-cache-${{ runner.os }}- + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.7.8" + enable-cache: true + cache-local-path: ${{ github.workspace }}/.cache/uv + tool-dir: ${{ github.workspace }}/.cache/uv + tool-bin-dir: ${{ github.workspace }}/.cache/uv + cache-dependency-glob: "" + + - name: Set up Python + run: uv python install + + - name: Install the project + run: uv sync --no-install-project --cache-dir ${{ github.workspace }}/.cache/uv + + - name: Linter & Formatter + run: uv run pre-commit run --all-files + + - name: Build Package + run: uv build --cache-dir ${{ github.workspace }}/.cache/uv + + - name: Publish to Gitea PyPI + run: | + uv publish \ + --index aiohttpx \ + --username ${{ secrets.CI_USERNAME }} \ + --token ${{ secrets.CI_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index e488a11..cbffdb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aiohttpx" -version = "1.2.2" +version = "1.3.0" description = "Custom HTTPX client with aiohttp transport, rate limiter and caching" readme = "README.md" authors = [ @@ -8,10 +8,10 @@ authors = [ ] requires-python = ">=3.13" dependencies = [ - "aiohttp==3.13.1", - "httpx==0.28.1", - "orjson==3.11.4", - "redis[hiredis]==7.0.0", + "aiohttp[speedups]>=3.13,<=3.14", + "httpx>=0.28,<=0.29", + "orjson>=3.11,<=3.12", + "redis[hiredis]>=7.0,<=7.1", ] [project.optional-dependencies] @@ -23,6 +23,12 @@ dev = [ "types-redis==4.6.0.20241004", ] +[[tool.uv.index]] +name = "aiohttpx" +url = "https://git.miwory.dev/api/packages/Miwory/pypi/simple" +publish-url = "https://git.miwory.dev/api/packages/Miwory/pypi/legacy" +explicit = true + [tool.poe.tasks] _git = "git add ." _lint = "pre-commit run --all-files"