-
Notifications
You must be signed in to change notification settings - Fork 401
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
Bug: Can't install with pyndantic >2.0 (despite documentation saying otherwise) #3601
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hey @xaviernogueira! Thanks for opening this issue! The reason you can't install Pydantic 2+ is because you are using aws_lambda_powertools[all] and Pydantic v1 is the default version in Powertools. Pls update your requirements.txt to use aws_lambda_powertools[aws-xray-sdk, fastjsonschema] and then you can bring Pydanticv2. Pls let me know if this works. Thanks |
I'm closing this issue and feel free to reopen it if necessary @xaviernogueira! Thanks |
|
So I tried your solution and got the warning:
I can't tell if those extras are installed, but it did allow me to resolve the environment! That said you guys should consider supporting pydantic 2.0, I may look into making a PR. |
Hello @xaviernogueira! My apologies here, I wrote the wrong command! You can try: We support Pydantic v2, but we do not make Pydantic v2 our default version because we can break customers who already use Powertools in their apps, and have not yet migrated their code from Pydantic v1 to v2. We will drop support for Pydanticv1 and make Pydanticv2 the default version in Powertools V3 (we don't have a release estimate yet). Thanks |
@leandrodamascena Thanks for the quick response! I'll let you know how it goes. |
Worked! |
|
Thanks for letting me know @xaviernogueira! Feel free to ping us or open issues whenever you need! |
Expected Behaviour
I was expecting to be able to install the Python parser extension of the powertools despite needing pydantic 2.0 after reading the docs here.
Current Behaviour
I am blocked from installing due to conflicting dependencies. The source of the issue is
pyproject.toml
.If this is unintentional behavior, can you update the
pyproject.toml
requirements, otherwise you should correct the documentation. I may make a PR.Code snippet
Possible Solution
No response
Steps to Reproduce
pydantic>=2.0.3
aws_lambda_powertools[all]==2.31.0
boto3==1.26.19
geojson-pydantic==1.0.1
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.10
Packaging format used
PyPi
Debugging logs
No response
The text was updated successfully, but these errors were encountered: