]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-88375, gh-111788: Fix parsing errors and normalization in robotparser ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 8 Oct 2025 12:22:44 +0000 (14:22 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Oct 2025 12:22:44 +0000 (14:22 +0200)
commit8da7c7e1f3c35ef9267cdc4b4f8c7cbaba21b39a
tree05175d084294512ccf7e7424e37f7aee3804fb2a
parent3013683e9962f5f7f0915ed6c94a551dc396b8ac
[3.14] gh-88375, gh-111788: Fix parsing errors and normalization in robotparser (GH-138502) (GH-138548)

* 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]