You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
valbort 40e2198b15 Cache pydantic.v1 import to minimize compatibility overhead 2 weeks ago
..
__init__.py ⬆️ Update Pydantic v2 code to address deprecations (#15101) 1 month ago
shared.py Cache pydantic.v1 import to minimize compatibility overhead 2 weeks ago
v2.py Optimize JSON parsing by using Pydantic V2 validate_json directly from request body bytes. - Add FastAPIOptimizedJsonBytes helper to mark bytes for optimized parsing. - Implement validate_json in ModelField to leverage pydantic-core's native JSON parsing. - Update get_request_handler to pass raw body bytes wrapped in FastAPIOptimizedJsonBytes when applicable. - Update _validate_value_with_model_field to use validate_json when receiving optimized bytes, avoiding redundant Python dict conversion. 3 weeks ago