/srv/irclogs.ubuntu.com/2017/10/30/#launchpad-dev.txt

=== frankban|afk is now known as frankban
=== frankban is now known as frankban|afk
cjwatsonwgrant: I ran into an interesting issue when doing some casual Python 3 porting.  lib/lp/services/webapp/tests/test_servers.py:TestWebServiceRequestToBrowserRequest.test_unicode_path_info tests that Unicode is permitted in PATH_INFO.  PEP-3333 explicitly forbids this (or rather, it allows Unicode but only the bottom 256 codepoints, and anything else must be MIME-encoded), and zope.publisher ...23:48
cjwatson... 4.0.0 enforces this at least in some places.  Do you think we should adjust the test in this case?23:48
cjwatsonI can't think of a case where we'd actually need anything above U+00FF in PATH_INFO; surely practically everything there is a name or a fixed segment of some kind.23:50
wgrantcjwatson: Filenames, mostly.23:50
cjwatsonDon't they get encoded?23:50
wgrantYou'd think so, but it's possible lazr.restful decodes them at some point.23:51
wgrantOr zserver does23:51
cjwatsonI mean if they don't undergo quoting then we must have other bugs23:51
wgrantIt sounds like it's probably safe, but it needs checking23:51
cjwatsonYeah23:51
cjwatsonIt's conceivable we'd need to upgrade ZTK first, I suppose23:52
cjwatsonAlso for bonus points py2 urllib.(un)quote and py3 urllib.parse.(un)quote don't behave the same way for non-trivial Unicode23:55
cjwatson>>> unquote('%D7%90')23:55
cjwatson'א'23:55
cjwatson^ py323:55
cjwatson>>> unquote('%D7%90')23:55
cjwatson'\xd7\x90'23:55
cjwatson^ py223:55
cjwatsonand the other way is a KeyError in py223:55
cjwatsonso we need to make sure to consistently encode-then-quote and unquote-then-decode23:59

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