Message368193
Chiming in here to add that I'd appreciate the ability to render 'standalone' (i.e. no '=') query-string keys in order to distinguish between absence-of-value and empty-string situations.
The backwards-compatibility concerns in here are genuine, so perhaps this could be introduced as an argument to urlencode with a disabled default value, allowing developers to opt-in.
>> Unless someone can point to a "real" web server that does something different with "&foo" than with "&foo=", there is no reason to make a change to Python.
There's a popular nodejs library that makes this serialization distinction explicit: https://github.com/sindresorhus/query-string#falsy-values
I've developed a Python 3.7-based set of commits[1] to address this issue. I haven't yet opened this as a pull request since I see that Python 3.7 is in maintenance/bugfix mode[2].
In case a new urlencode flag would fall under the category of feature, I'll aim to develop a subsequent set of commits against the master development branch soon.
[1] - https://github.com/jayaddison/cpython/compare/3.7..9555467
[2] - https://devguide.python.org/#status-of-python-branches |
|
Date |
User |
Action |
Args |
2020-05-05 18:27:54 | jayaddison | set | recipients:
+ jayaddison, orsenthil, ezio.melotti, r.david.murray, Claudiu.Popa, piotr.dobrogost, Joshua.Johnston |
2020-05-05 18:27:54 | jayaddison | set | messageid: <1588703274.26.0.222738602406.issue18857@roundup.psfhosted.org> |
2020-05-05 18:27:54 | jayaddison | link | issue18857 messages |
2020-05-05 18:27:53 | jayaddison | create | |
|