Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AttributeError: module 'pydantic.v1' has no attribute 'error_wrapper' #3611

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

shikha372
Copy link
Contributor

@shikha372 shikha372 commented Jun 10, 2024

Issue #3600

Description of changes

Added exception block to catch 'AttributeError' happening due to missing error_wrapper import in pydantic v1.10.15

This is a workaround till pydantic team solves the issue at their end:
Ticket to pydantic team pydantic/pydantic#9625

Description of how you validated changes

Tests ran successfully in python virtual env.

Commands used:

python3 -m venv .venv
source .venv/bin/activate
make init
make test
make pr

black /Users/shikagg/sam_clone/serverless-application-model/samtranslator/model/__init__.py  -> to fix error 
1 file would be reformatted, 364 files would be left unchanged.
make: *** [format-check] Error 1

Result

Required test coverage of 95% reached. Total coverage: 95.80%

3973 passed in 83.39s (0:01:23) 

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@shikha372 shikha372 marked this pull request as ready for review June 10, 2024 21:59
@shikha372 shikha372 requested a review from a team as a code owner June 10, 2024 21:59
samtranslator/model/__init__.py Outdated Show resolved Hide resolved
@shikha372 shikha372 enabled auto-merge (squash) June 13, 2024 20:17
@shikha372 shikha372 merged commit 2064306 into aws:develop Jun 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants