Skip to content
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

Adjust test_json_schema() for Pydantic 2.9 #215

Merged
merged 3 commits into from
Sep 15, 2024

Conversation

musicinmybrain
Copy link
Contributor

Fixes #213.

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

@musicinmybrain
Copy link
Contributor Author

musicinmybrain commented Sep 11, 2024

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

@yezz123
Copy link
Collaborator

yezz123 commented Sep 15, 2024

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
Copy link
Contributor Author

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.

Copy link

codecov bot commented Sep 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@musicinmybrain
Copy link
Contributor Author

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?

requirements/pyproject.txt Outdated Show resolved Hide resolved
@yezz123 yezz123 merged commit 58db4b0 into pydantic:main Sep 15, 2024
21 checks passed
@gotmax23
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in test_json_schema with Pydantic 2.9
3 participants