[issue4537] webbrowser.UnixBrowser should use builtins.open

2011-04-13 Thread ackounts

ackounts  added the comment:

This problem is happening in my linux box:

Python 3.2 (r32:88445, Feb 21 2011, 01:55:53) 
[GCC 4.5.2 20110127 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import antigravity
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.2/antigravity.py", line 5, in 
webbrowser.open("http://xkcd.com/353/";)
  File "/usr/lib/python3.2/webbrowser.py", line 62, in open
if browser.open(url, new, autoraise):
  File "/usr/lib/python3.2/webbrowser.py", line 276, in open
success = self._invoke(args, True, autoraise)
  File "/usr/lib/python3.2/webbrowser.py", line 239, in _invoke
stderr=inout, preexec_fn=setsid)
  File "/usr/lib/python3.2/subprocess.py", line 736, in __init__
restore_signals, start_new_session)
  File "/usr/lib/python3.2/subprocess.py", line 1330, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 9] Bad file descriptor
>>>

--
nosy: +ackounts
versions: +Python 3.2 -Python 3.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2011-04-14 Thread R. David Murray

R. David Murray  added the comment:

Despite the apparent similarity, your issue is something different from what 
was reported in this issue.  Could you please open a new issue for your problem?

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2011-04-14 Thread ackounts

ackounts  added the comment:

yes, you right, I will create a new issue, thanks.

--
components: +None -Library (Lib)
type: crash -> 
versions:  -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-04 Thread Michael Schurter

New submission from Michael Schurter <[EMAIL PROTECTED]>:

On the joyous occasion of Python 3000's release my friends & I were
playing with "import antigravity" and it failed for someone with the
following traceback (anonymized):

Traceback (most recent call last):
  File "", line 1, in 
  File "/.../lib/python3.0/antigravity.py", line 4, in 
webbrowser.open("http://xkcd.com/353/";)
  File "/.../lib/python3.0/webbrowser.py", line 61, in open
if browser.open(url, new, autoraise):
  File "/.../lib/python3.0/webbrowser.py", line 275, in open
success = self._invoke(args, True, autoraise)
  File "/.../lib/python3.0/webbrowser.py", line 226, in _invoke
inout = open(os.devnull, "r+")
  File "/.../lib/python3.0/webbrowser.py", line 61, in open
if browser.open(url, new, autoraise):
  File "/.../lib/python3.0/webbrowser.py", line 271, in open
"expected 0, 1, or 2, got %s" % new)
webbrowser.Error: Bad 'new' parameter to open(); expected 0, 1, or 2, got r+

I believe the following patch (against branches/release30-maint) fixes
it cleanly:

Index: Lib/webbrowser.py
===
--- Lib/webbrowser.py   (revision 67538)
+++ Lib/webbrowser.py   (working copy)
@@ -8,6 +8,7 @@
 import stat
 import subprocess
 import time
+import builtins
 
 __all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"]
 
@@ -223,7 +224,7 @@
 cmdline = [self.name] + raise_opt + args
 
 if remote or self.background:
-inout = open(os.devnull, "r+")
+inout = builtins.open(os.devnull, "r+")
 else:
 # for TTY browsers, we need stdin/out
 inout = None

--
components: Library (Lib)
messages: 76931
nosy: schmichael
severity: normal
status: open
title: webbrowser.UnixBrowser should use builtins.open
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-04 Thread gumpy

gumpy <[EMAIL PROTECTED]> added the comment:

I'd suggest the same thing that was done on lines 351-352.

Index: Lib/webbrowser.py
===
--- Lib/webbrowser.py   (revision 67538)
+++ Lib/webbrowser.py   (working copy)
@@ -223,7 +223,8 @@
 cmdline = [self.name] + raise_opt + args
 
 if remote or self.background:
-inout = open(os.devnull, "r+")
+import io
+inout = io.open(os.devnull, "r+")
 else:
 # for TTY browsers, we need stdin/out
 inout = None

--
nosy: +gumpy

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-04 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
assignee:  -> amaury.forgeotdarc
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-04 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Fixed in 67539 (py3k) and 67540 (release30-maint)
Thanks for the report!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-04 Thread Michael Schurter

Michael Schurter <[EMAIL PROTECTED]> added the comment:

I believe you forgot to "import io" in UnixBrowser (line 226).

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-05 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

sorry**10... probably a wrong copy operation because the Linux machine
where I tested did not have my svn ssh keys.
Someone already corrected this on py3k (r67544, thanks to Fred!), I'll
take care of merging it to the 3.0 branch.

--
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-05 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Merged the 2nd fix with r67602.

--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com