One function
get_netrc_auth in psf/requests
The author described this change as “Fix empty netrc entry usage (#7205)”. It counts as a record because the check below fails on the code as it stood at 1b40fdd00 and passes on 47914226c, with nothing else changed between the two runs.
Projectpsf/requests
Fix saved2026-02-13
Sharing licenceApache-2.0 · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Returns the Requests tuple auth for a given url from netrc.
The change
| 27 | 27 | ||
| 28 | 28 | try: | |
| 29 | 29 | _netrc = netrc(netrc_path).authenticators(host) | |
| 30 | - | if _netrc: | |
| 30 | + | if _netrc and any(_netrc): | |
| 31 | 31 | # Return with login / password | |
| 32 | 32 | login_i = 0 if _netrc[0] else 1 | |
| 33 | 33 | return (_netrc[login_i], _netrc[2]) |
The check that tells the two apart
fail→pass·tests/test_utils.py::TestGetNetrcAuth::test_empty_default_credentials_ignored
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 it1b40fdd004bfc8ba5301bcf8a6908264e9b6b877
Broken version dated2026-02-11
Modulerequests.utils
Units changedget_netrc_auth
Fingerprint8d0396d961f1377e
Checked2026-08-17 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in psf/requests
- 2026-03-30_parse_content_type_header