]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-138907: Support RFC 9309 in robotparser (GH-138908)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 4 May 2026 18:03:11 +0000 (21:03 +0300)
committerGitHub <noreply@github.com>
Mon, 4 May 2026 18:03:11 +0000 (18:03 +0000)
commitbc285e583286c739e553e49c19fd946cb63432c7
treecb2203dd858581384c947d70560daf42f2f06bcf
parentc74cba16a3e49c7ffc4a7d5a73334cb07cf673ef
gh-138907: Support RFC 9309 in robotparser (GH-138908)

* empty lines are always ignored instead of separating groups
* the "user-agent" line after a rule starts a new group
* groups matching the same user agent are now merged
* the rule with the longest match wins instead of the first matching rule
* in case of equal matches, the “Allow” rule wins over “Disallow”
* special characters “$” and “*” are now supported in rules
* prefer full match for user agent
Doc/library/urllib.robotparser.rst
Lib/test/test_robotparser.py
Lib/urllib/robotparser.py
Misc/NEWS.d/next/Library/2026-04-25-14-11-24.gh-issue-138907.u21Wnh.rst [new file with mode: 0644]