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

Update PyO3 to 0.20 #1003

Merged
merged 1 commit into from
Oct 14, 2023
Merged

Update PyO3 to 0.20 #1003

merged 1 commit into from
Oct 14, 2023

Conversation

davidhewitt
Copy link
Contributor

@davidhewitt davidhewitt commented Oct 3, 2023

Change Summary

Updates PyO3 to 0.20.

(For now in draft and building against the git dependency, will update this when the release is done.)

Related issue number

Fixes #761
Fixes pydantic/pydantic#6584

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @samuelcolvin

@davidhewitt
Copy link
Contributor Author

By far the bulk of the work is migrating for https://pyo3.rs/main/migration.html#pydictget_item-now-returns-a-result

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #1003 (cff1afe) into main (b51105a) will decrease coverage by 0.01%.
The diff coverage is 96.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1003      +/-   ##
==========================================
- Coverage   93.06%   93.05%   -0.01%     
==========================================
  Files         106      106              
  Lines       15739    15720      -19     
  Branches       35       35              
==========================================
- Hits        14648    14629      -19     
  Misses       1084     1084              
  Partials        7        7              
Files Coverage Δ
src/errors/types.rs 99.66% <100.00%> (ø)
src/errors/validation_exception.rs 91.60% <100.00%> (ø)
src/errors/value_exception.rs 89.65% <ø> (ø)
src/input/input_python.rs 98.36% <ø> (ø)
src/input/return_enums.rs 84.93% <ø> (ø)
src/lookup_key.rs 92.65% <100.00%> (ø)
src/serializers/extra.rs 99.08% <ø> (ø)
src/serializers/filter.rs 96.06% <100.00%> (-0.02%) ⬇️
src/serializers/type_serializers/dict.rs 95.55% <100.00%> (ø)
src/serializers/type_serializers/model.rs 94.55% <100.00%> (ø)
... and 21 more

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 b51105a...cff1afe. Read the comment docs.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 3, 2023

CodSpeed Performance Report

Merging #1003 will improve performances by 28.87%

Comparing dh/pyo3-0.20 (cff1afe) with main (b51105a)

Summary

⚡ 1 improvements
✅ 139 untouched benchmarks

Benchmarks breakdown

Benchmark main dh/pyo3-0.20 Change
test_decimal_from_string_core 70 µs 54.3 µs +28.87%

@davidhewitt davidhewitt marked this pull request as ready for review October 11, 2023 21:55
@davidhewitt
Copy link
Contributor Author

please review

Copy link
Member

@PrettyWood PrettyWood left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -72,7 +72,7 @@ impl PydanticCustomError {
}
}

#[getter(type)]
#[getter(r#type)]
Copy link
Member

Choose a reason for hiding this comment

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

I didn't see what forced this change from [pyo3 changelog]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe it was the switch to syn 2.0 changing the way the proc macro parsed idents.

@davidhewitt davidhewitt merged commit 372904c into main Oct 14, 2023
29 of 30 checks passed
@davidhewitt davidhewitt deleted the dh/pyo3-0.20 branch October 14, 2023 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError when running with coverage measurement activated Tests fail with pydebug
3 participants