-
-
Notifications
You must be signed in to change notification settings - Fork 9
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.23 #200
Update PyO3 to 0.23 #200
Conversation
@ngoldbaum I'm really interested in helping get this out, we use cramjam in our data analysis stack and I'd like to finally be able to use multithreading as opposed to multiprocessing. Is there any way I can help? The current error seems a bit mysterious, but I'll take a crack at reproducing. |
Hmm, that test passed on my laptop (osx-arm64), so either flaky test or os-dependent? |
Thanks for the help! Now that I know someone is blocked on this I'll get back to working on this library next week. |
I have been involved in this repo in the past, but not much recently. So I don't know the current state of the code well, but maybe I can help too. |
I spent some time over at #201. @milesgranger do you have any opinions about how to deal with CI being broken? Pin hypothesis for now maybe? |
Can't thank you enough for helping out here @ngoldbaum, pinning hypothesis seems good for now. |
woohoo, green CI :) |
Before merging this I should do one final pass to make sure the |
} | ||
|
||
/// Compress input into the current compressor's stream. | ||
pub fn compress(&mut self, input: &[u8]) -> PyResult<usize> { | ||
crate::io::stream_compress(&mut self.inner, input) | ||
crate::io::stream_compress(&mut self.inner.lock().unwrap(), input) |
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.
If it eases things, I'm not adverse to adding parking_lot::Mutex
Just FYI this still complains on import about not being marked as freethreaded-safe and reenables the GIL on import. Is that what we intend to have happen? |
Yes, I still need to formally audit the codebase and add free-threaded support and CI. I’d also like to add some explicitly multithreaded tests. That will be a followup. After that is merged I’ll work on the wheel builds in a third PR. |
OK, wanted to check! Sounds good to me. |
So I think all the
So I think we're good to go. @milesgranger go ahead and merge when ready :) |
Thank you, @ngoldbaum! 🎉 |
Opening as a draft to see how CI feels about this change and because
lock().unwrap()
may swallow panics incorrectly.