From 4206267e1f8face04c661d907aef83e3212700a5 Mon Sep 17 00:00:00 2001 From: Eero af Heurlin Date: Sat, 22 Aug 2026 11:39:50 +0300 Subject: [PATCH 1/3] feat: cache mTLS context creation results --- src/libpvarki/mtlshelp/context.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libpvarki/mtlshelp/context.py b/src/libpvarki/mtlshelp/context.py index 839eabd..cc7b677 100644 --- a/src/libpvarki/mtlshelp/context.py +++ b/src/libpvarki/mtlshelp/context.py @@ -4,6 +4,7 @@ import ssl from pathlib import Path import logging +import functools from starlette.config import Config @@ -14,6 +15,7 @@ # https://github.com/miguelgrinberg/python-socketio/discussions/1040 was very helpful +@functools.cache def get_ca_context( purpose: ssl.Purpose, extra_ca_certs_path: Optional[Path] = None, @@ -32,6 +34,7 @@ def get_ca_context( return ssl_ctx +@functools.cache def get_ssl_context( purpose: ssl.Purpose, client_cert_paths: Optional[Tuple[Path, Path]] = None, From 74a486abf1d2d050e88d9be1f5cca032648dcb1b Mon Sep 17 00:00:00 2001 From: Eero af Heurlin Date: Sat, 22 Aug 2026 11:41:09 +0300 Subject: [PATCH 2/3] chore: bump version --- .bumpversion.cfg | 2 +- pyproject.toml | 2 +- src/libpvarki/__init__.py | 2 +- tests/test_libpvarki.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 72e4727..2057a0f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.2.2 +current_version = 2.2.3 commit = False tag = False diff --git a/pyproject.toml b/pyproject.toml index 100988d..824be4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "libpvarki" -version = "2.2.2" +version = "2.2.3" description = "Common helpers like standard logging init" authors = ["Eero af Heurlin "] homepage = "https://github.com/pvarki/python-libpvarki/" diff --git a/src/libpvarki/__init__.py b/src/libpvarki/__init__.py index 703bf37..77f5c97 100644 --- a/src/libpvarki/__init__.py +++ b/src/libpvarki/__init__.py @@ -1,3 +1,3 @@ """Common helpers like standard logging init""" -__version__ = "2.2.2" # NOTE Use `bump2version --config-file patch` to bump versions correctly +__version__ = "2.2.3" # NOTE Use `bump2version --config-file patch` to bump versions correctly diff --git a/tests/test_libpvarki.py b/tests/test_libpvarki.py index 3994530..47f0cd8 100644 --- a/tests/test_libpvarki.py +++ b/tests/test_libpvarki.py @@ -5,4 +5,4 @@ def test_version() -> None: """Make sure version matches expected""" - assert __version__ == "2.2.2" + assert __version__ == "2.2.3" From 8a2d7de25be057961b3dffd725c7dc360225aec4 Mon Sep 17 00:00:00 2001 From: Eero af Heurlin Date: Sat, 22 Aug 2026 11:44:48 +0300 Subject: [PATCH 3/3] chore: run light jobs on community runners fix: do less useless work on merge to main --- .github/workflows/build.yml | 8 +++----- .github/workflows/release.yml | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e30e33..e56824e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,10 @@ on: workflow_dispatch: # Allow manual triggering pull_request: - push: - branches: - - main jobs: versiontag: - runs-on: arc-runner-set + runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' steps: - uses: actions/checkout@v5 @@ -19,7 +16,8 @@ jobs: diff /tmp/main_version.txt /tmp/version.txt && exit 1 || exit 0 lint: - runs-on: arc-runner-set + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' steps: - uses: actions/checkout@v5 - uses: actions/setup-python@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d04c749..e2b932b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: tag_release: - runs-on: arc-runner-set + runs-on: ubuntu-latest permissions: contents: write steps: @@ -17,7 +17,7 @@ jobs: - name: Install dependencies run: | python3 -m pip install --upgrade pip - pip install poetry + python3 -m pip install poetry - name: Parse tag to ENV run: | echo RELEASE_TAG=$(poetry version --short) >> ${GITHUB_ENV} @@ -30,7 +30,7 @@ jobs: tag_exists_error: false publish: - runs-on: arc-runner-set + runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Set up Python 3.11