Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ngoldbaum
Copy link
Contributor

Adds support for the free-threaded build.

I made BloomFilter and PreshedMap thread-safe under the free-threaded build using critical sections. I also added tests for multithreaded sharing of BloomFilter and PreshedMap.

The other types are not used by spaCy so I don't think it's worth updating them. Ideally I'd document this somewhere, but this project has very minimal docs, so it's not clear where I'd put that.

There's also a few changes included that aren't strictly related to free-threaded support:

  • Added testing on GIL-enabled Python 3.14
  • Moved from deprecated macos-13 runner to macos-15-intel
  • deleted a repeated prototype in bloom.pxd
  • Used a C++ vector instead of an array.array in the BloomFilter serialization. This is substantially faster and makes the multithreaded test I added substantially faster.

Copy link
Contributor

Choose a reason for hiding this comment

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

This module would greatly benefit from a RWLock.
Might be worth adding an issue for follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather only do that if this shows up as a performance bottleneck.

@ngoldbaum
Copy link
Contributor Author

I went ahead and added a couple sentences to the readme along with the comments @crusaderky suggested.

@ngoldbaum
Copy link
Contributor Author

OK, let's merge this. Rather than doing a release ASAP with cp314t wheels, we're going to first set up nightly wheels (scientific-python/upload-nightly-action#146) and then set up nightly testing for packages like spaCy further up the stack. Once the full stack is working, we'll do coordinated releases of all the packages including cp314t wheels.

@ngoldbaum ngoldbaum merged commit 9699a34 into explosion:v3.0.x Nov 18, 2025
21 checks passed
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.

3 participants