From c5ecd702b04417fa3d862806d608ea627b2e8ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Mon, 3 Feb 2025 20:37:45 +0100 Subject: [PATCH 1/2] fix: Deactivate Pydantic logic if v1 is installed instead of v2 Issue-240: https://github.com/mkdocstrings/python/issues/240 --- src/mkdocstrings_handlers/python/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mkdocstrings_handlers/python/config.py b/src/mkdocstrings_handlers/python/config.py index 07f34397..5e444d27 100644 --- a/src/mkdocstrings_handlers/python/config.py +++ b/src/mkdocstrings_handlers/python/config.py @@ -25,6 +25,11 @@ # "yaml.schemas": { # "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml" # } + import pydantic + + if getattr(pydantic, "__version__", "1.").startswith("1."): + raise ImportError # noqa: TRY301 + from inspect import cleandoc from pydantic import Field as BaseField From 40067f79f53d5918619580fd07866463a55f56d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Mon, 3 Feb 2025 20:38:03 +0100 Subject: [PATCH 2/2] chore: Prepare release 1.14.2 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac0458eb..d31fb5ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.14.2](https://github.com/mkdocstrings/python/releases/tag/1.14.2) - 2025-02-03 + +[Compare with 1.14.1](https://github.com/mkdocstrings/python/compare/1.14.1...1.14.2) + +### Bug Fixes + +- Deactivate Pydantic logic if v1 is installed instead of v2 ([c5ecd70](https://github.com/mkdocstrings/python/commit/c5ecd702b04417fa3d862806d608ea627b2e8ed9) by Timothée Mazzucotelli). [Issue-240](https://github.com/mkdocstrings/python/issues/240) + ## [1.14.1](https://github.com/mkdocstrings/python/releases/tag/1.14.1) - 2025-02-03 [Compare with 1.14.0](https://github.com/mkdocstrings/python/compare/1.14.0...1.14.1)