]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-88375, gh-111788: Fix parsing errors and normalization in robotparser ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 5 Sep 2025 20:21:02 +0000 (22:21 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Sep 2025 20:21:02 +0000 (20:21 +0000)
commit509ea397fbfa9cf63c6e1e20f24ec5171cb897c2
treecfb2284e5acc8854187b358155ce8f196a57e6d1
parent5f61a0aa76d29d62e137f2dee71955e1252a8f84
[3.13] gh-88375, gh-111788: Fix parsing errors and normalization in robotparser (GH-138502) (GH-138549)

* Don't fail trying to parse weird patterns.
* Don't fail trying to decode non-UTF-8 "robots.txt" files.
* No longer ignore trailing "?" in patterns and URLs.
* Distinguish raw special characters "?", "=" and "&" from the
  percent-encoded ones.
* Remove tests that do nothing.
(cherry picked from commit cb7ef18d70a0bc1363799e2dfa475db457155e43)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_robotparser.py
Lib/urllib/robotparser.py
Misc/NEWS.d/next/Library/2025-09-04-15-18-11.gh-issue-111788.tuTEM5.rst [new file with mode: 0644]
Misc/NEWS.d/next/Library/2025-09-05-15-35-59.gh-issue-88375.dC491a.rst [new file with mode: 0644]