FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-79638: Treat an unreachable robots.txt as "disallow all" (GH-138555) by serhiy-storchaka · Pull Request #149541 · python/cpython · GitHub

Repository navigation

gh-79638: Treat an unreachable robots.txt as "disallow all" (GH-138555) - #149541

Closed
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:robotparser-unreachable2
Closed

serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:robotparser-unreachable2

Conversation

serhiy-storchaka commented May 8, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Disallow all access in urllib.robotparser if the robots.txt file is unreachable due to server or network errors.

…thonGH-138555)

Disallow all access in urllib.robotparser if the robots.txt file is
unreachable due to server or network errors.

Copy link
Copy Markdown
Member Author

I am puzzled. Tests on Android and iOS fail because they modify urllib.requests._opener. But there is an explicit cleanup code for it. The only difference is that it is now a class cleanup instead of a separate test cleanup, and the server and the thread are ran at the class level (for performance).

Copy link
Copy Markdown
Member Author

It turned out that the explicit check is not needed, because the current code passes the required tests. It may be needed in future, when we change the code (for example, to allow reloading of robots.txt).

serhiy-storchaka deleted the robotparser-unreachable2 branch May 8, 2026 20:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL