<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/eventlet.git, branch subprocess</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>subprocess: Fix patched functions with optional arguments</title>
<updated>2016-07-11T12:59:50+00:00</updated>
<author>
<name>Jakub Stasiak</name>
<email>jakub.stasiak@smarkets.com</email>
</author>
<published>2016-07-11T12:56:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=de62278ab38ca5927e47794ef21034043e87a08d'/>
<id>de62278ab38ca5927e47794ef21034043e87a08d</id>
<content type='text'>
Since [1] we monkey patch subprocess module and it uncovered one issue -
the previous patched_function implementation would produce functions
with all optional arguments lacking their default values which made them
required. This is an issue on Python 3 where there's at least one
optional explicit argument in at least one of the functions
(check_call), on Python 2 the function signature has *args and **kwargs
so it wasn't an issue.

This patch is contributed by Smarkets Limited.

[1] 614a20462aebfe85a54ce35a7daaf1a7dbde44a7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since [1] we monkey patch subprocess module and it uncovered one issue -
the previous patched_function implementation would produce functions
with all optional arguments lacking their default values which made them
required. This is an issue on Python 3 where there's at least one
optional explicit argument in at least one of the functions
(check_call), on Python 2 the function signature has *args and **kwargs
so it wasn't an issue.

This patch is contributed by Smarkets Limited.

[1] 614a20462aebfe85a54ce35a7daaf1a7dbde44a7
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide green http without undesired side effects</title>
<updated>2016-07-08T14:06:23+00:00</updated>
<author>
<name>Jakub Stasiak</name>
<email>jakub@stasiak.at</email>
</author>
<published>2016-06-14T18:43:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=c93279086c21b9f838e1f9c9b232d60317fcfc71'/>
<id>c93279086c21b9f838e1f9c9b232d60317fcfc71</id>
<content type='text'>
The Eventlet patcher and the way we were patching multi-level http
package don't work well[1][2]. I spent a lot of time trying to make it
work but in the end every solution I came up with was breaking something
else and made the patching and providing green http even more
complicated - I wouldn't envy anyone having to debug it in the future.

After a lot of thinking I decided having our own copy of http with the
necessary modifications applied seems like the most straightforward and
the most reliable solution, even considering its downsides (we need to
keep it up to date ourselves and the API won't 100 % match the regular
http module API on older Python 3 versions as our bundled version is the
most recent one and has bug fixes and extra features implemented).

The code introduces by this commit comes from the following Python
commit (development branch):

commit 6251d66ba9a692d3adf5d2e6818b29ac44130787
Author: Xavier de Gaye &lt;xdegaye@users.sourceforge.net&gt;
Date:   2016-06-15 11:35:29 +0200

    Issue #26862: SYS_getdents64 does not need to be defined on android
    API 21.

Changes to the original http package code involve:

* Removing unnecessary import(s)
* Replacing some regular imports with eventlet.green imports
* Replacing fullmatch()[3] usage with match() so we stay Python 3.3
  compatible

I left urllib.parse imports intact as nothing there performs IO.

Green httplib module is also modified because it used to import
http.client using patcher which was breaking things the same way.

A new dependency, enum-compat, is added to ensure that the enum module
is present on Python 3.3 (the http package code comes the latest Python
development branch and uses enum).

[1] https://github.com/getsentry/raven-python/issues/703
[2] https://github.com/eventlet/eventlet/issues/316
[3] https://docs.python.org/3/library/re.html#re.fullmatch

This patch is contributed by Smarkets Limited.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Eventlet patcher and the way we were patching multi-level http
package don't work well[1][2]. I spent a lot of time trying to make it
work but in the end every solution I came up with was breaking something
else and made the patching and providing green http even more
complicated - I wouldn't envy anyone having to debug it in the future.

After a lot of thinking I decided having our own copy of http with the
necessary modifications applied seems like the most straightforward and
the most reliable solution, even considering its downsides (we need to
keep it up to date ourselves and the API won't 100 % match the regular
http module API on older Python 3 versions as our bundled version is the
most recent one and has bug fixes and extra features implemented).

The code introduces by this commit comes from the following Python
commit (development branch):

commit 6251d66ba9a692d3adf5d2e6818b29ac44130787
Author: Xavier de Gaye &lt;xdegaye@users.sourceforge.net&gt;
Date:   2016-06-15 11:35:29 +0200

    Issue #26862: SYS_getdents64 does not need to be defined on android
    API 21.

Changes to the original http package code involve:

* Removing unnecessary import(s)
* Replacing some regular imports with eventlet.green imports
* Replacing fullmatch()[3] usage with match() so we stay Python 3.3
  compatible

I left urllib.parse imports intact as nothing there performs IO.

Green httplib module is also modified because it used to import
http.client using patcher which was breaking things the same way.

A new dependency, enum-compat, is added to ensure that the enum module
is present on Python 3.3 (the http package code comes the latest Python
development branch and uses enum).

[1] https://github.com/getsentry/raven-python/issues/703
[2] https://github.com/eventlet/eventlet/issues/316
[3] https://docs.python.org/3/library/re.html#re.fullmatch

This patch is contributed by Smarkets Limited.
</pre>
</div>
</content>
</entry>
<entry>
<title>greenio: makefile related pypy socket ref counting</title>
<updated>2016-07-07T12:40:34+00:00</updated>
<author>
<name>Yashwardhan Singh</name>
<email>yashnitkkr7@gmail.com</email>
</author>
<published>2016-07-07T12:40:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=2ea3ad9c22444f3d071412ea49449a787f243793'/>
<id>2ea3ad9c22444f3d071412ea49449a787f243793</id>
<content type='text'>
On PyPy `[Errno 9] Bad file descriptor` because `makefile dup/_drop` dance leaves socket with PyPy special reference counter zero, so it may be garbage collected.

https://github.com/eventlet/eventlet/issues/318

(@temoto) maybe proper fix is to remove `dup` in `makefile()`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On PyPy `[Errno 9] Bad file descriptor` because `makefile dup/_drop` dance leaves socket with PyPy special reference counter zero, so it may be garbage collected.

https://github.com/eventlet/eventlet/issues/318

(@temoto) maybe proper fix is to remove `dup` in `makefile()`.</pre>
</div>
</content>
</entry>
<entry>
<title>websocket: support Gunicorn environ['gunicorn.socket']</title>
<updated>2016-07-06T13:53:53+00:00</updated>
<author>
<name>catroot</name>
<email>andrey@ledovskikh.ru</email>
</author>
<published>2016-07-04T19:00:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=6de8d478ca2ee152e1c28d37b1c91b15a6717faf'/>
<id>6de8d478ca2ee152e1c28d37b1c91b15a6717faf</id>
<content type='text'>
Now you able to upgrade connection with eventlet.websocket.WebSocketsWSGI when app runs under `gunicorn application:app -k eventlet`

https://github.com/eventlet/eventlet/pull/331
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now you able to upgrade connection with eventlet.websocket.WebSocketsWSGI when app runs under `gunicorn application:app -k eventlet`

https://github.com/eventlet/eventlet/pull/331
</pre>
</div>
</content>
</entry>
<entry>
<title>greenio: only trampoline when we block</title>
<updated>2016-07-01T09:29:16+00:00</updated>
<author>
<name>David Szotten</name>
<email>davidszotten@gmail.com</email>
</author>
<published>2016-07-01T09:29:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=863a1b7605b5c90ba470e597666c61a3261b706c'/>
<id>863a1b7605b5c90ba470e597666c61a3261b706c</id>
<content type='text'>
https://github.com/eventlet/eventlet/pull/314</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/eventlet/eventlet/pull/314</pre>
</div>
</content>
</entry>
<entry>
<title>tests: clean out unittest.main()</title>
<updated>2016-06-01T13:00:20+00:00</updated>
<author>
<name>Sergey Shepelev</name>
<email>temotor@gmail.com</email>
</author>
<published>2016-06-01T13:00:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=41bbe278d6ab1eaf52e4d7af3a01a4053fc6e2b1'/>
<id>41bbe278d6ab1eaf52e4d7af3a01a4053fc6e2b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>hub: Python2 _obsolete() was copying dicts, use six.iteritems</title>
<updated>2016-05-24T08:57:27+00:00</updated>
<author>
<name>Sergey Shepelev</name>
<email>temotor@gmail.com</email>
</author>
<published>2016-05-24T07:49:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=752a4a84abda8eaf44d7c7999aba912731dc1190'/>
<id>752a4a84abda8eaf44d7c7999aba912731dc1190</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: family kwarg name compatibility</title>
<updated>2016-05-24T08:03:04+00:00</updated>
<author>
<name>Sergey Shepelev</name>
<email>temotor@gmail.com</email>
</author>
<published>2016-05-24T07:59:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=d0837ba1cf8324d678b54567a7570421b7ede18c'/>
<id>d0837ba1cf8324d678b54567a7570421b7ede18c</id>
<content type='text'>
GreenSocket was (family_or_realsock=AF_INET, ...) which breaks code like socket(family=...)
https://github.com/eventlet/eventlet/issues/319
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GreenSocket was (family_or_realsock=AF_INET, ...) which breaks code like socket(family=...)
https://github.com/eventlet/eventlet/issues/319
</pre>
</div>
</content>
</entry>
<entry>
<title>release script: doc build was breaking pypi upload</title>
<updated>2016-05-24T07:46:08+00:00</updated>
<author>
<name>Sergey Shepelev</name>
<email>temotor@gmail.com</email>
</author>
<published>2016-05-24T07:46:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=8f3006554859b47b8af56be65506538fbc4e09ca'/>
<id>8f3006554859b47b8af56be65506538fbc4e09ca</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove select.poll and improve subprocess</title>
<updated>2016-05-20T08:23:36+00:00</updated>
<author>
<name>Jakub Stasiak</name>
<email>jakub@stasiak.at</email>
</author>
<published>2016-05-20T08:23:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/eventlet.git/commit/?id=614a20462aebfe85a54ce35a7daaf1a7dbde44a7'/>
<id>614a20462aebfe85a54ce35a7daaf1a7dbde44a7</id>
<content type='text'>
green select: Delete unpatched poll once again

https://github.com/eventlet/eventlet/pull/317

Previously attempted in f63165c, had to be reverted in 8ea9df6 because
subprocess was failing after monkey patching.

Turns out we haven't been monkey patching the subprocess module at all,
this patch adds that in order for the tests to pass.

This part is changed because otherwise Popen class instantiation would
cause an infinite loop when monkey patching is applied:

    -subprocess_orig = __import__("subprocess")
    +subprocess_orig = patcher.original("subprocess")

This patch is contributed by Smarkets Limited.

* green subprocess: Provide green check_output

This patch is contributed by Smarkets Limited.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
green select: Delete unpatched poll once again

https://github.com/eventlet/eventlet/pull/317

Previously attempted in f63165c, had to be reverted in 8ea9df6 because
subprocess was failing after monkey patching.

Turns out we haven't been monkey patching the subprocess module at all,
this patch adds that in order for the tests to pass.

This part is changed because otherwise Popen class instantiation would
cause an infinite loop when monkey patching is applied:

    -subprocess_orig = __import__("subprocess")
    +subprocess_orig = patcher.original("subprocess")

This patch is contributed by Smarkets Limited.

* green subprocess: Provide green check_output

This patch is contributed by Smarkets Limited.
</pre>
</div>
</content>
</entry>
</feed>
