Juha Jeronen
Juha Jeronen
I had hoped to get this into 0.14.3, but the technical cleanup has already produced enough material for a minor update. Better to push that out first, and then concentrate...
This is also an issue because of [The submodules are added to the package namespace trap](http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-submodules-are-added-to-the-package-namespace-trap). So if anything, anywhere, imports one of the submodules, the name in the top-level...
The trap is also documented in the [Python reference, §5.4.2](https://docs.python.org/3/reference/import.html#submodules). [Also on SO](https://stackoverflow.com/questions/29974455/why-might-pythons-from-form-of-an-import-statement-bind-a-module-name).
New names, list in progress: - `unpythonic.it` → `unpythonic.itertools`, in analogy with standard `itertools` - `unpythonic.fun` → `unpythonic.functools`, similarly - `unpythonic.llist` → `unpythonic.linkedlists` Maybe: - `unpythonic.ec` → `unpythonic.escapes` - `unpythonic.fup`...
Ok, so PyPy [doesn't have`ctypes.pythonapi`](https://doc.pypy.org/en/latest/discussion/ctypes-implementation.html), but it [has `cpyext`](https://doc.pypy.org/en/latest/cpython_differences.html#c-api-differences), which at least sounds promising. Will have to look at this a bit more. --- Hm, `cpyext`'s [`pystate.py`](https://bitbucket.org/pypy/pypy/src/default/pypy/module/cpyext/pystate.py) doesn't seem to...
Macros should be fine, [MacroPy has been tested on PyPy](https://macropy3.readthedocs.io/en/latest/).
Quickly tested on PyPy 7.3.0 (`runtests.py`), all tests except `async_raise` pass. ~REPL server/client seem to have a small problem with missing `\r`, when printing just `\n`. Need to investigate.~ **EDIT**:...
Meh. Tested, and it turns out `pthread_kill` isn't specific enough to always hit the targeted thread. The *might* in the docs really means that; it's basically random which signal-enabled thread...
Regarding `PyThreadState_SetAsyncExc`: - Note the branch is `py3.6`, not the default branch. (The default branch in the PyPy repo is for continued support of 2.7, due to the RPython toolchain...
Alternative way to signal a particular thread: [signalfd](https://github.com/ionelmc/python-signalfd). See [some context](https://blog.oddbit.com/post/2013-11-28-a-python-interface-to-signalfd/). Just need to test if it works in PyPy...