Re: [Python-Dev] Issue #7978, unexpected EINTR-related exceptions
Le jeudi 08 avril 2010 08:11:09, Yaniv Aknin a écrit : > Issue #7978 (http://bugs.python.org/issue7978) describes a bug in > SocketServer where a received signal in SocketServer's select() call > will raise an uncaught exception due to EINTR. The proposed solution > was to wrap SocketServer's select() with something like twisted's > untilConcludes function, which catches EINTR exceptions and re-calls > the call (see issue for code). > > However, before committing this to SocketServer, neologix raised the > (valid) concern that this is generally-useful code, already duplicated > at least in subprocess (_eintr_retry_call, subprocess.py), which can > probably be moved to another module and be shared from there. (...) +1 to share EINTR-related code, but I don't know the best place for such functions. Maybe the os module? -- Victor Stinner http://www.haypocalc.com/ ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 3147 working implementation
On Apr 06, 2010, at 09:57 PM, Benjamin Peterson wrote: >I've now added a review, too. As did Brett. Thanks! I've responded and will upload a new patch set as soon as I've verified the test suite passes. -Barry signature.asc Description: PGP signature ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Scope object (Re: nonlocals() function?)
2010/4/7 Steven D'Aprano > On Tue, 6 Apr 2010 04:25:08 pm Cesare Di Mauro wrote: > > > It will certainly. There's MUCH that can be optimized to let CPython > > squeeze more performance from static analysis (even a gross one) on > > locals. > [...] > > They are just "dummy" examples, but can make it clear how far > > optimizations can go with static analysis on locals. Python is a > > language that make it possible to use such analysis at compile time, > > and I think it is a very good thing. > > I'm not opposed to the idea of optimisations in general (far from it!) > but in case anyone is thinking about doing any work in this area, > please be careful about floating point optimisations. E.g. given a float > x, you can't assume that x*0 == 0. Nor can you assume that 0-x is the > same as -x. (The second is *almost* always correct, except for one > float value.) > > See, for example, the various writings by Professor Kahan: > > http://www.drdobbs.com/184410314 > http://www.cs.berkeley.edu/~wkahan/ > > Most of the issues discussed apply to languages that deal with floats at > a lower level than Python does, but still, simple minded optimizations > will break corner cases no matter what language you use. > > -- > Steven D'Aprano Thanks for the useful links. I never applied such kind of optimizations, and I think I'll never to do it anyway. :) Cesare ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] regrtest oddify
On Wed, 2010-04-07 at 18:20 -0500, Benjamin Peterson wrote: > 2010/4/7 "Martin v. Löwis" : > > I have commented out all tests in test_gdb, yet > > > > http://www.python.org/dev/buildbot/all/builders/sparc%20Ubuntu%20trunk/builds/47/steps/test/logs/stdio > > > > still shows them being run. Can anybody explain that, please? > > That's because the buildbot only updated to the revision before your change. FWIW I've attached a patch [1] to http://bugs.python.org/issue8330 which I believe may fix the issues seen in that log. Hope this is helpful Dave [1] http://bugs.python.org/file16808 ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] regrtest oddify
> FWIW I've attached a patch [1] to http://bugs.python.org/issue8330 which > I believe may fix the issues seen in that log. Thanks! I'll apply them after the beta release (don't want to mess with it before). Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python and compilers
Nick Coghlan wrote: I thought RPython already supported this? (admittedly, my knowledge of of the inner workings of PyPy is fairly sketchy, but I thought static compilation of RPython to a variety of backend targets was one of the key building blocks) Maybe so, but one would still have to create the appropriate backend to target the machine in question. I wouldn't like to rely on a generic C-generating backend to target something very tiny in an effective way. -- Greg ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
