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
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Bugbee, L. <Lar...@PS...> - 2001-01-23 20:26:03
|
All, The short answer is that I upgraded from IBM's Linux Java2 1.3.0 release 1.0 (dated 6/23/2000) to release 5.0 (dated 11/24/2000) and the problem went away. I'm now running Jython 2.0 final. (I have not yet tried Sun's Linux JVM. And, I have the details surrounding the original problem, but I doubt there is much interest.) Jython is goodness... Larry > ---------- > From: Bugbee, Larry[SMTP:Lar...@ps...] > Sent: Monday, January 22, 2001 10:48 AM > To: 'jyt...@li...' > Subject: [Jython-dev] jython20b2 works, jython20 final doesn't > > Hi, > > I was running RedHat 6.2, IBM Java2 v1.3.0, and jython 2.0b2, and all was well. > > I installed jython 2.0 (final) and I got a stack protection error while processing jython.jar. I reinstall jython 20b2 and all is well again. > > Anybody else having this problem? ..any suggestions? > > Larry > > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-dev > |
|
From: Ype K. <yk...@xs...> - 2001-01-23 19:50:03
|
>Hello, > >where can I find module select. >It's not in [My-Jython2.0-Dir]/Lib. >I got an import error if I try to >import this module. >(I.E. it's used by module telnetlib). >I have no problem with other Libs. A few days ago I checked briefly on the sockets that Java makes available and this is what I found: The 'native' Java lib does not provide a select function, so Jython cannot make use of it. The sockets that are there only a allow to check whether sockets are ready for reading, ie. you can get to the inputstream of a socket and ask for the nr. of bytes it has available. However you can't ask the socket's outputstream for the nr. of bytes it hasn't written yet, you can only flush the outputstream. Also there is no out of band data in Java, and for exceptional things (like TCP/IP errors) happening to an inputstream, you would have to catch the corresponding exception from the socket first. Read timeouts are there, and so is the TCP no delay option, as well as a shutdown and lingering on close. Non blocking reads can be done by using a very short time out. You can't do non blocking writes IIRC. I still hope I didn't look close enough, though. Regards, Ype |
|
From: <bc...@wo...> - 2001-01-23 18:12:09
|
[Andy] >On page http://www.jython.org/applets/index.html >the link for the Java Source code for the loader display >http://www.jython.org/applets/JythonLoader.java >is not loadable. Thanks for the report. It is fixed now. regards, finn |
|
From: <an...@fb...> - 2001-01-23 16:11:15
|
Hi On page http://www.jython.org/applets/index.html the link for the Java Source code for the loader display http://www.jython.org/applets/JythonLoader.java is not loadable. Andy -- ----------------------------------------------------------- an...@fb... - F B N Software ----------------------------------------------------------- |
|
From: Markus W. <We...@gm...> - 2001-01-23 16:01:29
|
Hello, where can I find module select. It's not in [My-Jython2.0-Dir]/Lib. I got an import error if I try to import this module. (I.E. it's used by module telnetlib). I have no problem with other Libs. thank you in advance, regards Markus -- Sent through GMX FreeMail - http://www.gmx.net |
|
From: Samuele P. <pe...@in...> - 2001-01-23 02:10:02
|
Hi.
[me]
>....
> In this case the listener function hold a ref to the source object, to solve
> this the table should (carefully) use weak-refs for values
> too. In the meantime this kind of code can be avoided given that events come
> with source info.
>
In a private discussion with Rich and Finn the following type of code has been
recalled:
class Button1(java.awt.Button):
def __init__(self):
self.actionPerformed = self.action
def action(self):
pass
b=Button1()
More complex components behaviour is customized this way - very often I
imagine. It's a natural style that I used too, and I just forgot about it.
Clearly setting
self.actionPerformed to a bound method (contains a ref to self) prevent gc as
in the example I previously presented.
Asking to avoid this kind of coding is asking too much. So I have committed a
patch along my proposal, that allows b to be collected.
Important things:
- WeakHashMap use for adapters was and now the new patch is always enabled
under java2 (no need to set internalTablesImpl for that - this option is really
only related to class unloading, not adapters gc).
- b would remain stuck in memory (no gc) also under JPython 1.1 and this will
continue to happen also with jython under java 1.1 - I see no way to avoid
that.
regards, Samuele Pedroni.
|
|
From: Bugbee, L. <Lar...@PS...> - 2001-01-22 18:48:34
|
Hi, I was running RedHat 6.2, IBM Java2 v1.3.0, and jython 2.0b2, and all was well. I installed jython 2.0 (final) and I got a stack protection error while processing jython.jar. I reinstall jython 20b2 and all is well again. Anybody else having this problem? ..any suggestions? Larry |
|
From: Chris A. <at...@nm...> - 2001-01-22 15:55:39
|
I am running the 2.0 release of jython on hpux11.0 with jdk1.2.2.07
I start up my jvm with the following flag on the command line:
-Dpython.security.respectJavaAccessibility=0
or with
-Dpython.security.respectJavaAccessibility=false
in either case, when I have a call such as the following:
foo.toPrintString(obj, " ", "name")
in my python code and the following definition for the java class foo,
class foo extends foobase
{
protected String toPrintString(Object obj,
String initialIndent, String name)
}
I get the following error in jython:
TypeError: toPrintString(): expected 0-2 args; got 3
Is this broken, or how do I now specify to ignore java security.
When I go back to using jython1.1, the above worked fine.
Thanks,
Chris Atkins
|
|
From: brian z. <bz...@zi...> - 2001-01-22 02:19:36
|
I would like to announce a new release of zxJDBC, the nearly 100% Python DB API 2.0 compliant interface for database connectivity in Jython. This release fixes any known bugs and adds a number of new features to the dbexts Python db wrapper script. It has been tested with the Jython 2.0 release and it is fully functional at this time. See the homepage at http://www.ziclix.com/zxjdbc for more information. Changes: - fixed a memory leak by ensuring statements and result sets are closed in finally blocks (thanks to Will Wohlman for pointing this out) - implemented callproc - added maxrows to raw and isql in dbexts - added preExecute and postExecute for DataHandler - forced a cast to String for InformixDataHandler on prepared statements when object is PyString - implemented nextset - updated dbexts.py to take advantage of the change thanks, brian |
|
From: <bc...@wo...> - 2001-01-21 11:45:21
|
[Even Solbraa] >Hi, >I have just started useing Jython 2.0 - and I really like it. >But I miss one module that I can use with Python - the Numeric module. >Could this module be used with Jython ? I have tried but couldn't make >it work. >This would be a big help for me. Maybe Tim Hochberg's JNumeric is usefull to you: http://mail.python.org/pipermail/jpython-interest/2000-July/003545.html The link in the announcement have been corrupted a bit by the pipermail archiver. Use this instead: http://members.home.net/tim.hochberg/ regards, finn |
|
From: Even S. <so...@st...> - 2001-01-20 16:08:59
|
Hi, I have just started useing Jython 2.0 - and I really like it. But I miss one module that I can use with Python - the Numeric module. Could this module be used with Jython ? I have tried but couldn't make it work. This would be a big help for me. Thank you. Even Solbraa |
|
From: Arun S. <ar...@sh...> - 2001-01-19 20:47:41
|
On NT, I did the following: >>> x = y() <failed with an error> >>> However, y.class seems to be open, because of which I couldn't delete y.class externally. Is this the expected behavior ? -Arun |
|
From: <ima...@ne...> - 2001-01-19 06:09:24
|
Subject: Worlds Most advanced Search for Industrial Products Dear Friend, Recently a new website was launched www.internetproductfinder.com which is a first of its kind in the world. This site offers small organisations,that cannot afford to spend enormous amounts to attract traffic, a better alternative to creating their individual website. As a Search Engine for Indian Industrial Products, www.internetproductfinder.com beats even Yahoo or any other you use so far. www.internetproductfinder.com is an endeavor to build an online community of Industrial Product Manufacturers, providers of Industrial services and those needing products and services from India...It also features Buyers Listing, Allows sale of Used Machinery and FREE Recruitment Ads. Register your company and build your product pages today! Each product page can have upto 2 pictures. And the best part is...It offers an opprtunity to earn over Rs 1,50,000/-. www.internetproductfinder.com is the only website, that allows the user to build a Home-Page in less than 5 minutes, that too under your very own Category and Sub-Category, thereby making it very easy for the user, to contact the right Company for the Industrial Product / Services he desires to buy. Also, you can market your products to the whole world thru www.internetproductfinder.com , by using the 'mail this page' option at the bottom of your Products Page. We will shortly be launching similiar sites for Hongkong, Taiwan, Japan, Korea, USA, etc. Yours Sincerely, Internetproductfinder Admin. -------------------------------------------------------------------------- For India oriented Email marketing, contact today ima...@re... ------------------------------------------------------ ------------------- Since India has no anti-spamming law, we follow the US directive passed in Bill.1618 Title III by the 105th US Congress, which states that mail cannot be considered spam if it contains the following information. If you want to be removed from the mailing list reply with "unsubscribe" in the subject line and specify your e-mail address as mentioned in the circular for faster response to unsubscribe. Incase you are using vsnl.com address, kindly mention both long (xx...@yy...) and short (xx...@vs...) address to save time. |
|
From: <ba...@di...> - 2001-01-18 20:46:32
|
On behalf of the Pythonlabs team, I want to extend my congratulations to Finn Bock on the release of Jython 2.0 final. This is a wonderful milestone in the life of JPython and Jython. Some of you are probably aware that I haven't been actively involved in Jython development for many months. With the Pythonlabs turmoil in 2000, I found that trying to lead two open source projects (Mailman and Jython) while still contributing to CPython's development was simply too much. I ran out of cycles and something had to give. Handing over the reins of Jython project leadership to Finn was actually quite an easy decision. He has been a valued contributor to the project for a long time, and I knew that he would serve Jython well. The Jython 2.0 release reinforces the wisdom of that decision! :) Jython is and continues to be a very important part of the Python world. The Pythonlabs team encourages and salutes Finn's work on Jython and will continue to work with him on various issues such as language development, CPython compatibility, and legal issues. I leave Jython in good hands -- thanks Finn Bock, Samuele Pedroni, and all the other Jython developers. -Barry Barry A. Warsaw PythonLabs at Digital Creations ba...@di... |
|
From: <Ric...@i2...> - 2001-01-18 16:51:40
|
Hi Samuel,
(Apologies if the formatting of this message is bizarre, we've been
forced onto Lotus Notes and I can't get it to stop chopping up my lines
in unpredictable places).
Anyhow, I had some more time to look into the problem.
In InternalTables2 you are storing a PyBeanEventProperty reference
into a HashMap, and this seems to prevent garbage collection.
If I change the implementation like so, the memory leak is closed:
protected WeakHashMap adapters;
protected Object getAdapter(Object o,String evc) {
HashMap ads = (HashMap)adapters.get(Integer.toString(o.hashCode
()));
if (ads == null) return null;
return ads.get(evc);
}
protected void putAdapter(Object o,String evc,Object ad) {
HashMap ads = (HashMap)adapters.get(Integer.toString(o.hashCode
()));
if (ads == null) {
ads = new HashMap();
adapters.put(Integer.toString(o.hashCode()),ads);
}
ads.put(evc,ad);
}
Or, alternately, I think you can do the following:
protected WeakHashMap adapters;
protected Object getAdapter(Object o,String evc) {
String key = evc + "$" + o.hashCode();
return adapters.get(key);
}
protected void putAdapter(Object o,String evc,Object ad) {
String key = evc + "$" + o.hashCode();
adapters.put(key,ad);
}
Rich
"Samuele
Pedroni" To: <jyt...@li...>,
<pedroni@inf. <Ric...@i2...>
ethz.ch> cc:
Subject: Re: [Jython-dev] Problems with weak
01/17/01 references?
04:42 PM
Hi.
First of all it seems (but maybe I'm missing something) that java.awt leaks
memory too or at least
to discard things at non-predictable points:
>>> C:\WINDOWS>\jython\mjyth
Jython 2.0beta2 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from java.lang import System,ref
>>> from java import awt
>>> f=awt.Frame()
>>> b=awt.Button()
>>> f.add(b);f.pack();f.show()
java.awt.Button[button0,0,0,0x0,invalid,label=]
>>> 0 # clears _
0
>>> w=ref.WeakReference(b)
>>> del b
>>> f.remove(w.get())
>>> System.gc(); System.gc()
>>> w.get() # leak? why?
java.awt.Button[button0,4,28,136x23,label=]
>>> 0
0
>>> f.dispose()
>>> del f
>>> System.gc()
>>> w.get()
>>>
f.remove() + System.gc() seems not enough in order to discard b?
This is related to the tables because as long as b is around, its adapters
will
be too.
Indipendently of this: the table can leak memory in some cases (it should
be
possible to fix this but after 2.0):
Jython 2.0beta2 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from java import awt
>>> import itd
>>> from java.lang import System
>>> b=awt.Button(); b.actionPerformed = lambda e: b
>>> itd.ad()
['java.awt.event.ActionListener']
>>> del b
>>> System.gc()
>>> itd.ad()
[]
>>> # no leaks with this code but
>>> b=awt.Button(); b.actionPerformed = lambda e,me=b: None
>>> itd.ad()
['java.awt.event.ActionListener']
>>> del b
>>> System.gc()
>>> itd.ad()
['java.awt.event.ActionListener']
>>> # so we get a memory leak
In this case the listener function hold a ref to the source object, to
solve
this the table should (carefully) use weak-refs for values
too. In the meantime this kind of code can be avoided given that events
come
with source info.
regards, Samuele Pedroni.
|
|
From: Fred L. D. Jr. <fd...@ac...> - 2001-01-18 16:29:27
|
Finn Bock writes: > There already is a link to: > > http://www.python.org/doc/ > > Do you have a another top-level directory which is more suitable? No; that was it. Looking again, I found the link; it was in the "visited" color, which is identical to the normal text color. This makes it very hard to tell that it's a link if you've already been there. Thanks for responding, and sorry for any confusion I created! -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Digital Creations |
|
From: <bc...@wo...> - 2001-01-18 16:00:34
|
[Fred] > Your documentation page at: > > http://www.jython.org/docs/index.html > >should probably include a link to the top-level directory of the >standard Python documentation; There already is a link to: http://www.python.org/doc/ Do you have a another top-level directory which is more suitable? >I imagine the lanuage manual would be >useful in addition to the tutorial and library reference. ;-) Thats true. Thanks. Now added to the website. regards, finn |
|
From: Fred L. D. Jr. <fd...@ac...> - 2001-01-18 15:36:07
|
Your documentation page at: http://www.jython.org/docs/index.html should probably include a link to the top-level directory of the standard Python documentation; I imagine the lanuage manual would be useful in addition to the tutorial and library reference. ;-) Thanks! -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Digital Creations |
|
From: <bc...@wo...> - 2001-01-18 10:13:31
|
I am happy to announce the release of Jython 2.0.
Jython is a Java implementation of the Python programming
language. It allows users to compile Python source code to
Java byte codes, and run the resulting bytecodes on any Java
Virtual Machine. It is a very seamless and smooth
integration with Java: from Python you have complete access
to all Java libraries, can build applets, can integrate with
Java beans, and can subclass Java classes in Python and vice
versa. Like Python, and unlike Java, Jython can also be
used interactively: just type some Jython code at the
prompt and see the results immediately.
A java installer is available for download at the Jython website:
http://www.jython.org/
Installation is started by running the installer class. Further
information and tips on installation is available at:
http://www.jython.org/install.html
Jython 2.0 is feature compatible with Python 2.0 and among the
new feature are:
- Augmented assignment, e.g. x += 1
- List comprehensions, e.g. [x**2 for x in range(10)]
- Extended import statement, e.g. import Module as Name
- Extended print statement, e.g. print >> file, "Hello"
A complete list of changes and differences are available here:
http://www.jython.org/NEWS.html
Bugs can be reported to the bug manager on SourceForge:
http://sourceforge.net/bugs/?group_id=12867
Cheers,
the jython-developers
|
|
From: Samuele P. <pe...@in...> - 2001-01-18 01:21:10
|
Hi. First of all it seems (but maybe I'm missing something) that java.awt leaks memory too or at least to discard things at non-predictable points: >>> C:\WINDOWS>\jython\mjyth Jython 2.0beta2 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> from java.lang import System,ref >>> from java import awt >>> f=awt.Frame() >>> b=awt.Button() >>> f.add(b);f.pack();f.show() java.awt.Button[button0,0,0,0x0,invalid,label=] >>> 0 # clears _ 0 >>> w=ref.WeakReference(b) >>> del b >>> f.remove(w.get()) >>> System.gc(); System.gc() >>> w.get() # leak? why? java.awt.Button[button0,4,28,136x23,label=] >>> 0 0 >>> f.dispose() >>> del f >>> System.gc() >>> w.get() >>> f.remove() + System.gc() seems not enough in order to discard b? This is related to the tables because as long as b is around, its adapters will be too. Indipendently of this: the table can leak memory in some cases (it should be possible to fix this but after 2.0): Jython 2.0beta2 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> from java import awt >>> import itd >>> from java.lang import System >>> b=awt.Button(); b.actionPerformed = lambda e: b >>> itd.ad() ['java.awt.event.ActionListener'] >>> del b >>> System.gc() >>> itd.ad() [] >>> # no leaks with this code but >>> b=awt.Button(); b.actionPerformed = lambda e,me=b: None >>> itd.ad() ['java.awt.event.ActionListener'] >>> del b >>> System.gc() >>> itd.ad() ['java.awt.event.ActionListener'] >>> # so we get a memory leak In this case the listener function hold a ref to the source object, to solve this the table should (carefully) use weak-refs for values too. In the meantime this kind of code can be avoided given that events come with source info. regards, Samuele Pedroni. |
|
From: Markus W. <We...@gm...> - 2001-01-17 16:24:10
|
Hello Jythonists, I tried to use the telnetlib as described in the lib-file (telnetlib.py). But module select seems to be untraceable: ( >>> import telnetlib Traceback (innermost last): File "<console>", line 1, in ? File "d:\jython-2.0rc1\Lib\telnetlib.py", line 42, in ? ImportError: no module named select ) Any suggestions how to solve this problem ? Thank you for your help in advance, regards from Germany Markus -- Sent through GMX FreeMail - http://www.gmx.net |
|
From: Mats W. <ma...@la...> - 2001-01-17 15:18:19
|
Is it possible to mirror the last release or two someplace other than Source Forge? I can't download from there unless I get extremely lucky. I don't know if I have worse paths than anyone else to the admittedly inadequate sourceforge download server... I have not been able to download the release candidate file, which has failed a half-dozen times now. The average transfer rate - before things just give up - hovers around 0.2k/sec, which would put it at a 2.5 hour download, if it actually completed! (eventually it just gives up with no messages) Mats |
|
From: Samuele P. <pe...@in...> - 2001-01-17 00:07:22
|
Hi.
[Finn]
>Luckily <wink> it happens fairly often on my 300Mhz win2k & jdk1.3.
>
>The situation where it happens for me, seems to be because
>PyJavaClass(__builtin__) gets booted from the internal tables.
>When that happens, all the assignments done in Py.setBuiltinExceptions()
>is lost. The booting is done during PySystemState.initPackages, which is
>before the default PySystemState instance is create. When that instance
>is created, it will keep the __builtin__ dict alive.
>
>Storing a reference of the PyJavaClass(__builtin__) in Py appears to
>close the hole.
>
> private static PyJavaClass v;
>
> public static void setBuiltinExceptions() {
> v = PyJavaClass.lookup(org.python.core.__builtin__.class);
> PyObject dict = v.__getattr__("__dict__");
>
>
>Since the the builtin exceptions are stored in PyJavaClass.__dict__,
>these bindings are not recreated when the PyJavaClass(__builtin__) is
>recreated.
>
>I think that could explain it. Do you agree Samuele?
Yes, if an instance of PyJavaClass is kept alive in the non-weak case just by
the internal tables, it could
be garbage collected when weak internal tables are turned on.
The fix seems fine up to the field name v <wink>.
We should check if something similar is happening for other classes too. I
regret not having done such a check before.
[Rich]
> Also, it seems that the PyBeanEventProperty class is has a memory
> leak. Previously I had made a local patch to it, replacing it's
> HashMap's with WeakHasMaps. I verified that garbage collection was
> occurring by means of debugging print statements in the "finalize" method
> of some of my Java base classes. These same statements are never
> executed when using the new weak reference implementation.
>
> I can't see anything wrong with the new code, but it seems
> fairly certain that it isn't working When I switch back to my
> "WeakHashMap" patch I see that they are executed.
>
> Of course, it's difficult to _prove_ anything here, since I don't have
> much control over when garbage collection occurs. But things do look
> a bit suspicious. Has anyone else been trying out the weak reference
> implementation?
Are the adapters that do not get garbage collected (this should work also
without the weak option,
under java2 the adapters table is always implemented as a WeakHashTable)
or the adaptersClasses?
At least for adapters the following example shows that (at least in principle)
they are garbage collected:
Note: itd.py is the module that I used to debug the new internal tables,
you can use it to track the problem (that would be nice <wink>).
(I already tried that before submitting the new table design).
I have experience that also classes (not tried for adaptersClasses) in the main
table get properly discarded.
Jython 2.0beta2 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from java import awt,lang
>>> import itd
>>> itd.ac() # lists the "listeners" for which an adapter-class exists and is
hold in the tbl
[]
>>> itd.ad() # lists the adpter instances (truly the for each one the
"listener"
name is shown)
[]
>>> b=awt.Button() # this alone does not create an adapter
>>> # we force the creation of an adapter
>>> b.actionPerformed
<CompoundCallable with 0 callables>
>>> itd.ac(),itd.ad()
(['java.awt.event.ActionListener'], ['java.awt.event.ActionListener'])
>>> del b
>>> lang.System.gc() # we force gc
>>> itd.ac(),itd.ad() # the adapter should have been gced
(['java.awt.event.ActionListener'], [])
Let me know.
regards, Samuele Pedroni.
<itd.py>
# Copyright 2000 Samuele Pedroni
from java.lang import Class
from org.python.core import PyJavaClass as JC
t=JC.getInternalTables()
def lazy():
r = []
t._beginLazyCanonical()
while 1:
x=t._next()
if not x: break
r.append(x.name)
return r
def canon():
r = []
t._beginCanonical()
while 1:
x=t._next()
if not x: break
r.append(Class.getName(x))
return r
def ac():
r = []
t._beginOverAdapterClasses()
while 1:
x=t._next()
if not x: break
r.append(Class.getName(x))
return r
def ad():
r = []
t._beginOverAdapters()
while 1:
x=t._next()
if not x: break
r.append(Class.getName(x))
return r
|
|
From: <bc...@wo...> - 2001-01-16 19:32:30
|
[Rich]
>I've been playing with the new python.options.internalTablesImpl option.
>I'm noticing some oddities when I set this to "weak".
>
>Every once in a while I get the following error when I start up the
>Jython interpreter:
>
>Jython 2.0rc1 on java1.3.0_01 (JIT: null)
>error importing site
>Traceback (innermost last):
> File "/home/rseddon/pnp/3rdparty/jython/Lib/site.py", line 68, in ?
> File "/home/rseddon/pnp/3rdparty/jython/Lib/javaos.py", line 6, in ?
>NameError: OSError
>
>This doesn't happen very often, and I haven't found any way to
>reproduce it consistently.
Luckily <wink> it happens fairly often on my 300Mhz win2k & jdk1.3.
The situation where it happens for me, seems to be because
PyJavaClass(__builtin__) gets booted from the internal tables.
When that happens, all the assignments done in Py.setBuiltinExceptions()
is lost. The booting is done during PySystemState.initPackages, which is
before the default PySystemState instance is create. When that instance
is created, it will keep the __builtin__ dict alive.
Storing a reference of the PyJavaClass(__builtin__) in Py appears to
close the hole.
private static PyJavaClass v;
public static void setBuiltinExceptions() {
v = PyJavaClass.lookup(org.python.core.__builtin__.class);
PyObject dict = v.__getattr__("__dict__");
Since the the builtin exceptions are stored in PyJavaClass.__dict__,
these bindings are not recreated when the PyJavaClass(__builtin__) is
recreated.
I think that could explain it. Do you agree Samuele?
regards,
finn
|
|
From: <Ric...@i2...> - 2001-01-16 18:08:33
|
Hi, I've been playing with the new python.options.internalTablesImpl option. I'm noticing some oddities when I set this to "weak". Every once in a while I get the following error when I start up the Jython interpreter: Jython 2.0rc1 on java1.3.0_01 (JIT: null) error importing site Traceback (innermost last): File "/home/rseddon/pnp/3rdparty/jython/Lib/site.py", line 68, in ? File "/home/rseddon/pnp/3rdparty/jython/Lib/javaos.py", line 6, in ? NameError: OSError This doesn't happen very often, and I haven't found any way to reproduce it consistently. Is it possible that the table holding this is being garbage collected? I never see this error when I'm not using the weak table implementation. Also, it seems that the PyBeanEventProperty class is has a memory leak. Previously I had made a local patch to it, replacing it's HashMap's with WeakHasMaps. I verified that garbage collection was occurring by means of debugging print statements in the "finalize" method of some of my Java base classes. These same statements are never executed when using the new weak reference implementation. I can't see anything wrong with the new code, but it seems fairly certain that it isn't working When I switch back to my "WeakHashMap" patch I see that they are executed. Of course, it's difficult to _prove_ anything here, since I don't have much control over when garbage collection occurs. But things do look a bit suspicious. Has anyone else been trying out the weak reference implementation? Rich |