[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2022-02-05 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

I can also reproduce it locally with: `./python.exe -m test -v test_urllib2 -m 
test_issue16464 -u network`

I've opened a new issue for it: https://bugs.python.org/issue46648

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2022-02-05 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

`test.test_urllib2.MiscTests.test_issue16464` started to fail again:

```
 ==
ERROR: test_issue16464 (test.test_urllib2.MiscTests)
--
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/contextlib.py", line 155, in 
__exit__
self.gen.throw(typ, value, traceback)
^
  File "/Users/runner/work/cpython/cpython/Lib/test/support/socket_helper.py", 
line 245, in transient_internet
yield
^
  File "/Users/runner/work/cpython/cpython/Lib/test/test_urllib2.py", line 
1799, in test_issue16464
opener.open(request, "1".encode("us-ascii"))

  File "/Users/runner/work/cpython/cpython/Lib/urllib/request.py", line 525, in 
open
response = meth(req, response)
   ^^^
  File "/Users/runner/work/cpython/cpython/Lib/urllib/request.py", line 634, in 
http_response
response = self.parent.error(
   ^^
  File "/Users/runner/work/cpython/cpython/Lib/urllib/request.py", line 563, in 
error
return self._call_chain(*args)
   ^^^
  File "/Users/runner/work/cpython/cpython/Lib/urllib/request.py", line 496, in 
_call_chain
result = func(*args)
 ^^^
  File "/Users/runner/work/cpython/cpython/Lib/urllib/request.py", line 643, in 
http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
^^
urllib.error.HTTPError: HTTP Error 404: Not Found

--
Ran 1 test in 0.093s
```

Link: 
https://github.com/python/cpython/runs/5077404591?check_suite_focus=true#step:7:705

Today I had like 3 or 4 different CI failures because of it.

--
nosy: +sobolevn

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread STINNER Victor

STINNER Victor  added the comment:

Stéphane Wirtel backported his fix to Python 2.7. I didn't see failures related 
to example.com on 3.7 and master branches, so I think that it's now time to 
close the issue.

Thanks Stéphane!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 84772e0ab49ee09acb44e30551aa5cfc1eafe5dc by Victor Stinner 
(Stéphane Wirtel) in branch '2.7':
[2.7] bpo-36019: Use pythontest.net in urllib network tests (GH-11941) 
(GH-12177)
https://github.com/python/cpython/commit/84772e0ab49ee09acb44e30551aa5cfc1eafe5dc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +12172

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

> For the backport, should I add support.TEST_HTTP_URL?

Yes

> Should I also fix these tests:

Yes, all urllib and urllib2 tests which use http://www.example.com/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Victor,

Should I also fix these tests:

test_urllibnet.py::urlretrieveNetworkTests.test_specified_path
test_urllibnet.py::urlretrieveNetworkTests.test_header
test_urllibnet.py::urlopenNetworkTests.test_fileno

?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-04 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi Victor,

For the backport, should I add support.TEST_HTTP_URL?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-04 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

sure, I will do the backport tomorrow. thanks for the notif

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-04 Thread STINNER Victor

STINNER Victor  added the comment:

Stéphane: Python 2.7 is also affected by the issue. Would you be interested in 
backport the fix to Lib/test/test_urllibnet.py? (in master, it's 
Lib/test/test_urllib2net.py). 

https://buildbot.python.org/all/#/builders/68/builds/238

Re-running failed tests in verbose mode
Re-running test 'test_urllibnet' in verbose mode
ERROR: testURLread (test.test_urllibnet.URLTimeoutTest)
ERROR: test_basic (test.test_urllibnet.urlopenNetworkTests)
ERROR: test_geturl (test.test_urllibnet.urlopenNetworkTests)
ERROR: test_info (test.test_urllibnet.urlopenNetworkTests)
ERROR: test_readlines (test.test_urllibnet.urlopenNetworkTests)
ERROR: test_basic (test.test_urllibnet.urlretrieveNetworkTests)

--
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset 6163210089148ad31c270695f7273fc3561a211a by Miss Islington (bot) 
in branch '3.7':
bpo-36019: Use pythontest.net instead of example.com in network tests (GH-11941)
https://github.com/python/cpython/commit/6163210089148ad31c270695f7273fc3561a211a


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-22 Thread STINNER Victor

STINNER Victor  added the comment:

> New changeset a40681dd5db8deaf05a635eecb91498dac882aa4 by Victor Stinner 
> (Stéphane Wirtel) in branch 'master':
> bpo-36019: Use pythontest.net instead of example.com in network tests 
> (GH-11941)

I'm not sure that this change will fix https://bugs.python.org/issue36019 but I 
prefer that your CI doesn't flood public servers like google.com or 
example.com. I prefer that we control the external resources used by our tests.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12012

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-22 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset a40681dd5db8deaf05a635eecb91498dac882aa4 by Victor Stinner 
(Stéphane Wirtel) in branch 'master':
bpo-36019: Use pythontest.net instead of example.com in network tests (GH-11941)
https://github.com/python/cpython/commit/a40681dd5db8deaf05a635eecb91498dac882aa4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Related failure:

https://buildbot.python.org/all/#/builders/141/builds/1233


--
Ran 56 tests in 25.105s
OK (skipped=1)
Re-running test 'test_normalization' in verbose mode
test_bug_834676 (test.test_normalization.NormalizationTest) ... ok
test test_normalization failed
test_main (test.test_normalization.NormalizationTest) ...   fetching 
http://www.pythontest.net/unicode/11.0.0/NormalizationTest.txt ...
FAIL
==
FAIL: test_main (test.test_normalization.NormalizationTest)
--
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/urllib/request.py", 
line 1316, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_normalization.py",
 line 41, in test_main
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
urllib.error.URLError: 
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_normalization.py",
 line 47, in test_main
self.fail(f"Could not retrieve {TESTDATAURL}")
AssertionError: Could not retrieve 
http://www.pythontest.net/unicode/11.0.0/NormalizationTest.txt
--
Ran 2 tests in 20.044s
FAILED (failures=1)
Re-running test 'test_urllib2net' in verbose mode
test_close (test.test_urllib2net.CloseSocketTest) ... skipped "Resource 
'http://www.example.com/' is not available"
test_custom_headers (test.test_urllib2net.OtherNetworkTests) ... skipped 
"Resource 'http://www.example.com' is not available"
test_file (test.test_urllib2net.OtherNetworkTests) ... ok
test_ftp (test.test_urllib2net.OtherNetworkTests) ... ok
test_redirect_url_withfrag (test.test_urllib2net.OtherNetworkTests) ... skipped 
"Resource 'http://www.pythontest.net/redir/with_frag/' is not available"
test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) ... 
skipped 'XXX: http://www.imdb.com is gone'
test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) ... skipped "Resource 
'http://www.pythontest.net/index.html#frag' is not available"
test_ftp_basic (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_basic (test.test_urllib2net.TimeoutTest) ... ok
test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py:1608:
 ResourceWarning: unclosed 
  gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py:1608:
 ResourceWarning: unclosed 
  gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
test_http_timeout (test.test_urllib2net.TimeoutTest) ... ok
--
Ran 15 tests in 686.335s
OK (skipped=5)
1 test failed again:
test_normalization

Also, it seems that there are some socket leaks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-19 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@vstinner I have fixed some URLs but we need to update pythontest.net for some 
tests.

For example: test.test_urllib2.MiscTests.test_issue16464 raises a HTTP 405 and 
pythontest.net does not support the requested method.

test_networked_trusted_by_default_cert (test.test_httplib.HTTPSTest) ... 
skipped "Resource 'www.python.org' is not available"
test_logincapa (test.test_imaplib.RemoteIMAPTest) ... skipped "Resource 
'cyrus.andrew.cmu.edu' is not available"
test_logout (test.test_imaplib.RemoteIMAPTest) ... skipped "Resource 
'cyrus.andrew.cmu.edu' is not available"
test_logincapa (test.test_imaplib.RemoteIMAP_SSLTest) ... skipped "Resource 
'cyrus.andrew.cmu.edu' is not available"
test_logout (test.test_imaplib.RemoteIMAP_SSLTest) ... skipped "Resource 
'cyrus.andrew.cmu.edu' is not available"
test_logincapa (test.test_imaplib.RemoteIMAP_STARTTLSTest) ... skipped 
"Resource 'cyrus.andrew.cmu.edu' is not available"
test_logout (test.test_imaplib.RemoteIMAP_STARTTLSTest) ... skipped "Resource 
'cyrus.andrew.cmu.edu' is not available"
skipped "Resource 'news.trigofacile.com' is not available"
skipped "Resource 'nntp.aioe.org' is not available"
test_connect (test.test_smtpnet.SmtpSSLTest) ... skipped "Resource 
'smtp.gmail.com' is not available"
test_connect_default_port (test.test_smtpnet.SmtpSSLTest) ... skipped "Resource 
'smtp.gmail.com' is not available"
test_connect_using_sslcontext (test.test_smtpnet.SmtpSSLTest) ... skipped 
"Resource 'smtp.gmail.com' is not available"
test_connect_using_sslcontext_verified (test.test_smtpnet.SmtpSSLTest) ... 
skipped "Resource 'smtp.gmail.com' is not available"
test_connect_starttls (test.test_smtpnet.SmtpTest) ... skipped "Resource 
'smtp.gmail.com' is not available"
test_get_server_certificate_ipv6 (test.test_ssl.NetworkedTests) ... skipped 
"Resource 'ipv6.google.com' is not available"
test_idna (test.test_socket.GeneralModuleTests) ... skipped "Resource 
'python.org' is not available"
testAcceptTimeout (test.test_timeout.TCPTimeoutTestCase) ... skipped "Resource 
'www.python.org.' is not available"
testConnectTimeout (test.test_timeout.TCPTimeoutTestCase) ... skipped "Resource 
'www.python.org.' is not available"
testRecvTimeout (test.test_timeout.TCPTimeoutTestCase) ... skipped "Resource 
'www.python.org.' is not available"
testSend (test.test_timeout.TCPTimeoutTestCase) ... skipped "Resource 
'www.python.org.' is not available"
testSendall (test.test_timeout.TCPTimeoutTestCase) ... skipped "Resource 
'www.python.org.' is not available"
testSendto (test.test_timeout.TCPTimeoutTestCase) ... skipped "Resource 
'www.python.org.' is not available"
test_issue16464 (test.test_urllib2.MiscTests) ... skipped "Resource 
'http://www.example.com/' is not available"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-19 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@vstinner and @pablogsal

I started to work on this issue, the PR is in WIP mode.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-19 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
keywords: +patch
pull_requests: +11965
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-19 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Here is the list of the external resources that we use in the tests.

test_issue16464 (test.test_urllib2.MiscTests) ... skipped "Resource 
'http://www.example.com/' is not available"
test_close (test.test_urllib2net.CloseSocketTest) ... skipped "Resource 
'http://www.example.com/' is not available"
test_custom_headers (test.test_urllib2net.OtherNetworkTests) ... skipped 
"Resource 'http://www.example.com' is not available"
test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) ... 
skipped 'XXX: http://www.imdb.com is gone'
test_http_basic (test.test_urllib2net.TimeoutTest) ... skipped "Resource 
'http://www.example.com' is not available"
test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... skipped 
"Resource 'http://www.example.com' is not available"
test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... skipped "Resource 
'http://www.example.com' is not available"
test_http_timeout (test.test_urllib2net.TimeoutTest) ... skipped "Resource 
'http://www.example.com' is not available"

in the failed tests:
test_urllib2 test_urllib2net test_urllibnet

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-19 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

ok for me if you prefer to use a function test with pythontest.net

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread STINNER Victor


STINNER Victor  added the comment:

> could we mock the http requests?

No, the tests are functional tests which use deliberate HTTP request to public 
servers.

I suggest to use a server that we control rather multiple "third-party" 
servers. I'm trying to keep a list of external services used by Python test 
suite:
https://pythondev.readthedocs.io/infra.html#services-used-by-unit-tests

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

sorry, error with my copy/paste/fixing_words: but my sentence was "could we 
mock the http requests?"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Use a public server or pythontest.net server (it's a public server on the 
Internet). could we the http requests? I use this practice for the unit test 
with an external web service, but for the integration tests, I prefer to use 
the real web service.

--
nosy: +matrixise

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_urllib fail in s390x buildbots -> test_urllib fail in s390x 
buildbots: http://www.example.com/

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com