diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e28c7fa..c25a169d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [32.0.0] - 2026-04-27 +- Bumped minimum pydantic version to 2.13 +- Fixed Parameter import to use openapi-pydantic v3.0 consistently + ## [31.0.2] - 2025-08-28 - Winter openapi order_by query parameter will be a single key with values separated by commas - diff --git a/pyproject.toml b/pyproject.toml index ace93c2a..8c1687fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "winter" -version = "31.0.2" +version = "32.0.0" homepage = "https://github.com/WinterFramework/winter" description = "Web Framework with focus on python typing, dataclasses and modular design" authors = ["Alexander Egorov "] @@ -37,7 +37,7 @@ SQLAlchemy = ">=1.4, <2" typing-extensions = "^4.8" StrEnum = "^0.4.8" openapi-pydantic = ">=0.5.0, <0.6" -pydantic = ">=1.10, <2" +pydantic = ">=2.13, <3" openapi-spec-validator = ">=0.5.7, <1" uritemplate = "==4.2.0" # Lib doesn't follow semantic versioning httpx = ">=0.24.1, <0.28" @@ -50,7 +50,7 @@ flake8-formatter-abspath = ">=1.0.1, <2" pre-commit-hooks = ">=2.2.3, <3" freezegun = ">=1.5.1, <2" mock = ">=2.0.0, <3" -pytest = ">=6.2.5, <7" +pytest = ">=7.0, <9" pytest-pythonpath = ">=0.7.1" pytest-cov = "^6.0.0" pytest-django = ">=3.2.0, <4" diff --git a/tests/winter_openapi/inspectors/test_route_parameter_inspector.py b/tests/winter_openapi/inspectors/test_route_parameter_inspector.py index 46ff894d..bb706686 100644 --- a/tests/winter_openapi/inspectors/test_route_parameter_inspector.py +++ b/tests/winter_openapi/inspectors/test_route_parameter_inspector.py @@ -2,9 +2,13 @@ from winter_openapi import PathParametersInspector from winter_openapi import register_route_parameters_inspector +from winter_openapi.inspectors.route_parameters_inspector import _route_parameters_inspectors def test_add_same_inspector_write_warning_log(caplog): + initial_count = len(_route_parameters_inspectors) with caplog.at_level(logging.WARNING): register_route_parameters_inspector(PathParametersInspector()) assert 'PathParametersInspector already registered' in caplog.text + # Clean up the duplicate inspector added by this test + del _route_parameters_inspectors[initial_count:] diff --git a/winter_openapi/inspectors/query_parameters_inspector.py b/winter_openapi/inspectors/query_parameters_inspector.py index cf29b47c..c8209a40 100644 --- a/winter_openapi/inspectors/query_parameters_inspector.py +++ b/winter_openapi/inspectors/query_parameters_inspector.py @@ -3,7 +3,7 @@ from typing import TYPE_CHECKING from typing import Tuple -from openapi_pydantic import Parameter +from openapi_pydantic.v3.v3_0 import Parameter from winter.core import ComponentMethodArgument from winter.web.query_parameters import QueryParameter diff --git a/winter_openapi/inspectors/route_parameters_inspector.py b/winter_openapi/inspectors/route_parameters_inspector.py index 64015888..a1dfe709 100644 --- a/winter_openapi/inspectors/route_parameters_inspector.py +++ b/winter_openapi/inspectors/route_parameters_inspector.py @@ -3,7 +3,7 @@ from typing import List from typing import TYPE_CHECKING -from openapi_pydantic import Parameter +from openapi_pydantic.v3.v3_0 import Parameter from winter.web.routing import Route