Skip to content

remove uses of IntoPy #1578

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

Merged
merged 2 commits into from
Dec 17, 2024
Merged

remove uses of IntoPy #1578

merged 2 commits into from
Dec 17, 2024

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Followup to #1577

Cleaning up after PyO3 0.23 update.

Related issue number

N/A

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

Copy link

codspeed-hq bot commented Dec 9, 2024

CodSpeed Performance Report

Merging #1578 will not alter performance

Comparing dh/pyo3-0.23-into-py (cb0efed) with main (bd91c18)

Summary

✅ 157 untouched benchmarks

@davidhewitt davidhewitt marked this pull request as ready for review December 12, 2024 20:37
@@ -575,7 +599,7 @@ impl TzInfo {
}
let offset_seconds: f64 = offset_delta.call_method0(intern!(py, "total_seconds"))?.extract()?;
let offset = offset_seconds.round() as i32;
Ok(op.matches(self.seconds.cmp(&offset)).into_py(py))
op.matches(self.seconds.cmp(&offset)).into_py_any(py)
Copy link
Contributor Author

@davidhewitt davidhewitt Dec 12, 2024

Choose a reason for hiding this comment

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

Probably a lot more of the .into_py(py) calls could have been replaced with just .into_py_any(py) (after adjusting for error handling) but I couldn't stop myself using more efficient alternatives where I spotted them 🙈

Copy link
Contributor

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

@davidhewitt davidhewitt merged commit 39435c2 into main Dec 17, 2024
29 checks passed
@davidhewitt davidhewitt deleted the dh/pyo3-0.23-into-py branch December 17, 2024 15:35
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