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 issue with recursive wrap function serializer schemas #530

Merged
merged 10 commits into from
Apr 7, 2023

Conversation

dmontagu
Copy link
Collaborator

@dmontagu dmontagu commented Apr 6, 2023

This is necessary to resolve the issue @commonism reported in pydantic/pydantic#5387 while testing pydantic/pydantic#5385 (related to pydantic/pydantic#5383)

@codspeed-hq
Copy link

codspeed-hq bot commented Apr 6, 2023

CodSpeed Performance Report

Merging #530 recursive-wrap-function-ser-schema (a42f4c8) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 95 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@dmontagu
Copy link
Collaborator Author

dmontagu commented Apr 6, 2023

please review

@codecov-commenter
Copy link

codecov-commenter commented Apr 6, 2023

Codecov Report

Merging #530 (3b56a51) into main (6b43ade) will increase coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
+ Coverage   94.80%   94.82%   +0.01%     
==========================================
  Files          93       93              
  Lines       12304    12307       +3     
  Branches       26       26              
==========================================
+ Hits        11665    11670       +5     
+ Misses        631      629       -2     
  Partials        8        8              
Impacted Files Coverage Δ
src/build_context.rs 96.21% <100.00%> (+0.05%) ⬆️
src/serializers/type_serializers/function.rs 92.37% <100.00%> (+0.32%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b43ade...3b56a51. Read the comment docs.

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM, I had a quick play and added another test, so I've pushed that.

@dmontagu dmontagu added the Full Build cause CI to do a full build label Apr 7, 2023
@@ -47,17 +47,23 @@ name = "_pydantic_core"
crate-type = ["cdylib", "rlib"]

[features]
# must be disabled for cargo bench
extension-module = ["pyo3/extension-module"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this can be safely removed (well, moved into the maturin config) thanks to the changes from this (recent) PR: PyO3/maturin#1479

Specifically, see this comment indicating that the intent was to make it so cargo test etc. can be used without flags: PyO3/maturin#1479 (comment)


[profile.release]
lto = "fat"
codegen-units = 1
strip = true

[dev-dependencies]
pyo3 = { version = "0.18.2", features = ["auto-initialize"] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pyo3 = { version = "0.18.2", features = ["auto-initialize"] }
pyo3 = { version = "*", features = ["auto-initialize"] }

That way we only have the version in one spot?


[profile.release]
lto = "fat"
codegen-units = 1
strip = true

[dev-dependencies]
pyo3 = { version = "0.18.2", features = ["auto-initialize"] }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmontagu dmontagu merged commit 23ac0db into main Apr 7, 2023
@dmontagu dmontagu deleted the recursive-wrap-function-ser-schema branch April 7, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Full Build cause CI to do a full build ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants