IRC Logs for #circuits Sunday, 2013-03-17

prologicspaceone, that's not really possible since all unit tests pass on my branch00:32
prologiccan you elaborate?00:32
*** Osso has joined #circuits03:34
spaceoneprologic: jah, but you are only testing simple things03:36
spaceoneit is completely broken03:36
spaceonei can give you 2 examples03:36
prologichey Osso03:37
prologicOsso, did you see the logo design?03:37
prologicWhat do yo think?03:37
prologicspaceone, shoot03:37
spaceonerun it!03:38
spaceonethen access /foo03:38
spaceoneafter that access /03:38
spaceoneyou can see the response object is the same reference03:38
spaceonerestart server03:38
spaceoneaccess first / then /foo03:38
OssoI am not sure about the logo color03:39
prologicOsso, just the color?03:41
prologicOsso, would you mind formulating a response to my email to the dev mailing list03:41
prologicso I can forward it on to the designer03:41
prologicspaceone, I'm not seeing what you're seeing03:42
prologicI get two different response for / and /foo03:42
prologicand vice versa03:42
spaceonei am getting the same03:42
prologicso for / you get Hello World!03:42
prologicand for /foo you get Hello World! too?03:42
prologicyeah I'm totally not seeing that03:42
spaceoneand also the other way round03:43
prologicI recommend you fetch from my branch03:43
spaceonei did03:43
prologicand discard your recent changeset03:43
spaceoneit is03:43
prologicI cherry picked your changes03:43
prologicensuring all tests pass :)03:43
prologicyeah what you're describing is very weird03:43
prologicI'm just not able to reproduce that behavior03:43
spaceoneanother problem: start an SSL server with a wrong cert-path... it ends up in an endless loop03:44
prologicnow that is a real problem :)03:45
prologicso just point the cert to an invalid file?03:45
prologicI think this branch has a memory leak03:46
prologicI'll test out the ssl thing and fix that03:46
prologicbut your original problem I'll leave with you03:46
prologicI cannot reproduce it here03:46
spaceoneplease test again03:46
prologicwhat's more03:46
prologictests would fail otherwise03:46
spaceonedo some more than2 requests03:46
prologicI was doing dozens :)03:46
prologichang on I'll do heaps more03:46
spaceonei get sometimes the right response03:46
spaceoneit has to do with time03:46
prologickk hang on03:46
prologiclemme se03:46
spaceonepress F5 5times then change the URL (fast)03:47
Ossook I replied03:47
prologic$ curl -q -o - http://localhost:9000/ && curl -q -o - http://localhost:9000/foo03:47
prologicHello World!Hello Foo!03:47
prologiccan't reproduce03:47
spaceoneplease try with Firefox03:47
spaceonewith curl it worksforme too03:48
prologicahh huh!03:48
prologicI believe I know why03:48
spaceonei never report invalid bugs ;)03:48
prologicwasn't saying you do :)03:48
prologicjust hunting bugs down is a pain03:49
spaceoneit is because the connection did not close03:49
prologicthis is something we need to develop a unit test for03:49
prologicwhat's happenning here is HTTP/1.1 is working03:49
prologicreally really well :)03:49
prologicI need to delete the request/response object for a client03:49
prologicafter the response has ended03:49
prologiceasy fix03:49
prologicbut needs a unit test too03:49
spaceonetell me when you commitet the fix03:49
spaceonei am showering and eating now03:50
prologicfirst I want to commit and push this changeset03:50
prologiclemme paste the diff for you to see first03:50
prologicit's also based on the last cherry picked changes from you03:50
prologicbasically reworking the Request object and various attributes03:50
spaceonei have problems with mercurial03:50
prologicsuch as?03:50
spaceoneit sometimes deletes my changes or reverts to an complete old branch03:51
prologicwhat are you doing?03:51
prologicOsso, thanks :)03:51
prologicOsso, when you see/hart from mehere could you ask him to respond with his feedback too?03:51
spaceonei dont know.. i want just to commit && push03:52
prologicspaceone, we probably don't need request.host03:52
prologicrequest.local is enough03:53
prologichg commit -m "..."03:53
prologicfollowed by hg push03:53
prologicshould not do anything weird03:53
spaceonebut it actually does :D03:54
spaceoneprologic: another bug?!:  if rp[0] != sp[1]:03:54
spaceoneshould be  if rp[0] != sp[0]:03:54
prologicthat was suppose to be 003:54
prologictoo many late nights :)03:55
spaceonei did not have more than 4 hours sleep per day for 2 weeks03:55
spaceonei have to finish my project, don't have more time03:55
spaceoneprologic: how can i list every unpushed branch?03:59
spaceonecan you implement the HeaderMap class?04:08
prologicwe already do don't we?04:12
prologichg out04:12
prologichg outgoing04:12
prologichg out | less04:12
prologicWe can't get rid of server.base property04:13
prologicit's used by every test :)04:13
prologicit just constructs the base/root url of the server04:13
prologicOk I'm almost finished with this changeset04:37
prologica) Add request.local and request.server04:37
prologicb) Replace request.server_protocol with request.server.protocol04:37
prologicc) Add proper scheme support04:38
prologicNow I'll quickly fix the request/object not being deleted after a response is complete04:38
prologicbut then I'll go to bed04:38
prologicOsso, I forwarded your feedback on to the designer - thanks :)04:46
spaceoneprologic: hmm request.server.protocol is from design also wrong!?04:49
spaceonebecause the server does not have to do anything with HTTP... the server only knows sockets04:50
prologicwell what's a better option?04:51
prologicwe need some way of accessing the http protocol the server speaks04:52
prologicok one sec05:00
prologicI believed I fixed the same response problem05:00
prologicjust running tests05:00
prologicSo in Server05:01
prologicI can do:05:01
prologicself.http = HTTP(..._).register(self)05:01
prologicand move the protocol proeprty to the HTTP component05:01
prologicsound better?05:01
prologicmaybe move the base property to HTTP as well05:04
spaceonealso move web/http to net/protocols05:04
prologicI can easily s/webapp.server.base/webapp.server.http.base/g05:04
prologiccan't do that05:05
prologicwe already have net.protocos.http05:05
prologicand they'd have to be merged05:05
spaceonewhich is response05:05
prologicto handle either requests or resposnes05:05
prologicresponse handling is in net.protocols05:05
prologicit's still very new05:05
prologicbut we should be able to use the http-parser module now05:05
prologicQuestion is05:06
prologicare we happy with the direction this is going in?05:06
spaceonethere are many API changes but i think it is necessary05:06
prologicnot what I asked :)05:07
prologicare we happy with this direction? :)05:07
prologicor are we wasting time05:07
prologicie: the inclusinog of http-parser05:07
prologicpymultipart (soon to be replaced with the simpler multipart)05:07
prologicvarious API changes05:07
spaceonei am happy, it makes it more robust and simpler to understand and more powerful05:09
prologicok good :)05:09
prologicI'll move these two attributes out of server05:10
prologicthen fix the invalid ssl cert problem05:10
prologicand go to bed05:10
spaceonehow can i select your branch as the primary?05:11
spaceonei tries hg merge -r your_branch05:12
*** Osso has quit IRC05:22
prologicdo you have to heads?05:31
spaceonego sleeping105:40
prologicThis passes all tests05:43
prologicI think I'll fix the ssl cert thing int he morning at work05:44
prologicthis is my last commit05:44
prologicWhat do you think before I commit/push?05:44
prologicspaceone, ping? :)05:47
spaceoneprologic: i will look, wait05:51
spaceoneprologic: +from .constants import SERVER_VERSION, SERVER_PROTOCOL05:52
spaceonei would not do this05:52
spaceonebecause this will copy these things05:52
spaceonei would use web.circuits.constants05:52
spaceoneso you can change them at run time05:52
spaceone(important for the error page)05:53
spaceoneprologic: chagnes looks good05:54
prologicI don't get it05:55
prologicwhy would you want to change the Server header05:55
prologicand default server protocol?05:55
prologicin an error page05:55
spaceonenot the protocol05:55
spaceonebut there is a ERROR_TEMPLATE05:56
prologicdoing from foo import blah05:56
prologicdoes not just import blah05:56
prologicbut other things from the module?05:56
prologicsince when? :)05:56
spaceonestrings are copied on import i think05:56
prologicregardless of you actually importing them?05:57
spaceonein my tests i could not overwrite the http errro template05:57
spaceonebut that is not important05:57
prologicbut hang on05:57
prologicwhy are you trying to overwrite the template?05:57
prologicwhy aren't you just filtering the httperror event instead?05:58
prologicthis is hwo I customize error pages in sahriswiki05:58
spaceonejah, it would be a better solution ;)05:58
spaceonei will do this05:58
prologicyou should :)05:59
spaceoneyep, thank you ;)05:59
prologicthen I don't need to worry about this :)05:59
spaceonewhat time is it ?05:59
prologicfiltering the event is far better :)05:59
prologicSun Mar 17 23:57:53 EST 201305:59
spaceonef course05:59
prologicnearly bed time :)05:59
prologicI'll commit/push this then?05:59
prologicit moves all the base, scheme, stuf, etc05:59
prologicto HTTP05:59
spaceonecan you tomorrow also implement my fragment thing?06:00
prologicwhat fragment thing?06:00
prologicI didn't include that06:00
prologicbecause we already return a 400 error for fragments in the path06:00
prologicno point in preventing it in the parser ihmo06:01
spaceonejeah but i moved it from our code to the http parser06:01
prologicahh yeah06:01
prologicI'd prefer it stay in the HTTP protocol component06:01
prologicand not the parser06:02
prologicthat parser can be used for both server and client http request/response parsing06:02
prologicso my intention is to move it into at some point06:02
spaceoneit was only done in the response function06:02
prologicalong with the actual HTTP component06:02
prologicif you look in the read handler06:02
prologicit's done before the request is fired06:02
prologictesting with echo and nc06:04
prologicI do get 400 Bad Request06:04
spaceoneyes, but i deleted it from and implemented it in parsers.py06:04
spaceoneinto _parse_request_line06:05
spaceonewhere it belongs to06:05
spaceonethere are also the other bad requests raised06:05
prologicfixed two other bugs06:08
prologicand pushed06:08
prologicyeah I know what you're saying06:08
prologicbut moving it into the parser makes the code more complicated06:09
prologicbecause it's raising an exception too early06:09
spaceonehmm, but there are also other exceptions raised06:09
prologicit works as it is for now06:09
prologiclet's discuss further tomorrow06:09
prologicmaybe we can move it back into the parser06:09
prologicg'night :)06:09
prologicmake sure to pull/merge from me06:09
spaceonei will try :D06:10
prologic#mercurial are very helpful when it comes to tips 'n tricks on using mercurial06:10
spaceonei will join06:10
prologicespecially for complex merges06:10
prologicbut you should be able to merge from me discarding your changes06:10
prologicusing hg merge and hg revert06:10
prologicand possibly hg resolve06:11
prologicmight have conflicts06:11
prologicor just edit the conflicts by hand06:11
prologicg'night :)06:11
prologicI'll give the fragment thing a quick go again06:12
prologicone sec06:12
prologicinitial tests work06:14
prologicmaybe I fixed handling http parsing errors in general06:14
prologicI think I did06:14
prologicwhich is why it works now06:14
prologicyeap all tests pass06:14
spaceoneof course06:14
prologichappy? :)06:15
spaceoneyes, very06:15
prologicbut of course06:15
prologicany exception raised in the parser06:15
prologicwill result in a 400 Bad Request06:15
spaceonethat is OK06:15
spaceoneif there are no errors in the parser06:16
prologicg'night finally :)06:17
spaceoneyes, sleep well06:17
prologicI'll fix that ssl thing in the morning at work06:17
prologicspaceone, ping?06:45
spaceoneprologic: pong06:45
prologicI can prevent the event loop with invalid ssl cert06:45
prologicbut I cannot produce a valid response to the client06:45
prologicbecause the socket is non-existent06:46
prologicit never got established06:46
prologicso you'd just see the error in the server logs06:46
spaceoneis the connection closed then?06:47
prologicdoes that matter?06:47
spaceonethen it is ok06:47
prologicwell I believe so06:47
prologicI don't think it ever becomes open06:48
prologicL703 in circuits/net/sockets.py06:48
prologicI committed and pushed the Handling of invalid SSL certs btw06:48
spaceoneah ok06:49
spaceoneit will not get accepted06:49
prologicthe .accept() call fails06:50
prologicin theory we should also not send a HTTPError either06:51
spaceoneyes, this has nothing to do with http06:52
prologicthis ensures we do not respond to such errors06:53
prologicie: if we can't work with the socket in question06:53
prologicwe just simply do not care at that point06:53
prologicso we do nothing06:53
prologiceither the socket is valid06:53
prologicor it's not06:53
prologicbecause in Request we try to build self.remote06:53
prologicby doing sock.getpeername()06:53
prologicthat will fail for invalid sockets (e.g: ssl error or non-accepted)06:54
spaceonecan you fire an "log-error" event?06:55
prologicyou can intercept error events anyway06:55
prologiceither use the Debugger() as is06:55
prologicor filter error events06:55
prologicseveral of my other projects do this also :)06:55
prologicthere is also06:56
prologicg'night again07:02
prologicsleep time for real :)07:02
prologicspaceone, btw does this resolve all 4 issues you reported on bitbucket?07:03
spaceonei will test ;)07:03
*** Osso has joined #circuits07:28
spaceoneprologic: can you run tests with this? my normal requests are very successfull08:47
ronnyoh, you internalized six as well :(09:00
spaceonewhy :( =09:00
ronnyspaceone, by now i object to library inclusions09:12
spaceonewe could also write circuits.compatibility09:13
spaceonefor these python2/3 workarounds09:13
ronnyspaceone, thats not really what i mean09:25
spaceoneronny: what is the alternative?09:25
ronnyim all of depending on the origin instead of including09:25
spaceone"depending on the origin" ?09:25
spaceonepython2 / 3 has different APIs09:25
spaceonehow should that work?09:26
spaceonealways e.g. using dict.items() (copy of the values) instead of iterating over them?09:26
ronnyi mean a install_requires=['six'] in setup.py09:27
spaceoneah ok09:28
*** Osso has quit IRC10:01
*** ronny_ has joined #circuits10:32
*** ronny has quit IRC10:36
*** Osso has joined #circuits10:51
OssoWe need to update our circuits version on pypi10:56
Ossoit got the 100% cpu bug with a plain web server10:56
spaceoneOsso: how?11:00
Ossothis one
Ossoafter the first request11:00
Ossoit keeps using 100% cpi11:01
spaceoneand why?11:01
Ossogood question I am checking if it is fixed in the circuits repo11:02
Ossoactually it's still on circuits repo11:06
spaceoneOsso: trying strace ?11:06
Ossono need probably a bug in the code I am checking circuits-dev first11:07
spaceonehow can i reproduce this?11:07
Ossojust run the example and then do a request on /11:07
Ossoyeah still there on -dev11:08
Ossook checking whty now~11:08
Ossobut only happens on non linux platforms11:37
Ossoprologic: I was wondering if the control socket is overkill if don't have another thread11:43
Ossoit is fixed now11:51
prologicOsso, nice work :)12:46
prologicronny_, I really don't seriously see what the problem is with inclusion and modification of code12:46
prologicWe ahve not ever depended on external mandatory dependencies to date.12:47
prologicOnly optional ones.12:47
prologicIt's stated very clearly in the docs and on the README12:47
ronny_prologic, in my experience that invariably ends up with maintaining a fork that will get incompatible12:53
*** Osso has quit IRC12:54
prologicthat's why we have used small bits of code that only do one or two things13:08
spaceoneprologic: g'mornin13:18
spaceonewhats the time?13:18
prologicMon Mar 18 07:21:56 EST 201313:23
spaceoneprologic: did you see my commit?13:25
prologicnot yet13:26
*** Osso has joined #circuits13:29
prologicspaceone, redo that changset without the commented out code13:29
prologicand I'll accept it as is :)13:30
prologicCleaning up Header class - great :)13:30
prologicdon't commit commented out code :)13:30
spaceoneprologic: thank god13:30
prologicthat's what revision control is for :)13:30
prologicand test-driven development13:30
prologicif something don't work13:30
prologichg bisect ftw :)13:30
Ossowhat's the compatibility we are trying to maintain ?13:31
prologicwith what?13:32
Ossothis ronny_: prologic, in my experience that invariably ends up with maintaining a fork that will get incompatible13:33
prologicyeah no, in the past we have never maintained compatibility really13:33
prologiceven now we've already modified the http_parser code we included13:33
prologicarguably we could push back improvements/fixes13:34
prologicand depend on the lib13:34
spaceonei leaced the header thing backward compatible13:34
prologicbut we break our "no external deps" that we've maintained for over 8 years13:34
Ossoah I did not know we based ourselves on a lib13:35
Ossothere were quite a few changes in the http parsing13:35
prologicwell noa  lib per say13:35
prologiccopy/pasted code into circuits.web.<new_module_here>.py13:36
prologicthe other option we have13:36
prologicwhich might make ronny happier13:36
prologicis we break circuits.web out into a separate project13:36
prologicand depend on these libs externally13:37
prologicpush fixes/changes up to them13:37
prologicand maintain circuits and circuits.web separately13:37
prologicas two independent projects and packages13:37
prologiccircuits itself does not include included code from libs we borrowed13:37
prologiconly circuits.web13:37
prologic-but- I still really don't see what the problem is of the inclusion of code written by others with appropriate licenses (MIT/BSD)13:39
OssoI see the reason as long as we depend on libs that are active/maintained13:41
OssoI don't think we do?13:41
prologicno we don't13:41
prologiccode we've included hasn't seen active development or maintainance for years13:42
spaceoneprologic: can i move web.headers:parse_headers() into net.protocols.http (grep says it is only used there)13:44
prologicdelete it in the exp* branch13:45
prologicdelete any code we no longer use in circuits.web13:45
prologicwe'll later integrate the parser and http stuff into at a later date13:45
prologicmaking both the server and client use this13:46
*** koobs_ has joined #circuits13:49
spaceoneprologic: pushed13:50
prologiccheat :)13:51
prologicbut ok I'll pull that in as is13:52
spaceoneit was a must13:52
spaceonei thought you would not recognize13:52
prologicin future (if you don't mind):13:52
prologica) commit small chunks of work that represent one or two (at most) things - keep commit message small and associated code13:52
prologicb) don't commit commented out sode - just delete it :)13:53
prologicNB: a can't always be followed though :)13:53
spaceoneNB ?13:53
prologicreason(s) for this is it makes finding changesets that causes bugs a lot eaiser when bisecting the revision tree with things like "hg bisect"13:53
prologicNB == Note Well13:53
prologicLatin for something :)13:53
*** koobs_ has quit IRC13:54
*** koobs_ has joined #circuits13:54
prologicmorn'n koobs_  :)13:54
spaceonehello koobs_13:54
prologickoobs_, your boss hasn't rung yet13:54
prologicmaybe today :)13:54
prologicspaceone, yeah ok13:55
prologicyour broke tests.web.test_client13:55
prologictry again :)13:55
prologicspaceone, do you have pytest installed?13:55
prologicand/or tox?13:55
prologicpip install pytest-cov13:56
spaceonecan you give me the exception?13:56
prologicpip install tox13:56
prologicrun the tests before you commit/push :)13:56
spaceoneare there further tests broken?13:56
koobs_prologic; i think he may be on AL today/tomorrow13:56
prologicspaceone, it's hanging on tests.web.test_client13:56
prologicso I suspect an exception is raised causing an event loop13:56
prologicspaceone, you would have to install pytest13:56
prologicedit tests/web/test_client.py13:56
prologicand add in:13:56
prologicfrom circuits import Debugger13:57
prologicre-tun that indiviaul test and find out why/how you broke things13:57
prologicpy.test -x -s tests/web/test_client.py13:57
prologicthen fix the brokness13:57
prologicand rerun tests13:57
prologicyour turn to fix :)13:57
spaceonei installed the test libs13:57
prologickoobs_, ahh ok :)13:57
prologickoobs_, nps :)13:57
spaceonehow do you run every test?13:58
prologicpy.test -x -s tests13:58
prologicbut also install tox13:58
prologicjust run: tox13:58
prologicto run the tests against every python version13:58
prologicNB: You must have the python version installed though13:58
spaceonei dont have a py.test13:58
prologicTry to install (with your package manager):13:58
prologicPython 2.6, 2.7, 3.2, 3.3 and pypy13:58
prologicpip install pytest13:59
prologicpip install pytest-cov13:59
spaceonei can't13:59
spaceonei only have 2.7 and 3.3 in my repos13:59
prologicyou can't install other python versions?13:59
prologicwhat distro are you using?14:00
prologicit doesn't matter I don't think14:00
prologictox will only run against python versions you have (AFAIK)14:00
prologicarch should have the other versions too in their repos14:00
spaceonebut i don't have a py.test file14:00
prologicyou should14:00
prologicby installing pytest14:00
spaceonei installed pytest14:00
prologicit should have installed a py.test script in your bin somewhere14:01
prologicmaybe that's not in your path14:01
spaceoneah permission denied14:02
prologicahh you don't have a virtualenv in your home dir then14:02
prologicit probably tried to install to /usr/bin or such14:02
spaceonejeah, it works now14:03
prologicso run py.test for running the test suite against your normal python (default) version or to run individual tests14:05
prologicand run to run the entire test suite against different python versions14:05
*** ronny_ has quit IRC14:11
spaceonethere are many wsgi errors14:15
prologicnow you won't break anything before comitting/pushing right? :)14:15
prologicTTD ftw14:15
prologicTest Driven Development (For the Wicked) :)14:16
spaceoneprologic: where is .helpers ?14:25
prologicwhich one?14:32
prologicor circuits.core.helpers14:32
spaceonedon't mind14:33
spaceonei am debugging with the tools now14:34
prologicmehere, Thank you for everything :) We'll miss your hard work and knowledge :)14:34
spaceoneis he leaving?14:44
prologicI think you should ask him yourself :)14:45
prologicin case he doesn't want me divulging :)14:46
prologicIt was a personal email to me only14:46
prologicHe has done great work for circuits though14:46
prologicand we will miss him as a developer14:46
spaceone1 failed, 224 passed, 4 skipped in 222.99 seconds#14:49
spaceoneit does not tell me which failed14:50
prologicpy.test -x -s -r fsxX tests14:51
spaceoneahh /me scrolling up14:51
prologic   -r chars            show extra test summary info as specified by chars14:51
prologic                        (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed.14:51
spaceonecan you add a parameter which automatically add Debugger.register(webapp)14:53
prologicyes I will do this14:56
prologicnot sure15:00
prologicfind out why request.server is None?15:00
spaceonebut this does not belong to my changes15:03
prologicsays you changed them :)15:04
*** Osso has quit IRC16:10
*** koobs_ has quit IRC19:26
*** koobs_ has joined #circuits20:01
*** koobs has joined #circuits20:02
jgiorgihey prologic :)21:15
prologichey :)21:20
*** koobs_ has joined #circuits21:51
*** koobs` has joined #circuits21:51
*** koobs has quit IRC21:54
*** koobs_ has quit IRC21:55
*** FSX has quit IRC22:04
*** FSX has joined #circuits22:04

Generated by 2.11.0 by Marius Gedminas - find it at!