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 2015年08月11日 00:29 by vlee, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue24841.diff | berker.peksag, 2015年09月22日 04:31 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg248382 - (view) | Author: Vinson Lee (vlee) * | Date: 2015年08月11日 00:29 | |
'make test' runs all the network tests. Some of the tests in test_ssl fail instead of skip if svn.python.org is not accessible. $ ./python -m test -v -u all test_ssl ====================================================================== ERROR: test_non_blocking_connect_ex (test.test_ssl.NetworkedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vinson/workspace/cpython-master/Lib/test/test_ssl.py", line 1404, in test_non_blocking_connect_ex s.do_handshake() File "Lib/ssl.py", line 978, in do_handshake self._check_connected() File "Lib/ssl.py", line 776, in _check_connected self.getpeername() OSError: [Errno 107] Transport endpoint is not connected ====================================================================== FAIL: test_connect_ex (test.test_ssl.NetworkedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_ssl.py", line 1381, in test_connect_ex self.assertEqual(0, s.connect_ex(("svn.python.org", 443))) AssertionError: 0 != 111 ====================================================================== FAIL: test_timeout_connect_ex (test.test_ssl.NetworkedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_ssl.py", line 1428, in test_timeout_connect_ex self.assertIn(rc, (errno.EAGAIN, errno.EWOULDBLOCK)) AssertionError: 111 not found in (11, 11) ---------------------------------------------------------------------- Ran 117 tests in 3.123s FAILED (failures=2, errors=1, skipped=20) test test_ssl failed 1 test failed: test_ssl |
|||
| msg251287 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年09月22日 04:31 | |
The attached patch should fix the test failures. |
|||
| msg251990 - (view) | Author: Vinson Lee (vlee) * | Date: 2015年10月01日 02:58 | |
I tested the attached patch on latest cpython master and it works for me. test_ciphers (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_connect (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_connect_cadata (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_connect_capath (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_connect_ex (test.test_ssl.NetworkedTests) ... skipped 'svn.python.org cannot be reached: Connection refused' test_connect_with_context (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_context_setget (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_get_ca_certs_capath (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_get_server_certificate (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_makefile_close (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_non_blocking_connect_ex (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_non_blocking_handshake (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_timeout_connect_ex (test.test_ssl.NetworkedTests) ... skipped 'svn.python.org cannot be reached: Connection refused' test_handshake (test.test_ssl.NetworkedBIOTests) ... skipped "Resource 'svn.python.org' is not available" test_read_write_data (test.test_ssl.NetworkedBIOTests) ... skipped "Resource 'svn.python.org' is not available" Tested-by: Vinson Lee <vlee@twitter.com> |
|||
| msg259014 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年01月27日 11:17 | |
The two changes to test_ssl.py look okay to me, although they will need updating since the Issue 24841 changeover to pythontest.net. But I don’t think it is a good idea to add ENOTCONN to the list of errors ignored by all transient_internet() tests. In most cases, ENOTCONN suggests a programming error, not a network problem. I think a better solution would be to call connect_ex() again in test_non_blocking_connect_ex(), and retrieve the result (probably also ECONNREFUSED like the other failures, or 0 if successful). |
|||
| msg259132 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2016年01月28日 14:18 | |
> although they will need updating since the Issue 24841 changeover to pythontest.net. I think you meant issue 25940, right? :) Do you want me to wait for issue 25940? |
|||
| msg259161 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年01月28日 21:34 | |
Yes sorry I did mean Issue 25940 (too many bug numbers!), but only the main change which has already been made (revision adf750b1252d etc). So you don’t have to wait for that. |
|||
| msg348638 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2019年07月29日 11:49 | |
test_ssl doesn't use svn.python.org anymore and it now better handle network failures. I close the issue as out of date. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:19 | admin | set | github: 69029 |
| 2019年07月29日 11:49:14 | vstinner | set | status: open -> closed nosy: + vstinner messages: + msg348638 resolution: out of date stage: patch review -> resolved |
| 2016年01月28日 21:34:01 | martin.panter | set | messages: + msg259161 |
| 2016年01月28日 14:18:45 | berker.peksag | set | messages:
+ msg259132 versions: - Python 3.4 |
| 2016年01月27日 11:17:43 | martin.panter | set | nosy:
+ martin.panter messages: + msg259014 |
| 2015年10月01日 02:58:37 | vlee | set | messages: + msg251990 |
| 2015年09月22日 04:31:37 | berker.peksag | set | files:
+ issue24841.diff messages: + msg251287 keywords: + patch type: behavior stage: needs patch -> patch review |
| 2015年08月12日 21:22:43 | berker.peksag | set | keywords:
+ easy nosy: + berker.peksag stage: needs patch versions: - Python 3.3 |
| 2015年08月11日 00:48:47 | vlee | set | versions: + Python 3.3, Python 3.4, Python 3.5 |
| 2015年08月11日 00:29:01 | vlee | create | |