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

Fix deprecation warnings around "copy_on_model_validation" #927

Merged
merged 3 commits into from Nov 22, 2022
Merged

Fix deprecation warnings around "copy_on_model_validation" #927

merged 3 commits into from Nov 22, 2022

Conversation

Dominic-Walther
Copy link
Contributor

Reduces Pytest warnings from 6145 down to 4.

@codecov
Copy link

codecov bot commented Nov 20, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (10a1d35) compared to base (e9b6edf).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##            master      #927     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           11        14      +3     
  Lines         1020      2082   +1062     
  Branches       201       517    +316     
===========================================
+ Hits          1020      2082   +1062     
Flag Coverage Δ
unittests 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
datamodel_code_generator/__main__.py 100.00% <100.00%> (ø)
datamodel_code_generator/http.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/base.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/enum.py 100.00% <100.00%> (ø)
...amodel_code_generator/model/pydantic/base_model.py 100.00% <100.00%> (ø)
..._code_generator/model/pydantic/custom_root_type.py 100.00% <100.00%> (ø)
...tamodel_code_generator/model/pydantic/dataclass.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/pydantic/imports.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/pydantic/types.py 100.00% <100.00%> (ø)
datamodel_code_generator/parser/base.py 100.00% <100.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@koxudaxi
Copy link
Owner

@Dominic-Walther
Thank you for creating the PR.
I guess the braking changes came from the PR.
pydantic/pydantic#4093

We should change the value by the pydantic version.

@Dominic-Walther
Copy link
Contributor Author

Good catch.
Would be great to have an automatic check to verify compatibility with older versions of dependencies, as my commit would have likely broken something, despite passing all tests. Checking all possible version combinations would lead to exponential (if not factorial) growth in the number of required tests, so it's probably best to just check the oldest supported version of all direct dependencies. I'm not aware of a simple way of doing this however - maybe a poetry plugin? (Related issues: pypa/flit#396, pdm-project/pdm#906)

@koxudaxi koxudaxi merged commit f7dfb11 into koxudaxi:master Nov 22, 2022
@koxudaxi
Copy link
Owner

I agree with you.
We should check the oldest dependence.
I want to avoid a lot of unit test on CI 😓

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.

None yet

2 participants