Repository navigation
Conversation
2f0308c to
f15f4fc
Compare
|
According to codecov almost none of the API surface is tested. Can you please make sure there's coverage for all the |
57b35c8 to
f622003
Compare
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
|
@codspeedbot fix this regression |
|
Maintainers (@ngoldbaum), is test coverage OK. Do we need a test case which deliberately causes initialization to fail so the error handling code is covered? |
c8f66ec to
99b41b0
Compare
141a505 to
7931138
Compare
davidhewitt
left a comment
There was a problem hiding this comment.
Thanks, some various thoughts and suggestions. Sorry it took a long time to get around to this one.
5ca5f0a to
5c01d67
Compare
davidhewitt
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me!
2adc377 to
301eaa1
Compare
|
I'm ignoring the |
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
Use OnceCell instead of Once
|
@ngoldbaum what happened to CI for this PR? I see that you cancelled them after they were stuck for a few hours, so what happens now? |
|
Maybe try debugging locally or in your fork? I canceled CI because it was blocking CI on other PRs. |
|
@ngoldbaum , I tried running CI again to see if it was a transient issue or if I could get logs, and I've confirmed that the pytest |
|
I usually enable actions in my fork of a project when I’m limited by permissions like you’re hitting here. |
af0753d to
5a5770e
Compare
|
@davidhewitt @bschoenmaeckers is there still anything blocking this? |
davidhewitt
left a comment
There was a problem hiding this comment.
Sorry for the extremely delayed review. I took a pass at this with a local AI agent and dug up a few rough edges worth cleaning before we merge.
| const ALREADY_INIT_MESSAGE: &str = "interpreter is already initialized"; | ||
|
|
||
| let mut already_initialized = true; | ||
| START.get_or_try_init(|| { |
There was a problem hiding this comment.
Local AI review suggests that calling Python::attach after a failed call to initialize_from_config may be unsound.
Some ideas:
- We could make this initialization API
unsafeand require the caller to be extremely careful to not callPython::attachuntil a sucessful reattempt at initialization - We could go further split it into fallible / infallible forms, making the infallible form abort inside
get_or_try_initon failure soPython::attachnever makes it pastwait_for_initialization(). - We could store the error in
STARTand make all calls toPython::attachfail.
I'm not sure what's the best choice.
There was a problem hiding this comment.
Local AI review suggests that calling
Python::attachafter a failed call toinitialize_from_configmay be unsound.
Can you elaborate? Why is this unsound? It should work the same as any other initial call to Python::attach.
fe41b27 to
9dd1d94
Compare
9dd1d94 to
e5d17f4
Compare
Adds a rust API to initialize the embedded interpreter with configuration.
Closes #6153