Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1336
___
___
Python-bugs-list mailing list
Jesús Cea Avión added the comment:
I would catch ALL exceptions, not only OSError.
An easy way to test this would be to test a subclass of Popen with
_execute_child() method overrided for always raising an exception.
On Unix the test could just open six fds, close them taking note of the
Gregory P. Smith added the comment:
python 3 already catches all exceptions and handles closing of p2cwrite,
c2pread and errread here. i don't know which branch this patch is against.
Regardless, it makes sense that the other fd's, if created by us, also need to
be cleaned up. The code
Chris Jerdonek added the comment:
Nick would be a better person to review the patch since IIRC he worked a bunch
on that module (e.g. in the changeset you mentioned). But if I get a chance I
will take a look.
--
___
Python tracker
Mark Gius added the comment:
attachment against 2.7
if I understand this code correctly, the fix shouldn't need to be fixed
separately on windows and Linux, since the thing handled by init is just a file
descriptor.
Good idea on the testing. I'll give that a shot tomorrow. I think 3.3 will
Changes by Nick Coghlan ncogh...@gmail.com:
--
assignee: - ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16163
___
___
Python-bugs-list
Jesús Cea Avión added the comment:
The cleanup code in python 3 validates my idea of simplifying cleanup moving
_execute_child() after the platform specific code.
I wonder what raise will actually raise if this cleanup code catches
ignores close() exception :-).
--
Jesús Cea Avión added the comment:
Mark, could you consider to fillsend a contributor form agreement?
http://www.python.org/psf/contrib/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16327
Jesús Cea Avión added the comment:
In fact, nested exception management in python 2 and python 3 actually
diverges. BEWARE: (Python 3 does the right thing, once again :-)
Python 2.7.3 (default, Apr 12 2012, 13:11:53)
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more
Jesús Cea Avión added the comment:
http://stackoverflow.com/questions/8997431/is-there-any-way-to-access-nested-or-re-raised-exceptions-in-python
This is known as Exception Chaining and is suported in Python 3.
PEP 3134: http://www.python.org/dev/peps/pep-3134/
In Python 2, the old exception
Jesús Cea Avión added the comment:
Python2 management should be something like:
Python 2.7.3 (default, Apr 12 2012, 13:11:53)
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
try :
... 1/0
... except BaseException as e :
... try :
... raise
...
Jesús Cea Avión added the comment:
Replace except BaseException as e : with just except:. It was a remnant of
my tests.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16327
___
Todd Rovito added the comment:
Thanks for the feedback! Over the weekend I will make sure the documentation
and test cases cover all possibilities. I have not worked with test suite but
I will do my best.
--
___
Python tracker
101 - 113 of 113 matches
Mail list logo