-
Notifications
You must be signed in to change notification settings - Fork 0
Home
-Working on posix compatibility, specifically the _posixsubprocess
module, with JNR-
Rewriting _socket
module with jnr-unixsocket
, to replace the current netty version.
Close to zero effort is spent to gain performance, CPython compatibility is the only focus at the moment, that means java interop could be broken at some point.
Builtin modules are types, instead of modules, i.e.
>>> import _io
>>> type(_io)
<type 'java.lang.Class'>
>>> _io
<type 'builtins._io'>
Changes that are not necessarily hard but involes a lot of work.
-
Create
PyBytes
that inherits fromBaseBytes
to replace the currentPyString
asbytes
type. At the moment there are so many usages ofPyString
asstr
. -
Changes all
PyInteger
usage toPyLong
. Currently both are used, and kind messed up. -
Be compatible with CPython on the
__next__
and__findattr__
methods.
Currently the java __next__
method returns null
as a sentinel for StopIteration
, the idea is good, but it doesn't work in practice, such that most of the implementations are actually like:
@Override
public PyObject __next__() {
try {
return object___next__();
} catch (PyException e) {
if (e.match(Py.StopIteration)) {
return null;
}
throw e;
}
}
It totally defeat the purpose.
So is __findattr__
, it returns null
instead of raising Py.AttributeError
.
Implement subprocess
module with JNR, this is the basic module for multiprocessing
, which is used by concurrent
and the later is used by asyncio
.
It could be an interesting project to implement the asyncio
event loop with netty.
Once almost all specs are passing or ignored by the @test.support.cpython_only
decorator, I'll start working on invokedynamic
support, hopefully then we can remove all the derived
classes, and the java wrapper methods and have better performance.