-
Notifications
You must be signed in to change notification settings - Fork 289
update to PyO3 0.22, add 3.13 support #1340
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
Conversation
CodSpeed Performance ReportMerging #1340 will not alter performanceComparing Summary
|
let fields = schema | ||
.get_as_req::<&PyList>(intern!(py, "fields"))? | ||
.iter() | ||
.map(|s| Ok(s.downcast::<PyString>()?.into_py(py))) | ||
.collect::<PyResult<Vec<_>>>()?; |
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.
Why don't we need this anymore?
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.
Type inference is able to work out that we want fields
to be Vec<Py<PyString>>
, so best to let PyO3 decide the most efficient way to achieve that.
This code was flagged to me because &PyList
is now removed as a type (we always wrap it as Py<PyList>
or Bound<'_, PyList>
now), so I simplified :)
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.
Great!
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.
Awesome, thanks for helping me to understand some of these changes.
I think we'll also want to add support for 3.13 to CI?
d5e372a
to
f3a5c1d
Compare
f3a5c1d
to
bfa816c
Compare
0da9d55
to
b10515e
Compare
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.
Looks great, pending CI :).
Ah also we can update |
@@ -436,27 +438,33 @@ jobs: | |||
# macos; | |||
# all versions x86_64 | |||
# arm pypy and older pythons which can't be run on the arm hardware for PGO | |||
# | |||
# FIXME https://github.com/PyO3/maturin-action/issues/275 | |||
# cffi prevents `maturin-action` working on macOS 3.13 for now for the optimized build |
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.
cffi is close, they have a pre release out with support :)
Change Summary
Updates to PyO3 0.22
Related issue number
Closes #1175
Closes #1292
Checklist
pydantic-core
(except for expected changes)