Closed
Description
Description
Pydantic 1.10.15 aliases the pydantic
namespace as pydantic.v1
as a forward-compatibility feature. This seems to interact badly with several
Steps to reproduce
$ gh repo clone aws/serverless-application-model
$ cd serverless-application-model
$ python3 -m venv _e
$ . _e/bin/activate
(_e) $ pip install -e .[dev]
(_e) $ pip install pydantic==1.10.15
(_e) $ make test
Observed result
=========================================================================================== short test summary info ============================================================================================
FAILED tests/model/test_resource_validator.py::TestResourceValidatorFailure::test_connector_with_empty_properties - AttributeError: module 'pydantic.v1' has no attribute 'error_wrappers'
FAILED tests/model/test_resource_validator.py::TestResourceValidatorFailure::test_connector_with_invalid_permission - AttributeError: module 'pydantic.v1' has no attribute 'error_wrappers'
FAILED tests/model/test_resource_validator.py::TestResourceValidatorFailure::test_connector_with_invalid_permission_type - AttributeError: module 'pydantic.v1' has no attribute 'error_wrappers'
FAILED tests/model/test_resource_validator.py::TestResourceValidatorFailure::test_connector_without_source - AttributeError: module 'pydantic.v1' has no attribute 'error_wrappers'
FAILED tests/translator/test_translator.py::test_transform_invalid_document[error_graphqlapi] - AttributeError: module 'pydantic.v1' has no attribute 'error_wrappers'
============================================================================= 5 failed, 3967 passed, 5 rerun in 104.48s (0:01:44) =============================================================================
Expected result
(_e) $ pip install pydantic==1.10.14
(_e) $ make test
======================================================================================= 3972 passed in 103.63s (0:01:43) =======================================================================================
Additional environment details
- OS: Fedora 39
x86_64
- If using the SAM CLI,
sam --version
: N/A - AWS region: N/A