From 3d3cf48e53404996cff2e5a7e35812245b3e0a31 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola' Date: Tue, 20 Mar 2012 16:46:57 +0100 Subject: Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr. --- Lib/asyncore.py | 1 + Misc/NEWS | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Lib/asyncore.py b/Lib/asyncore.py index 35db387..d8d28a4 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -345,6 +345,7 @@ class dispatcher: err = self.socket.connect_ex(address) if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \ or err == EINVAL and os.name in ('nt', 'ce'): + self.addr = address return if err in (0, EISCONN): self.addr = address diff --git a/Misc/NEWS b/Misc/NEWS index 0e12494..0b3668f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -27,6 +27,9 @@ Core and Builtins Library ------- +- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr + attribute. + - Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem. - Issue #11199: Fix the with urllib which hangs on particular ftp urls. -- cgit v0.12 From 7c010ee00cc0bfb859c326d9a78bd8dd2bf92246 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 21 Mar 2012 13:35:08 +0200 Subject: #3573: idle now doesn't hungs if launched as: idle -e Patch by Guilherme Polo. --- Lib/idlelib/NEWS.txt | 7 +++++++ Lib/idlelib/PyShell.py | 6 ++++-- Misc/NEWS | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 46ef3cb..205b9f3 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -1,3 +1,10 @@ +What's New in IDLE 2.7.3? +======================= + +- Issue #3573: IDLE hangs when passing invalid command line args + (directory(ies) instead of file(s)). + + What's New in IDLE 2.7.2? ======================= diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 895d7da..eeb33e1 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1412,8 +1412,10 @@ def main(): if enable_edit: if not (cmd or script): - for filename in args: - flist.open(filename) + for filename in args[:]: + if flist.open(filename) is None: + # filename is a directory actually, disconsider it + args.remove(filename) if not args: flist.new() if enable_shell: diff --git a/Misc/NEWS b/Misc/NEWS index 0b3668f..65b5c17 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -27,6 +27,9 @@ Core and Builtins Library ------- +- Issue #3573: IDLE hangs when passing invalid command line args + (directory(ies) instead of file(s)) (Patch by Guilherme Polo) + - Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr attribute. -- cgit v0.12 From b3f95d7ff17f64de1a3b9b0d1e36d9a89748be3f Mon Sep 17 00:00:00 2001 From: R David Murray Date: Wed, 21 Mar 2012 15:02:30 -0400 Subject: #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v --- Lib/doctest.py | 10 +++++++--- Misc/NEWS | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Lib/doctest.py b/Lib/doctest.py index 8297fad..095f560 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -2314,7 +2314,8 @@ class DocTestCase(unittest.TestCase): return "Doctest: " + self._dt_test.name class SkipDocTestCase(DocTestCase): - def __init__(self): + def __init__(self, module): + self.module = module DocTestCase.__init__(self, None) def setUp(self): @@ -2324,7 +2325,10 @@ class SkipDocTestCase(DocTestCase): pass def shortDescription(self): - return "Skipping tests from %s" % module.__name__ + return "Skipping tests from %s" % self.module.__name__ + + __str__ = shortDescription + def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, **options): @@ -2372,7 +2376,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, if not tests and sys.flags.optimize >=2: # Skip doctests when running with -O2 suite = unittest.TestSuite() - suite.addTest(SkipDocTestCase()) + suite.addTest(SkipDocTestCase(module)) return suite elif not tests: # Why do we want to do this? Because it reveals a bug that might diff --git a/Misc/NEWS b/Misc/NEWS index 65b5c17..5f715cf 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -27,6 +27,9 @@ Core and Builtins Library ------- +- Issue #12757: Fix the skipping of doctests when python is run with -OO so + that it works in unittest's verbose mode as well as non-verbose mode. + - Issue #3573: IDLE hangs when passing invalid command line args (directory(ies) instead of file(s)) (Patch by Guilherme Polo) -- cgit v0.12