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/.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 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/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, 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"