Skip to content
Discussion options

You must be logged in to vote

Hi Brett,

Thank you for reporting this, and for the complete example with tests and fixtures. That made it easy to reproduce on the first try, which almost never happens with these reports.

This is a bug in Depends, not a mistake on your side. When enable_validation=True, we walk the dependency tree and try to build a Pydantic schema for the return type of every dependency function. For your botocore.Session / boto3.Session / DynamoDBClient dependencies that fails, because those are arbitrary types Pydantic can't model.

The schema is never actually used and we were serializing this. I mean, the return value of a dependency is injected straight into your handler, not serialized or validate…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bdellegrazie
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants