-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
PyPy3 looks promising, as it's rumored to be fast, and it supports version 3.6.9 of "the Python standard". Our main target platform just so happens to be Python 3.6.x.
Our PyPy3 compatibility is already near 100%. This issue documents what remains to be done.
- Test compatibility with PyPy. Most things should work already.
- Yes, pretty much everything already works. All tests pass except
async_raise.
- Yes, pretty much everything already works. All tests pass except
- Macros? Is the
astclose enough to CPython's?- Yes, macros work.
unpythonic.misc.async_raise? This may or may not work, depending on what is available in PyPy3'sctypesmodule. (It's only needed for remote Ctrl+C in the REPL server, but that's a nice feature to have.)- Doesn't work in PyPy, and without hacking PyPy itself, currently no way to make it work. See details below.
- Get rid of
__del__methods, since they may be delayed or not called at all, and in most cases having a__del__is just not pythonic anyway.- The one in
unpythonic.tco._jumpdoesn't (really) matter, since its only purpose is to print a warning. The one inunpythonic.dynassign._DynLiveViewis more serious. How to get around it? Awithblock is no solution here, since the_DynLiveViewinstance is returned byunpythonic.dyn.asdict, so it has indefinite dynamic extent, depending on the code that callsasdict. Requiring users to call a.close()method explicitly just invites omission by accident or even on purpose (e.g. who ever callssocket.shutdown()?). OTOH, maybe_DynLiveViewcould be a singleton? The dynamic scopes are already context-managed, and that's really all that matters.How about for the lose, instead. Can't work, since the dynamic scope stacks are thread-local. Having observers linger around a bit longer than they absolutely need to, or not having them cleaned up when the process exits, are not really a problem. In practice, the old solution should be fine in PyPy, too. Hence, reverted in 089f7cc._DynLiveViewsingleton FTW. 1a0f0f5.
- The one in
- Anything else? Add more details here. Maybe refer to Python compatibility and Differences between PyPy and CPython.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request