From: Ezio Melotti Date: Sat, 30 Mar 2013 03:19:06 +0000 (+0200) Subject: #17526: merge with 3.3. X-Git-Tag: v3.4.0a1~1067^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0503de9c83b3fb3545d8fe34ad560ec3fc56a63b;p=thirdparty%2FPython%2Fcpython.git #17526: merge with 3.3. --- 0503de9c83b3fb3545d8fe34ad560ec3fc56a63b diff --cc Lib/inspect.py index 366131604287,7834d12ea7d0..e60a235fe432 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@@ -550,8 -550,8 +550,8 @@@ def findsource(object) file = getfile(object) sourcefile = getsourcefile(object) - if not sourcefile and file[0] + file[-1] != '<>': + if not sourcefile and file[:1] + file[-1:] != '<>': - raise IOError('source code not available') + raise OSError('source code not available') file = sourcefile if sourcefile else file module = getmodule(object, file) diff --cc Misc/NEWS index 5c2879ade9dc,c3e9ef2fa747..2af6102d996f --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -297,13 -211,8 +297,16 @@@ Core and Builtin Library ------- ++- Issue #17526: fix an IndexError raised while passing code without filename to ++ inspect.findsource(). Initial patch by Tyler Doyle. ++ - Issue #17540: Added style to formatter configuration by dict. +- Issue #16692: The ssl module now supports TLS 1.1 and TLS 1.2. Initial + patch by Michele Orrù. + +- Issue #17025: multiprocessing: Reduce Queue and SimpleQueue contention. + - Issue #17536: Add to webbrowser's browser list: www-browser, x-www-browser, iceweasel, iceape.