This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年04月29日 23:43 by vstinner, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test_robotparser_transient_internet.patch | vstinner, 2010年04月29日 23:44 | |||
| transient_internet-3.patch | vstinner, 2010年04月30日 00:17 | |||
| Messages (5) | |||
|---|---|---|---|
| msg104596 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年04月29日 23:43 | |
Many tests of the Python test suite depends on the availability of websites, especially www.python.org. Python.org has some troubles since some days, and many buildbots failed (test_robotparser failure). I propose to use a default timeout of 60 seconds in transient_internet(), and then use transient_internet() in tests using the internet. Patches: - transient_internet.py: set temporary the defalt socket timeout to 60 seconds (and then restore the previous default value), and catch also weird IOError (which contain in socket.error as the 2nd argument) from urllib - test_robotparser_transient_internet.py: use "with transient_internet():" to do not hung anymore (for 1800 seconds!) if a website is down On Linux, you can use "iptables -I OUTPUT -p tcp --dport 80 -j DROP" (drop all outgoing packets) to simulate a network failure, and set the default timeout value of transient_internet() to 3 seconds. |
|||
| msg104597 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年04月29日 23:59 | |
Oops, transient_internet.patch doesn't catch socket.error(errno.ETIMEDOUT, ...). Fixed by patch version 2. |
|||
| msg104599 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年04月30日 00:00 | |
See also issue #8499. |
|||
| msg104600 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年04月30日 00:17 | |
Version 3 to prepare a patch for #8499: don't change socket default timeout if the timeout argument is None. |
|||
| msg115807 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年09月07日 21:10 | |
Improved again and committed in r84597 and r84599. Needs backporting. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:00 | admin | set | github: 52820 |
| 2010年09月07日 21:40:32 | pitrou | set | status: pending -> closed |
| 2010年09月07日 21:10:08 | pitrou | set | status: open -> pending versions: - Python 2.6 nosy: + pitrou messages: + msg115807 resolution: fixed stage: resolved |
| 2010年04月30日 00:19:31 | vstinner | link | issue8499 dependencies |
| 2010年04月30日 00:17:09 | vstinner | set | files: - transient_internet-2.patch |
| 2010年04月30日 00:17:01 | vstinner | set | files:
+ transient_internet-3.patch messages: + msg104600 |
| 2010年04月30日 00:00:28 | vstinner | set | messages: + msg104599 |
| 2010年04月29日 23:59:47 | vstinner | set | files: - transient_internet.patch |
| 2010年04月29日 23:59:40 | vstinner | set | files:
+ transient_internet-2.patch messages: + msg104597 |
| 2010年04月29日 23:44:05 | vstinner | set | files: + test_robotparser_transient_internet.patch |
| 2010年04月29日 23:43:54 | vstinner | create | |