Whole file
joke2k/django-environ
The author described this change as “fix unquote vs unquote_plus issue”. It counts as a record because the check below fails on the code as it stood at 509cf7737 and passes on 41f9e736f, with nothing else changed between the two runs.
Projectjoke2k/django-environ
Fix saved2021-12-13
Sharing licenceMIT · LICENSE.txt
Change size+2 −1
What the code was meant to do, written into the code itself as a save note
fix unquote vs unquote_plus issue
The change
| 22 | 22 | parse_qs, | |
| 23 | 23 | ParseResult, | |
| 24 | 24 | unquote_plus, | |
| 25 | + | unquote, | |
| 25 | 26 | urlparse, | |
| 26 | 27 | urlunparse, | |
| 27 | 28 | ) | |
| ⋯ | |||
| 61 | 62 | ||
| 62 | 63 | ||
| 63 | 64 | def _cast_urlstr(v): | |
| 64 | - | return unquote_plus(v) if isinstance(v, str) else v | |
| 65 | + | return unquote(v) if isinstance(v, str) else v | |
| 65 | 66 | ||
| 66 | 67 | ||
| 67 | 68 | class NoValue: | |
The check that tells the two apart
fail→pass·tests/test_utils.py::test_cast_urlstr[Le-%7BFsIaYnaQw%7Da2B%2F%5BV8bS+-Le-{FsIaYnaQw}a2B/[V8bS+]
Check file tests/test_utils.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it509cf7737363a56e4464962dbae4ab72b801c7b3
Broken version dated2021-11-21
Moduleenviron.environ
Units changed_cast_urlstr
Fingerprint1c2eb16c7ecc95df
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in joke2k/django-environ
- 2026-02-20Fix prometheus DB scheme aliases: underscores → hyphens (#585)
- 2026-02-17Feature/add choice parameter and raise an exception if fetched value is not within (#555)
- 2022-06-14Fix `environ.Path.__eq__()` to compare paths correctly
- 2021-12-09fix[db_url_config]: added postgres cluster DSN support (ie postgresql://username:password@host1:port1,host2:port2/database)
- 2021-09-01Fix db_url_config to work the same for all postgres-like schemes