forked from pool/python-pydantic
- Add patch remove-pkg_resources.patch:
* Use packaging, not pkg_resources for versions. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=24
This commit is contained in:
parent
a8bc96b8c7
commit
bf67906633
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 19 09:20:43 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch remove-pkg_resources.patch:
|
||||||
|
* Use packaging, not pkg_resources for versions.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jun 18 13:37:28 UTC 2022 - Michael Ströder <michael@stroeder.com>
|
Sat Jun 18 13:37:28 UTC 2022 - Michael Ströder <michael@stroeder.com>
|
||||||
|
|
||||||
|
@ -26,7 +26,9 @@ Summary: Data validation and settings management using python type hintin
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/samuelcolvin/pydantic
|
URL: https://github.com/samuelcolvin/pydantic
|
||||||
Source: https://github.com/samuelcolvin/pydantic/archive/v%{version}.tar.gz#/pydantic-%{version}.tar.gz
|
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 email_validator >= 1.0.3}
|
||||||
|
BuildRequires: %{python_module packaging}
|
||||||
BuildRequires: %{python_module pytest-mock}
|
BuildRequires: %{python_module pytest-mock}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module python-dotenv >= 0.10.4}
|
BuildRequires: %{python_module python-dotenv >= 0.10.4}
|
||||||
|
22
remove-pkg_resources.patch
Normal file
22
remove-pkg_resources.patch
Normal file
@ -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():
|
Loading…
x
Reference in New Issue
Block a user