Kaydet (Commit) 72c6227d authored tarafından Benjamin Peterson's avatar Benjamin Peterson

merge heads

...@@ -345,6 +345,7 @@ class dispatcher: ...@@ -345,6 +345,7 @@ class dispatcher:
err = self.socket.connect_ex(address) err = self.socket.connect_ex(address)
if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \ if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \
or err == EINVAL and os.name in ('nt', 'ce'): or err == EINVAL and os.name in ('nt', 'ce'):
self.addr = address
return return
if err in (0, EISCONN): if err in (0, EISCONN):
self.addr = address self.addr = address
......
...@@ -2314,7 +2314,8 @@ class DocTestCase(unittest.TestCase): ...@@ -2314,7 +2314,8 @@ class DocTestCase(unittest.TestCase):
return "Doctest: " + self._dt_test.name return "Doctest: " + self._dt_test.name
class SkipDocTestCase(DocTestCase): class SkipDocTestCase(DocTestCase):
def __init__(self): def __init__(self, module):
self.module = module
DocTestCase.__init__(self, None) DocTestCase.__init__(self, None)
def setUp(self): def setUp(self):
...@@ -2324,7 +2325,10 @@ class SkipDocTestCase(DocTestCase): ...@@ -2324,7 +2325,10 @@ class SkipDocTestCase(DocTestCase):
pass pass
def shortDescription(self): 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, def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
**options): **options):
...@@ -2372,7 +2376,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, ...@@ -2372,7 +2376,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
if not tests and sys.flags.optimize >=2: if not tests and sys.flags.optimize >=2:
# Skip doctests when running with -O2 # Skip doctests when running with -O2
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(SkipDocTestCase()) suite.addTest(SkipDocTestCase(module))
return suite return suite
elif not tests: elif not tests:
# Why do we want to do this? Because it reveals a bug that might # Why do we want to do this? Because it reveals a bug that might
......
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? What's New in IDLE 2.7.2?
======================= =======================
......
...@@ -1412,8 +1412,10 @@ def main(): ...@@ -1412,8 +1412,10 @@ def main():
if enable_edit: if enable_edit:
if not (cmd or script): if not (cmd or script):
for filename in args: for filename in args[:]:
flist.open(filename) if flist.open(filename) is None:
# filename is a directory actually, disconsider it
args.remove(filename)
if not args: if not args:
flist.new() flist.new()
if enable_shell: if enable_shell:
......
...@@ -30,6 +30,15 @@ Core and Builtins ...@@ -30,6 +30,15 @@ Core and Builtins
Library 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)
- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr
attribute.
- Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem. - Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem.
- Issue #11199: Fix the with urllib which hangs on particular ftp urls. - Issue #11199: Fix the with urllib which hangs on particular ftp urls.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment