python3Packages.formatron: fix usage with newest version of pydantic (#481101)

This commit is contained in:
isabel
2026-01-17 17:54:37 +00:00
committed by GitHub
@@ -24,6 +24,17 @@ buildPythonPackage rec {
fetchSubmodules = true;
};
postPatch = ''
# Fix pydantic compatibility
# https://github.com/Dan-wanna-M/formatron/issues/35
substituteInPlace src/formatron/schemas/dict_inference.py \
--replace-fail 'typing.Type' 'Type' \
--replace-fail 'typing.Any' 'Any'
substituteInPlace src/formatron/schemas/json_schema.py \
--replace-fail 'from pydantic import typing' 'import typing'
'';
build-system = [
setuptools
];