Unverified Commit fa3fde27 authored by isabel's avatar isabel Committed by GitHub
Browse files

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

parents ee868845 74d3202f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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
  ];