[Twisted-Python] PotentialZombieWarning warning message?

2015-12-14 Thread pisymbol .
Hi:

I'd like to adopt Twisted for a current project I'm coding up. I'm on
CentOS 6.7 x86-64 using python v2.6 and the stock
python-twisted-8.2.0-3.1 package built for this release.

No matter what I do when trying to implement the Process protocol or
use utils.getProcessOutput() directly, I always see the following
warning message on the console:

/usr/lib64/python2.6/site-packages/twisted/internet/utils.py:25:
PotentialZombieWarning: spawnProcess called, but the SIGCHLD handler
is not installed. This probably means you have not yet called
reactor.run, or called reactor.run(installSignalHandler=0). You will
probably never see this process finish, and it may become a zombie
process.
  reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path)
...

Is there anyway to get rid of this message? I realize I'm using an
older release of twisted but I can't upgrade to the latest without
incurring the cost of installing an python v2.7 or greater.

My script is literally:

d = utils.getProcessOutput('/bin/ls')
d.addCallbacks(writeResponse, noResponse)
reactor.run()

etc.

What am I doing wrong?

-aps

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] PotentialZombieWarning warning message?

2015-12-14 Thread pisymbol .
On Mon, Dec 14, 2015 at 10:09 AM, Amber "Hawkie" Brown
 wrote:
>
>> On 14 Dec 2015, at 22:52, pisymbol .  wrote:
>>
>> Hi:
>>
>> I'd like to adopt Twisted for a current project I'm coding up. I'm on
>> CentOS 6.7 x86-64 using python v2.6 and the stock
>> python-twisted-8.2.0-3.1 package built for this release.
>
> ...
>
>> Is there anyway to get rid of this message? I realize I'm using an
>> older release of twisted but I can't upgrade to the latest without
>> incurring the cost of installing an python v2.7 or greater.
>
> Hi,
>
> Python 2.6 has been EOL for years and Twisted 8.2.0 is nearly seven years 
> old. We can't really help with things that old (many, many issues have since 
> been fixed, so remembering what's a bug that's been squashed and what's a 
> platform bug is nearly impossible), but upgrading to Twisted 15.4 (the last 
> release with Python 2.6 support, and only 4 or so months old) may help.

That maybe, but CentOS 6.7 is the latest 6.x release which ships with
8.2.x (somebody maintaining the RHEL 6.x series should update these
packages then).

I did a pip install and it said I needed Python 2.7 or higher. Let me
reevaluate if I can just update twisted.

Thanks!

-aps

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] PotentialZombieWarning warning message?

2015-12-14 Thread pisymbol .
On Mon, Dec 14, 2015 at 4:51 PM, Glyph Lefkowitz
 wrote:
> I did a pip install and it said I needed Python 2.7 or higher. Let me
> reevaluate if I can just update twisted.
>
>
> Try `pip install twisted==15.4´ if you still require Python2.6 support; `pip
> install twisted´ will install the latest, which no longer works on 2.6.

Yeah, that's what I did. It's working now!

> But again: Python 2.6 is unsupported by the upstream Python developers.  You
> really should not be using it, since it won't receive security updates (of
> course, Red Hat and transitively CentOS claim to "support" these packages,
> but if upstream is refusing patches at this point, it's not clear where that
> support will come from).

As you can imagine, this boils down to politics.

> If you must use CentOS 6, then I'd recommend installing PyPy 4.0 from
> https://github.com/squeaky-pl/portable-pypy#portable-pypy-distribution-for-linux
> and using that.  In addition to being security-supported, it will also make
> your python code run 10x faster :).

Interesting, I'll take a look.

-aps

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] PotentialZombieWarning warning message?

2015-12-14 Thread pisymbol .
On Mon, Dec 14, 2015 at 7:43 PM, Glyph Lefkowitz
 wrote:
>
>> On Dec 14, 2015, at 3:53 PM, pisymbol .  wrote:
>>
>> On Mon, Dec 14, 2015 at 4:51 PM, Glyph Lefkowitz
>>  wrote:
>>> I did a pip install and it said I needed Python 2.7 or higher. Let me
>>> reevaluate if I can just update twisted.
>>>
>>>
>>> Try `pip install twisted==15.4´ if you still require Python2.6 support; `pip
>>> install twisted´ will install the latest, which no longer works on 2.6.
>>
>> Yeah, that's what I did. It's working now!
>
> Great!  Glad to hear you were able to make a huge leap in Twisted versions 
> with little trouble :-).
>
>>> But again: Python 2.6 is unsupported by the upstream Python developers.  You
>>> really should not be using it, since it won't receive security updates (of
>>> course, Red Hat and transitively CentOS claim to "support" these packages,
>>> but if upstream is refusing patches at this point, it's not clear where that
>>> support will come from).
>>
>> As you can imagine, this boils down to politics.
>
> I understand that things like this often do, which is exactly why I want to 
> make it clear that we (speaking in terms of the broader Python community now, 
> not just Twisted) are trying to push people towards more recent versions just 
> because they're more fun or more aesthetically pleasant, but because there 
> are very real risks associated with being on unsupported ancient versions of 
> things.  It pains me not to be supporting a configuration that some users 
> want, but there is a line where "conservative about change" becomes 
> "negligent about maintenance" and python 2.6 crossed it a little over two 
> years ago :-).

I'm not disagreeing with you per se...but...

The fact is the Python community at large then needs to convince the
distro maintainers accordingly. Telling a customer to update their
entire platform for a newer version of Python isn't going to fly a lot
of times (and remember, someone of them have support agreements with
RH).

And running two versions of Python can get messy real fast.

Anyway, it is what it is.

>>> If you must use CentOS 6, then I'd recommend installing PyPy 4.0 from
>>> https://github.com/squeaky-pl/portable-pypy#portable-pypy-distribution-for-linux
>>> and using that.  In addition to being security-supported, it will also make
>>> your python code run 10x faster :).
>>
>> Interesting, I'll take a look.
>
> Hope that works out for you.  Good luck!

Thanks! So far, so good. I was now able to lift my prototype code and
integrate it with the rest.

I'll probably have more questions at some point, but at least 15.4 did
the trick!

-aps

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python