[issue15719] Sort dict items in urlencode()

2012-09-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: As an aside, I noticed a doctest affected by this in the urllib HOWTO: >>> url_values = urllib.parse.urlencode(data) >>> print(url_values) name=Somebody+Here&language=Python&location=Northampton http://docs.python.org/dev/howto/urllib2.html#data (search for th

[issue15719] Sort dict items in urlencode()

2012-09-09 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: I've come to see more downsides than upsides to this idea. I'm withdrawing it. Good points, Greg! (And others.) -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: -1 on doing this from me. While I don't see it hurting anything when "type(query) is dict" I'd much rather encourage people to write better tests that do not take the lazy way out. Tests that get by comparing a generated string to a "golden" string are soo

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Honestly, this looks much more like an enhancement than a bugfix to me, so I think it should only target 3.4. As for the idea proper, I sounds ok to me, as long as only exact dict instances are affected (i.e. OrderedDict and friends keep using their native orde

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Note, the sort may fail if e.g. bytes and str are mixed in the keys. So this should be caught and ignored. An alternative would just be to fix the call site to pass in sorted(query.items()) instead of sorted(query). Still, I think that more predictable out

[issue15719] Sort dict items in urlencode()

2012-08-17 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15719] Sort dict items in urlencode()

2012-08-17 Thread Guido van Rossum
New submission from Guido van Rossum: >From http://mail.python.org/pipermail/python-dev/2012-August/121364.html : """ I just fixed a unittest for some code used at Google that was comparing a url generated by urllib.encode() to a fixed string. The problem was caused by turning on PYTHONHASHSEED=