IRC Logs for #circuits Thursday, 2013-03-14

*** Osso has joined #circuits00:39
Ossogoogle reader is being shut down :(01:47
prologicI nkow01:48
prologicI'm outraged01:48
Ossoeverybody here too01:48
prologicOsso, you got time to help me fix unicode support for headers?01:48
Ossoyes01:48
prologicoh good!01:48
prologicCan you have a look at the revisions related to the story?01:49
prologichttps://www.pivotaltracker.com/story/show/4542152701:49
prologicSee where I went wrong01:49
prologicI had to backout the changes (for now)01:49
prologicEverytime I thought I fixed it, I broke Python 3 compat01:50
Ossook checking01:51
OssoI should use your patch as base right ?01:56
Ossoprologic: since you have been working on py3 recently02:00
OssoI can rely on py3 on jenkins having the u"" literal ?02:00
prologicwell you can try02:06
prologicumm02:07
prologichere's the thing02:07
prologicpy33 has the u"" literal02:07
prologicbut py32 doesn't02:07
prologic(nor py31 or py30) - but we're not supporting those versions02:07
Ossois py32 tested ?02:08
prologicyeah02:09
Ossook~02:09
prologicunless you think we should drop it?02:09
prologicright now we run our tests on and support02:09
prologicpy26, py27, py32, py33 and pypy02:09
prologicon Windows, Linux, OS X and BSD02:09
prologicBut we only have build environments for Linux and Windows (the other two are more manual through tox)02:10
prologickoobs has promised us a BSD jail to do testing on (still waiting on that) :)02:10
koobspong02:10
koobs:)02:10
koobsill update my port tonight and run the unit tests for you02:10
koobsjail will be a little longer02:10
koobssmashed at the moment (as ive mentioned) :]02:11
koobs*updates port*02:11
OssoI wondering about the the u() thingy02:11
Ossoit's using unicode_escape02:11
koobsoooo, new files02:11
koobsfutures and pools moved, ooo02:12
Ossoit'll be a different result from utf-802:13
Ossoso I am missing how it works02:14
koobsrunning build_ext02:17
koobserror: No such file or directory02:17
koobshmm02:17
koobssetup.py test is borked02:17
koobssetup.py test needs a test02:17
koobs;D02:17
koobsah02:18
koobsmain.runtests isnt there02:18
prologickoobs: what version was your port for?02:18
koobs2.0.102:18
koobsim almost done on 2.1.002:18
prologicOsso: yeah I think we should continue the style of using circuits.six02:18
prologicbut with modifications02:18
koobssetup.py refers to tests.main.runtests for test_suite02:18
prologicI believe IHMO that the u() implementation is circuits.six is wrong02:18
koobsit doesnt exist anymore02:18
OssoI think we should six but02:19
prologickoobs: eh?02:19
koobsprologic; need to know hwo to run tests :)02:19
Ossothis 2 results are different and I clearly want the second option02:19
Ossohttp://circuits.codepad.org/IUquu8Ao02:19
prologickoobs: make clean tests02:19
prologickoobs: py.test tests02:19
prologickoobs: tox02:19
prologic:)02:19
koobsprologic; setup.py contains test_suite="tests.main.runtests", that module doesnt exist anymore (and i could run tests via python setup.py test in 2.0.1)02:20
koobstox is new since 2.0.1 ?02:20
prologickoobs: hmmm02:20
prologicdid we break the setup.py?02:20
koobsindeed.02:20
koobs:)02:20
koobsim installing tox now, lucky im the maintainer02:20
prologickoobs: we use fox now to run tests across different envs02:20
koobsyah, i get it :)02:21
prologickoobs: ok I'll fix setup.py02:21
prologicthanks for the heads up :)02:21
koobsjust needs hooking up to the setup.py test cmd02:21
prologicobviously we don't personally use it :)02:21
koobsnp02:21
prologicbut it is nice to python setup.py test02:21
koobswrite a test for it ;)02:21
koobsits very nice02:21
prologichaha02:21
prologiccould do02:21
prologicbe a bit tricky though02:21
koobsand standard hook for system packages to use02:21
koobsgiven the variation in testing methodologies/tools02:21
prologic*nods*02:22
prologicOsso: I found a better implementation (perhaps a correct one) of the u() function on stack overflow today at work02:23
prologiclet me try to find it again02:23
koobsrunning tests now02:24
prologicOsso: http://stackoverflow.com/questions/6625782/unicode-literals-that-work-in-python-3-and-202:26
prologicWhat about this?02:26
Ossofrom __future__ import unicode_literals02:27
prologickoobs: fixed test_suite in dev02:27
Ossowe can always u"" then02:27
prologicOsso: does that work in py32?02:27
Ossoyes02:28
koobsprologic; oh that was quick :)02:28
prologicOsso: how? I just tried it on py3202:29
prologicstill get a SyntaxError for02:29
prologic>>> s = u"foo"02:29
koobsgood news everyone!02:29
koobs========================================================== 266 passed, 1 skipped in 56.61 seconds ===========================================================02:29
koobsbut only 266 tests *tear*02:29
prologickoobs: good stuff :)02:29
koobs:]02:29
prologickoobs: what got skipped?02:30
koobsthats only on 2.702:30
koobsummm02:30
koobsi recall we skipped one in 2.0.102:30
prologicyeah use fox to run across all supported pythons02:30
koobs*looks*02:30
koobsooo interesting02:30
koobsit says it passed, but.02:30
prologicmake clean tests (is more verbose)02:30
prologicshould give a report at the bottom of failed, skipped, etc02:30
Ossono never mind it does not work02:30
koobswhats make? :)02:30
koobsprologic; the port build_Ext's then runs tox directly from tarball extract dir02:31
prologicyou know GNU make :)02:31
koobsrunning again02:31
koobssif use Makefiles for python modules02:31
koobswhat is this :]02:31
prologiclol02:31
prologicconvenience for a bund of things02:31
prologicmake docs02:32
prologicmake clean02:32
prologicmake release02:32
prologic:)02:32
koobsi thought python had cmd's for that :]02:32
koobsbut understood nonetheless02:32
prologicnah02:32
prologicit does02:32
prologicbut it doesn't cover everything02:32
koobsi know what youre getting at :)02:32
koobshmm, bad file descriptors02:32
koobswill paste02:32
prologicno don't02:33
prologicif it didn't fail02:33
prologicdon't :)02:33
prologicwe know about them :)02:33
koobsmy issue is02:33
koobsok02:33
koobshow can there be errors02:33
prologicwe have a story to fix those I think02:33
koobsand still be passing02:33
prologicbecause the behaviour is still correct02:33
prologicbut the cleanup is bad02:33
prologicor something to that effect02:33
koobs  File "/usr/local/lib/python2.7/socket.py", line 170, in _dummy02:33
koobs    raise error(EBADF, 'Bad file descriptor')02:33
koobsthat one?02:33
prologicthe reason you're seeing the errors on stderr though02:33
prologicis because of a new feature in 2.1.002:33
prologicnamely default error handler02:34
koobsand i cant see the skipped one hm,m02:34
prologicthat by default prints to stderr02:34
prologicie: don't have to forget to add Debugger() to your app02:34
prologicbut adding Debugger() or a custom error logger will override the default02:34
prologicme here's idea :)02:34
prologicmehere*02:34
koobsbe nice to know which was skipped :]02:34
prologicumm02:35
prologicpy.test -r fsxX tests02:35
prologicor02:35
prologicpython -m tests.main02:35
prologicthose two test runners have the reporting for skipped, failed, etc02:35
koobsSKIP [1] /usr/home/koobs/repos/freebsd/ports/devel/py-circuits/work/circuits-2.1.0/tests/io/test_notify.py:5: could not import 'pyinotify'02:36
koobsah.02:36
koobsyou shoudl write a kqueue bit for fd notifications on freebsd02:36
prologicwait02:37
koobshttps://pypi.python.org/pypi/watchdog supports kqueue02:37
koobs:]02:37
koobsand windows02:37
koobsand FSEvents on OSX :]02:37
prologicthere's a way to implement real-time file notifications on BSD using kqueue?02:37
koobsuh02:37
koobsyes.02:37
koobs:]02:37
prologicwait02:38
koobshave a squiz at that pypi link02:38
prologicwe just have to wrap watchdog?02:38
koobsyes.02:38
koobsif its good enough02:38
prologichmm02:38
koobsif you like it02:38
prologiccan you write it for us? :)02:38
prologicshould be trivial02:38
prologicjust like we wrapped pyinotify02:38
koobsi have never written a line of python :)02:38
prologicdoes watchdog also support notify for linux?02:38
koobsi lie.02:38
prologiclol02:38
koobsyes02:39
koobsinotify on linux02:39
prologicok I'll write it :)02:39
koobsfsevents/kqueue on OSX02:39
prologicoh sweet02:39
koobskqueue on *BSD02:39
koobsand windows02:39
prologicok I'll investigate it02:39
prologicand write up a new story02:39
prologicit's better to wrap something that supports more platforms ihmo02:39
koobsyou may not get identical feature support, i cant tell you exactly02:39
*** ronny has joined #circuits02:39
koobsbut theres plenty of tools that subscribe to file/dir etc notifications (among other things) using kqueue02:39
prologicyeah no that's cool02:40
prologiccircuits.io.INotify just fires file system events for what it's watching02:40
prologicif watchdog can provide the same functionality and support more platforms02:40
prologicthat's all we need it for02:40
koobstheres also http://people.freebsd.org/~dwhite/PyKQueue/02:41
koobswhich i think is py-kqueue on pypi02:41
prologicahh yeah nah02:43
prologicwe're covered with queue inc ircuits02:43
prologicwe fully support it on OS X / BSD as you know02:43
prologicfor circuits.io.sockets02:43
koobskqueue for python02:43
prologicand circuits.io.file02:43
koobsnot queue02:43
prologicyeah kqueue02:43
prologicit's built into the python std lib02:43
koobsif watchdog turns out to be crap, or too wide in scope02:43
prologicpydoc select02:43
koobsah02:43
prologicwe support Select, Poll, EPoll, KQueue pollers02:44
koobsnot really polling with epoll and kqueue :)02:44
koobstwo hard problems in computer science02:44
*** ronny has quit IRC02:45
prologicwell the point is we support all pollers we know about provided by select module02:46
prologicas long as they're available on your system :)02:46
koobswhich is great02:46
*** ronny has joined #circuits04:11
*** ronny has quit IRC04:11
*** ronny has joined #circuits04:11
*** christopher_ has quit IRC07:35
*** christopher_ has joined #circuits07:52
*** christopher_ has quit IRC08:02
*** christopher has joined #circuits08:05
*** Osso has quit IRC09:17
*** christopher has joined #circuits10:25
*** ronny_ has joined #circuits11:14
*** ronny has quit IRC11:17
spaceoneprologic: what do you think about parsing the first http request line with regex?11:29
spaceoneRFC2616 Section 19.3 says that a server SHOULD be tolerant when parsing it11:29
spaceoneanother section says that the server MUST send an 505 if the request HTTP protocol version is wrong (it must be case sensitive): "HTTP" "/" NUM "." NUM11:32
ronny_how about using http_parser ?11:34
spaceonere.compile('^(?P<method>[^ \t]+)[ \t](?P<uri>[^ \t]+)[ \t]+HTTP/[0-9]\.[0-9]$')11:35
spaceonere.compile('^(?P<method>[^ \t]+)[ \t](?P<uri>[^ \t]+)[ \t]+HTTP/(?P<protocol>[0-9]\.[0-9])$')11:36
spaceoneronny_: hmm, only if i can see the 3p lib code11:36
spaceonealso it is one simple regex11:36
ronny_spaceone, http-parser is open-source :P11:47
spaceoneronny_: is it a pyhton lib ?11:47
ronny_spaceone, yes11:48
ronny_https://github.com/benoitc/http-parser11:48
spaceonehmm, no.. it is on pypi11:48
spaceonehmm, it contains more than HTTP11:52
spaceonethere are status definitions which are not part of HTTP1.111:52
spaceonealso it requires a minimum length of 3 for the HTTP request method11:53
spaceoneit does more than parsing11:57
spaceonealso encoding11:57
*** Guest99624 has joined #circuits13:37
prologicronny_, I'm actually considering using http-parser going forward and borrowing cherrypy reqbody parsing15:18
ronny_prologic, neat15:22
spaceonehmmmm15:24
prologicI think that'll have to wait for a 2.2 though15:41
prologicwe need to fix this for now with what we've got15:41
prologicOsso fixed headers/unicode last night (mostly)15:41
prologicit's in dev15:41
spaceoneyep15:42
spaceonethis is not that important15:43
spaceone(it is no bug, but it is untidy)15:43
spaceonecircuits is not forearmed for malformed requests... there are a lot things where it does not send an answer to the socket (even not after an timeout)15:44
ronny_prologic, i got some small fixes lined up for http-parser myself :P but those only affect sync use with socket files15:44
prologic*nods* - we'll try to fix that at some point15:46
prologicin 2.2 probably15:46
ronny_hmm15:55
*** ronny_ has quit IRC16:32
*** Guest99624 has quit IRC17:10
prologicspaceone, thank you17:10
prologiclooks like we'll be doing a 2.1.1 followed quickly be a 2.1.217:11
prologicor maybe we'll just roll all these bug fixes into 2.1.117:11
prologicI might move the 2.1.1 release milestone17:11
prologicI'll see what Osso/mehere think17:11
*** Guest99624 has joined #circuits17:13
*** ronny_ has joined #circuits22:35

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!