#jython IRC Log

Index

IRC Log for 2014-05-27

Timestamps are in GMT/BST.

[0:14] * chrisseaton (~chrisseat@79-76-255-22.dynamic.dsl.as9105.com) has joined #jython
[0:41] * supa_ (~Supa_@c-71-194-15-113.hsd1.il.comcast.net) Quit (Quit: leaving)
[1:03] * chrisseaton (~chrisseat@79-76-255-22.dynamic.dsl.as9105.com) Quit ()
[2:28] * danlamanna1 (~dan@pool-96-236-38-183.albyny.fios.verizon.net) has joined #jython
[2:28] <danlamanna1> for some reason on jython 2.5.3 i can add a jar to -J-classpath and it works, but with 2.5.2 this isn't the case?
[2:29] <danlamanna1> seems -Dpython.path=file.jar works
[3:11] * danlamanna1 (~dan@pool-96-236-38-183.albyny.fios.verizon.net) Quit (Remote host closed the connection)
[3:17] * supa_ (~Supa_@c-71-194-15-113.hsd1.il.comcast.net) has joined #jython
[3:20] <supa_> I want to use Flask with Jython in a jar, but I can't seem to figure out how to correctly set up the templates directory. I thought I could use <modulename>/templates, but that doesn't seem to work. I can set it to a local directory, but I would like to use the templates packed in the jar. Any hints?
[3:20] <agronholm> supa_: is loading templates from anything else than a directory even supported?
[3:20] <agronholm> this question probably belongs on #pocoo
[3:21] <supa_> Probably not.
[3:21] <supa_> ... but I was hoping there was some java/jar magic that would work around the limitation.
[3:21] <agronholm> why do you want to use jython with flask?
[3:22] <supa_> I wanted to make a quick management interface for an application that is Java. I thought packing a jar would be the easiest and most portable and then leveraging a browser.
[3:22] <agronholm> is it deployed in the same JVM as the app itself?
[3:22] <supa_> Is there an alternative you would suggest to flask for that use?
[3:22] <agronholm> flask is not the issue here
[3:23] <supa_> You're thinking I should skip jython entirely?
[3:25] <agronholm> it would probably be easier
[3:26] <agronholm> or you could write a specializer template loader for jinja or whatever you use
[3:26] <supa_> I don't really have a good argument against that. :)
[3:27] <supa_> Jinja2 has a template from_string, but I'd lose inheritance. Maybe I can dig up a python templating engine that can use zips.
[3:27] <supa_> I was sort of hoping there was some jar/java-fu I could use.
[3:28] <agronholm> it's probably not that difficult to write a template loader methinks
[3:29] <supa_> ... I could actually probably skip the templates entirely. It's not like the application will be extremely complex.
[3:30] <agronholm> yet ;)
[3:58] <supa_> jinja2 has a Loader class I can override (maybe with zipimport?) and also a DictLoader.
[4:40] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Excess Flood)
[4:41] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[5:59] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[6:11] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 276 seconds)
[6:44] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) has joined #jython
[6:49] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) Quit ()
[7:05] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[7:25] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 252 seconds)
[8:20] * chrisseaton (~chrisseat@aruba-ctlr4-nat.its.manchester.ac.uk) has joined #jython
[8:25] * chrisseaton (~chrisseat@aruba-ctlr4-nat.its.manchester.ac.uk) Quit (Ping timeout: 264 seconds)
[9:19] * paolo (~paolo@unaffiliated/paolo) has joined #jython
[9:30] * paolo (~paolo@unaffiliated/paolo) Quit (Remote host closed the connection)
[9:40] * paolo (~paolo@unaffiliated/paolo) has joined #jython
[9:46] * paolo (~paolo@unaffiliated/paolo) Quit (Quit: Leaving)
[10:04] * paolo (~paolo@unaffiliated/paolo) has joined #jython
[10:08] * clajo04_ (~clajo04@pool-96-232-190-28.nycmny.fios.verizon.net) has joined #jython
[10:09] * clajo04 (~clajo04@pool-96-232-190-28.nycmny.fios.verizon.net) Quit (Ping timeout: 240 seconds)
[10:09] * clajo04_ is now known as clajo04
[10:45] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[10:57] * aboutGod (~aboutGod@static-72-66-66-50.washdc.fios.verizon.net) has joined #jython
[11:02] * aboutGod (~aboutGod@static-72-66-66-50.washdc.fios.verizon.net) has left #jython
[12:16] * ebarrett (~edd@88-105-202-27.dynamic.dsl.as9105.com) has joined #jython
[12:31] * zz_whg is now known as whg
[13:06] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) has joined #jython
[13:24] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) Quit (Remote host closed the connection)
[13:48] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) has joined #jython
[13:56] * plankton (~plankton@gw.grupoperetto.com.br) has joined #jython
[14:02] * mike_af (~mike_af@50-77-49-46-static.hfc.comcastbusiness.net) has joined #jython
[14:02] * mike_af (~mike_af@50-77-49-46-static.hfc.comcastbusiness.net) Quit (Changing host)
[14:02] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) has joined #jython
[15:18] * whg is now known as zz_whg
[15:29] * fwierzbicki (~Adium@99-106-170-162.lightspeed.sntcca.sbcglobal.net) has joined #jython
[15:48] * zz_whg is now known as whg
[16:02] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Excess Flood)
[16:02] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[16:03] <jimbaker> supa_, i'm thinking of adding jar url resolution to the open function so that it can transparently load (for read only of course) resources from jars in the sys.path, including from the classpath
[16:04] <jimbaker> that might solve your issue. it also seems necessary for fully supporting site-packages (without hacks) when using a standalone (aka uber) jar
[16:08] <jimbaker> http://bugs.jython.org/issue2143 is the related issue
[16:15] <whg> Hi jimbaker. Sorry to miss you last week, but I was on vacation
[16:15] <jimbaker> whg, no worries
[16:16] <jimbaker> i am in and out myself this week, just took a long 3 day weekend, will take another one starting friday, given that kids just finished school for the year
[16:18] <jimbaker> this is in part how i spent yesterday: https://www.youtube.com/watch?v=YP_JeFdGrcI
[16:18] <whg> Yes. This is our first day of "normal" summer. The oldest one is already driving us up a wall.
[16:18] <whg> Looks fun
[16:22] <jimbaker> i ran pretty nicely, placing 100th in my age division (out of 397); my daughter placed 11th in the 13-year old girls (out of 438). she starts summer training for the high school cross country team next monday in fact
[16:22] <jimbaker> so that will keep her busy :)
[16:24] <jimbaker> whg, so you may have seen that i spent basically a long day going through 100+ bugs last week, closing out about 40 or so, as part of a "spring cleaning"
[16:24] <whg> I did get an *awful* lot of bug tracker emails one day :-)
[16:25] <whg> And congrats to your daughter
[16:27] <whg> And you
[16:28] <jimbaker> whg, thanks! recently she has discovered a passion for running, not to mention some obvious natural talent
[16:28] <whg> Yeah, 11 out of 438 is top-notch
[16:29] <whg> Did she get it from you or her mom?
[16:29] <jimbaker> whg, my wife is the athlete in the family, i just try to keep with the family :)
[16:30] <whg> Hehe.
[16:30] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) Quit (Ping timeout: 264 seconds)
[16:33] <jimbaker> whg, so we have ~ 50 bugs marked for beta 4 - there's a bit of noise in the search query, it's not 58
[16:35] <whg> that's a lot of issues
[16:36] <whg> Lots of progress :-)
[16:44] <jimbaker> whg, yeah, i
[16:44] <jimbaker> am hoping we will see lots of PRs addressing these issues :)
[16:46] <whg> hehe
[16:46] <whg> Still waiting on official clearance before I can submit pull requests, but I'm happy to chat about them :-)
[16:48] <jimbaker> whg, cool. a lot of these PRs really revolve around finding one or two lines in code that is causing the issue
[16:49] <jimbaker> we will not have another "reboot" in 2.7 :)
[16:49] <jimbaker> see for example this one - http://hg.python.org/jython/rev/c35aa984452f
[16:49] <whg> hehe
[16:49] <whg> nice
[16:49] <jimbaker> it still need to be paired with a test - http://hg.python.org/jython/rev/2f8b6070b213
[16:57] <jimbaker> whg, here's a good example of what i think would be likely a small fix, but also not easy to figure out - determine why test_import currently fails
[16:58] <jimbaker> so no need for a PR for that, just a triangulation on the corresponding lines of code
[16:59] <jimbaker> topi`, i suspect this may be where twisted trial currently fails btw
[17:00] <jimbaker> so i'm pretty sure this is a hard problem, because import semantics are way too complicated. importlib for python 3 fixed that, by putting the import semantics in python itself, but for jython we have to work with the port of the corresponding c module (imp.java)
[17:03] <whg> I'm guessing importlib changed semantics?
[17:04] <jimbaker> whg, it must have
[17:04] <jimbaker> probably not in a way that most code would see
[17:05] <jimbaker> that's the usual 2.x to 3.x breaking issue
[17:06] <jimbaker> eg most code probably does not depend on old style class inheritance method resolution to work
[17:06] <whg> yeah
[17:10] <jimbaker> whg, but even though it's hard, my experience with imp.java is that because of the way we ported it from cpython, it's also something that requires minimal changes. just the *right* changes :)
[17:19] <whg> That's always the tricky part :-)
[17:19] <whg> You see Doug's latest post?
[17:19] <whg> He's doing ASCII art calendars to help him plan his lawn care
[17:22] <paolo> hello guys, on Frank's blog i read about nailgun to speed up jython startup. the post is dated and i wonder if using nailgun today is still a good idea/valid option. what do you think?
[17:22] <paolo> i'd use it with jython 2.7 and java7
[17:23] <jimbaker> whg, appropriate timeliness on that post, i have a very similar irrigation timer
[17:24] <jimbaker> paolo, re nailgun - in general, it still makes sense for a narrow range of use cases
[17:25] <jimbaker> paolo, i think it would be much nicer if it incorporated security properly and also (optional) process isolation
[17:25] <paolo> hm... ok, let's talk about my problem
[17:25] <paolo> time jython -c "import flask"
[17:25] <paolo> real 0m6.976s
[17:25] <paolo> user 0m13.786s
[17:25] <paolo> sys 0m0.478s
[17:25] <jimbaker> for the later case, jruby iirc does support that by keeping a pool of jruby vms spun up
[17:25] <paolo> (sorry for have interrupted)
[17:25] <jimbaker> paolo, yes, that's pretty bad
[17:26] <paolo> if it's the "normal" timings then OK, just to know
[17:26] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) has joined #jython
[17:26] <jimbaker> paolo, so i don't think flask is a nailgun candidate. better to use a container like jetty
[17:27] <jimbaker> i did write up a little here on using bottle with my fireside project: https://github.com/jimbaker/hellowsgi
[17:27] <paolo> thanks for the link!
[17:28] <jimbaker> should be directly portable to flask. expect more like 1ms overhead (or maybe less)
[17:28] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 265 seconds)
[17:28] <paolo> I'm planning to use tomcat/modjy instead of jetty
[17:28] <jimbaker> so that's about 13,000 times faster than what you're seeing :)
[17:29] <jimbaker> paolo, you can use modjy as well. however, fireside directly supports site-packages layouts
[17:29] <jimbaker> eg "modern python"
[17:30] <jimbaker> based on other users' experiences, i know it works just fine w/ tomcat - no surprise, it's just about building out a war
[17:30] <paolo> ok, i dont even know what fireside is but i'll have a loog, 1ms overhead is really appealing ;)
[17:31] <jimbaker> paolo, i plan to reduce that overhead further too ;)
[17:31] <jimbaker> but right now, it is already pretty good
[17:31] <paolo> even much fun then? just perfect.
[17:32] <jimbaker> paolo, fireside is part of the jythontools ecosystem that i have been developing outside of jython core, along with a number of other contributors. if you follow jython-dev, i occasionally mention clamp, which is the key piece
[17:33] <jimbaker> we basically want to move jython to what we see in python in general - a core platform, plus tooling built on it that can evolve faster
[17:34] <jimbaker> so in particular, we are running openstack keystone on fireside, after clamping a single jar
[17:35] <jimbaker> the next step is to rewrite fireside in java, although it's an interesting example of being able to write such code in clamp. but rewriting this way will help on calling overhead
[17:41] <paolo> I really appreciate your help and your (jython team) work.
[17:52] <jimbaker> paolo, thanks! i'm really happy to see that we are moving to a 2.7 release, now that we are back on track with what was released in beta 3
[17:52] <jimbaker> http://sourceforge.net/p/jython/mailman/message/32386573/
[17:53] <paolo> well, I'll try b3 then! Can pip and virtualenv be used to create populated jython environments?
[17:54] <paolo> i read there should be some issue (can't remember the details atm)
[17:56] <paolo> i created the environment and installed bottle using pip without problems, it seems ok
[17:57] <paolo> except for virtualenv that gives: Cannot find file /home/paolo/tmp/j2.7b2/Include (bad symlink)
[17:57] <paolo> but the venv is there and i can activate and use it
[18:04] <jimbaker> paolo, yeah, there's some small problem with virtualenv
[18:04] <jimbaker> beta 4 will include support for ensurepip and venv from python 3
[18:04] <jimbaker> given the available backport. something pypy is also doing
[18:07] <jimbaker> i plan to get cjk support done first, then we can have html5lib-python fixed, then we can have pip fixed, then virtualenv, then tox
[18:08] <jimbaker> lots of chaining here, all so we can a small fix upstreamed into html5lib-python, then downstreamed into pip
[18:09] <jimbaker> but it's all good
[18:17] <whg> speaking of html5lib fixed
[18:18] <whg> Would it be easier or harder to get them to accept a patch that basically vendored whatever approach we finally use with patois?
[18:18] <whg> As opposed to just fixing their inline logic?
[18:21] <jimbaker> whg, it might be easier to do it the vendor approach
[18:22] <whg> Then I will try to find some free time to go ahead and get that logic into patois and then start trying to figure out test cases.
[18:22] <jimbaker> fundamentally, i just want to get this upstreaming off the critical path for jython. although i suppose if we use ensurepip, we can point to our own version of pip for some delta
[18:23] <jimbaker> whg, i think having good tests makes the vendor case much stronger
[18:24] <whg> That's where I stalled out last time
[18:24] <whg> I started hunting for not-trivial test cases and got distracted
[18:24] <whg> I actually have my laptop
[18:24] <whg> Let me see if I still have my WIP
[18:24] <jimbaker> whg, html5lib-python gives those cases
[18:24] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) Quit ()
[18:25] <jimbaker> in terms of being able to pick up surrogate failures, and what to do with them
[18:25] <whg> okey dokey
[18:26] <whg> I will look at it again
[18:26] <whg> I seem to recall somebody actually caring about the index of the detected invalid surrogate in one of the snippets I looked at, which makes for a less appealing method name, but whatevs.
[18:27] <jimbaker> whg, makes sense
[18:31] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) has joined #jython
[18:42] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) Quit (Read error: Connection reset by peer)
[18:43] * plankton (~plankton@gw.grupoperetto.com.br) Quit (Quit: Saindo)
[18:43] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) has joined #jython
[18:54] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[19:14] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[19:15] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Client Quit)
[19:20] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) Quit ()
[19:36] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[19:36] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Remote host closed the connection)
[20:03] * supa__ (~supa@209.101.183.82) has joined #jython
[20:04] <supa__> I'm having this exact issue - https://gist.github.com/paolodina/b98c3f3a159024584e13 any hints?
[20:21] <whg> I'm guessing that the subprocess implementation doesn't like there being a Boolean in the "args" collection ?
[20:24] <jimbaker> whg, supa__ - that would make sense without drilling further
[20:24] <jimbaker> supa__, i would recommend trying out beta 3 btw
[20:24] <whg> jimbaker: Does Jython have its own subprocess implementation, or does it re-use the one from the stdlib?
[20:24] <jimbaker> at least you get easy_install and pip with that (via https://github.com/jimbaker/pip)
[20:25] <jimbaker> whg, jython has its own (if patched from cpython's stdlib) - it's very implementation dependent
[20:26] <whg> I rather suspected as much
[20:26] <whg> But I didn't want to say so without digging up the impl
[20:26] <jimbaker> diffstat reports 1 file changed, 509 insertions(+), 170 deletions(-)
[20:26] <whg> whoo!
[20:26] <jimbaker> so not completely different. which is good. but definitely some pieces
[20:26] <whg> As simple as forcing a `str()` on all the arguments?
[20:27] <whg> (I'm guessing that happens in CPython somehow or other)
[20:27] <jimbaker> whg, ahh good point. let's look at the actual diff
[20:29] <jimbaker> https://gist.github.com/jimbaker/e8b08d3c16fe56056aa3
[20:30] <whg> line 517 in that diff looks suspicious
[20:30] <jimbaker> whg, ahh, yes i would agree with that
[20:31] <jimbaker> i have in fact let that pass unnoticed a couple of times as well
[20:31] <jimbaker> whg, supa__ - it would explain this error - https://gist.github.com/paolodina/b98c3f3a159024584e13#file-gistfile1-txt-L34
[20:31] <pjenvey> what's being passed to subprocess? sounds like the args are bogus
[20:32] <supa__> There's a b3?
[20:32] <supa__> hm
[20:32] <whg> app.debug = True is the culprit
[20:32] <whg> b3 might still be in soft launch
[20:32] <pjenvey> I have no idea what that does or causes args to be =]
[20:32] <jimbaker> pjenvey, yeah, it sounds questionable. although the problem seems to be in flask
[20:32] <jimbaker> which passes it through, depending on the str-ifying behavior
[20:32] <supa__> app.debug = True and app.port = 9999 # both work as expected in python
[20:33] <jimbaker> whg, correct, beta 3 is soft launch
[20:33] <agronholm> so where are we with the actual beta 3 launch?
[20:33] <jimbaker> agronholm, when no one complains :)
[20:33] <agronholm> there have been complaints?
[20:33] <whg> supa__: The problem seems to be that CPython stringifies those args silently, and Jython does not
[20:33] <jimbaker> agronholm, yes, we didn't include a couple of bug fixes
[20:33] <whg> supa__: And Flask relies on the string-ifying.
[20:33] <jimbaker> now included
[20:33] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[20:34] <supa__> oh. I can go try app.port = "9999". Unless I misunderstood?
[20:34] <whg> supa__: Give it a try
[20:34] <supa__> Well, it doesn't fail, but the port is still 5K.
[20:34] <supa__> hm
[20:34] <agronholm> supa_: why would the port need to be stringified?
[20:34] <jimbaker> supa__, well under the theory we are working, flask depends on this stringification
[20:35] <jimbaker> but it might still want the port to be a number
[20:35] <jimbaker> in other logic
[20:35] <whg> agronholm supa__ Jython wants the subprocess arguments to be strings.
[20:35] <jimbaker> app.debug = "True" should still test as true of course
[20:35] <whg> And I believe werkzeug is just dumping the config dict to the subprocess call
[20:36] <agronholm> whg: that is curious
[20:36] <jimbaker> as if we never saw this sort of assumption before in jython ;)
[20:36] <jimbaker> or rather python code we are trying to run on jython...
[20:36] <supa__> Ok, so app.debug = "Anything" seems to work. Port doesn't, but I can specify that as a kwarg to Flask.run()
[20:37] <whg> https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/serving.py#L601
[20:37] <whg> That's the call to subprocess that fails on Jython
[20:37] <jimbaker> whg, which makes perfect sense why it would fail
[20:37] <jimbaker> also look at https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/serving.py#L593
[20:37] <whg> And this is in serving.py in Flask
[20:38] <whg> So I strongly suspect that it is when you are using Flask's built-in server for dev, right?
[20:38] <supa__> Right.
[20:38] <jimbaker> which reflects our own NOTE
[20:38] <supa__> I'm not on Windows, though.
[20:38] <jimbaker> supa__, yeah, but it doesn't matter for our discussion
[20:39] <jimbaker> we are now digging deeper into what werkzeug does, what cpython does out of the box, and how jython differs
[20:39] <pjenvey> it's not env vars, the error is w/ the plain args
[20:39] <jimbaker> pjenvey, sure. but it follows the same intent
[20:40] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[20:40] <pjenvey> args can accept unicode or str
[20:40] <supa__> This still dies app.run(port=9999, debug=True), but only when Debug is specified.
[20:40] <jimbaker> pjenvey, presumably ProcessBuilder knows how to handle on the underlying system
[20:42] <jimbaker> pjenvey, btw, i think we should be able to make this an easy now that we require java 7, http://bugs.jython.org/issue2096
[20:42] <whg> supa__: It dies when trying to start the child process for the HTTP server
[20:42] <pjenvey> definitely
[20:42] <whg> supa__: I'm not sure you're going to be able to bind to the not-default port
[20:47] <supa__> app.run(port=9999, use_reloader=False) * Running on http://127.0.0.1:9999/ (Press CTRL+C to quit)
[20:47] <supa__> o.O
[20:49] <whg> supa__: wha?
[20:49] <whg> Oh, it doesn't go through the same code path
[20:50] <supa__> I can bind to other ports and disable use_reloader.
[20:50] <whg> use_reloader=False
[20:50] <supa__> app.run(port=9999) sometimes works, too.
[20:50] <whg> The call to subprocess.call is only in the restart_with_reloader method
[20:50] <whg> As long as you don't need the reloader, that's your workaround
[20:52] <supa__> Ok, so if I don't touch any other configuration whatsoever, app.run(port=9999) works by itself with the reloader enabled.
[20:53] <whg> supa__: If you're feeling adventurous, go hack the serving.py file in your site-packages and dump the args it passes
[20:54] <whg> supa__: That should tell you exactly which argument is not a string in which cases
[20:54] <supa__> This is Jython - I can just overwrite the serving.py
[21:08] <supa__> I think what seems to be happening is when it relaunches it expects arg[0] to be the modulename, but it's set to None.
[21:09] * jorgew (~Adium@50.57.17.244) has joined #jython
[21:09] <topi`> wow, I have a huuge backlog here
[21:09] * jorgew (~Adium@50.57.17.244) has left #jython
[21:09] <topi`> I have one piece of python source, where Jython actually *beats* pypy ;)
[21:09] <jimbaker> topi`, it's a good thing
[21:10] <topi`> (I counted out the usual 5-6 sec "import lag")
[21:13] <supa__> * Restarting with reloader
[21:13] <supa__> [None, 'jython-2.7-b2.build.jar']
[21:13] <supa__> OSError: Cannot run program "jython-2.7-b2.build.jar" (in directory "/tmp"): error=2, No such file or directory
[21:13] <supa__> So disable the reloader is the answer.
[21:26] <supa__> sys.executable is None. Is that a problem with Jython?
[21:26] <paolo> supa_: that's me. I was able to solve that using the installed version
[21:26] <paolo> when I had that problem I used the standalone
[21:27] <supa__> That's what I'm using.
[21:28] <paolo> I had to download 2.7b2 from http://mvnrepository.com/artifact/org.python/jython-installer and install, then it worked
[21:28] <supa__> I don't have that option.
[21:30] <supa__> Both sys.executable and sys.argv[0] are blank in standalone. :\
[21:30] <paolo> but with a 5-6 sec lag i think the reload is almost useless (at least for me)
[21:30] <supa__> reload is only really for development, ya? All it does is relaunch the process when a stat() is different in the source files?
[21:38] <paolo> Q1 i think so, Q2 i don't know.
[21:40] * whg is now known as zz_whg
[21:41] <supa__> So I cheated. If I add shell=True to subprocess.call from serving.py in werkzeug and set args[0] to my script name.... I can relaunch.
[21:42] <supa__> But that's exceptionally silly.
[22:13] * supa__ (~supa@209.101.183.82) Quit (Quit: leaving)
[22:27] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[22:32] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 252 seconds)
[22:40] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) Quit (Quit: Leaving...)
[22:41] <jimbaker> supa_, right, we should fix that issue re sys.executable for a standalone jar
[22:42] <jimbaker> there are some minor questions about parsing that is done by the jython wrapper script, but these should be readily resolvable
[22:43] <jimbaker> the solution to http://bugs.jython.org/issue1452 apparently worked around this issue
[22:51] <jimbaker> i suppose the only question then is, per https://docs.python.org/2/library/sys.html#sys.executable, does a jar count as a binary executable? or do we need something like this post: https://coderwall.com/p/ssuaxa ?
[22:55] <jimbaker> no doubt, this is the real reason why this remains unresolved. note that it's possible to set sys.executable via -Dpython.executable=/path/to/some/executable
[22:55] <jimbaker> supa_, ^^^
[23:32] * chrisseaton (~chrisseat@79-76-252-14.dynamic.dsl.as9105.com) has joined #jython
[23:39] <jimbaker> another possibility is providing some sort of mechanism by which we generate a wrapper script in a tempdir. this might cause other issues related to security however
[23:53] <pjenvey> you need something like a wrapper script, since it's assumed that sys.executable is a single executable
[23:54] <pjenvey> we can write files safely, we support O_EXCL or whatever it is
[23:56] <pjenvey> in theory I don't really care about providing a sys.executable for users not using the cmd line script --if you're not using the cmd line script it's not too common that anything you're doing will require sys.executable in the first place
[23:57] <pjenvey> problem is when you someone does run into this, the problems exhibited are always really obscure
[23:58] <pjenvey> it might have been helpful to say, make accessing the sys.executable property when one doesn't exist emit a warning. but then of course 2.7 disables warnings by default =P

Index

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