You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(38) |
Nov
(98) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(114) |
Feb
(123) |
Mar
(96) |
Apr
(66) |
May
(84) |
Jun
(72) |
Jul
(128) |
Aug
(126) |
Sep
(82) |
Oct
(80) |
Nov
(148) |
Dec
(55) |
2002 |
Jan
(137) |
Feb
(85) |
Mar
(118) |
Apr
(67) |
May
(71) |
Jun
(28) |
Jul
(69) |
Aug
(48) |
Sep
(83) |
Oct
(79) |
Nov
(54) |
Dec
(32) |
2003 |
Jan
(44) |
Feb
(47) |
Mar
(59) |
Apr
(57) |
May
(43) |
Jun
(45) |
Jul
(44) |
Aug
(39) |
Sep
(27) |
Oct
(62) |
Nov
(17) |
Dec
(23) |
2004 |
Jan
(41) |
Feb
(51) |
Mar
(38) |
Apr
(30) |
May
(25) |
Jun
(12) |
Jul
(11) |
Aug
(27) |
Sep
(16) |
Oct
(56) |
Nov
(23) |
Dec
(29) |
2005 |
Jan
(75) |
Feb
(82) |
Mar
(50) |
Apr
(77) |
May
(19) |
Jun
(104) |
Jul
(47) |
Aug
(42) |
Sep
(28) |
Oct
(143) |
Nov
(62) |
Dec
(13) |
2006 |
Jan
(20) |
Feb
(10) |
Mar
(59) |
Apr
(45) |
May
(25) |
Jun
(129) |
Jul
(162) |
Aug
(91) |
Sep
(15) |
Oct
(39) |
Nov
(186) |
Dec
(191) |
2007 |
Jan
(134) |
Feb
(140) |
Mar
(106) |
Apr
(77) |
May
(92) |
Jun
(63) |
Jul
(233) |
Aug
(102) |
Sep
(119) |
Oct
(63) |
Nov
(68) |
Dec
(32) |
2008 |
Jan
(69) |
Feb
(91) |
Mar
(129) |
Apr
(44) |
May
(18) |
Jun
(53) |
Jul
(50) |
Aug
(25) |
Sep
(11) |
Oct
(28) |
Nov
(67) |
Dec
(36) |
2009 |
Jan
(20) |
Feb
(24) |
Mar
(66) |
Apr
(53) |
May
(48) |
Jun
(48) |
Jul
(59) |
Aug
(82) |
Sep
(49) |
Oct
(30) |
Nov
(16) |
Dec
(16) |
2010 |
Jan
(52) |
Feb
(25) |
Mar
(36) |
Apr
(34) |
May
(14) |
Jun
(15) |
Jul
(14) |
Aug
(16) |
Sep
(23) |
Oct
(6) |
Nov
(4) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(22) |
Mar
(45) |
Apr
(9) |
May
(8) |
Jun
(13) |
Jul
(12) |
Aug
(4) |
Sep
(6) |
Oct
(10) |
Nov
(21) |
Dec
(5) |
2012 |
Jan
(6) |
Feb
(9) |
Mar
(25) |
Apr
(6) |
May
(4) |
Jun
(23) |
Jul
(6) |
Aug
(18) |
Sep
(21) |
Oct
(34) |
Nov
(19) |
Dec
(25) |
2013 |
Jan
(8) |
Feb
(34) |
Mar
(35) |
Apr
(4) |
May
(11) |
Jun
(4) |
Jul
(7) |
Aug
(5) |
Sep
(20) |
Oct
(12) |
Nov
(11) |
Dec
(7) |
2014 |
Jan
(10) |
Feb
(18) |
Mar
(50) |
Apr
(26) |
May
(53) |
Jun
(21) |
Jul
(12) |
Aug
(39) |
Sep
(43) |
Oct
(26) |
Nov
(8) |
Dec
(6) |
2015 |
Jan
(18) |
Feb
(32) |
Mar
(31) |
Apr
(42) |
May
(38) |
Jun
(13) |
Jul
(6) |
Aug
(11) |
Sep
(29) |
Oct
(25) |
Nov
(10) |
Dec
(11) |
2016 |
Jan
(24) |
Feb
(12) |
Mar
(13) |
Apr
(15) |
May
(22) |
Jun
(8) |
Jul
(12) |
Aug
(25) |
Sep
(8) |
Oct
(6) |
Nov
(13) |
Dec
(7) |
2017 |
Jan
(6) |
Feb
(29) |
Mar
(32) |
Apr
(8) |
May
(82) |
Jun
(42) |
Jul
(20) |
Aug
(17) |
Sep
(27) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
2018 |
Jan
(12) |
Feb
(9) |
Mar
(22) |
Apr
(19) |
May
(14) |
Jun
(9) |
Jul
(9) |
Aug
(22) |
Sep
(22) |
Oct
(12) |
Nov
(13) |
Dec
(8) |
2019 |
Jan
(22) |
Feb
(3) |
Mar
(30) |
Apr
(20) |
May
(20) |
Jun
(6) |
Jul
(15) |
Aug
(25) |
Sep
(11) |
Oct
(24) |
Nov
(11) |
Dec
(6) |
2020 |
Jan
(9) |
Feb
(12) |
Mar
(29) |
Apr
(10) |
May
(22) |
Jun
(11) |
Jul
(15) |
Aug
(5) |
Sep
(6) |
Oct
(7) |
Nov
(7) |
Dec
(13) |
2021 |
Jan
(21) |
Feb
(5) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(7) |
Jul
(6) |
Aug
(8) |
Sep
(5) |
Oct
(9) |
Nov
(5) |
Dec
(6) |
2022 |
Jan
(5) |
Feb
(4) |
Mar
(8) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(10) |
Aug
(6) |
Sep
(7) |
Oct
(4) |
Nov
(4) |
Dec
(6) |
2023 |
Jan
(5) |
Feb
(5) |
Mar
(6) |
Apr
(4) |
May
(5) |
Jun
(6) |
Jul
(5) |
Aug
(5) |
Sep
(5) |
Oct
(5) |
Nov
(7) |
Dec
(8) |
2024 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2025 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jeff T. <je...@so...> - 2000-11-01 08:19:56
|
On Tue, 31 Oct 2000, Finn Bock wrote: > Hi > > I have tried to create an installer for the current snapshot of jython. > I have used the free (GPL) LiftOff program to create the self installing > .class file. > > http://sourceforge.net/projects/liftoff/ > > The installer is 1.5 Mb and contains also the standard python library > which have previously been distributed as pylib15x.jar > > ftp://jython.sourceforge.net/pub/jython/Install.class > > We have not made any decisions that LiftOff should be used, so please > look at this as part of an evaluation of installers. > > I have only tested this on win2k (with jdk1.3, jdk1.1.7a & MS-jview > 5.00.3229). Feedback from other platforms and JVMs is needed before we > can decide whether LiftOff is useful to us. > > Please try the installer and post your experience, both good and bad, > here on the list. Give special attention to the two generated scripts. > With some luck these should work on unixes and windows. Everything went fine (rh6.0, jdk1.2.2), except the two shell scripts (jython and jythonc) were in DOS file format, and wouldn't execute: ~/jython-2.0pa0$ ./jythonc bash: ./jythonc: No such file or directory Also, the jython script had set: JAVA_HOME=/home/jeff/jdk1.2.2/jre Usually I have JAVA_HOME to /home/jeff/jdk1.2.2. I had not checked the "jre" button on the installer. The script worked okay. > > The text shown as license and readme should not be taken for anything > other than examples. This also include the graphics used. Hmm.. so the use of a GPL'ed installer won't affect jython's license? --Jeff > > I had to fix some bugs in LiftOff which occurred on windows > (line-ending, slash/backslash) and LiftOff is GPL so the modified > version is here: > > ftp://jython.sourceforge.net/pub/jython/liftoff-001031.tar.gz > > regards, > finn > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > http://lists.sourceforge.net/mailman/listinfo/jython-dev > |
From: Adam B. <ada...@gb...> - 2000-11-01 00:32:56
|
Worked fine for NT 4 SP6 and Sun SDK 2 for java -version Classic VM (build JDK-1.2.2-001, native threads, symcjit) even though I probably shouldn't be using JIT. My testing was pretty minor (1+2=3, for i in x : print i, javac b.py where b.py is fairly trivial) but that would still seem to confirm the installer works fine. The only problem was it couldn't find README.txt to display at the end of the install. try path E:\tempinstall\jp\ can not find readme text README.txt Adam Burke > -----Original Message----- > From: bc...@wo... [SMTP:bc...@wo...] > Sent: Wednesday, November 01, 2000 8:12 AM > To: jyt...@li... > Subject: [Jython-dev] Installer test > > Hi > > I have tried to create an installer for the current snapshot of jython. > I have used the free (GPL) LiftOff program to create the self installing > .class file. > > http://sourceforge.net/projects/liftoff/ > > The installer is 1.5 Mb and contains also the standard python library > which have previously been distributed as pylib15x.jar > > ftp://jython.sourceforge.net/pub/jython/Install.class > > We have not made any decisions that LiftOff should be used, so please > look at this as part of an evaluation of installers. > > I have only tested this on win2k (with jdk1.3, jdk1.1.7a & MS-jview > 5.00.3229). Feedback from other platforms and JVMs is needed before we > can decide whether LiftOff is useful to us. > > Please try the installer and post your experience, both good and bad, > here on the list. Give special attention to the two generated scripts. > With some luck these should work on unixes and windows. > > The text shown as license and readme should not be taken for anything > other than examples. This also include the graphics used. > > I had to fix some bugs in LiftOff which occurred on windows > (line-ending, slash/backslash) and LiftOff is GPL so the modified > version is here: > > ftp://jython.sourceforge.net/pub/jython/liftoff-001031.tar.gz > > regards, > finn > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > http://lists.sourceforge.net/mailman/listinfo/jython-dev |
From: <bc...@wo...> - 2000-10-31 22:22:01
|
Hi I have tried to create an installer for the current snapshot of jython. I have used the free (GPL) LiftOff program to create the self installing .class file. http://sourceforge.net/projects/liftoff/ The installer is 1.5 Mb and contains also the standard python library which have previously been distributed as pylib15x.jar ftp://jython.sourceforge.net/pub/jython/Install.class We have not made any decisions that LiftOff should be used, so please look at this as part of an evaluation of installers. I have only tested this on win2k (with jdk1.3, jdk1.1.7a & MS-jview 5.00.3229). Feedback from other platforms and JVMs is needed before we can decide whether LiftOff is useful to us. Please try the installer and post your experience, both good and bad, here on the list. Give special attention to the two generated scripts. With some luck these should work on unixes and windows. The text shown as license and readme should not be taken for anything other than examples. This also include the graphics used. I had to fix some bugs in LiftOff which occurred on windows (line-ending, slash/backslash) and LiftOff is GPL so the modified version is here: ftp://jython.sourceforge.net/pub/jython/liftoff-001031.tar.gz regards, finn |
From: <bc...@wo...> - 2000-10-30 23:07:42
|
Hi, I want to remove the builtin "code" module from jython and replace it with the code.py from CPython2.0. The Lib/code.py files will then also be removed. This is primary because IDLE require the real code.py. This will break code that depends on the current builtin "code" module or depends on the fact that this code module is always available. If such code exists, the workaround is to use the builtin "codeop" instead. Comments, gripes? regards, finn |
From: Samuele P. <pe...@in...> - 2000-10-30 11:23:25
|
[Finn] > But this cause silent loss of information, so I would prefer that we fix > the documentation. Does anyone have a strong opinion about this? I agree that's better to change the doc than to have a info losing coercion. For the rest: I'm working on the prec,... things. regards, Samuele |
From: <bc...@wo...> - 2000-10-29 19:33:06
|
Hi, Daniel Wood discovered that a python float does not autocoerce to a java int when passed to a java method. Jython 2.0 pre-alpha on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import java >>> java.lang.Integer(1.0) Traceback (innermost last): File "<console>", line 1, in ? TypeError: java.lang.Integer(): 1st arg can't be coerced to int or String >>> The documentation in usejava.html says that floats will be converted to ints, so there is a bug in either the docs or in the code. But which is it? Fixing the code could look like this: Index: PyFloat.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyFloat.java,v retrieving revision 2.2 diff -u -r2.2 PyFloat.java --- PyFloat.java 1999/10/04 22:21:46 2.2 +++ PyFloat.java 2000/10/29 19:26:28 @@ -68,6 +68,9 @@ if (c == Float.TYPE || c == Float.class) { return new Float(value); } + if (c == Integer.TYPE || c == Integer.class) { + return new Integer((int) value); + } return super.__tojava__(c); } But this cause silent loss of information, so I would prefer that we fix the documentation. Does anyone have a strong opinion about this? regards, finn |
From: Samuele P. <pe...@in...> - 2000-10-28 19:18:42
|
Hi. [Finn] > [Samuele] > > >Let's do that way. If you mean the gathering of frozen packages info, plus > >the initProxy,initProps,runMain stuff, > > I will commit this soon. The list of modules is passed to > Py.initProperties() which right now only prints the list for debugging > purposes. The list looks like this: > > String[] modules = { "p0.__init__", "a", "p0.x" } > > Is this what you need? It should be ok, otherwise I can adjust your code, if that does not disturb you. > >I imagine I can also fix the two last bugs: very likely the first as part of > >the findattr rewriting. > > I assume bug #2 must be solved in jythonc. (Pity we can't re-use the > algorithm for searching for modules from jython itself) Yes, it's a jythonc bug. > >[Finn] > >>>(a little note) Differently from jython, jythonc follows > >>>the proposed precedence py > java. For the rest (java loading) > >>>it uses the org.python.core runtime. Is that true? > >> > >>I don't think so. jythonc creates a list of known java packages and > >>passes this list on to sys.add_package() during initialization. This > >>creates PyJavaPackages which is currently searched before the python > >>modules. I think. But hey, you're the expert <wink>. > > > >I just hope I'm the expert ;). Sorry for the confusion. I was referring to > >the jythonc handling of import stmt > >at compilation time, not to the interaction between compiled code and jython > >runtime. > > Ohh, I see. I'm entirely sure about that either, but it does seem to be > the case. I'll look further into this and maybe fix bug #2. I have studied the code for tracking bug #2. In order to solve it one should give jythonc ImportName.lookupName information about the package of the module in which the involved import is. The information is somehow around. It is clearly needed to construct the path necessary for relative lookup. I have just started working on the rest. regards, Samuele |
From: <bc...@wo...> - 2000-10-28 14:10:17
|
[Samuele] >Let's do that way. If you mean the gathering of frozen packages info, plus >the initProxy,initProps,runMain stuff, I will commit this soon. The list of modules is passed to Py.initProperties() which right now only prints the list for debugging purposes. The list looks like this: String[] modules = { "p0.__init__", "a", "p0.x" } Is this what you need? >I imagine I can also fix the two last bugs: very likely the first as part of >the findattr rewriting. I assume bug #2 must be solved in jythonc. (Pity we can't re-use the algorithm for searching for modules from jython itself) >I will disable the unfinished support for poor freezing, we once reffered >to. Ok. I have no problem with that. >And the loading of python modules from mixed java/python pkgs, because with >the new precedence this is no more necessary and just confusing, there will >be only python pkgs that eventually shadow java pkgs but leaving access to >them, or >not shadowed pure java pkgs. Exactly. This is one of the reason I believe that we are onto something good. >[Finn] >>>(a little note) Differently from jython, jythonc follows >>>the proposed precedence py > java. For the rest (java loading) >>>it uses the org.python.core runtime. Is that true? >> >>I don't think so. jythonc creates a list of known java packages and >>passes this list on to sys.add_package() during initialization. This >>creates PyJavaPackages which is currently searched before the python >>modules. I think. But hey, you're the expert <wink>. > >I just hope I'm the expert ;). Sorry for the confusion. I was referring to >the jythonc handling of import stmt >at compilation time, not to the interaction between compiled code and jython >runtime. Ohh, I see. I'm entirely sure about that either, but it does seem to be the case. I'll look further into this and maybe fix bug #2. regards, finn |
From: <bc...@wo...> - 2000-10-28 12:55:27
|
Samuele, I just commit some minor changes, most of it have already been discussed here. However, since one of the changes touched some of the sources you must work on also, a "cvs update" will be prudent. regards, finn |
From: Samuele P. <pe...@in...> - 2000-10-27 22:31:09
|
Hi. [Finn] > > [Samuele] > >I clarified to myself that jythonc should build the list, use the new > >order dealing with imports but it is not necessary that it find out > >that a py pkg is also a java pkg :). The modified runtime support > >can deal with this. > > [Finn] > >I can make this change. Py.initProxy will then get a new "String[] > >modules" argument. I'll make it a patch,, i.e I will not commit this > >until we have settled the complete semantic change. > > [Samuele] > >> During the next weekend I will somehow start experimenting with > >> merging PyJava*Packages and sys.path java load support. > >> So we will have some experience about this. > > > >Given the flat sematic for sys.path java loading (no dynamic __path__'s) > >there is nothing to experiment with, fixing things to the new semantic > >should be simple (and make code cleaner), > >up to jpythonc building the list (but I think it already gathers that > >information) > > Correct, it does. > > >and how radically can we change PackageManager, but I don't > >think its interface was intended to be public up to the sys.add_package > >door that will still be there. > > I can't quite parse the paragraph above, but I think sys.add_package is > just about the only intended public interface to the PackageManager. > > >It is really just Barry turn to express his opinions and concerns. > > Let's not necessarily wait for that. Everybody who have spoken up agrees > that the new precedence is an improvement. With an implementation > available we can get some real world feedback from the users that are > tracking the CVS. > > The precedence we are talking about can be described like this: > > Known frozen pys > sys.path (py) > java pkgs > sys.path (java) > > I'll get the necessary changes to jythonc ready by saturday. > Yes that's the precedence we're talking about. Let's do that way. If you mean the gathering of frozen packages info, plus the initProxy,initProps,runMain stuff, I can work on the rest (the famous PackageManager,findattrs,PyJava*Package,BytecodeLoader) during the weekend and for next week. I imagine I can also fix the two last bugs: very likely the first as part of the findattr rewriting. I will disable the unfinished support for poor freezing, we once reffered to. And the loading of python modules from mixed java/python pkgs, because with the new precedence this is no more necessary and just confusing, there will be only python pkgs that eventually shadow java pkgs but leaving access to them, or not shadowed pure java pkgs. I would like to have poor freezing + loading from classpath/jars of python pkgs in interpreted mode, but we can think about it later. For the moment I hope there is nobody around who really relies on undocumented/unfinished stuff. The documented part of the story, -jar option and __run__.py will still be supported. [Finn] >>(a little note) Differently from jython, jythonc follows >>the proposed precedence py > java. For the rest (java loading) >>it uses the org.python.core runtime. Is that true? > >I don't think so. jythonc creates a list of known java packages and >passes this list on to sys.add_package() during initialization. This >creates PyJavaPackages which is currently searched before the python >modules. I think. But hey, you're the expert <wink>. I just hope I'm the expert ;). Sorry for the confusion. I was referring to the jythonc handling of import stmt at compilation time, not to the interaction between compiled code and jython runtime. About that your picture is exact. regards, Samuele |
From: <bc...@wo...> - 2000-10-27 21:16:46
|
[Samuele] >I clarified to myself that jythonc should build the list, use the new >order dealing with imports but it is not necessary that it find out >that a py pkg is also a java pkg :). The modified runtime support >can deal with this. [Finn] >I can make this change. Py.initProxy will then get a new "String[] >modules" argument. I'll make it a patch,, i.e I will not commit this >until we have settled the complete semantic change. [Samuele] >> During the next weekend I will somehow start experimenting with >> merging PyJava*Packages and sys.path java load support. >> So we will have some experience about this. > >Given the flat sematic for sys.path java loading (no dynamic __path__'s) >there is nothing to experiment with, fixing things to the new semantic >should be simple (and make code cleaner), >up to jpythonc building the list (but I think it already gathers that >information) Correct, it does. >and how radically can we change PackageManager, but I don't >think its interface was intended to be public up to the sys.add_package >door that will still be there. I can't quite parse the paragraph above, but I think sys.add_package is just about the only intended public interface to the PackageManager. >It is really just Barry turn to express his opinions and concerns. Let's not necessarily wait for that. Everybody who have spoken up agrees that the new precedence is an improvement. With an implementation available we can get some real world feedback from the users that are tracking the CVS. The precedence we are talking about can be described like this: Known frozen pys > sys.path (py) > java pkgs > sys.path (java) I'll get the necessary changes to jythonc ready by saturday. regards, finn |
From: <bc...@wo...> - 2000-10-27 21:15:35
|
[Samuele] >Let's consider the following module/pkg/dir hierarchy: >TOP/ > a.py > p0/ > __init__.py > x.py > y.py > p1/ > __init__.py > z.py > >all python files just contain: >print __name__ > >except a.py: > >import p0.x > >print __name__ > >and x.py: > >import y >import p1.z > >print __name__ > >(0) If one executes a.py from TOP with CPython 1.5/1.6/2.0 everything > works fine. > >(1) Jython instead fails to locate p1 relative to x package (stmt import p1.z in >x.py). > >Built-in Package Support in Python 1.5 >( http://www.python.org/doc/essays/packages.html ) > >is not explicit about loading packages relative to modules in pkgs, it only >speaks about module (but pkgs "are" modules) rel. import, in any case CPython >behaviour is to find p1 package relative to x package p0 completing import p1.z >in x.py. >So jython seems buggy in this respect. I agree, this is bug. Complex python applications depends on this relative behaviour, so it should be fixed. OTOH, since no one have reported the bug it does not have get a high priority. (Once on python-dev, it was suggested that relative imports should look in each package, the whole way up the package structure. If my memory serves me right, there was a very high level of agreement that this would be a good thing) >Notice that jython correctly locate y. > >(2) If one compiles a.py with jythonc and the --deep option, >p0.y will not be compiled. The relative import rule is ignored >by jythonc. In my opinion this is a bug, and I know how possibly >fix this. Also a bug IMO. Also a low priority for the same reasons. >Both bugs are better solved in the "grand" *loading cleanup... > >(a little note) Differently from jython, jythonc follows >the proposed precedence py > java. For the rest (java loading) >it uses the org.python.core runtime. Is that true? I don't think so. jythonc creates a list of known java packages and passes this list on to sys.add_package() during initialization. This creates PyJavaPackages which is currently searched before the python modules. I think. But hey, you're the expert <wink>. regards, finn |
From: Samuele P. <pe...@in...> - 2000-10-27 12:26:07
|
Hi. Let's consider the following module/pkg/dir hierarchy: TOP/ a.py p0/ __init__.py x.py y.py p1/ __init__.py z.py all python files just contain: print __name__ except a.py: import p0.x print __name__ and x.py: import y import p1.z print __name__ (0) If one executes a.py from TOP with CPython 1.5/1.6/2.0 everything works fine. (1) Jython instead fails to locate p1 relative to x package (stmt import p1.z in x.py). Built-in Package Support in Python 1.5 ( http://www.python.org/doc/essays/packages.html ) is not explicit about loading packages relative to modules in pkgs, it only speaks about module (but pkgs "are" modules) rel. import, in any case CPython behaviour is to find p1 package relative to x package p0 completing import p1.z in x.py. So jython seems buggy in this respect. Notice that jython correctly locate y. (2) If one compiles a.py with jythonc and the --deep option, p0.y will not be compiled. The relative import rule is ignored by jythonc. In my opinion this is a bug, and I know how possibly fix this. Both bugs are better solved in the "grand" *loading cleanup... (a little note) Differently from jython, jythonc follows the proposed precedence py > java. For the rest (java loading) it uses the org.python.core runtime. Is that true? Remarks are welcome. regards, Samuele |
From: <bc...@wo...> - 2000-10-26 14:41:24
|
I once wrote: >We may have a problem with JavaCC-2.0 on (some?) Macs. Frode Reinsnes >have tested errata-09 (which uses JavaCC-1.1) and encountered a >ArrayIndexOutOfBoundsException. > >http://www.python.org/pipermail/jpython-interest/2000-October/006356.html There are now more info available: [Frode Reinsnes] >I have trace the problem lintel more down. The problem is in FillBuff. and >the problem occure when you try to read one char in the last posison in the >buffer. That mean theat maxNextCharInd == bufsize-1. > > if ((i = inputStream.read(buffer, maxNextCharInd, > available - maxNextCharInd)) == -1) > > >A call to inputStream.read(buffer,buffer.length-1,1) will return a larg >negativ number. This is perhaps a bug in MRJ2.2? I would say it is a bug in MRJ2.2. It is however a bug that will hurt jython when used under that version of the JVM. The return value of Reader.read(b,o,l) is documented as: """ The number of characters read, or -1 if the end of the stream has been reached """ The inputStream is actually a new InputStreamReader( new BufferedInputStream( new FileInputStream(new File(modname + ".py")))) I suspect it is the ByteToCharConverter in the InputStreamReader, that somehow get confused and return a wrong length. I still have no clue what to do about it. regards, finn |
From: <bc...@wo...> - 2000-10-26 14:40:52
|
Hi, When updating sre to handle keyword argument in patter.sub(..) and frieds, I needed some helper function to scan, error check and find keyword parameters. Basicly the same as CPython's PyArg_ParseTupleAndKeywords. Below is such a utility class which I suggest shuold be added to core. A typical use will look like this: public MatchObject search(PyObject[] args, String[] kws) { ArgParser ap = new ArgParser("search", args, kws, "pattern", "pos", "endpos"); String string = ap.getString(0); int start = ap.getInt(1, 0); int end = ap.getInt(2, string.length()); ... The ctor gets the function name, the actual arguments/keywords and the expected keyword names. Some checks are then performed by the ArgParser constructor. The values are then extracted using the ap.getXXX() methods. In the example, the first "pattern" argument is required (therefore no default value is specified). The last two arguments have a default value given as the second parameter to ap.getXXX(). If this is wrong, badly named or not general enough, speak up now. regards, finn package org.python.core; /** * A utilityclass for handling mixed positional and keyword arguments. * * A typical usage: * <pre> * public MatchObject search(PyObject[] args, String[] kws) { * ArgParser ap = new ArgParser("search", args, kws, * "pattern", "pos", "endpos"); * String string = ap.getString(0); * int start = ap.getInt(1, 0); * int end = ap.getInt(2, string.length()); * ... * </pre> */ public class ArgParser { // The name of the function. Used in exception messages private String funcname; // The actual argument values. private PyObject[] args; // The list of actual keyword names. private String[] kws; // The list of allowed and expected keyword names. private String[] params = null; // A marker. private static Object required = new Object(); private ArgParser(String funcname, PyObject[] args, String[] kws) { this.funcname = funcname; this.args = args; this.kws = kws; } public ArgParser(String funcname, PyObject[] args, String[] kws, String p0) { this(funcname, args, kws); this.params = new String[] { p0 }; check(); } public ArgParser(String funcname, PyObject[] args, String[] kws, String p0, String p1) { this(funcname, args, kws); this.params = new String[] { p0, p1 }; check(); } public ArgParser(String funcname, PyObject[] args, String[] kws, String p0, String p1, String p2) { this(funcname, args, kws); this.params = new String[] { p0, p1, p2 }; check(); } public ArgParser(String funcname, PyObject[] args, String[] kws, String[] paramnames) { this(funcname, args, kws); this.params = paramnames; check(); } public String getString(int pos) { return (String) getArg(pos, String.class, "string"); } public String getString(int pos, String def) { return (String) getArg(pos, String.class, "string", def); } public int getInt(int pos) { return getRequiredArg(pos).__int__().getValue(); } public int getInt(int pos, int def) { PyObject value = getOptionalArg(pos); if (value == null) return def; return value.__int__().getValue(); } public PyObject getPyObject(int pos) { return getRequiredArg(pos); } public PyObject getPyObject(int pos, PyObject def) { PyObject value = getOptionalArg(pos); if (value == null) value = def; return value; } private void check() { l1: for (int i = 0; i < kws.length; i++) { for (int j = 0; j < params.length; j++) { if (kws[i].equals(params[j])) continue l1; } throw Py.TypeError(kws[i] + " is an invalid keyword argument " + "for this function"); } } private PyObject getRequiredArg(int pos) { PyObject ret = getOptionalArg(pos); if (ret == null) throw Py.TypeError(funcname + ": The " + ordinal(pos) + " argument is required"); return ret; } private PyObject getOptionalArg(int pos) { int kws_start = args.length - kws.length; if (pos < kws_start) return args[pos]; for (int i = 0; i < kws.length; i++) { if (kws[i].equals(params[pos])) return args[kws_start + i]; } return null; } private Object getArg(int pos, Class clss, String classname) { return getArg(pos, clss, classname, required); } private Object getArg(int pos, Class clss, String classname, Object def) { PyObject value = null; if (def == required) value = getRequiredArg(pos); else { value = getOptionalArg(pos); if (value == null) return def; } Object ret = value.__tojava__(clss); if (ret == Py.NoConversion) throw Py.TypeError("argument " + (pos+1) + ": expected " + classname + ", " + Py.safeRepr(value) + " found"); return ret; } private static String ordinal(int n) { switch(n+1) { case 1: return "1st"; case 2: return "2nd"; case 3: return "3rd"; default: return Integer.toString(n+1)+"th"; } } } |
From: Samuele P. <pe...@in...> - 2000-10-26 13:59:52
|
Hi. [Finn] > >I clarified to myself that jythonc should build the list, use the new > >order dealing with imports but it is not necessary that it find out > >that a py pkg is also a java pkg :). The modified runtime support > >can deal with this. > > I can make this change. Py.initProxy will then get a new "String[] > modules" argument. I'll make it a patch,, i.e I will not commit this > until we have settled the complete semantic change. [me] > During the next weekend I will somehow start experimenting with > merging PyJava*Packages and sys.path java load support. > So we will have some experience about this. Given the flat sematic for sys.path java loading (no dynamic __path__'s) there is nothing to experiment with, fixing things to the new semantic should be simple (and make code cleaner), up to jpythonc building the list (but I think it already gathers that information) and how radically can we change PackageManager, but I don't think its interface was intended to be public up to the sys.add_package door that will still be there. It is really just Barry turn to express his opinions and concerns. regards, Samuele. |
From: <bc...@wo...> - 2000-10-26 08:24:00
|
[Dj] >I know this is minor but it has been quietly bugging me. > >Shouldn't the org directory in the jython tree be inside a src directory >rather than >having the top of the package hierachy appearing? It was organized so in JPython-1.0 and was changed in the 1.1beta's. Personally, I rather like the new layout. I suspect that Barry does too. Perhaps this preference have something to do with the fifth rule of The Zen of Python: - Flat is better than nested. regards, finn |
From: Samuele P. <pe...@in...> - 2000-10-25 12:11:52
|
Hi. During the next weekend I will somehow start experimenting with merging PyJava*Packages and sys.path java load support. So we will have some experience about this. regards, Samuele. |
From: Dj <dj...@ru...> - 2000-10-25 11:56:48
|
I know this is minor but it has been quietly bugging me. Shouldn't the org directory in the jython tree be inside a src directory rather than having the top of the package hierachy appearing? PS. After building a new build.xml which handled the javacc and jjtree stuff as "exec" processes, the new release of Ant 1.2 came out which has javacc and jjtree as built in tasks so I'm redoing it with that at the moment. Dj |
From: Tim P. <ti...@em...> - 2000-10-25 07:43:23
|
[Finn Bock] > I have made a "sha" module based on source from cryptix. Their license > "The cryptix general license" is claimed to a Berkeley License. > > http://www.cryptix.org/docs/license.html Yes, that's "the new" Berkeley License (w/ a different copyright holder), and not even the FSF <wink> will have a problem with it. > The source SHA1.java contains the complete license text from the link > above. The sha.__doc__ also contains the complete license text. By this > I hope to have complied with both conditions, but before I commit it I > want to be sure ... > > Would it cause problems for users if some parts of jython are covered by > such a license? It should be fine -- it doesn't obligate them in any way, except to refrain from removing the copies of the license you added. There are a few similar files in the CPython implementation, and nobody ever complained about them there either. too-many-licenses-are-a-weariness-of-the-soul-ly y'rs - tim |
From: <bc...@wo...> - 2000-10-24 17:44:27
|
Hi, I have made a "sha" module based on source from cryptix. Their license "The cryptix general license" is claimed to a Berkeley License. http://www.cryptix.org/docs/license.html The source SHA1.java contains the complete license text from the link above. The sha.__doc__ also contains the complete license text. By this I hope to have complied with both conditions, but before I commit it I want to be sure ... Would it cause problems for users if some parts of jython are covered by such a license? regards, finn |
From: <bc...@wo...> - 2000-10-23 19:38:55
|
[Dj] >... Can jython be built with the >current version (2.0) of javacc or are we still locked on the old version We have moved to version javacc-2.0. regards, finn |
From: <ba...@wo...> - 2000-10-23 19:26:06
|
>>>>> "D" == Dj <dj...@ru...> writes: D> Yup, I skipped that. (I'll get right on to it). Can jython be D> built with the D> current version (2.0) of javacc or are we still locked on the D> old version (and if so, anyone got a copy they could send me; I D> can't find the old one anywhere). JavaCC 2.0 works just fine now! -Barry |
From: Dj <dj...@ru...> - 2000-10-23 19:01:56
|
Finn Bock wrote: > One thing that is missing in your build.xml is the handling of > org/python/parser/python.jjt, first by jjtree and then by javacc. Yup, I skipped that. (I'll get right on to it). Can jython be built with the current version (2.0) of javacc or are we still locked on the old version (and if so, anyone got a copy they could send me; I can't find the old one anywhere). Dj |
From: <bc...@wo...> - 2000-10-23 17:40:52
|
[Dj] >After grabbing jython, I threw a quick ant build.xml file together... Great. I never got around to do it myself. >then I thought I'd better ask if there was actually a mandated build >procedure for >jython. No. Barry use "make" on his unix, I just do a "jikes *.java" in each directory manually. >I quite like the look of Ant as it keeps the portability up. Me too. One thing that is missing in your build.xml is the handling of org/python/parser/python.jjt, first by jjtree and then by javacc. If you add that (and the corresponding clean commands), I'll include your build.xml in the cvs. regards, finn |