#jython IRC Log (v0.9)

Index

IRC Log for 2012-06-21

Timestamps are in GMT/BST.

[1:22] * int3__ (~int3__@69.170.160.74) Quit (Ping timeout: 244 seconds)
[2:05] * lheuer1 (~Adium@blfd-4d08ec09.pool.mediaWays.net) has joined #jython
[2:06] * lheuer (~Adium@blfd-4d0822ba.pool.mediaWays.net) Quit (Ping timeout: 244 seconds)
[2:35] * ChanServ (ChanServ@services.) Quit (*.net *.split)
[2:37] * vayer (~vayer@173-164-129-225-SFBA.hfc.comcastbusiness.net) Quit (Quit: Leaving)
[2:50] * ChanServ (ChanServ@services.) has joined #jython
[3:14] * int3__ (~int3__@ip-64-134-229-150.public.wayport.net) has joined #jython
[5:07] * r0bby_ is now known as robbyoconnor
[5:16] * int3___ (~int3__@ip-64-134-229-150.public.wayport.net) has joined #jython
[5:18] * int3__ (~int3__@ip-64-134-229-150.public.wayport.net) Quit (Ping timeout: 244 seconds)
[5:29] * int3___ (~int3__@ip-64-134-229-150.public.wayport.net) Quit (Remote host closed the connection)
[5:49] * int3__ (~int3__@c-24-5-81-207.hsd1.ca.comcast.net) has joined #jython
[5:49] * hongminhee (~dahlia@175.125.21.72) has joined #jython
[5:53] * int3__ (~int3__@c-24-5-81-207.hsd1.ca.comcast.net) Quit (Ping timeout: 250 seconds)
[6:02] * hongminhee (~dahlia@175.125.21.72) Quit (Remote host closed the connection)
[6:03] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) has joined #jython
[6:40] * hongminhee (~dahlia@175.125.21.72) has joined #jython
[7:02] * hongminhee (~dahlia@175.125.21.72) Quit (Remote host closed the connection)
[7:21] * hongminhee (~dahlia@175.125.21.72) has joined #jython
[7:24] * hongminhee (~dahlia@175.125.21.72) Quit (Quit: leaving)
[7:48] * yanne (~jth@backport.reaktor.fi) Quit (Ping timeout: 240 seconds)
[9:48] * lheuer1 is now known as lheuer
[10:50] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) Quit (Remote host closed the connection)
[11:03] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) has joined #jython
[11:13] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[11:13] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) has joined #jython
[11:36] * agronholm (~Demi-god@nblzone-211-37.nblnetworks.fi) Quit (Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/)
[12:21] * hongminhee (~dahlia@175.125.21.72) has joined #jython
[12:36] * wainersm (~wainersm@189.61.204.85) has joined #jython
[13:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 246 seconds)
[14:06] * enebo (~enebo@174-20-178-12.mpls.qwest.net) has joined #jython
[14:09] * ctismer_afk is now known as ctismer
[14:20] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Quit: Ex??re)
[14:24] * ctismer is now known as ctismer_afk
[14:47] * ctismer_afk is now known as ctismer
[15:47] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[16:13] * ctismer is now known as ctismer_afk
[16:16] * ctismer_afk is now known as ctismer
[16:21] * norman__ (~norm_@74.213.188.46) has joined #jython
[17:32] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 248 seconds)
[17:38] <Thunderbird> how well should subprocess kill/terminate work in jython 2.7?
[17:38] <Thunderbird> I'm trying to use terminate on a process, but seeing
[17:38] <Thunderbird> File "/usr/share/jython-2.7/Lib/subprocess.py", line 1386, in terminate
[17:38] <Thunderbird> _subprocess.TerminateProcess(self._handle, 1)
[17:38] <Thunderbird> NameError: global name '_subprocess' is not defined
[17:43] * vayer (~vayer@173-164-129-225-SFBA.hfc.comcastbusiness.net) has joined #jython
[17:43] <Thunderbird> let's dig further into the code then
[17:59] * ctismer is now known as ctismer_afk
[18:28] * ctismer_afk is now known as ctismer
[18:30] <pjenvey> Thunderbird - yea, that needs some fixing
[18:30] <pjenvey> so either terminate or kill can be implemented
[18:30] <pjenvey> I forget which one
[18:31] <pjenvey> you can implement it by just calling self._process.destroy() iirc
[18:33] <pjenvey> IIRC Process.destroy() is SIGTERM
[18:33] <pjenvey> so that'd be for terminate()
[18:34] <pjenvey> technically we could implement kill() but we'd have to steal the process PID (which I'm almost certain is a private field in Java, we'd have to steal it via reflection, and handle cases where we can't steal it when the security manager is being strict)
[18:34] <pjenvey> I'd just implement terminate for now
[18:43] <Thunderbird> I implemented some code
[18:44] <Thunderbird> but I'm not sure if it is correct
[18:44] <Thunderbird> pjenvey, this is what I did, http://pastebin.com/WiHeAPzk, but I'm not a big fan of the string parsing
[18:44] * norman__ (~norm_@74.213.188.46) Quit (Read error: Connection reset by peer)
[18:45] <Thunderbird> yeah, thought of os.kill too, but didn't know of a clean way to get the pid
[18:55] <pjenvey> i think the subprocess.py file was merged weirdly or something
[18:55] <pjenvey> last time i looked at it
[18:55] <pjenvey> that kill = terminate line i think is for windows
[18:56] <pjenvey> you could make the jython kill (and send_signal) raise NotImplementedError
[18:56] <pjenvey> i suppose send_signal(SIGTERM) could work
[18:56] <Thunderbird> it looked like a bad merge to me as well _subprocess was used for windows
[18:57] <pjenvey> I'd do a diff of the original 2.7 subprocess.py vs ours and just make sure all our code is within the if jython: blocks
[18:57] <pjenvey> and the rest is unmodified
[18:57] <pjenvey> (just keep it nice, eventually we might merge this code upstream)
[18:57] <Thunderbird> seems reflection does work, http://stackoverflow.com/questions/4750470/know-pid-java-process
[18:58] <pjenvey> yep
[18:58] <Thunderbird> where do the diffs live? not sure how the subprocess.py file and others get merged
[18:58] <Thunderbird> our software needs a functioning subprocess.py, so I can justify fixing things properly instead of adding horrible hacks to our code
[18:59] <Thunderbird> send_signal(SIGTERM) seems to come down to terminate as well; if we knew the PID it could be hooked up to os.kill
[19:05] <Thunderbird> let's make the diff
[19:08] <Thunderbird> overall the merge looks fine, except that the jython code got added right before the mswindows terminate/kill definitions
[19:14] <pjenvey> you can just do diff lib-python/2.7/subprocess.py (that's the orig) to the one in Lib/
[19:19] <Thunderbird> okay
[19:19] <Thunderbird> what do you think about the suggested patch? had to deal with several exceptions
[19:19] <pjenvey> yea
[19:19] <pjenvey> do you have tests for those?
[19:20] <pjenvey> I'd have to look into that, that CouplerThread thing is a bit tricky
[19:20] <Thunderbird> I tested it with my own code, but don't have any unit tests
[19:20] <Thunderbird> I don't know much about that couplerthread
[19:20] <Thunderbird> not sure if it is the correct thing
[19:21] <Thunderbird> brb, lunch
[19:21] <Thunderbird> unless you have time to fix it in a better way, since you have a lot of changes in that file
[19:24] <Thunderbird> it seems 'destroy' does in fact a sigterm in java
[19:24] <Thunderbird> not fully correct for a kill implementation
[19:25] * ctismer is now known as ctismer_afk
[19:26] <pjenvey> what type of exception was thrown for 'Stream Closed'
[19:26] <pjenvey> ClosedChannelException?
[19:27] <pjenvey> or was it a plain IOExcepion
[19:34] * ctismer_afk is now known as ctismer
[19:49] * int3___ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) has joined #jython
[19:49] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[19:51] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) has joined #jython
[19:51] * int3___ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[19:52] * int3___ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) has joined #jython
[19:52] * int3__ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[20:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[20:12] * int3___ (~int3__@99-119-64-75.lightspeed.sntcca.sbcglobal.net) Quit (Remote host closed the connection)
[20:33] <Thunderbird> back
[20:33] <Thunderbird> let me look up the log
[20:35] <Thunderbird> pjenvey, was really:
[20:35] <Thunderbird> Exception in thread "_CouplerThread-2 (stdout)" Traceback (most recent call last):
[20:35] <Thunderbird> File "/usr/share/jython-2.7/Lib/subprocess.py", line 748, in runnning
[20:35] <Thunderbird> count = self.read_func
[20:35] <Thunderbird> IOError: Stream closed
[20:41] <Thunderbird> so no ClosedChannelException
[20:41] <Thunderbird> initially I only had the java.nio.channels.AsynchronousCloseException
[20:41] <Thunderbird> but depending on timing I also got the Stream closed one
[21:01] * enebo (~enebo@174-20-178-12.mpls.qwest.net) Quit (Quit: enebo)
[21:11] * int3__ (~int3__@69.170.160.74) has joined #jython
[21:49] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 255 seconds)
[21:55] <int3__> fwierzbicki: thanks for merging my patches! do you think it would be a good idea if i submitted the rest of the itertools refactoring as one big patch?
[21:57] * iandalton (~user@216.51.42.66) has joined #jython
[22:01] * ctismer is now known as ctismer_afk
[22:23] <iandalton> I set up a virtualenv, and did pip install Django. jython -c 'import django' raises an ImportError: No module named django. Is this a known bug?
[22:30] <fwierzbicki> int3__ that would work just fine
[22:30] <int3__> coolk
[22:30] <int3__> *cool
[22:30] * wainersm (~wainersm@189.61.204.85) Quit (Quit: Ex-Chat)
[22:31] <int3__> iandalton: haven't tried that myself, but did you specify the path to jython when creating the virtualenv? otherwise it'll only copy the default python installation
[22:50] <iandalton> int3__: that was it. I was using the wrong virtualenv.
[22:50] <int3__> :)
[23:35] * iandalton (~user@216.51.42.66) has left #jython

Index

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