⬆️ Upgrade compatibility with Pydantic v2.4, new renamed functions and JSON Schema input/output models with default values (#10344)

* 🚚 Refactor deprecated import general_plain_validator_function to with_info_plain_validator_function

* 🚚 Rename deprecated FieldValidationInfo to ValidationInfo

* ✅ Update tests with new defaults for JSON Schema for default values

* ♻️ Add Pydantic v1 version of with_info_plain_validator_function

* 👷 Invalidate cache

* ✅ Fix tests for Pydantic v1

* ✅ Tweak tests coverage for older Pydantic v2 versions
This commit is contained in:
Sebastián Ramírez
2023-09-27 23:14:40 -05:00
committed by GitHub
parent b944b55dfc
commit bc935e08b6
19 changed files with 63 additions and 303 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v05
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v06
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
@@ -62,7 +62,7 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v05
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v06
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt