From e7d36fe0a6118a055b407f0651fed3cefc01e9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 17 Apr 2011 16:48:52 +0200 Subject: Prevent deprecation warning --- Lib/trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/trace.py b/Lib/trace.py index 53c6150..850369b 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -688,7 +688,7 @@ def main(argv=None): for opt, val in opts: if opt == "--help": - usage(sys.stdout) + _usage(sys.stdout) sys.exit(0) if opt == "--version": -- cgit v0.12 From 2a83cc61d6bd96dc05008039703827ec0438cf9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 17 Apr 2011 19:10:27 +0200 Subject: Add missing types to docstring of ast.literal_eval. The reST doc was updated but not the docstring. --- Lib/ast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/ast.py b/Lib/ast.py index 72237ed..fb5adac 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -40,8 +40,8 @@ def literal_eval(node_or_string): """ Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following - Python literal structures: strings, numbers, tuples, lists, dicts, booleans, - and None. + Python literal structures: strings, bytes, numbers, tuples, lists, dicts, + sets, booleans, and None. """ _safe_names = {'None': None, 'True': True, 'False': False} if isinstance(node_or_string, str): -- cgit v0.12 From 87f3a9aac7f4b324f10b23adb1e79ad6b69117ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 16 Apr 2011 00:13:39 +0200 Subject: Fix double use of f.close(). The other one is in a finally block not seen in the diff, which I added in 3bf86785cd9c (for #10252). --- Lib/sysconfig.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 685c84e..3b0ca85 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -694,7 +694,6 @@ def get_platform(): m = re.search( r'ProductUserVisibleVersion\s*' + r'(.*?)', f.read()) - f.close() if m is not None: macrelease = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour -- cgit v0.12