Replace network decorator with with_connectivity_check
Network decorator was ignoring test failures due to API changes in external
services.

Closes #5816.

:+1:. looks good.

The only issue is that we potentially have a box sitting on AWS's (travis) pipe 
flooding google.com with requests. But I can't see how that would actually happen.
Bombs away.
 Is this a legit error the network decorator should catch?
http://scatterci.github.io/ScatterCI-Pandas/ on this commit: https://github.com/pydata/pandas/commit/54945de2

```
=============================================================================
ERROR: test_get_near_stock_price (pandas.io.tests.test_data.TestYahooOptions)
-----------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.3/unittest/case.py", line 384, in _executeTestPart
    function()
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/util/testing.py", line 1086, in wrapper
    return t(*args, **kwargs)
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/io/tests/test_data.py", line 279, in test_get_near_stock_price
    expiry=self.expiry)
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/io/data.py", line 781, in get_near_stock_price
    price = float(get_quote_yahoo([self.symbol])['last'])
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/io/data.py", line 132, in get_quote_yahoo
    with urlopen(url_str) as url:
  File "/usr/lib/python3.3/urllib/request.py", line 156, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 475, in open
    response = meth(req, response)
  File "/usr/lib/python3.3/urllib/request.py", line 587, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.3/urllib/request.py", line 507, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 447, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 692, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 469, in open
    response = self._open(req, data)
  File "/usr/lib/python3.3/urllib/request.py", line 487, in _open
    '_open', req)
  File "/usr/lib/python3.3/urllib/request.py", line 447, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 1268, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.3/urllib/request.py", line 1253, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.3/http/client.py", line 1147, in getresponse
    response.begin()
  File "/usr/lib/python3.3/http/client.py", line 358, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.3/http/client.py", line 320, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.3/socket.py", line 297, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
```
 Probably, but I recall issues with all the different error types for
sockets and other IO errors. @cpcloud - you have any recollection where
this ended up?
On Jan 28, 2014 5:26 AM, "jreback" notifications@github.com wrote:

Is this a legit error the network decorator should catch?
http://scatterci.github.io/ScatterCI-Pandas/ on this commit:
54945dehttps://github.com/pydata/pandas/commit/54945de2

# 

## ERROR: test_get_near_stock_price (pandas.io.tests.test_data.TestYahooOptions)

Traceback (most recent call last):
  File "/usr/lib/python3.3/unittest/case.py", line 384, in _executeTestPart
    function()
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/util/testing.py",
line 1086, in wrapper
    return t(_args, *_kwargs)
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/io/tests/test_data.py",
line 279, in test_get_near_stock_price
    expiry=self.expiry)
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/io/data.py",
line 781, in get_near_stock_price
    price = float(get_quote_yahoo([self.symbol])['last'])
  File "/home/travis/virtualenv/python3.3_with_system_site_packages/lib/python3.3/site-packages/pandas/io/data.py",
line 132, in get_quote_yahoo
    with urlopen(url_str) as url:
  File "/usr/lib/python3.3/urllib/request.py", line 156, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 475, in open
    response = meth(req, response)
  File "/usr/lib/python3.3/urllib/request.py", line 587, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.3/urllib/request.py", line 507, in error
    result = self._call_chain(_args)
  File "/usr/lib/python3.3/urllib/request.py", line 447, in _call_chain
    result = func(_args)
  File "/usr/lib/python3.3/urllib/request.py", line 692, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 469, in open
    response = self._open(req, data)
  File "/usr/lib/python3.3/urllib/request.py", line 487, in _open
    '_open', req)
  File "/usr/lib/python3.3/urllib/request.py", line 447, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 1268, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.3/urllib/request.py", line 1253, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.3/http/client.py", line 1147, in getresponse
    response.begin()
  File "/usr/lib/python3.3/http/client.py", line 358, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.3/http/client.py", line 320, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.3/socket.py", line 297, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

## 

Reply to this email directly or view it on
GitHubhttps://github.com/pydata/pandas/pull/6111#issuecomment-33477578
.
