From: Amaury Forgeot d'Arc Date: Fri, 5 Dec 2008 01:07:15 +0000 (+0000) Subject: Merged revisions 67539 via svnmerge from X-Git-Tag: v3.0.1~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c28f8f5f4ea2dd500916594af7f82a2e0677518b;p=thirdparty%2FPython%2Fcpython.git Merged revisions 67539 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r67539 | amaury.forgeotdarc | 2008-12-05 02:02:21 +0100 (ven., 05 déc. 2008) | 5 lines Issue #4537: webbrowser.UnixBrowser failed because this module defines an open() function which shadows the builtin. Will backport to 3.0 ........ --- diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 4772adc6c05d..18dc11b191bd 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -223,7 +223,7 @@ class UnixBrowser(BaseBrowser): cmdline = [self.name] + raise_opt + args if remote or self.background: - inout = open(os.devnull, "r+") + inout = io.open(os.devnull, "r+") else: # for TTY browsers, we need stdin/out inout = None diff --git a/Misc/NEWS b/Misc/NEWS index d0e055235da6..e2a72394ffa8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -15,6 +15,9 @@ Core and Builtins Library ------- +- Issue #4537: webbrowser.UnixBrowser would fail to open the browser because + it was calling the wrong open() function. + - Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to support unusual filenames (such as those containing semi-colons) in Content-Disposition headers.