Daniel Wagner-Hall added the comment:
Is anything blocking this patch's submission?
--
___
Python tracker
<http://bugs.python.org/issue15836>
___
___
Pytho
Daniel Wagner-Hall added the comment:
That is indeed the behaviour I'm talking about.
In particular I came across this where two libraries imported an exception type
using different sys.path traversals, which both led to the same file, and a
try-catch didn't catch the exception beca
New submission from Daniel Wagner-Hall:
Importing the same module twice should only execute its code once, and should
only lead to one copy of the classes defined in the module's file.
If a subdirectory of $PWD is on $PYTHONPATH, and a package is imported both
relative to $PWD and relati
Daniel Wagner-Hall added the comment:
Cool, my contributor agreement has been received, please merge if happy!
--
___
Python tracker
<http://bugs.python.org/issue15
Daniel Wagner-Hall added the comment:
Added patch for 2.7.
I'll sign the contributor form just as soon as I can get to a printer.
Thanks for taking me through my first contribution.
--
versions: +Python 2.7
Added file: http://bugs.python.org/file27081/issue15836-2.7.
Daniel Wagner-Hall added the comment:
I seem to be getting exceptions why trying to upload a new patch to rietveld,
either by the web interface (in several browsers), or by upload.py - attaching
new patchset here
Also, if I wanted to backport to 2.7 including an isinstance(e,
types.ClassType
New submission from Daniel Wagner-Hall:
The following code in a unittest test is a no-op:
self.assertRaises(lambda: 1)
I would expect this to fail the test, because I naively assumed omitting the
exception class would act as:
self.assertRaises(BaseException, lambda: 1)
verifying that *any
Daniel Wagner-Hall added the comment:
Explanation of behaviour at
http://stackoverflow.com/questions/7700929/python-multiprocessing-map-if-one-thread-raises-an-exception-why-arent-other
tl;dr SIGTERM kills subprocesses and finally blocks aren't called.
I still consider this a bug, t
New submission from Daniel Wagner-Hall :
import random
from multiprocessing import Pool
from time import sleep
def Process(x):
try:
print x
sleep(random.random())
raise Exception('Exception: ' + x)
finally:
print 'Finally: ' + x
Pool(3).map(Process, [&