From: Isaiah P. <is...@gm...> - 2016-04-21 12:57:07
|
Hi guys, I am working on python 3 support for jython, in the jython/jython3 repository, I've created a few pull request on github, https://github.com/jython/jython3/pulls Please don't hesitate to give your valuable feedbacks. Thanks, Isaiah |
From: <fwi...@gm...> - 2016-04-24 17:42:36
|
On Thu, Apr 21, 2016 at 5:56 AM, Isaiah Peng <is...@gm...> wrote: > Hi guys, > > I am working on python 3 support for jython, in the jython/jython3 > repository, I've created a few pull request on github, > > https://github.com/jython/jython3/pulls > > Please don't hesitate to give your valuable feedbacks. Hi Isaiah, I am planning to start really examining these today, thanks for the pull requests! I'm especially excited to see that you have not only managed to somehow work with the very immature jython3 work, but also updated Jython's grammar: few dare to venture there :). Have you signed a Python contributor agreement? For a set of contributions of this size we'll need that (or at least assurance that you plan to do that as soon as possible). The directions are here: http://python.org/psf/contrib/ Note that it requires a username from bugs.python.org with a (p)ython, not the one you might have at bugs.jython.org. Don't worry about the Jython-specific one, it was for past contributors, only worry about this one: http://www.python.org/psf/contrib/contrib-form/ -Frank |
From: Isaiah P. <is...@gm...> - 2016-04-24 20:06:06
|
Hi Frank, I've just signed the contributor agreement (my username on bugs.python.org is isaiah), thanks for pointing it out. Because of the current immature status of the branch, I am trying to get as much working as possible, so I didn't run the tests nor add new tests for my work, hope that makes sense for the moment. I also encountered a problem when trying to add the `int.from_bytes` class method, >>> int.from_bytes(b'\xfc\x00', byteorder='big', signed=True) -1024 I tried to add ```java @ExposedClassMethod(doc = BuiltinDocs.int_from_bytes_doc) final static PyObject long_from_bytes(PyType type, PyObject[] args, String[] keywords) { ... } ``` But get the following exception when compiling: */home/isaiah/codes/java/jython3/build.xml:799: java.lang.NoSuchMethodError: org.python.core.PyBuiltinClassMethodNarrow: method <init>(Ljava/lang/String;)V not found at org.python.core.PyLong$long_from_bytes_exposer.<init>(Unknown Source) at org.python.core.PyLong$PyExposer.<init>(Unknown Source) at org.python.core.PyLong.<clinit>(PyLong.java) at org.python.core.Py.newLong(Py.java:617) at org.python.core.FloatInfo.getInfo(PySystemState.java:1943) at org.python.core.PySystemState.<clinit>(PySystemState.java:195) at org.python.util.JycompileAntTask.process(JycompileAntTask.java:30) at org.python.util.GlobMatchingTask.execute(GlobMatchingTask.java:70) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) at org.apache.tools.ant.Project.executeTarget(Project.java:1376) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1260) at org.apache.tools.ant.Main.runBuild(Main.java:853) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112) * It works with the following method, but it won't support keyword parameters, and the `signed` argument cannot be optional: ```java final static PyObject long_from_bytes(PyType type, PyObject bytes, PyObject byteorder, PyObject signed) { ``` How to express such method signature in native implemented method? Regards, Isaiah On Sun, 24 Apr 2016 at 19:42 fwi...@gm... <fwi...@gm...> wrote: > On Thu, Apr 21, 2016 at 5:56 AM, Isaiah Peng <is...@gm...> wrote: > > Hi guys, > > > > I am working on python 3 support for jython, in the jython/jython3 > > repository, I've created a few pull request on github, > > > > https://github.com/jython/jython3/pulls > > > > Please don't hesitate to give your valuable feedbacks. > Hi Isaiah, > > I am planning to start really examining these today, thanks for the > pull requests! I'm especially excited to see that you have not only > managed to somehow work with the very immature jython3 work, but also > updated Jython's grammar: few dare to venture there :). > > Have you signed a Python contributor agreement? For a set of > contributions of this size we'll need that (or at least assurance that > you plan to do that as soon as possible). > > The directions are here: > > http://python.org/psf/contrib/ > > Note that it requires a username from bugs.python.org with a (p)ython, > not the one you might have at bugs.jython.org. Don't worry about the > Jython-specific one, it was for past contributors, only worry about > this one: > > http://www.python.org/psf/contrib/contrib-form/ > > -Frank > |