[issue9657] Add circular imports test

2010-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you Nick! I've committed the patch in r84268 (py3k) and r84269 (3.1). -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.1 ___ Python tracker

[issue9657] Add circular imports test

2010-08-22 Thread Nick Coghlan
Nick Coghlan added the comment: Both good points - don't worry about it then. +1 to add to the test suite as-is. -- ___ Python tracker ___ ___

[issue9657] Add circular imports test

2010-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It would be good if the test timed out rather than deadlocking in the > face of a broken import lock. I could do that indeed. I'm not sure it would be much better, though, because the lock will still be held and posterior tests may freeze mysteriously. > Fo

[issue9657] Add circular imports test

2010-08-22 Thread Nick Coghlan
Nick Coghlan added the comment: It would be good if the test timed out rather than deadlocking in the face of a broken import lock. I suggest: 1. Make the two test threads daemon threads 2. Specify a timeout to the join() calls 3. Use self.assertFalse(t1.is_alive()) and self.assertFalse(t2.is_

[issue9657] Add circular imports test

2010-08-21 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here is a test for multi-threaded circular imports (in order to exercise the import lock), following a comment by Graham Dumpleton on #9260. -- components: Tests files: circulartest.patch keywords: patch messages: 114541 nosy: brett.cannon, ncoghlan,