pydantic / pydantic-extra-types

Extra Pydantic types.
MIT License
193 stars 51 forks source link

Adjust test_json_schema() for Pydantic 2.9 #215

Closed musicinmybrain closed 1 month ago

musicinmybrain commented 1 month ago

Fixes #213.

Assuming the change in this schema in Pydantic 2.9 is intentional, this PR adapts the test to it.

musicinmybrain commented 1 month ago

CI fails due to the pinned dependencies in requirements/pyproject.txt, i.e. pydantic==2.6.3 in particular.

yezz123 commented 1 month ago

CI fails due to the pinned dependencies in requirements/pyproject.txt, i.e. pydantic==2.6.3 in particular.

You can fix it by installing pip-tools and sync the dependencies

musicinmybrain commented 1 month ago

Okay, I tried pip-compile --extra=all --no-emit-index-url --output-file=requirements/pyproject.txt pyproject.toml --upgrade-package pydantic --upgrade-package pydantic-core. Let’s see if that suffices.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (e186814) to head (a0ea204). Report is 46 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #215 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 11 19 +8 Lines 685 1047 +362 Branches 169 253 +84 ========================================== + Hits 685 1047 +362 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

musicinmybrain commented 1 month ago

pip-compile has changed python-ulid==1.1.0 to python-ulid==1.1.0 ; python_version >= "3.9" based on

    'python-ulid>=1,<2; python_version<"3.9"',
    'python-ulid>=1,<3; python_version>="3.9"',

in pyproject.toml. I don’t know why that’s changed, or why there is no case for Python <3.9, or what I should do about it, but it seems to be why “CI / test py3.8 on ubuntu (pull request)” is failing.

I could hand-edit the result of pip-compile to remove ; python_version >= "3.9", I guess?

gotmax23 commented 1 month ago

Thanks @musicinmybrain for fixing this and @yezz123 for reviewing!