#jython IRC Log (v0.9)

Index

IRC Log for 2011-11-16

Timestamps are in GMT/BST.

[0:03] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Quit: ChatZilla 0.9.87 [Firefox 3.6.20/20110803131630])
[0:04] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[0:15] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Read error: Connection reset by peer)
[0:16] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[1:11] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Quit: Ex??re)
[3:24] * shashank (~shashank@65-101-219-224.hlrn.qwest.net) has joined #jython
[8:00] * shashank (~shashank@65-101-219-224.hlrn.qwest.net) Quit (Quit: Leaving.)
[8:30] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[9:29] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[9:53] * stakkars_ (~tismer@p5DDB7E68.dip.t-dialin.net) has joined #jython
[9:53] * stakkars (~tismer@p5DDB7E68.dip.t-dialin.net) Quit (Read error: Connection reset by peer)
[9:53] * stakkars_ is now known as stakkars
[11:26] * wainersm (~wainersm@201-68-154-79.dsl.telesp.net.br) has joined #jython
[12:25] * juneau001 (~juneau@131.225.24.141) has joined #jython
[13:07] * stakkars (~tismer@p5DDB7E68.dip.t-dialin.net) Quit (Read error: Connection reset by peer)
[13:07] * stakkars (~tismer@p5DDB7E68.dip.t-dialin.net) has joined #jython
[14:05] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[14:06] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Client Quit)
[14:06] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[14:26] * MacRohard (rm@felix.lechat.ir) Quit (Ping timeout: 276 seconds)
[14:31] * MacRohard (rm@felix.lechat.ir) has joined #jython
[14:57] * offbyone (u910@gateway/web/irccloud.com/x-thaylhnmlrnsshbb) Quit (Read error: Connection reset by peer)
[14:57] * lopex (u4272@gateway/web/irccloud.com/x-nghpipsgbdocltuc) Quit (Remote host closed the connection)
[15:15] * offbyone (u910@gateway/web/irccloud.com/x-adphysluayzbwcjf) has joined #jython
[15:22] * lopex (u4272@gateway/web/irccloud.com/x-ptmntfxprediizzv) has joined #jython
[15:50] * juneau001 (~juneau@131.225.24.141) Quit (Quit: juneau001)
[16:00] * juneau001 (~juneau@FESS-116326.dhcp.fnal.gov) has joined #jython
[16:04] * shashank (~shashank@65-101-219-224.hlrn.qwest.net) has joined #jython
[16:48] * Trundle (~andy@python/site-packages/trundle) Quit (Remote host closed the connection)
[17:12] * stakkars_ (~tismer@89.204.137.67) has joined #jython
[17:48] * thijstriemstra (~thijs@5249260E.cm-4-2a.dynamic.ziggo.nl) has joined #jython
[18:03] <agronholm> is there a way to get jython to not create .class files automatically?
[18:03] <agronholm> couldn't find anything relevant in --help
[18:16] * shashank (~shashank@65-101-219-224.hlrn.qwest.net) Quit (Ping timeout: 260 seconds)
[18:37] * stakkars_ (~tismer@89.204.137.67) Quit (Read error: Connection reset by peer)
[18:41] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[18:41] * chadrs (~Adium@208.90.215.178) has joined #jython
[19:16] * juneau001 (~juneau@FESS-116326.dhcp.fnal.gov) Quit (Quit: juneau001)
[19:52] * shashank (~shashank@ucb-np2-142.colorado.edu) has joined #jython
[20:01] * shashank (~shashank@ucb-np2-142.colorado.edu) Quit (Ping timeout: 252 seconds)
[20:03] * shashank (~shashank@ucb-np2-142.colorado.edu) has joined #jython
[20:07] * wainersm (~wainersm@201-68-154-79.dsl.telesp.net.br) Quit (Quit: Ex-Chat)
[20:29] <jimbaker> any thoughts on agronholm's request for a 2.5.3 release? in principle, this is a good idea. however, i personally don't have the time to work on it myself. (i'm trying to stay focused on my invokedynamic work with shashank and verterok)
[20:30] <jimbaker> fwierzbicki, pjenvey ^^^
[20:54] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[21:03] * juneau001 (~juneau@50-103-17-182.dklb.il.frontiernet.net) has joined #jython
[21:05] <fwierzbicki> jimbaker, pjenvey, if we are ready for a 2.5.3 I can find some time to do it - we should make sure Alan Kennedy is in a good place with his fixes first.
[21:07] * shashank (~shashank@ucb-np2-142.colorado.edu) Quit (Ping timeout: 245 seconds)
[21:07] <agronholm> sorry for the outburst earlier
[21:07] <agronholm> I was getting extremely frustrated
[21:07] <agronholm> I seem to be running into odd bugs a lot
[21:12] <fwierzbicki> agronholm, no worries :)
[21:16] <agronholm> especially with pdb I see a lot of weird stuff happening
[21:16] <agronholm> the reason I asked how to make jython not write class files is that my application is loading class files that are older than the corresponding .py files
[21:16] <agronholm> and I have no clue why
[21:16] <agronholm> hm
[21:18] <agronholm> I have to go find -name "*.class" -delete every time after I run the unit test suite
[21:18] <agronholm> otherwise I won't see any changes I make to my modules in practice
[21:20] <fwierzbicki> agronholm, I don't think there is currently a way to turn off .class generation - CPython added such a feature in 2.6 and so we will likely add it then - let me check in the code to be completely sure...
[21:20] <agronholm> oh.
[21:21] <agronholm> I thought maybe there was an environment variable for that
[21:27] <fwierzbicki> agronholm, no - it's new in 2.6 -- and in fact pjenvey has it implemented, but only for 2.6
[21:27] <agronholm> :/
[21:27] <agronholm> any way to make jython use the newer .py files instead of the older .class files then?
[21:28] <agronholm> I think CPython updates the .pyc files when it detects they are older than the corresponding .py files
[21:28] <fwierzbicki> agronholm, it *should* be doing that - it checks the files and recompiles if the .py are newer - at least it is supposed to do that
[21:28] <agronholm> well it's clearly not doing that
[21:28] <agronholm> I'm not sure how to reproduce that
[21:28] <agronholm> I'm only seeing it when I launch my app from eclipse
[21:28] <fwierzbicki> very weird - so far I haven't had trouble with that
[21:28] <agronholm> and my app instantiates a PythonInterpreter
[21:29] <agronholm> I can paste my Jython.java (which contains all the relevant setup stuff)
[21:29] <agronholm> maybe I'm doing something wrong
[21:29] <fwierzbicki> agronholm, sure - though I have to admit I don't know much about interactions with Eclipse
[21:29] <agronholm> eclipse shouldn't really matter
[21:29] <fwierzbicki> ok
[21:29] <agronholm> it just sets the CLASSPATH and fires away
[21:30] <agronholm> http://pastebin.com/HhY633Qx
[21:30] * fwierzbicki looks
[21:31] <agronholm> other than that problem, this works
[21:32] <fwierzbicki> is the problem mainly with the modules that you are loading with "imp.load()" ?
[21:32] <agronholm> no
[21:32] <agronholm> other modules
[21:32] <fwierzbicki> ok
[21:33] <agronholm> I don't think imp.load() makes any difference in that respect
[21:35] <fwierzbicki> agronholm, just finding my place :) -- I'm hunting for the logic that checks the file ages in case there is a clue there
[21:35] <agronholm> ok
[21:35] <agronholm> I have the jython sources open in eclipse, maybe I can add some debug output
[21:35] <agronholm> but I'd have to know where to put it
[21:41] <fwierzbicki> if you run jython like this:
[21:41] <fwierzbicki> jython -Dpython.verbose=debug
[21:41] <fwierzbicki> it spits out where it is loading stuff
[21:41] <fwierzbicki> (along with a ton of other stuff)
[21:41] <agronholm> so I'll just add -Dpython.verbose=debug to my VM options in the launch configuration
[21:41] <agronholm> ?
[21:42] <fwierzbicki> not the VM options - it needs to be Jython that gets it
[21:42] <agronholm> doesn't jython read it through System.getProperty()?
[21:42] <agronholm> if that is the case, how do I give Jython that option?
[21:42] <fwierzbicki> I'd have to look :) -- try passing it to the VM and see if it works
[21:43] <fwierzbicki> you may be right but I thought it was separate
[21:43] <agronholm> a crapton of stuff is being printed on stderr
[21:43] <fwierzbicki> then you are right
[21:43] <fwierzbicki> that's the expected behavior
[21:43] <fwierzbicki> so somewhere in the crapton you should see it checking source and compiled versions
[21:44] <fwierzbicki> if you find the modules that are goofed there may be a clue
[21:44] <agronholm> thanks, I'll have a look
[21:52] <fwierzbicki> agronholm, is there a chance that Eclipse is running the $py.class files from a different directory than the source files? I seem to remember it doing something like that (though I haven't used it in years)
[21:52] <agronholm> I'm reproducing the same broken behavior from the command line now
[21:55] <fwierzbicki> agronholm, oh interesting - what platform is this? Any symlinks involved?
[21:55] <agronholm> no, but I think I just figure out something
[21:55] <agronholm> one moment
[21:55] <fwierzbicki> ok
[21:55] <agronholm> platform is linux (kubuntu)
[21:56] * chadrs (~Adium@208.90.215.178) has left #jython
[21:57] <agronholm> hm, false alarm
[21:59] * Furao (~Furao@pc-136-125-239-201.cm.vtr.net) has joined #jython
[22:00] <Furao> where is src code repository of jython?
[22:02] <Furao> ah this info is not on jython.org but python.org
[22:03] <fwierzbicki> Furao, yeah it's in an hg repo now - I'll grab a link
[22:04] <fwierzbicki> Furao, here is a doc: http://wiki.python.org/jython/JythonDeveloperGuide
[22:04] <fwierzbicki> short version:
[22:04] <fwierzbicki> hg clone http://hg.python.org/jython
[22:05] <fwierzbicki> but there are some details on the wiki like us currently depending on svn for stuff
[22:05] <agronholm> fwierzbicki: so I was unable to reproduce it from the command line after all
[22:05] <agronholm> but quite fine from an Eclipse launch
[22:06] <agronholm> once I imported the test class from the command line it wrote an updated .class file
[22:08] <agronholm> every time I change the source and launch from Eclipse, the .class file remains untouched
[22:08] <fwierzbicki> agronholm, so I'm still wondering if the class files are being run from a different directory
[22:09] <agronholm> I did a find
[22:09] <Furao> well I just want to submit a fix to Lib
[22:09] <agronholm> nothing named that anywhere else
[22:09] <Furao> no need to build
[22:09] <agronholm> I will now get the debug output from it
[22:09] <fwierzbicki> Furao, if you have a patch you can submit it at http://bugs.jython.org/
[22:10] <Furao> I fixed it in my local copy
[22:10] <Furao> so I do not even know where the patch should be applied :)
[22:10] <fwierzbicki> Furao, what is the bug?
[22:10] <Furao> in my code, I want to use logging handlers not shipped with jython
[22:11] <agronholm> fwierzbicki: http://pastebin.com/BUUjETan
[22:11] <Furao> I use logging.config.fileConfig('somefile.conf')
[22:11] <agronholm> line 2063
[22:11] <Furao> and it fail to load the logging handler
[22:11] <agronholm> is where I'm doing "print **test2**" on the module level
[22:11] <agronholm> the source code says print **test3**
[22:12] <Furao> and I changed logging/config.py to import on the file the module and set klass as the imported logging handler
[22:13] <agronholm> fwierzbicki: it's the etikettu.amqpclient module where I'm printing this
[22:14] <agronholm> perhaps I should've output to stderr instead
[22:14] <fwierzbicki> oh strange that it printed so far away
[22:14] <Furao> ah look like in hg default branch they handle this
[22:15] <Furao> default branch == 2.6 ?
[22:15] <fwierzbicki> Furao, yes trunk is 2.6
[22:15] <agronholm> http://pastebin.com/WBi43tSS
[22:15] <agronholm> in this paste I printed to stderr instead
[22:16] <agronholm> wonderfully vague that __pyclasspath__/etikettu/amqpclient$py.class
[22:16] <agronholm> doesn't really tell where it is in the file system
[22:19] <agronholm> that print line is towards the end of that module
[22:20] <agronholm> if I import sys to get stderr, it will print lots of crap about that before the marker
[22:20] <agronholm> maybe I should try another approach
[22:21] <fwierzbicki> yeah __pyclasspath__ is a special class loader -- and looking at the source (src/org/python/core/ClasspathPyImporter.java) it looks like it doesn't understand mtime (so can't compare with the source)
[22:22] <agronholm> where does that class loader come to play?
[22:22] <fwierzbicki> I don't exactly remember what __pyclasspath__ is - I think either Charlie Groves or pjenvey wrote that
[22:22] <fwierzbicki> agronholm, not sure yet - any chance that the .py$class files are getting pulled in from a java classpath?
[22:23] * Furao (~Furao@pc-136-125-239-201.cm.vtr.net) has left #jython
[22:23] <agronholm> quite likely
[22:24] <agronholm> in fact I'm not defining any JYTHONPATH
[22:24] <agronholm> so the class path is the only place where it could get the class
[22:24] <agronholm> but then again it knows how to pick up the .py source too
[22:28] <fwierzbicki> Looking at ClasspathPyImporter makes me suspect that the age detection won't work when the .py files are pulled from the java classpath
[22:28] <agronholm> I've never seen that mentioned in the docs
[22:29] <fwierzbicki> getSourceMtime just returns -1
[22:29] <agronholm> is that a bug or an unimplemented feature? or is it not technically feasible?
[22:30] <fwierzbicki> the comment in that method is "can't determine this easily" --- sounds like a technical hurdle
[22:30] <agronholm> right, because the .py file might live in a jar file
[22:30] <fwierzbicki> I'm guessing that if the $py.class file is pulled in as a java class file from a java classpath it doesn't have a file location associated
[22:30] <fwierzbicki> right
[22:31] <agronholm> that also explains why I get no source code output with pdb
[22:31] <fwierzbicki> aha
[22:31] <agronholm> even though the source is in the very same location
[22:31] * thijstriemstra (~thijs@5249260E.cm-4-2a.dynamic.ziggo.nl) Quit (Ping timeout: 244 seconds)
[22:31] <fwierzbicki> yeah - it's invisible from this style of loading
[22:31] <fwierzbicki> frustrating
[22:32] <agronholm> quite
[22:35] <agronholm> fwierzbicki: what is also curious is that I still get no source view in pdb even without the .class files
[22:36] <fwierzbicki> agronholm, this is from eclipse?
[22:36] <agronholm> well yes, launched the same way and then set_trace() somewhere in the code
[22:37] <fwierzbicki> agronholm, I bet it is converting it to bytecode first before loading even if it doesn't print the file out
[22:37] <fwierzbicki> the .class file I mean
[22:37] <agronholm> well I don't know how pdb finds the source code normally then
[22:38] <agronholm> but even if the .py files lived inside a .jar file, it should be able to find the source
[22:38] <fwierzbicki> from the command line it isn't using __pyclasspath__
[22:38] <agronholm> yeah but I'm launching set_trace() from within the app launched from eclipse
[22:38] <fwierzbicki> I think that's the tricky bit - refinding the source when things where loading as a a Java class
[22:39] <agronholm> well it already reads in the .py file so it should be able to find it later on
[22:39] <agronholm> but
[22:39] <agronholm> the __module__ attribute is set to a funny value
[22:39] <agronholm> I guess that is why pdb can't display the source
[22:40] <agronholm> it doesn't know where to look.
[22:40] <fwierzbicki> yeah I think it reads the .py file, converts it to an in-memory bytecode blob, and forgets where it found the py file
[22:40] <agronholm> I wonder if ClasspathPyImporter could be convinced to retain that information
[22:40] <agronholm> at least if the file was found directly in the file system
[22:41] <fwierzbicki> the original author (blame is telling me) apparently thought it was "difficult" but maybe not impossible
[22:41] <fwierzbicki> *blame is not telling me
[22:41] <agronholm> hm
[22:41] <fwierzbicki> maybe that info got lost in the svn->hg migration
[22:41] <fwierzbicki> or maybe I'm not reading it right
[22:45] <fwierzbicki> I suspect there would be many corner cases to get right - in any case no one has tried
[22:49] <fwierzbicki> gotta go pick up my daughter from school - sorry this hasn't been good news, but at least we know better what is going on
[22:50] <agronholm> fwierzbicki: yeah, thanks for that
[23:06] * jimbaker (~jbaker@canonical/jimbaker) Quit (Ping timeout: 240 seconds)
[23:31] * Trundle (~andy@python/site-packages/trundle) Quit (Quit: ???)
[23:41] * jimbaker (~jbaker@c-75-71-80-146.hsd1.co.comcast.net) has joined #jython
[23:41] * jimbaker (~jbaker@c-75-71-80-146.hsd1.co.comcast.net) Quit (Changing host)
[23:41] * jimbaker (~jbaker@canonical/jimbaker) has joined #jython
[23:50] * clajo04_ (~clajo04_@pool-108-41-219-3.nycmny.fios.verizon.net) Quit (Read error: Connection reset by peer)
[23:50] * clajo04_ (~clajo04_@pool-108-41-219-3.nycmny.fios.verizon.net) has joined #jython

Index

These logs were automatically created by JythonLogBot_ on irc.freenode.net using a slightly modified version of the Java IRC LogBot (github).