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

Allow Pydantic >= 2.5.3 #1388

Merged
merged 11 commits into from
Dec 5, 2024
Merged

Allow Pydantic >= 2.5.3 #1388

merged 11 commits into from
Dec 5, 2024

Conversation

camillol
Copy link
Contributor

@camillol camillol commented Aug 1, 2024

No description provided.

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6be6136) to head (9d7d71a).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1388   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          207       207           
  Lines        14969     14942   -27     
=========================================
- Hits         14969     14942   -27     
Files with missing lines Coverage Δ
ormar/models/mixins/save_mixin.py 100.00% <100.00%> (ø)
tests/test_fastapi/test_binary_fields.py 100.00% <100.00%> (ø)
...definition/test_overwriting_pydantic_field_type.py 100.00% <ø> (ø)

... and 12 files with indirect coverage changes

Copy link

codspeed-hq bot commented Aug 1, 2024

CodSpeed Performance Report

Merging #1388 will degrade performances by 18.61%

Comparing camillol:unpinpydantic (9d7d71a) with master (6be6136)

Summary

⚡ 2 improvements
❌ 5 (👁 5) regressions
✅ 77 untouched benchmarks

Benchmarks breakdown

Benchmark master camillol:unpinpydantic Change
test_min[250] 3.6 ms 2.8 ms +28.63%
👁 test_deleting_all[500] 2.4 ms 2.9 ms -18.61%
👁 test_deleting_individually[10] 8.7 ms 9.8 ms -12.12%
test_get_all_with_related_models[10] 14.1 ms 12.5 ms +12.55%
👁 test_get_one[1000] 3.4 ms 4.1 ms -16.94%
👁 test_get_or_create_when_get[1000] 3.5 ms 4.1 ms -14.81%
👁 test_saving_models_individually[10] 12.9 ms 14.4 ms -10.8%

@collerek
Copy link
Owner

collerek commented Aug 2, 2024

That's still installing 2.5.3 in tests, might be cross dependency with pydantic-extra or something else. As it mingles with pydantic internals each upper version should be checked.

Edit: see that you didn't run poetry lock that's why

it was yanked on pypi because it's obsoleted by types-setuptools.
but pkg_resources is typed in recent setuptools, so we don't need a
types package at all
@camillol
Copy link
Contributor Author

camillol commented Aug 2, 2024

Ran poetry lock!

create_schema_validator now returns SchemaValidator | PluggableSchemaValidator
@camillol
Copy link
Contributor Author

@collerek there is one broken test, tests/test_fastapi/test_binary_fields.py::test_read_main. It's not clear to me that the behavior expected by the test is correct; it looks like it wants the JSON response to represent the LargeBinary field as its binary contents decoded into a string with the default encoding (utf-8), but why should it? Could you take care of it?

@collerek collerek merged commit a1f6e57 into collerek:master Dec 5, 2024
16 checks passed
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.

2 participants