This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: webbrowser.py bug with Opera on Linux
Type: behavior Stage: commit review
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: NE1, georg.brandl, terry.reedy
Priority: normal Keywords: patch

Created on 2010-12-19 15:05 by NE1, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
zweb.diff terry.reedy, 2010-12-24 21:21 Opera raise_opts entry
Messages (4)
msg124358 - (view) Author: (NE1) Date: 2010-12-19 15:05
Tested with Python 2.7.1 / Linux 2.6.33.2 / Opera 10.63. Build 6450 for Linux

class Opera(UnixBrowser) shows:
raise_opts = ["", "-raise"]

"-raise" is not a valid command line option for Opera.

This causes all webbrowser open methods (that use autoraise=True by default) to not work correclty with Opera (webbrowser.open returns True, but Opera does not open, etc).

The raise options should probably be changed to:
raise_opts = ["-noraise", ""]

Opera - UNIX Command Line Options: http://www.opera.com/docs/switches/#unix
msg124610 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-12-24 21:21
According to the linked doc, Opera has '-noraise' but not '-raise' as a command line option (to not raise window when receiving remote commands).

It does have '"raise()"' (with quotes and parens, but not "noraise()") as a remote command following the '-remote' command line option to be sent to another Opera window. I suspect this as the reason for the apparently invalid 
raise_opts = ["", "-raise"]

From the usage of raise_opts in UnixBrowser._invoke, which concatenates one of the entries, if not "", to self.name, I am pretty sure the command line form is what is wanted and that the proposed
raise_opts = ["-noraise", ""]
is correct.

Attached patch also removes a few blank lines to make entries for different browsers consistent.

Georg, if you agree, I will commit the change and backport.
msg124773 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-28 09:36
By all means.
msg124815 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-12-28 19:57
3.2,3.1,2.7: r87553, r87554, r87555
History
Date User Action Args
2022-04-11 14:57:10adminsetgithub: 54947
2010-12-28 19:57:32terry.reedysetstatus: open -> closed

type: behavior
components: + Library (Lib)
assignee: terry.reedy
nosy: georg.brandl, terry.reedy, NE1
messages: + msg124815
resolution: fixed
2010-12-28 09:36:36georg.brandlsetnosy: georg.brandl, terry.reedy, NE1
messages: + msg124773
2010-12-24 21:21:31terry.reedysetfiles: + zweb.diff

versions: + Python 3.1, Python 3.2
keywords: + patch
nosy: + terry.reedy

messages: + msg124610
stage: commit review
2010-12-20 00:10:16ned.deilysetnosy: + georg.brandl
2010-12-19 15:05:20NE1create