This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Joshua.Johnston
Recipients Claudiu.Popa, Joshua.Johnston, ezio.melotti, orsenthil, r.david.murray
Date 2014-02-07.16:23:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391790206.79.0.902899485219.issue18857@psf.upfronthosting.co.za>
In-reply-to
Content
I'm sorry to reopen this but after it biting me quite a few times more I still cannot think of a valid use-case for this behavior that someone would be depending on 'None' being passed.

I think your backwards compatibility concerns are artificial. Can anyone describe a use-case that depended on arg=None being passed in a query string?

I am sure that anyone who is encountering this behavior is treating the string 'None' as None when encountered in a request query string.

Consider this example usage. A website presents a user with a form to search their twitter followers using the twitter api https://api.twitter.com/1.1/friends/ids.json

Form fields optional
screen_name: [________]
(assume more fields)

Handler gets the form post and builds the dict for the search query string.

# User entered nothing so params = {'screen_name': None, ..more fields}
params = {k: self.request.get(k, None) for k in self.request.GET}

url = "https://api.twitter.com/1.1/friends/ids.json?" + urllib.urlencode(params)

print url
"https://api.twitter.com/1.1/friends/ids.json?screen_name=None"

This would cause the twitter search api to look for your friends with None in their screen name. Not exactly what you'd expect right?
History
Date User Action Args
2014-02-07 16:23:26Joshua.Johnstonsetrecipients: + Joshua.Johnston, orsenthil, ezio.melotti, r.david.murray, Claudiu.Popa
2014-02-07 16:23:26Joshua.Johnstonsetmessageid: <1391790206.79.0.902899485219.issue18857@psf.upfronthosting.co.za>
2014-02-07 16:23:26Joshua.Johnstonlinkissue18857 messages
2014-02-07 16:23:26Joshua.Johnstoncreate