#jython IRC Log

Index

IRC Log for 2014-09-09

Timestamps are in GMT/BST.

[3:33] * lopex_ (uid4272@gateway/web/irccloud.com/x-lvdupceikvplbool) has joined #jython
[3:33] * lopex_ is now known as Guest43929
[3:38] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (*.net *.split)
[3:40] * Taylor (~Taylor@unaffiliated/taylor) Quit (*.net *.split)
[3:40] * lopex (uid4272@gateway/web/irccloud.com/x-phencpysnzaqayfw) Quit (*.net *.split)
[3:40] * Taylor (~Taylor@unaffiliated/taylor) has joined #jython
[3:42] * Guest43929 is now known as lopex
[3:42] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[4:52] * [Arfrever] (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 250 seconds)
[5:00] * [Arfrever] (~Arfrever@apache/committer/Arfrever) has joined #jython
[5:06] * agronholm (~agronholm@2001:1bc8:102:6f29:891e:4ba3:ffc:87a3) Quit (Ping timeout: 260 seconds)
[5:55] * agronholm (~agronholm@2001:1bc8:102:6f29:b9af:3993:6269:503) has joined #jython
[5:55] * ChanServ sets mode +o agronholm
[6:28] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[9:55] * mhahe (~mhahe@95.85.22.247) Quit (Quit: WeeChat 0.4.2)
[10:52] * ebarrett_ is now known as ebarrett
[11:13] * ohumbel (5390f784@gateway/web/freenode/ip.83.144.247.132) has joined #jython
[12:01] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (*.net *.split)
[12:05] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[12:18] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 240 seconds)
[12:19] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[12:36] * xemdetia (xemdetia@nat/ibm/x-lejahurryrdizunx) has joined #jython
[13:31] <syl20bnr> I tried to use imp instead of interpreter.exec("from x import y") and I stil have the same behavior:
[13:31] <syl20bnr> after doing this, I'm kicked from my thread and the execution returns to the main thread
[13:32] <syl20bnr> (using jython 2.7b2)
[13:44] <paolo> what's the policy about missing modules? I get ImportError: No module named fcntl and wondering if there is any chance to port it to jython
[13:51] <syl20bnr> mmmmh not sure on this one
[13:52] <syl20bnr> my previous message was on the thread issue
[13:52] <syl20bnr> seems that the issue is just that the thread is renamed to MainThread
[15:09] <syl20bnr> issue created: http://bugs.jython.org/issue2202
[17:20] <acharis> jimbaker
[17:20] <acharis> I have a minimal testcase
[17:20] <acharis> where do you want it?
[17:26] <xemdetia> acharis, probably attach to bug?
[17:27] <acharis> k, willdo
[17:29] <acharis> also, is it expected that jython2.7b3 does not ship with traceback module? and is it expected that jython with no other filename will error instead of drop into REPL?
[17:32] <acharis> in fact, jython2.7b3 won't do anything after minimal install (Core only)
[17:34] <acharis> but I guess that's a separate bug
[18:02] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 260 seconds)
[18:23] <agronholm> acharis: um, 2.7b3 does ship with the "traceback" module
[18:48] <acharis> Minimal (core) doesn't contain it
[18:48] <acharis> Standard has it
[18:48] <agronholm> acharis: minimal does not contain ANY stdlib modules that aren't built in
[18:48] <acharis> then close the bug
[18:49] <agronholm> which bug
[18:52] <acharis> jimbaker: issue2205
[18:55] <acharis> agronholm: i filed 2203 and 2204 about install issues
[18:57] <agronholm> this may be a larger issue
[18:57] <agronholm> I've yet to see a case where Jython works with the minimal install
[18:57] <agronholm> is there a use case for it?
[18:58] <agronholm> 2203 and 2204 are really the same issue
[18:59] <xemdetia> there is a use case for a minimal install when you are trying to create a restricted python environment
[18:59] <agronholm> restricted how?
[18:59] <xemdetia> for plugins and that sort of thing
[19:00] <xemdetia> err, untrusted code is a better catchall
[19:01] <agronholm> xemdetia: you would still have to do something about the builtins like exec, open etc.
[19:01] <xemdetia> it's true, trying to build a reduced python is a huge pita
[19:03] <xemdetia> but throwing out most of the kitchen sink and then adding the few features you want to expose is a lot more sane then starting with a full stdlib
[19:04] <agronholm> not having itertools, functools etc. is kinda meh
[19:04] <xemdetia> you can always drop them back in
[19:06] <xemdetia> but by default being able to start with nothing and add in what you want or need is a lot easier than trying to remove everything unnecessary
[19:11] <agronholm> acharis: I'm rolling a new installer build, let's see how it fares
[19:14] <agronholm> welp, not it wants linecache.py
[19:21] * robbyoconnor (~wakawaka@2600:1017:b026:5a7e:b4e3:e3f4:e6fd:1f66) has joined #jython
[19:21] * robbyoconnor (~wakawaka@2600:1017:b026:5a7e:b4e3:e3f4:e6fd:1f66) Quit (Changing host)
[19:21] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[19:23] <jimbaker> hmmm, a minimum install is certainly an interesting question. my record here tends to be the opposite - i believe i'm personally responsible for most of the current heft :)
[19:25] <xemdetia> I mean for my general purposes I want an embeddable language that gives me a well-understood language for free but the ability to whitelist everything
[19:26] <xemdetia> the niceness of a DSL but with a familiar syntax or a language extended in a direction to make the work of the DSL make more sense
[19:26] <agronholm> jimbaker: I found out that we need to add traceback.py, copy_reg.py, types.py, linecache.py and sysconfig.py to the minimal install in order to get commandline to work
[19:26] <jimbaker> xemdetia, i think that's a great idea, but there will be some work to do this
[19:26] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 272 seconds)
[19:26] <xemdetia> jimbaker, I've noticed. ;)
[19:26] <agronholm> I can just commit my changes right now if it's okay
[19:27] <jimbaker> agronholm, that little? please commit away
[19:28] * syl20bnr (d8623829@gateway/web/freenode/ip.216.98.56.41) Quit ()
[19:28] <agronholm> I built the installer and verified that command line works with the minimal install now
[19:28] <jimbaker> xemdetia, certainly would like to see what you have done. the challenge will be that in some cases, jython's java runtime does depend on python. but as usual, it depends on what is being done
[19:29] <xemdetia> I have not made significant work to that end, I more explored the possiblity and found that it would be a lot of work
[19:29] <xemdetia> unfortunately real work has gotten into the way of language happy fun time
[19:30] * syl20bnr (~user@216.98.56.41) has joined #jython
[19:30] <agronholm> acharis, xemdetia: I have now pushed the relevant changes to hg.python.org
[19:30] <agronholm> have fun.
[19:33] <xemdetia> oh and moving :)
[19:33] <acharis> another issue with the notion of minimal install is that it's not enough to bootstrap, that is, it would not run ez_setup.py
[19:34] <xemdetia> I wouldn't consider ez_setup.py to be a requirement of a minimal install, it just would need to be able to import another python file.
[19:34] <agronholm> me neither
[19:34] <xemdetia> You wouldn't give a 2 year old access to do apt-get or yum install -> not minimal
[19:35] <acharis> as a jython noob, i don't know how else to add packages/modules
[19:35] <xemdetia> it's just filesystem at a certain point acharis
[19:35] <xemdetia> ez_setup.py just helps you put the files in the right place
[19:36] <acharis> for example, trying to run my test with minimal, i saw that traceback wasn't included, so i googled for how to install modules into jython, saw ez_setup.py and then that didn't work.
[19:37] <acharis> i understand that it just puts a file in a certain place, and it was trivial to find that place, but i thought that just copying python's traceback.py into there probably wasn't going to work : )
[19:37] <xemdetia> afaik python is pretty fast and loose
[19:37] <xemdetia> there's no signing on the python source files or anything fancy
[19:38] <xemdetia> I assume jython is mostly the same way
[19:38] <jimbaker> so i would assume a generally useful, but minimal, jython installation is one that can install additional code with pip. but it's unclear how modules installed that way would react - usually anything in the stdlib is assumed
[19:39] <xemdetia> when python packaging was a lot more dodgy I just was stuffing libraries wherever they worked
[19:39] <jimbaker> so requirements.txt in particular w/ pip would not include stdlib dependencies
[19:39] <acharis> so for me the value add of pip or ez_setup is getting the right traceback.py
[19:39] <jimbaker> xemdetia, yeah, that time has passed
[19:39] <acharis> anyway, hi jimbaker
[19:39] <xemdetia> jimbaker, I was more referring to the fact that there was nothing stopping you from doing it the old way
[19:39] <xemdetia> if worst comes to worst
[19:40] <acharis> issue 2205 ... thoughts?
[19:40] <acharis> works totally fine with CPython
[19:41] <jimbaker> xemdetia, right, but it's just a question of what could work. so in comparison, i've been working with openstack. (maybe go to the javaone session we have on "openstack on the jvm"?) openstack interrogates the site-packages layout to determine how to run
[19:41] <jimbaker> so it's not so amenable for old way installs :)
[19:42] <xemdetia> true
[19:42] <xemdetia> If that is the equivalent to what a 'minimal' install means is 'runs on openstack whahay'
[19:42] <xemdetia> that's fine too
[19:42] <jimbaker> acharis, i don't know. this looks rather crazy to me. as if some sort of weird monkeypatching was happening
[19:42] <agronholm> acharis: it doesn't produce an error here
[19:42] <agronholm> works fine
[19:43] <acharis> what value of THREADS ?
[19:43] <xemdetia> it's just mainly having a state of the system that's well defined, but barebones vs. trying to pare down the universe
[19:43] <agronholm> ah
[19:44] <agronholm> acharis: yup I got it now
[19:44] <acharis> it's rare, but I have gotten jython to complete with THREADS=8 without error
[19:44] <acharis> but try, say, THREADS=15 or 30 or 60 for super fun times
[19:44] <jimbaker> acharis, right you now have a test case. ok, let me try that. btw, i'm flying to san francisco in a few minutes, so maybe some delay getting back on success
[19:45] <jimbaker> or failure, as the case may be
[19:45] <xemdetia> jimbaker, good luck on your flight :)
[19:45] <acharis> and to contrast, CPython just completed THREADS=60000 with no error...that's sixty thousand
[19:45] <xemdetia> acharis, they have GIL though
[19:45] <jimbaker> xemdetia, i'm going to be giving a talk on jython this friday at rackspace (which is where i work) in SF, so should be fun
[19:46] <agronholm> acharis: if I add a print statement to get the Popen args, the script runs fine X_X
[19:46] <acharis> haha
[19:46] <jimbaker> hmmm, sounds like an old fashioned race
[19:46] <xemdetia> that does sound fun!
[19:46] <agronholm> heisenbug
[19:46] <jimbaker> this is helping to narrow things down for sure
[19:47] <jimbaker> ok, that's much better. everyone, just as we are having a great chat, i got to go. ttyl! :)
[19:47] <acharis> ok, well i've got work to do over here ; )
[19:47] <acharis> i'll keep xchat open, but please don't ping me unless it's about this race. i don't care that much about the whole minimal install thing.
[20:05] <acharis> jython noob question: can i use multiprocessing?
[20:08] <xemdetia> acharis, what is your definition of multiprocessing
[20:08] <acharis> import multiprocessing
[20:08] <acharis> class Foo(multiprocessing.Process)
[20:09] <xemdetia> I don't know then
[20:09] <xemdetia> sorry
[20:10] <acharis> ok, i just saw: www.slideshare.net/fwierzbicki/jython-update-2012 and it sounds like "no"
[20:15] <xemdetia> yeah acharis that seems extraordinarily CPython dependent
[20:15] <acharis> y
[20:15] <acharis> ok, ttyl
[20:21] <fwierzbicki> acharis: yeah, btw the original author of multiprocessing doesn't see the point (since threading on the JVM and therefore Jython can use all of the cpu's)
[20:24] <acharis> so something like: import java.lang.ProcessBuilder
[20:43] <fwierzbicki> right - that's a reasonable way to go
[20:48] <fwierzbicki> the original use case for multiprocessing was to be able to replace any "import threading" with "import multiprocessing" and have the same API. Given that use case, multiprocessing doesn't make sense for Jython. I believe multiprocessing has grown such that there may be other use cases, so it might be something we'd look into someday. Though I think it's more likely we'd just want to make sure that things really are intercha
[20:49] <fwierzbicki> It may even be an "attractive nuisance" to have multiprocessing in Jython - since most of the time you just want threading (unlike in CPython)
[20:51] <agronholm> once pypy have stm + 3.3+ support, it will start looking really attractive to me
[21:38] * xemdetia (xemdetia@nat/ibm/x-lejahurryrdizunx) Quit (Ping timeout: 245 seconds)
[22:15] * xemdetia (xemdetia@nat/ibm/x-vbusrmolivjvtpqf) has joined #jython
[23:09] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 240 seconds)
[23:21] <jimbaker> acharis, i did find the problem re the race. the module import lock is simply not be acquired before imp.load is called by os.system
[23:21] <jimbaker> workaround: import subprocess at the top of your test code
[23:21] * mbooth (~mbooth@cpc68386-shef10-2-0-cust10.17-1.cable.virginm.net) has joined #jython
[23:21] * mbooth (~mbooth@cpc68386-shef10-2-0-cust10.17-1.cable.virginm.net) Quit (Changing host)
[23:21] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[23:22] <jimbaker> fix, which i will make: ensure all import paths - especially from jython's runtime! - do acquire the module import lock
[23:23] <agronholm> sounds like you found a nasty bug
[23:24] <jimbaker> fwierzbicki, per paolo's bug report, it looks like we need two things for django 1.7 dev support. 1) i worked a bit on inspect on the flight to san francisco (oh btw, i'm in SF! we should meet up)
[23:25] <jimbaker> 2) there's apparently some rejected execution on a channel, via the netty stuff i did. not certain how this happens, but it looks easy enough to reproduce
[23:25] <jimbaker> fwierzbicki, maybe meet up tomorrow at yelp for the san francisco python meetup?
[23:26] <jimbaker> pjenvey, others in the area - pr3d4t0r, i think you are sometimes around
[23:26] <agronholm> there's another installer bug
[23:27] <agronholm> https://bpaste.net/show/32864c8e2920
[23:27] <agronholm> this happens when creating a standalone jar
[23:27] <jimbaker> agronholm, yeah, but import issue is the sort of bug that's fortunately pretty easy to fix. just need to make sure all entry points acquire that lock, and done
[23:27] <fwierzbicki> jimbaker: oh I didn't know you where coming here - I'll see if I can make it to the meetup!
[23:27] <agronholm> ah the installer bug is issue 2196
[23:28] <jimbaker> fwierzbicki, i'm pretty bad about using this social media stuff :)
[23:28] <jimbaker> or email
[23:28] <fwierzbicki> Ha I think I may be worse - and worse yet at email
[23:28] <fwierzbicki> I've dropped off of facebook and twitter. I look at google+ a little
[23:29] <fwierzbicki> I'm too obsessive - if I read some I end up trying to read all
[23:29] <jimbaker> my favorite excuse right now is that teaching a univ course this semester does suck up all that extra time i use for this sort of stuff. this is more or less true
[23:33] <jimbaker> fwierzbicki, btw, i finally merged in santoso's filling in of dict protocol support for proxied objects implementing java.util.Map. it still needs to support __le__ (and by extension w/ __eq__ other comparisons), but it's now good and doesn't break things
[23:34] <jimbaker> the one cautionary note i put in the commit text: "Note that d[key_not_present] no longer returns None, but raises KeyError, which means this behavior now matches standard dict semantics." we had code in the runtime relying on this buggy behavior
[23:53] <fwierzbicki> yikes
[23:58] <fwierzbicki> Drat forgot I have soccer dad duties tomorrow night (and tonight) - in fact this whole week is pretty bad
[23:59] <fwierzbicki> jimbaker: how long are you here?

Index

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