IRC Logs for #circuits Tuesday, 2013-03-12

*** kingargon has joined #circuits00:08
*** circuits has quit IRC00:48
*** Osso has joined #circuits01:18
*** ronny has joined #circuits02:44
*** ronny has quit IRC03:15
*** circuits has joined #circuits04:23
*** ronny has joined #circuits04:42
*** ronny has quit IRC04:52
*** ronny has joined #circuits05:48
spaceoneprologic: they are failing because of missing trailing slash?!08:33
*** ronny has quit IRC10:13
*** ronny has joined #circuits10:13
*** Osso has quit IRC11:08
*** Osso has joined #circuits11:37
*** patx has quit IRC11:38
*** Osso has quit IRC11:51
*** Osso has joined #circuits11:55
*** ronny has quit IRC12:11
*** Osso has quit IRC12:42
*** Osso has joined #circuits12:45
*** Osso has quit IRC12:49
prologicspaceone, I fixed it by integrating the url module (http://pypi.python.org/pypi/url)13:00
prologicProblem is though url isn't Python 3 ready13:00
prologicso some work there to get that working on Python 313:00
prologicBut it gives for a nice URL object on the Request object for doing things like checking url equivalence, degraging, creating new absolute or relative urls based on the request, sanitizing, etc13:02
spaceoneprologic: jah i know13:03
spaceoneprologic: this was also my plan13:03
spaceoneprologic: this replaces all the Request attributes like query_String, path, scheme, host, port, etc.13:04
prologicactually you are right it does13:11
prologicwhich makes our Request object much simpler13:12
prologicwe just have to adapt circuits.web.url to be Python 3 compatible13:12
prologicTrouble is I'm terrible when it comes to dealing with Unicode13:12
prologicAlso running two servers in a single process13:12
prologicyou must run them on separate channels13:12
prologicserver1 = BaseServer(bind, channel="foo")13:13
prologicserver2 = BaseServer(bind, channel="bar")13:13
prologic(server1 + server2).run()13:13
prologicbare in mind though that you're no longer talking about "web" as the channel now13:13
spaceonewhat effect does it have?13:14
prologicso some of your event handlers might have to be dynamically created at runtime13:14
prologicwell when you connect to server1 via it's interface13:14
prologicall the events will be fired on channel "foo"13:14
prologicso you'll see (in the Debugger()) things like13:14
prologic<Read[_foo.read] (...)>13:15
prologictry it out on a couple of simple cases and see13:15
prologicshit I have to get dressed and run13:16
prologicI'll be online via my iPad in a few mins13:16
spaceoneok13:18
*** ronny has joined #circuits13:41
*** ronny has quit IRC13:41
*** ronny has joined #circuits13:41
*** EtHeO has joined #circuits14:26
*** Osso has joined #circuits14:41
*** Osso has quit IRC15:02
prologicheya15:28
spaceone;)15:29
prologicneed to try and get circuits.web.url working on Python 315:30
prologicall tests pass great on Python 215:30
prologicAnd it does the same sort of thing as os.path.realpath(...)15:30
prologicWhich is great15:30
prologicplus better url management15:30
prologicBefore I relied on a crappy little function from cherrypy in circuits.web.utls15:31
prologicI believe borrowed from cherrypy tools15:31
spaceoneprologic: where is the roadmap ?15:31
spaceonewhen does the next sprint end?15:31
spaceonethe first SF release will be based on it15:32
prologichttps://www.pivotaltracker.com/projects/69562115:32
prologicYes well if I can't make circuits.web.url work with Python 3 over the next 2-3 days I'm going to have to postpone it and back out all the changes15:33
prologicwhich is why I thought there must be a better way15:33
prologicwhat better way then to use someone else's hard work :)15:34
spaceoneprologic: hmm, but maybe just one line fixes the windows issues:15:34
prologichmm15:34
prologicunfortunately I have no windows dev machines to test/dev with15:34
prologicso I haven't a clue15:34
spaceonepath = os.path.realpath(request.path); if request.path.endswith('/'): path += '/';15:34
prologicsomething about using os.path.realpath breaks things for windows15:34
prologicpossibly because it does something different on windows15:35
ronnypP15:35
prologichey ronny :)15:35
prologicmaybe I'll give it another go this morning15:35
prologicusing os.path.realpath(...)15:36
ronnythere should be a completely separate libs only for dealing with uri/iri15:36
ronnyand NO os.path functions there15:36
prologicthere is15:36
prologicit's called url15:36
prologichttp://pypi.python.org/pypi/url15:36
prologicbut it's not Python 3 ready15:36
prologic:/15:36
ronnylet me take a look15:37
prologicta15:37
prologicI tried to patch it last night for Python 315:37
prologicgot 90% there, but there are still some issues15:37
ronnyomg15:38
ronnythat lib is totally rotten15:38
prologichmm why's that?15:38
spaceoneit is not pythonic15:38
prologicdo you have a better lib in mind that just deals with url parsing, sanitization and creating new urls (absolute, relative, etc)?15:38
spaceoneprologic: maybe the better thing is sqlalchemies URL15:38
spaceonehmm, i don't think it sanitizes15:39
ronnyprologic, it doesnt really deal with uri vs iri and the code looks bad at first glance15:39
prologicwell I've used it in a few projects before15:40
prologicand quite like it15:40
prologicI like how you can chain calls together15:40
prologichmmm15:42
prologicsqlalchemy.lib.engine.url is not suitable15:42
prologiclooking at the code it's not Python 3 ready either15:42
prologicand doesn't do half of what we need15:42
prologichttps://github.com/gruns/furl15:44
prologicgah also not Python 3 compatible15:45
prologicand doesn't do sanitization I don't think15:45
spaceonedrop python3 and windows support15:45
prologicAre you serious? :)15:47
prologicWe just went to a lot of trouble to support these over the past 2 years15:47
prologicnormally I would agree with you15:48
prologicI'm no Windows user (haven't been for 12+ years)15:48
prologic-but-15:48
prologicWasted effort :)15:48
spaceoneno that serious15:48
prologicWhat about: https://pypi.python.org/pypi/YURL/0.1015:48
spaceoneit is cool to support it15:48
spaceonefurl is similar to the other thing15:49
ronnyhmm15:49
ronnyi'll work on the werkzeug url/iri lib first i suppose15:49
spaceoneronny: german?15:50
ronnyspaceone, werkzeug is a wsgi toolkit15:51
ronnyalso a german name LP15:51
ronny:P15:51
prologicronny:  yea but we need it now :)15:51
prologichehe15:51
prologicI'm guessing you don't have a better suggestion at this time?15:51
ronnynop15:51
prologicMy gut feeling is to go with url and improve it15:51
ronnyall i have seen fails with some things15:51
ronnyand url just looks messy15:52
ronnyand yurl looks like nasty FUD15:52
spaceonefud?15:53
spaceoneprologic: if os.name == 'nt': old_behvaior else: os.path.realpath :D15:54
prologichmm15:54
spaceoneprologic: do not use a lib which is uncool15:54
prologicyurl does url  sanitization15:54
prologicremove_dot_segments15:55
prologicseems to do the right thing15:55
prologicplus y url also supports Python 315:55
ronnyhow about IMPORT POSIXPATH15:55
spaceoneprologic: try posixpath.realpath15:55
ronnysince thats kind of what you want for urls15:55
prologichmm15:56
prologicalright15:56
spaceone;)15:56
prologicmy only way to test on Windows is to let Shining Panda tell me if things blew up for Windows :15:56
prologic:)15:56
ronnysounds far15:56
prologicI'll backout all the recent changes15:56
ronnywouldnt want to get closer to windows :P15:56
prologicheh15:56
prologicI don't even own a copy of Windows15:56
prologicok bbs15:57
prologicfirst let s undo this mess15:57
prologicoh and also investigate why fox breaks horribly on OS X15:57
prologic:)15:57
ronnybbl15:58
prologic*fingers crossed*16:01
prologicI would still like a better URL/URI module/class16:01
prologicOne that is Pythonic supports Python2/3 and has nice convenience16:01
prologicthat's what I like the most about http://pypi.python.org/pypi/url16:01
prologicit's API is quite nice really16:01
spaceonei have to sleep ;)16:02
prologickk :)16:04
prologicI'm just running the tests now on my Mac16:04
prologicwill push the changes up shortly16:04
prologicand see if it also passes on Shining Panda16:04
ronnyprologic, btw, see httpcore.uri/iri16:23
ronnyoh, shit they copy half of werkzeug :)16:24
ronnyhmm, time to sleep16:24
ronnynight16:24
prologicyeah no16:31
prologiccan't have that :)16:31
*** ronny has quit IRC16:31
prologicAll 1438 tests passed on all platforms and environments.17:53
*** christopher has joined #circuits21:55
*** ronny has joined #circuits22:17
spaceoneprologic: nice! how can i get the changes to my forked version?22:41
prologichg fetch https://bitbucket.org/circuits/circuits-dev22:41
prologicput it in your .hg/hgrc22:41
prologicsimply ini style file22:41
prologic[paths]22:41
prologicupstream = https://bitbucket.org/circuits/circuits-dev22:41
prologicAny new changes I should pull in from you?22:42
spaceoneprologic: i did not do commit anything22:43
spaceonei will tell you22:43
spaceonethen22:43
spaceonebut my focus is currently on my webapp, i don't have the time to enhance circuits22:43
prologicyeah no that's fine :)22:45
prologicI applied all the hand-written patches you submitted so far :)22:45
prologicI'll be levying for home in a few mins22:45
spaceonei am going to work now22:47
spaceonesee you later (in 14 hrs) :D22:47
prologicnps22:48
ronnymoin22:50
prologicGM ronny22:52

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