<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/urllib3.git/test/test_wait.py, branch pyopenssl-pin-python-2.6</title>
<subtitle>github.com: shazow/urllib3.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/urllib3.git/'/>
<entry>
<title>Just verify that waiting on an invalid socket raises *some* error</title>
<updated>2018-04-22T02:01:07+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2018-04-22T02:01:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/urllib3.git/commit/?id=b5073f2c462aae0ab40dc2b7ffb9b83ac30b70eb'/>
<id>b5073f2c462aae0ab40dc2b7ffb9b83ac30b70eb</id>
<content type='text'>
Apparently the exact exception is different on different platforms. In
particular, Python 2 on Windows seems to give a socket.error, or
something like that? Since this case should only fire when we have a
bug, it doesn't matter too much what the exact exception is.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apparently the exact exception is different on different platforms. In
particular, Python 2 on Windows seems to give a socket.error, or
something like that? Since this case should only fire when we have a
bug, it doesn't matter too much what the exact exception is.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test for wait_for_socket EINTR handling w/ infinite timeout</title>
<updated>2018-04-22T01:44:59+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2018-04-22T01:44:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/urllib3.git/commit/?id=d6ae50674104c81a3aab1c9c50b80cc5967ca2e8'/>
<id>d6ae50674104c81a3aab1c9c50b80cc5967ca2e8</id>
<content type='text'>
This covers an otherwise uncovered branch in _retry_on_intr.

As requested here:
  https://github.com/urllib3/urllib3/pull/1358#issuecomment-383324003
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This covers an otherwise uncovered branch in _retry_on_intr.

As requested here:
  https://github.com/urllib3/urllib3/pull/1358#issuecomment-383324003
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove selectors backport (#1358)</title>
<updated>2018-04-20T18:01:54+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2018-04-20T18:01:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/urllib3.git/commit/?id=9782e1f866aa6d0d176dce8678aee448aeb492dd'/>
<id>9782e1f866aa6d0d176dce8678aee448aeb492dd</id>
<content type='text'>
* Implement wait_for_[read,write} directly on top of 'select' module

Our vendored backport of the 'selectors' module is huge, its tests are
flaky, and the only we thing we use it for is to... turn around and
implement some trivial select() operations. It lets urllib3 use epoll
or kqueue... but the way urllib3 uses them, they're actually *less*
efficient than just using poll or select.

This commit removes the dependency on 'selectors', by implementing
urllib3's wait_for_{read,write} helpers directly on top of
poll/select. Because I'm sneaky, it does this in terms of a more
generic wait_for_socket(...) operation, which is exactly the primitive
that we need for the bleach-spike branch (see gh-1323), so this should
also help keep the diff down.

* Delete selectors backport

Now that we're not using it anymore (see previous commit), it can be deleted.

* Address comments from review

- Check that poll works before using it
- Add a test for detecting readability after the peer closes the
  socket
- Remove an unnecessary coverage-control comment

* Delay choice of wait_for_socket backend until first call

To work around things like:

    import urllib3
    from gevent import monkey
    monkey.patch_all()

Since this means we no longer make an import-time decision about
wait_for_socket support, I also got rid of the constant
HAS_WAIT_FOR_SOCKET.

* Add test for calling wait_for_socket on a closed socket

* Fix lint errors
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Implement wait_for_[read,write} directly on top of 'select' module

Our vendored backport of the 'selectors' module is huge, its tests are
flaky, and the only we thing we use it for is to... turn around and
implement some trivial select() operations. It lets urllib3 use epoll
or kqueue... but the way urllib3 uses them, they're actually *less*
efficient than just using poll or select.

This commit removes the dependency on 'selectors', by implementing
urllib3's wait_for_{read,write} helpers directly on top of
poll/select. Because I'm sneaky, it does this in terms of a more
generic wait_for_socket(...) operation, which is exactly the primitive
that we need for the bleach-spike branch (see gh-1323), so this should
also help keep the diff down.

* Delete selectors backport

Now that we're not using it anymore (see previous commit), it can be deleted.

* Address comments from review

- Check that poll works before using it
- Add a test for detecting readability after the peer closes the
  socket
- Remove an unnecessary coverage-control comment

* Delay choice of wait_for_socket backend until first call

To work around things like:

    import urllib3
    from gevent import monkey
    monkey.patch_all()

Since this means we no longer make an import-time decision about
wait_for_socket support, I also got rid of the constant
HAS_WAIT_FOR_SOCKET.

* Add test for calling wait_for_socket on a closed socket

* Fix lint errors
</pre>
</div>
</content>
</entry>
</feed>
