]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-153404: Silently ignore non-decimal digits in robots.txt Crawl-delay and...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 17 Jul 2026 06:23:28 +0000 (08:23 +0200)
committerGitHub <noreply@github.com>
Fri, 17 Jul 2026 06:23:28 +0000 (06:23 +0000)
commit1b060a65467d62d6ed89a67ba5524f004fcef709
tree60f362d941422dd18ae6ff990b799f84988f79bf
parent890bd0ed9130c8baa1e5a29fcfac266b1504889e
[3.14] gh-153404: Silently ignore non-decimal digits in robots.txt Crawl-delay and Request-rate (GH-153405) (GH-153831)

str.isdigit() returned True for non-decimal Unicode digits such as
U+00B2 SUPERSCRIPT TWO, which int() then rejected with ValueError.
(cherry picked from commit 597ec2d7e5f8bbd5a1eb9e6780444cae46cec3ea)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Lib/test/test_robotparser.py
Lib/urllib/robotparser.py
Misc/NEWS.d/next/Library/2026-07-09-16-35-47.gh-issue-153404.daRkes.rst [new file with mode: 0644]