diff --git a/python-pydantic.changes b/python-pydantic.changes index 37374b5..d1a2e9b 100644 --- a/python-pydantic.changes +++ b/python-pydantic.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 19 09:20:43 UTC 2022 - Steve Kowalik + +- Add patch remove-pkg_resources.patch: + * Use packaging, not pkg_resources for versions. + ------------------------------------------------------------------- Sat Jun 18 13:37:28 UTC 2022 - Michael Ströder diff --git a/python-pydantic.spec b/python-pydantic.spec index 2ad8a46..b414511 100644 --- a/python-pydantic.spec +++ b/python-pydantic.spec @@ -26,7 +26,9 @@ Summary: Data validation and settings management using python type hintin License: MIT URL: https://github.com/samuelcolvin/pydantic Source: https://github.com/samuelcolvin/pydantic/archive/v%{version}.tar.gz#/pydantic-%{version}.tar.gz +Patch0: remove-pkg_resources.patch BuildRequires: %{python_module email_validator >= 1.0.3} +BuildRequires: %{python_module packaging} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dotenv >= 0.10.4} diff --git a/remove-pkg_resources.patch b/remove-pkg_resources.patch new file mode 100644 index 0000000..27404c2 --- /dev/null +++ b/remove-pkg_resources.patch @@ -0,0 +1,22 @@ +Index: pydantic-1.9.1/tests/test_utils.py +=================================================================== +--- pydantic-1.9.1.orig/tests/test_utils.py ++++ pydantic-1.9.1/tests/test_utils.py +@@ -8,7 +8,7 @@ from copy import copy, deepcopy + from typing import Callable, Dict, List, NewType, Tuple, TypeVar, Union + + import pytest +-from pkg_resources import safe_version ++from packaging.version import Version + from typing_extensions import Annotated, Literal + + from pydantic import VERSION, BaseModel, ConstrainedList, conlist +@@ -379,7 +379,7 @@ def test_version_info(): + + + def test_standard_version(): +- assert safe_version(VERSION) == VERSION ++ assert str(Version(VERSION)) == VERSION + + + def test_class_attribute():