<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/eventlet.git/tests, branch deprecate-python-27-34</title>
<subtitle>github.com: eventlet/eventlet.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/'/>
<entry>
<title>py39: Add _at_fork_reinit method to Semaphores</title>
<updated>2020-11-03T07:48:13+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2020-11-03T00:09:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=087ba743c7af8a40ac1e4e2ec89409eee3b4233e'/>
<id>087ba743c7af8a40ac1e4e2ec89409eee3b4233e</id>
<content type='text'>
CPython expects to be able to call such a method on RLocks, Conditions,
and Events in threading; since we may monkey-patch threading to use
Semaphores as locks, they need the method, too.

Addresses #646
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CPython expects to be able to call such a method on RLocks, Conditions,
and Events in threading; since we may monkey-patch threading to use
Semaphores as locks, they need the method, too.

Addresses #646
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Improve ECONNREFUSED checks</title>
<updated>2020-10-22T02:46:47+00:00</updated>
<author>
<name>Ivan A. Melnikov</name>
<email>iv@altlinux.org</email>
</author>
<published>2019-05-03T07:21:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=6a64cea657d6639600254bdb6014799de3e5755f'/>
<id>6a64cea657d6639600254bdb6014799de3e5755f</id>
<content type='text'>
Only the value for the current platform should be considered
valid here, so this check uses the constant from `errno`
module as expected output, instead of hardcoded ints.

Also, this fixes build on MIPS, where ECONNREFUSED is defined
as 146.

Signed-off-by: Ivan A. Melnikov &lt;iv@altlinux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only the value for the current platform should be considered
valid here, so this check uses the constant from `errno`
module as expected output, instead of hardcoded ints.

Also, this fixes build on MIPS, where ECONNREFUSED is defined
as 146.

Signed-off-by: Ivan A. Melnikov &lt;iv@altlinux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patcher: monkey_patch(builtins=True) failed on py3 because `file` class is gone (#545)</title>
<updated>2020-10-22T01:56:12+00:00</updated>
<author>
<name>秋葉</name>
<email>ambiguous404@gmail.com</email>
</author>
<published>2020-10-22T01:56:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=089a1a73e6af6ca8f7f3627f04843add023b86ce'/>
<id>089a1a73e6af6ca8f7f3627f04843add023b86ce</id>
<content type='text'>
https://github.com/eventlet/eventlet/issues/541
https://github.com/eventlet/eventlet/pull/545
https://docs.python.org/release/3.0/whatsnew/3.0.html#builtins</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/eventlet/eventlet/issues/541
https://github.com/eventlet/eventlet/pull/545
https://docs.python.org/release/3.0/whatsnew/3.0.html#builtins</pre>
</div>
</content>
</entry>
<entry>
<title>ssl: context wrapped listener failed to supply _context in accept()</title>
<updated>2020-10-20T00:40:34+00:00</updated>
<author>
<name>Sergey Shepelev</name>
<email>temotor@gmail.com</email>
</author>
<published>2020-10-18T01:01:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=fbcc0def0f8728b5eacb8860c5b17d78a533b22c'/>
<id>fbcc0def0f8728b5eacb8860c5b17d78a533b22c</id>
<content type='text'>
https://github.com/eventlet/eventlet/issues/651
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/eventlet/eventlet/issues/651
</pre>
</div>
</content>
</entry>
<entry>
<title>Always remove the right listener from the hub</title>
<updated>2020-09-23T15:16:27+00:00</updated>
<author>
<name>Samuel Merritt</name>
<email>sam@swiftstack.com</email>
</author>
<published>2018-06-08T03:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=9f49f0bbb9c18d7478d7c5e2e677ae6452845ab5'/>
<id>9f49f0bbb9c18d7478d7c5e2e677ae6452845ab5</id>
<content type='text'>
When in hubs.trampoline(fd, ...), a greenthread registers itself as a
listener for fd, switches to the hub, and then calls
hub.remove(listener) to deregister itself. hub.remove(listener)
removes the primary listener. If the greenthread awoke because its fd
became ready, then it is the primary listener, and everything is
fine. However, if the greenthread was a secondary listener and awoke
because a Timeout fired then it would remove the primary and promote a
random secondary to primary.

This commit makes hub.remove(listener) check to make sure listener is
the primary, and if it's not, remove the listener from the
secondaries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When in hubs.trampoline(fd, ...), a greenthread registers itself as a
listener for fd, switches to the hub, and then calls
hub.remove(listener) to deregister itself. hub.remove(listener)
removes the primary listener. If the greenthread awoke because its fd
became ready, then it is the primary listener, and everything is
fine. However, if the greenthread was a secondary listener and awoke
because a Timeout fired then it would remove the primary and promote a
random secondary to primary.

This commit makes hub.remove(listener) check to make sure listener is
the primary, and if it's not, remove the listener from the
secondaries.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up threading book-keeping at fork when monkey-patched</title>
<updated>2020-08-29T03:58:07+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2020-05-07T23:00:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=115103d5608cbe8f15df10e27eba1644f5364e95'/>
<id>115103d5608cbe8f15df10e27eba1644f5364e95</id>
<content type='text'>
Previously, if we patched threading then forked (or, in some cases, used
the subprocess module), Python would log an ignored exception like

   Exception ignored in: &lt;function _after_fork at 0x7f16493489d8&gt;
   Traceback (most recent call last):
     File "/usr/lib/python3.7/threading.py", line 1335, in _after_fork
       assert len(_active) == 1
   AssertionError:

This comes down to threading in Python 3.7+ having an import side-effect
of registering an at-fork callback. When we re-import threading to patch
it, the old (but still registered) callback still points to the old
thread-tracking dict, rather than the new dict that's actually doing the
tracking.

Now, register our own at_fork hook that will fix up the dict reference
before threading's _at_fork runs and put it back afterwards.

Closes #592
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if we patched threading then forked (or, in some cases, used
the subprocess module), Python would log an ignored exception like

   Exception ignored in: &lt;function _after_fork at 0x7f16493489d8&gt;
   Traceback (most recent call last):
     File "/usr/lib/python3.7/threading.py", line 1335, in _after_fork
       assert len(_active) == 1
   AssertionError:

This comes down to threading in Python 3.7+ having an import side-effect
of registering an at-fork callback. When we re-import threading to patch
it, the old (but still registered) callback still points to the old
thread-tracking dict, rather than the new dict that's actually doing the
tracking.

Now, register our own at_fork hook that will fix up the dict reference
before threading's _at_fork runs and put it back afterwards.

Closes #592
</pre>
</div>
</content>
</entry>
<entry>
<title>tests checking output were broken by Python 2 end of support warning</title>
<updated>2020-08-19T09:28:12+00:00</updated>
<author>
<name>Sergey Shepelev</name>
<email>temotor@gmail.com</email>
</author>
<published>2020-08-19T09:28:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=3a01b33250a6b0504d506b79e563e7445b0ecc77'/>
<id>3a01b33250a6b0504d506b79e563e7445b0ecc77</id>
<content type='text'>
Previous behavior to ignore DeprecationWarning is now default in py2.7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous behavior to ignore DeprecationWarning is now default in py2.7
</pre>
</div>
</content>
</entry>
<entry>
<title>backdoor: handle disconnects better</title>
<updated>2020-07-30T23:22:48+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2019-05-23T19:45:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=3e5baa8feac8d8f64ae42dad82f290e06604e763'/>
<id>3e5baa8feac8d8f64ae42dad82f290e06604e763</id>
<content type='text'>
Previously, when a client quickly disconnected (causing a socket.error
before the SocketConsole greenlet had a chance to switch), it would
break us out of our accept loop, permanently closing the backdoor.

Now, it will just break us out of the interactive session, leaving the
server ready to accept another backdoor client.

Fixes #570
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, when a client quickly disconnected (causing a socket.error
before the SocketConsole greenlet had a chance to switch), it would
break us out of our accept loop, permanently closing the backdoor.

Now, it will just break us out of the interactive session, leaving the
server ready to accept another backdoor client.

Fixes #570
</pre>
</div>
</content>
</entry>
<entry>
<title>wsgi: Fix header capitalization on py3</title>
<updated>2020-07-02T00:04:45+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2019-08-26T18:16:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=b5054309e5528dc3529ef881d715307799a6fb43'/>
<id>b5054309e5528dc3529ef881d715307799a6fb43</id>
<content type='text'>
str.capitalize() and str.upper() respect unicode capitalization rules on
py3, while py2 just translates a-z to A-Z.

At best, this may cause confusion and unexpected behaviors, such as
when '\xdf' (a Latin1-encoded ß) becomes 'SS'; at worst, this causes
UnicodeEncodeErrors and the server fails to reply, such as when '\xff'
(a Latin1-encoded ÿ) becomes '\u0178' which does not map back into
Latin1.

Now, convert everything to bytes before capitalizing so just a-z and A-Z
are affected on both py2 and py3.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
str.capitalize() and str.upper() respect unicode capitalization rules on
py3, while py2 just translates a-z to A-Z.

At best, this may cause confusion and unexpected behaviors, such as
when '\xdf' (a Latin1-encoded ß) becomes 'SS'; at worst, this causes
UnicodeEncodeErrors and the server fails to reply, such as when '\xff'
(a Latin1-encoded ÿ) becomes '\u0178' which does not map back into
Latin1.

Now, convert everything to bytes before capitalizing so just a-z and A-Z
are affected on both py2 and py3.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compatibility with SSLContext usage &gt;= Python 3.7</title>
<updated>2020-07-01T23:51:20+00:00</updated>
<author>
<name>James Page</name>
<email>james.page@ubuntu.com</email>
</author>
<published>2020-07-01T12:52:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=02fa826d22d0df7f9379c3a1e5cd2192e0ffadd8'/>
<id>02fa826d22d0df7f9379c3a1e5cd2192e0ffadd8</id>
<content type='text'>
For SSL sockets created using the SSLContext class under Python &gt;= 3.7,
eventlet incorrectly passes the context as '_context' to the top
level wrap_socket function in the native ssl module.

This causes:

  wrap_socket() got an unexpected keyword argument '_context'

as the context cannot be passed this way.

If a context is provided, use the underlying sslsocket_class to
wrap the socket, mirroring the implementation of the wrap_socket
method in the native SSLContext class.

Fixes issue #526

Co-authored-by: Tim Burke &lt;tim.burke@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For SSL sockets created using the SSLContext class under Python &gt;= 3.7,
eventlet incorrectly passes the context as '_context' to the top
level wrap_socket function in the native ssl module.

This causes:

  wrap_socket() got an unexpected keyword argument '_context'

as the context cannot be passed this way.

If a context is provided, use the underlying sslsocket_class to
wrap the socket, mirroring the implementation of the wrap_socket
method in the native SSLContext class.

Fixes issue #526

Co-authored-by: Tim Burke &lt;tim.burke@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
