diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f5ddc3..8b8478a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.0.3] - 2025-12-08 +### Fixed +- Fix some deprecation warnings raised by Pydantic V2 + ## [2.0.2] - 2025-10-20 ### Fixed diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml index 636591eb..88fcfc86 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.2] + tags: [v2.0.3] asciidoc: attributes: page-toclevels: 5 diff --git a/docs/antora.yml b/docs/antora.yml index da9cec15..07d7a766 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,3 +1,3 @@ name: corva-sdk -version: ~ +version: 2.0.3 nav: [modules/ROOT/nav.adoc] diff --git a/pyproject.toml b/pyproject.toml index 073ed6d0..bed1b888 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.2" +version = "2.0.3" license = { text = "The Unlicense" } authors = [ { name = "Jordan Ambra", email = "jordan.ambra@corva.ai" } diff --git a/src/corva/handlers.py b/src/corva/handlers.py index 862eeb86..3e748af4 100644 --- a/src/corva/handlers.py +++ b/src/corva/handlers.py @@ -197,7 +197,7 @@ def wrapper( return app_event = event.metadata.log_type.event.model_validate( - event.copy(update={"records": records}, deep=True).model_dump() + event.model_copy(update={"records": records}, deep=True).model_dump() ) with LoggingContext( aws_request_id=aws_request_id, diff --git a/src/corva/models/stream/raw.py b/src/corva/models/stream/raw.py index 814c95f3..a88ba09c 100644 --- a/src/corva/models/stream/raw.py +++ b/src/corva/models/stream/raw.py @@ -82,9 +82,9 @@ class RawMetadata(CorvaBaseEvent): RecordsTime = Sequence[RawTimeRecord] RecordsDepth = Sequence[RawDepthRecord] else: - RecordsBase = Annotated[List[RawBaseRecord], Field(min_items=1)] - RecordsTime = Annotated[List[RawTimeRecord], Field(min_items=0)] - RecordsDepth = Annotated[List[RawDepthRecord], Field(min_items=1)] + RecordsBase = Annotated[List[RawBaseRecord], Field(min_length=1)] + RecordsTime = Annotated[List[RawTimeRecord], Field(min_length=0)] + RecordsDepth = Annotated[List[RawDepthRecord], Field(min_length=1)] class RawStreamEvent(CorvaBaseEvent, RawBaseEvent): diff --git a/src/corva/models/stream/stream.py b/src/corva/models/stream/stream.py index 78d368b0..3b8aeb4f 100644 --- a/src/corva/models/stream/stream.py +++ b/src/corva/models/stream/stream.py @@ -39,8 +39,8 @@ class StreamDepthRecord(CorvaBaseEvent): RecordsTime = Sequence[StreamTimeRecord] RecordsDepth = Sequence[StreamDepthRecord] else: - RecordsTime = Annotated[List[StreamTimeRecord], Field(min_items=1)] - RecordsDepth = Annotated[List[StreamDepthRecord], Field(min_items=1)] + RecordsTime = Annotated[List[StreamTimeRecord], Field(min_length=1)] + RecordsDepth = Annotated[List[StreamDepthRecord], Field(min_length=1)] class StreamEvent(CorvaBaseEvent): diff --git a/src/version.py b/src/version.py index 311aff26..c129f683 100644 --- a/src/version.py +++ b/src/version.py @@ -1 +1 @@ -VERSION = "2.0.2" +VERSION = "2.0.3" diff --git a/tests/unit/test_scheduled_app.py b/tests/unit/test_scheduled_app.py index d6af52b7..ea4b10b0 100644 --- a/tests/unit/test_scheduled_app.py +++ b/tests/unit/test_scheduled_app.py @@ -254,7 +254,7 @@ def test_set_schedule_start( def app(e, api, state): return e - event = event.copy(update={'schedule_start': value}) + event = event.model_copy(update={'schedule_start': value}) app_event = ( type(event) .model_validate(