[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

Irit Katriel report at bugs.python.org
Fri Jul 2 04:55:39 EDT 2021


Irit Katriel <iritkatriel at gmail.com> added the comment:

As I wrote on the PR, and again on this issue, a PR that makes a behavior change (like this one) is not complete without a unit test (which fails before the change and passes after the change, and can show what the bug being fixed is).  You could add such a test.

In this case, it is also not clear that the current behavior is a bug at all, and if it is then what the fix should be (you propose to map None to ''. But why not 'None'? Why not 'Mary had a little lamb'?  I suggested to return None rather than some arbitrary string). You could explain why you think it's a bug and why you think '' is the correct return value.

Once you do write the test and there is consensus that it is a bug and we agree what the fix should be, it should be some core dev's top priority to review and merge the PR (as opposed to reviewing and merging another PR). So you could push it forward by explaining why this bug is important.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44520>
_______________________________________


More information about the Python-bugs-list mailing list