-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Remove support for threads-less builds #75551
Comments
The --without-threads option has a lot of repercussions on the code base, forcing us to maintain specific paths for builds with threads disabled, for no useful purpose. |
See discussion in https://mail.python.org/pipermail/python-dev/2017-September/149156.html |
Question: should we keep Modules/Setup.config.in? It's going to become empty: |
The PEP-11 should be updated just to mention that platforms without threading support are not supported in Python 3.7. |
We had a buildbot testing --without-threads, but it's gone. I just removed its unused class from the buildbot configuration: |
I guess Setup.config.in can go. It's only purpose was for autoconf driven Setup changes. |
PEP-11 was updated, the change was merged, this issue can now be closed. Thanks Antoine! |
Also 'import threading' code in Tools/scripts/run_tests.py should be cleaned. |
Lib/_dummy_thread.py and Lib/dummy_threading.py were deleted, but Doc/library/_dummy_thread.rst and Doc/library/dummy_threading.rst still exist. Probably Doc/whatsnew/3.7.rst should mention that these modules were deleted. Or maybe they should be restored and firstly deprecated, before deletion in a later version of Python. |
Arfrever: "Lib/_dummy_thread.py and Lib/dummy_threading.py were deleted, but Doc/library/_dummy_thread.rst and Doc/library/dummy_threading.rst still exist." Ah, it should be deleted as well. Arfrever: "Probably Doc/whatsnew/3.7.rst should mention that these modules were deleted." Right. Arfrever: "Or maybe they should be restored and firstly deprecated, before deletion in a later version of Python." I don't think that it's worth it, but I suggest to add a warning to Python 3.6 documentation. Something like the following warning in Python 2.7 documentation of the commands module: |
Oh, Arfrever wrote me on IRC that the removal of dummy_threading broke portage on Gentoo: https://bugs.gentoo.org/630730 eventlet also uses dummy_threading: eventlet/support/dns/entropy.py:23: import dummy_threading as _threading Hum, maybe we need one release with the deprecated module, and only remove it in Python 3.8? |
+1 to restore dummy_threading and go through a proper deprecation phase in 3.7+. -0 to restore _dummy_thread. It's an internal, private module. |
dummy_threading should definitely not have been removed, and like all the other APIs should not be removed until 2.7 is dead. Deprecating it is of course fine :) |
And actually, I wouldn't be surprised if eventlet depended on the *functionality* in _dummy_threading, so you probably need to restore that, too. |
Not sure what you mean by that. eventlet uses the regular try/except import dance around "import threading": https://github.com/eventlet/eventlet/blob/master/eventlet/support/dns/entropy.py#L20-L23 As for portage, Arfrever fixed it :-) https://gitweb.gentoo.org/proj/portage.git/commit/?id=504f66b0e25281e4465ebeceb799c3e54ff2b884 That said, I am not against bringing dummy_threading back, though it would sound rather weird to use it unconditionally... |
#3648 restores dummy_threading and _dummy_thread, but deprecates them. |
Unfortunately, this also leads to less good LTO if you use a single static executable, similar to what Tools/freeze produces but including libpython itself. I'm currently trying to make LLVM do that, but since I can't build without threads, it'd be extremely hard to tell it that it can remove all threading related things (like TLS) and inline them. This means I'll have to patch CPython on my own to remove thread support, but unfortunately this also means I can't guarantee that it continues to work, as well as that it makes it a lot more likely that my build won't support many third-party libraries. |
This has unfortunately turned out to be a blocker on getting WASI support as there's not direct threading support in WebAssembly. |
https://web.dev/webassembly-threads/ suggests otherwise. |
It actually doesn't as that post isn't for WASI, it's for WASM in the browser (I chose my acronyms carefully 😉). WASI is like POSIX for WebAssembly, so it's meant for desktop usage and thus no browser or JS engine is involved to provide web workers. |
This issue is now closed and unrelated to WASI support. Can you please open a new separated issue for it? |
Concur with Victor. It is fine to add a link to other discussion in a closed issue, but an issue closed many years ago is not a good place for a new discussion at all. |
I am not opening a new discussion; this is just recording this fact here as it has come up in other places on the internet. |
Either reopen the issue or open a new issue. Only people subscribed to this bug are aware of the recent comments. Closed issues are hidden from the bugs home page and from the default search. If you consider that Python must again support thread-less platforms, IMO it's a new feature and a new issue must be opened. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: