Put a version of `threading_helper` on pypi?

I recently learned about the threading_helper, module in the private test package CPython ships.

Is there any problem with factoring it out into its own pip-installable project, assuming I keep the PSF license? It seems like it might be generally useful as a test dependency for projects that want to write better multithreaded tests.

1 Like

Is that supposed to be a link? If so it doesn’t work.

Should be fixed, sorry about that!

1 Like

It’s already in the standard library and can be imported, why would it need to be on pypi too?

I think the test module isn’t routinely installed with Python (because it’s really only used for testing Python itself) so a typical user wouldn’t have it.

3 Likes

I don’t see a problem. We’ve suggested people do similar for the PEP 594 removed batteries, and there’s a few packages out there that backport stdlib features for older Python versions.

3 Likes

In addition to this, the test module isn’t public API so even if it is importable, projects shouldn’t rely on it.

We can maintain a fork on pypi that projects can add as a test dependency.

Awesome. I opened Releasee a version of CPython’s `threading_helper` on pypi · Issue #223 · Quansight-Labs/free-threaded-compatibility · GitHub to track this.

2 Likes