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

chore: add support for pydantic 2.x #3282

Merged
merged 6 commits into from
Aug 9, 2023
Merged

chore: add support for pydantic 2.x #3282

merged 6 commits into from
Aug 9, 2023

Conversation

yan12125
Copy link
Contributor

@yan12125 yan12125 commented Aug 1, 2023

Issue #, if available

This PR supersedes #3249

Description of changes

This change brings pydantic 2.x support without breaking 1.x support by utilizing the compatibility package pydantic.v1

Description of how you validated changes

Run the test suite with both pydantic 1.10.9 and 2.0.2, and both are green

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.

@yan12125 yan12125 requested a review from a team as a code owner August 1, 2023 14:52
@yan12125
Copy link
Contributor Author

yan12125 commented Aug 1, 2023

The second commit introduces a # type: ignore commit to work-around a mypy issue. It violates development guidelines but cannot figure out a better way.

requirements/base.txt Outdated Show resolved Hide resolved
samtranslator/compat.py Show resolved Hide resolved
requirements/base.txt Outdated Show resolved Hide resolved
ssenchenko and others added 3 commits August 4, 2023 14:28
@ssenchenko ssenchenko merged commit e41b0f0 into aws:develop Aug 9, 2023
8 checks passed
@yan12125 yan12125 deleted the pydantic2 branch August 10, 2023 01:41
@yan12125
Copy link
Contributor Author

Thank you for reviewing. I noticed this commit is not included in 1.73.0. Is it forgotten?

@aaythapa
Copy link
Contributor

Hi @yan12125 this PR was merged yesterday, it needs to go through our release process which can take some time. Should be released within the coming week or 2.

@yan12125
Copy link
Contributor Author

Got it, thanks!

potiuk added a commit to potiuk/airflow that referenced this pull request Aug 18, 2023
We already fixed all deprecation warnings for Pydantic 2 and we can
thus remove Pydantic 2 limitation. Even if we are waiting for other
dependencies (aws-sam-translator) it should be save to remove the
limit - we will get Pydantic 2 when aws-sam-translate new version
is released in a week or two (Pydantic 2 support has been added
last week in
aws/serverless-application-model#3282)
jedcunningham pushed a commit to apache/airflow that referenced this pull request Aug 18, 2023
We already fixed all deprecation warnings for Pydantic 2 and we can
thus remove Pydantic 2 limitation. Even if we are waiting for other
dependencies (aws-sam-translator) it should be save to remove the
limit - we will get Pydantic 2 when aws-sam-translate new version
is released in a week or two (Pydantic 2 support has been added
last week in
aws/serverless-application-model#3282)
potiuk added a commit to apache/airflow that referenced this pull request Aug 25, 2023
We already fixed all deprecation warnings for Pydantic 2 and we can
thus remove Pydantic 2 limitation. Even if we are waiting for other
dependencies (aws-sam-translator) it should be save to remove the
limit - we will get Pydantic 2 when aws-sam-translate new version
is released in a week or two (Pydantic 2 support has been added
last week in
aws/serverless-application-model#3282)

(cherry picked from commit 754a4ab)
@mahyess
Copy link

mahyess commented Sep 1, 2023

Not released in v1.74.0 either. Anyone knows why?

@aaythapa
Copy link
Contributor

this was part of v1.75.0, sorry about the delay!

ahidalgob pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request May 15, 2024
We already fixed all deprecation warnings for Pydantic 2 and we can
thus remove Pydantic 2 limitation. Even if we are waiting for other
dependencies (aws-sam-translator) it should be save to remove the
limit - we will get Pydantic 2 when aws-sam-translate new version
is released in a week or two (Pydantic 2 support has been added
last week in
aws/serverless-application-model#3282)

(cherry picked from commit 754a4ab396e6e6002f79a716f93ed71712393687)

GitOrigin-RevId: 100f37d9a4cd18626effe491fab56957252e7b1d
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jul 18, 2024
We already fixed all deprecation warnings for Pydantic 2 and we can
thus remove Pydantic 2 limitation. Even if we are waiting for other
dependencies (aws-sam-translator) it should be save to remove the
limit - we will get Pydantic 2 when aws-sam-translate new version
is released in a week or two (Pydantic 2 support has been added
last week in
aws/serverless-application-model#3282)

GitOrigin-RevId: 754a4ab396e6e6002f79a716f93ed71712393687
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

6 participants