From bc2ce57203e1f355004ec95953eae9dec780ef9a Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Fri, 5 Dec 2008 01:02:21 +0000 Subject: [PATCH] Issue #4537: webbrowser.UnixBrowser failed because this module defines an open() function which shadows the builtin. Will backport to 3.0 --- Lib/webbrowser.py | 2 +- Misc/NEWS | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 4772adc6c05..18dc11b191b 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 d4e749f58c0..15e3401c597 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -16,6 +16,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.