aws / serverless-application-model

The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
https://aws.amazon.com/serverless/sam
Apache License 2.0
9.29k stars 2.37k forks source link

fix: exclude breaking pydantic version #3620

Closed aaythapa closed 1 week ago

aaythapa commented 1 week ago

Issue #, if available

3617

Description of changes

Pydantic versions 1.10.15 and 1.10.17 introduced breaking changes. Exclude those versions from being installed.

Description of how you validated changes

Ran make init with pydantic>=1.8,!=1.10.15,!=1.10.17,<2 (to insure pydantic V1 got installed). pydantic 1.10.16 was installed

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.

xazhao commented 1 week ago

Should we pin the version as 1.10.16 or < 1.10.15? If they release a new version without fixing it, we will have to change it again.

aaythapa commented 1 week ago

Should we pin the version as 1.10.16 or < 1.10.15? If they release a new version without fixing it, we will have to change it again.

If we pin a version now then we'd have to unpin eventually no? This way if the next version fixes it then we don't have to make another change. Imo if they release another version without fixing this issue then we can pin a version 😅

xazhao commented 1 week ago

Yeah if we pin a version now we will need to unpin eventually. There will be a little additional work but it's safer to make sure we don't use the bad version in the future (we can test the version before unpinning). Not a merge blocker though.