#4334 work around parse_qs behavior in python < 3.11
Merged by tkopecek. Opened by mikem.
mikem/koji blank-query-string  into  master

Download 4334.patch

Prior to python 3.11, parse_qs will error on blank query strings. This change simply skips the call in such a case. Also added a unit test to cover this case.

Fixes https://pagure.io/koji/issue/4332

It looks like the change in python was a side effect of a different fix for unicode handling.

https://github.com/python/cpython/pull/115771
https://github.com/python/cpython/issues/74668

The newer version of the lib (in parse_qsl, which parse_qs calls) has the same basic check we use here. I.e.

if not qs:
    return []

This issue was not found by our unit tests, hence the addition.

Works for me under el9

you can use qs instead of calling environ.get again

1 new commit added

  • avoid duplicate environ.get call

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

Commit 30cc2065 fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata