Skip to content

Several tests fail with Pydantic 1.10.17 (latest 1.x) #3617

Closed
@musicinmybrain

Description

@musicinmybrain

Description

After I reported #3600 about Pydantic 1.10.15, the release of Pydantic 1.10.16 fixed the problem – but then 1.10.17 broke it again.

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.17
(_e) $ make test

Interestingly, I can also reproduce this on the develop branch, which includes #3611 – using either pydantic==1.10.15 or pydantic==1.10.17 – so it doesn’t look like that PR works as intended.

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 99.69s (0:01:39) ==============================================================================

Expected result

(_e) $ pip install pydantic==1.10.16
(_e) $ make test
======================================================================================= 3972 passed in 103.12s (0:01:43) =======================================================================================

Additional environment details

  1. OS: Fedora 40 x86_64
  2. If using the SAM CLI, sam --version: N/A
  3. AWS region: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    stage/needs-triageAutomatically applied to new issues and PRs, indicating they haven't been looked at.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions