diff --git a/clabe/errors.py b/clabe/errors.py index 6ecd610..c16fc24 100644 --- a/clabe/errors.py +++ b/clabe/errors.py @@ -1,4 +1,4 @@ -from pydantic.errors import PydanticValueError +from pydantic.v1.errors import PydanticValueError class BankCodeValidationError(PydanticValueError): diff --git a/clabe/types.py b/clabe/types.py index 08d6052..4e5dd3f 100644 --- a/clabe/types.py +++ b/clabe/types.py @@ -1,7 +1,7 @@ from typing import TYPE_CHECKING, ClassVar -from pydantic.errors import NotDigitError -from pydantic.validators import ( +from pydantic.v1.errors import NotDigitError +from pydantic.v1.validators import ( constr_length_validator, constr_strip_whitespace, str_validator, @@ -11,7 +11,7 @@ from .validations import BANK_NAMES, BANKS, compute_control_digit if TYPE_CHECKING: - from pydantic.typing import CallableGenerator + from pydantic.v1.typing import CallableGenerator def validate_digits(v: str) -> str: diff --git a/clabe/version.py b/clabe/version.py index d2309e3..19b4f1d 100644 --- a/clabe/version.py +++ b/clabe/version.py @@ -1 +1 @@ -__version__ = '1.2.17' +__version__ = '1.3.0' diff --git a/requirements.txt b/requirements.txt index 62c77cd..d8c492f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -pydantic==1.9.0 +pydantic==1.10.19 diff --git a/setup.py b/setup.py index 80d79db..d6adc9d 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ packages=setuptools.find_packages(), include_package_data=True, package_data=dict(clabe=['py.typed']), - install_requires=['pydantic>=1.4,<2.0'], + install_requires=['pydantic>=1.10.17'], classifiers=[ 'Programming Language :: Python :: 3', 'License :: OSI Approved :: MIT License', diff --git a/tests/test_types.py b/tests/test_types.py index 543ea23..0723e24 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -1,6 +1,6 @@ import pytest -from pydantic import BaseModel -from pydantic.errors import NotDigitError +from pydantic.v1 import BaseModel +from pydantic.v1.errors import NotDigitError from clabe import BANK_NAMES, BANKS, compute_control_digit from clabe.errors import (