From 40c242a37e4925d5e58d79f90e62442a3f1e884d Mon Sep 17 00:00:00 2001 From: Dmytro Kosse Date: Wed, 14 Jan 2026 12:36:25 +0000 Subject: [PATCH 1/6] feat(DEVC-2097): upgrade urllib3 + fix `MAX_RETRY_COUNT` --- CHANGELOG.md | 7 +++++++ docs/antora-playbook.yml | 2 +- docs/antora.yml | 2 +- pyproject.toml | 4 ++-- src/corva/configuration.py | 30 ++++++++++++++++++++++++++++-- src/version.py | 2 +- 6 files changed, 40 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b8478a7..d0b286f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.0.4] - 2026-01-14 +### Security +- Upgraded internal dependency `urllib3` to version `urllib3 >= 2.6.3, <3.0.0` since `2.5.0` has [these](https://security.snyk.io/package/pip/urllib3/2.5.0) vulnerabilities +### Fixed +- Fixed issue with `MAX_RETRY_COUNT` + + ## [2.0.3] - 2025-12-08 ### Fixed - Fix some deprecation warnings raised by Pydantic V2 diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml index 88fcfc86..b52e372f 100644 --- a/docs/antora-playbook.yml +++ b/docs/antora-playbook.yml @@ -7,7 +7,7 @@ content: start_path: docs branches: [] # branches: HEAD # Use this for local development - tags: [v2.0.3] + tags: [v2.0.4] asciidoc: attributes: page-toclevels: 5 diff --git a/docs/antora.yml b/docs/antora.yml index da9cec15..9eca2189 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,3 +1,3 @@ name: corva-sdk -version: ~ +version: 2.0.4 nav: [modules/ROOT/nav.adoc] diff --git a/pyproject.toml b/pyproject.toml index bed1b888..e07198e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "corva-sdk" description = "SDK for building Corva DevCenter Python apps." readme = "README.md" -version = "2.0.3" +version = "2.0.4" license = { text = "The Unlicense" } authors = [ { name = "Jordan Ambra", email = "jordan.ambra@corva.ai" } @@ -19,7 +19,7 @@ dependencies = [ "pydantic-settings >= 2.0, <3.0", "redis == 6.4.0", "requests >= 2.32.3, <3.0.0", - "urllib3 == 2.5.0", + "urllib3 >= 2.6.3, <3.0.0", "semver == 3.0.4" ] classifiers = [ diff --git a/src/corva/configuration.py b/src/corva/configuration.py index 6d9e11a3..6339da8d 100644 --- a/src/corva/configuration.py +++ b/src/corva/configuration.py @@ -1,16 +1,42 @@ import datetime import pydantic_settings -from pydantic import AnyHttpUrl, BeforeValidator, TypeAdapter +from pydantic import AnyHttpUrl, BeforeValidator, TypeAdapter, field_validator from typing_extensions import Annotated +from .logger import CORVA_LOGGER + def validate_http_url_to_str(v: str) -> str: TypeAdapter(AnyHttpUrl).validate_python(v) return v +def _parse_max_retry_count(value) -> int: + if value is None or value == "": + return DEFAULT_MAX_RETRY_COUNT + try: + if isinstance(value, bool): + raise TypeError + if isinstance(value, int): + return value + if isinstance(value, str): + return int(value.strip()) + except (TypeError, ValueError): + pass + + CORVA_LOGGER.warning( + "Invalid MAX_RETRY_COUNT value %r; using default %d.", + value, + DEFAULT_MAX_RETRY_COUNT, + ) + return DEFAULT_MAX_RETRY_COUNT + + HttpUrlStr = Annotated[str, BeforeValidator(validate_http_url_to_str)] +MaxRetryValidator = Annotated[int, BeforeValidator(lambda v: _parse_max_retry_count(v))] + +DEFAULT_MAX_RETRY_COUNT = 3 class Settings(pydantic_settings.BaseSettings): @@ -40,7 +66,7 @@ class Settings(pydantic_settings.BaseSettings): POOL_BLOCK: bool = True # Wait until connection released # retry - MAX_RETRY_COUNT: int = 3 # If `0` then retries will be disabled + MAX_RETRY_COUNT: MaxRetryValidator = DEFAULT_MAX_RETRY_COUNT # If `0` then retries will be disabled BACKOFF_FACTOR: float = 1.0 # OTEL diff --git a/src/version.py b/src/version.py index c129f683..215732a1 100644 --- a/src/version.py +++ b/src/version.py @@ -1 +1 @@ -VERSION = "2.0.3" +VERSION = "2.0.4" From f1e04522c4d732c1853069a95080159b04b9f48c Mon Sep 17 00:00:00 2001 From: Dmytro Kosse Date: Wed, 14 Jan 2026 12:40:51 +0000 Subject: [PATCH 2/6] feat(DEVC-2097): fix linter --- src/corva/configuration.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corva/configuration.py b/src/corva/configuration.py index 6339da8d..22e702f5 100644 --- a/src/corva/configuration.py +++ b/src/corva/configuration.py @@ -1,11 +1,9 @@ import datetime import pydantic_settings -from pydantic import AnyHttpUrl, BeforeValidator, TypeAdapter, field_validator +from pydantic import AnyHttpUrl, BeforeValidator, TypeAdapter from typing_extensions import Annotated -from .logger import CORVA_LOGGER - def validate_http_url_to_str(v: str) -> str: TypeAdapter(AnyHttpUrl).validate_python(v) @@ -13,6 +11,8 @@ def validate_http_url_to_str(v: str) -> str: def _parse_max_retry_count(value) -> int: + from .logger import CORVA_LOGGER + if value is None or value == "": return DEFAULT_MAX_RETRY_COUNT try: @@ -65,8 +65,8 @@ class Settings(pydantic_settings.BaseSettings): POOL_MAX_SIZE: int = 20 # Max connections count per pool/host POOL_BLOCK: bool = True # Wait until connection released - # retry - MAX_RETRY_COUNT: MaxRetryValidator = DEFAULT_MAX_RETRY_COUNT # If `0` then retries will be disabled + # retry. If `0` then retries will be disabled + MAX_RETRY_COUNT: MaxRetryValidator = DEFAULT_MAX_RETRY_COUNT BACKOFF_FACTOR: float = 1.0 # OTEL From 0d98cf3ff9281e9bd8c3d1fd4fee00904db8a26f Mon Sep 17 00:00:00 2001 From: Dmytro Kosse Date: Wed, 14 Jan 2026 12:44:23 +0000 Subject: [PATCH 3/6] feat(DEVC-2097): fix logger --- src/corva/configuration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/corva/configuration.py b/src/corva/configuration.py index 22e702f5..c4eb8c9c 100644 --- a/src/corva/configuration.py +++ b/src/corva/configuration.py @@ -1,9 +1,12 @@ import datetime +import logging import pydantic_settings from pydantic import AnyHttpUrl, BeforeValidator, TypeAdapter from typing_extensions import Annotated +logger = logging.getLogger("corva") + def validate_http_url_to_str(v: str) -> str: TypeAdapter(AnyHttpUrl).validate_python(v) @@ -11,7 +14,6 @@ def validate_http_url_to_str(v: str) -> str: def _parse_max_retry_count(value) -> int: - from .logger import CORVA_LOGGER if value is None or value == "": return DEFAULT_MAX_RETRY_COUNT @@ -25,7 +27,7 @@ def _parse_max_retry_count(value) -> int: except (TypeError, ValueError): pass - CORVA_LOGGER.warning( + logger.warning( "Invalid MAX_RETRY_COUNT value %r; using default %d.", value, DEFAULT_MAX_RETRY_COUNT, From 54ca803b3920250ae623c64e4222d73750e919f5 Mon Sep 17 00:00:00 2001 From: Dmytro Kosse Date: Thu, 15 Jan 2026 10:32:11 +0000 Subject: [PATCH 4/6] feat(DEVC-2097): upgrade redis dependency --- CHANGELOG.md | 6 ++++++ docs/antora-playbook.yml | 2 +- docs/antora.yml | 2 +- pyproject.toml | 6 +++--- src/version.py | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0b286f0..9eaf17fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.1.0] - 2026-01-15 +### Dependency +- Upgraded internal dependency `redis` to version `redis >=7.1.0, <8.0.0` +- Bumped a supported SDK runtime version to minimum `3.10` since new redis lib drops support for `3.9` + + ## [2.0.4] - 2026-01-14 ### Security - Upgraded internal dependency `urllib3` to version `urllib3 >= 2.6.3, <3.0.0` since `2.5.0` has [these](https://security.snyk.io/package/pip/urllib3/2.5.0) vulnerabilities diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml index b52e372f..f4c95352 100644 --- a/docs/antora-playbook.yml +++ b/docs/antora-playbook.yml @@ -7,7 +7,7 @@ content: start_path: docs branches: [] # branches: HEAD # Use this for local development - tags: [v2.0.4] + tags: [v2.1.0] asciidoc: attributes: page-toclevels: 5 diff --git a/docs/antora.yml b/docs/antora.yml index 9eca2189..29f1b0f3 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,3 +1,3 @@ name: corva-sdk -version: 2.0.4 +version: 2.1.0 nav: [modules/ROOT/nav.adoc] diff --git a/pyproject.toml b/pyproject.toml index e07198e7..81d4fca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,18 +6,18 @@ build-backend = "setuptools.build_meta" name = "corva-sdk" description = "SDK for building Corva DevCenter Python apps." readme = "README.md" -version = "2.0.4" +version = "2.1.0" license = { text = "The Unlicense" } authors = [ { name = "Jordan Ambra", email = "jordan.ambra@corva.ai" } ] keywords = ["corva", "sdk"] -requires-python = ">=3.9,<4.0" +requires-python = ">=3.10,<4.0" dependencies = [ "fakeredis >= 2.30.0, <2.32.0", "pydantic >= 2.0, <3.0", "pydantic-settings >= 2.0, <3.0", - "redis == 6.4.0", + "redis >=7.1.0, <8.0.0", "requests >= 2.32.3, <3.0.0", "urllib3 >= 2.6.3, <3.0.0", "semver == 3.0.4" diff --git a/src/version.py b/src/version.py index 215732a1..127c148a 100644 --- a/src/version.py +++ b/src/version.py @@ -1 +1 @@ -VERSION = "2.0.4" +VERSION = "2.1.0" From 4bd8dda1195e3ddfb18b4356306f49ffa40ffa5f Mon Sep 17 00:00:00 2001 From: Dmytro Kosse Date: Thu, 15 Jan 2026 10:36:22 +0000 Subject: [PATCH 5/6] feat(DEVC-2097): bump min runtime version on CI side --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 28009144..facd3ed4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: CI on: push env: - PYTHON_VERSIONS: '[ "3.9", "3.10", "3.11", "3.12", "3.13.3" ]' + PYTHON_VERSIONS: '[ "3.10", "3.11", "3.12", "3.13.3" ]' jobs: @@ -25,10 +25,10 @@ jobs: python-version: ${{ fromJSON(needs.set-python-matrix.outputs.python_versions) }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -48,10 +48,10 @@ jobs: python-version: ${{ fromJSON(needs.set-python-matrix.outputs.python_versions) }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -103,11 +103,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v6 with: - python-version: 3.9 + python-version: 3.10 - name: Install dependencies run: pip install -U setuptools wheel build @@ -131,7 +131,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Build run: make docs From 3c4c6238701576418ad9af94f38e27d59d87e628 Mon Sep 17 00:00:00 2001 From: Dmytro Kosse Date: Thu, 15 Jan 2026 13:31:48 +0000 Subject: [PATCH 6/6] feat(DEVC-2097): tiny CI fix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index facd3ed4..8b55e9af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -107,7 +107,7 @@ jobs: - uses: actions/setup-python@v6 with: - python-version: 3.10 + python-version: '3.10' - name: Install dependencies run: pip install -U setuptools wheel build