[openstack-dev] Fwd: Eventlet 0.13 is going to have minor incompatible change in subprocess API

Doug Hellmann doug.hellmann at dreamhost.com
Wed Jun 5 17:33:35 UTC 2013


Do we have an eventlet expert available to figure out if this is going to
bite us?

Doug

---------- Forwarded message ----------
From: Sergey Shepelev <temotor at gmail.com>
Date: Tue, Jun 4, 2013 at 1:26 PM
Subject: Eventlet 0.13 is going to have minor incompatible change in
subprocess API
To: comp-lang-python-announce at moderators.isc.org


Hello.

I'm trying to reach out for as many Eventlet users as possible. This
message contains specific actions to be taken by project owners to ensure
compatibility with future versions of eventlet.

1. We're going to have a minor backward incompatible change. It will *only*
affect you if you use Eventlet specific `check_interval` positional
argument, e.g. subprocess.Popen(...).wait(0.1). Which is very unlikely, but
I have to make sure. Checking will take less than minute best case.

2. Please run the following search against your code base:

grep -lr -E 'import.+subprocess' . |xargs grep -nE '\.wait\([^)]' |fgrep -v
'check_interval='

3. If you have any results on step 3, please check that either you imported
subprocess from eventlet.green or used monkey_patch and matched lines
correspond to eventlet.green.subprocess.Popen objects

4. If you have any results on step 4, that is, you pass check_interval as
first positional argument to .wait() method of Popen object, please change
it to keyword argument `check_interval=...`

5. Please, spread this message to your coworkers, friends or other people
who uses Eventlet in their projects.

Thank you very much.


If you are curious what's going on, here's the full story:
Python 3.3 introduced `timeout` kwarg to lots of methods of subprocess
module. The RHEL guys backported it to their Python 2.6 package. At some
point, the code they used started to use subprocess from Eventlet which
does not have the `timeout` kwarg.
https://bitbucket.org/eventlet/eventlet/issue/89
https://bitbucket.org/eventlet/eventlet/pull-request/30
Now in Eventlet, I am going to introduce the `timeout` argument and to make
it forward compatible with Python3, it's going to get first place, like in
stdlib.
To interested people, you may leave a comment in this discussion or in this
Github thread: https://github.com/eventlet/eventlet/pull/34
--
http://mail.python.org/mailman/listinfo/python-announce-list

        Support the Python Software Foundation:
        http://www.python.org/psf/donations/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130605/28ebb930/attachment.html>


More information about the OpenStack-dev mailing list