-
Notifications
You must be signed in to change notification settings - Fork 312
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
remove uses of IntoPy #1578
Conversation
CodSpeed Performance ReportMerging #1578 will not alter performanceComparing Summary
|
4cc9490 to
cb0efed
Compare
| 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) |
There was a problem hiding this comment.
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 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks @davidhewitt! Some nice speedups here: https://codspeed.io/pydantic/pydantic-core/branches/dh%2Fpyo3-0.23-into-py
Original-commit-hash: 39435c2
Original-commit-link: pydantic/pydantic-core@39435c2
Change Summary
Followup to #1577
Cleaning up after PyO3 0.23 update.
Related issue number
N/A
Checklist
pydantic-core(except for expected changes)