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: wrong arguments for Opera browser.
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: kbumsik, miss-islington, pablogsal, taleinat
Priority: normal Keywords: patch

Created on 2018-07-02 09:51 by kbumsik, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8047 merged kbumsik, 2018-07-02 09:56
PR 8063 merged miss-islington, 2018-07-03 11:41
PR 8064 merged miss-islington, 2018-07-03 11:42
PR 8126 merged pablogsal, 2018-07-05 23:56
Messages (12)
msg320863 - (view) Author: Bumsik Kim (kbumsik) * Date: 2018-07-02 09:51
webbrowser module currently opens Opera Browser using the following command:

opera -remote "openURL(https://google.com,new-window)"

While this follows Opera's documentation (https://www.opera.com/docs/switches/#remote), this is broken since Opera switched from its own engine to Chromium. The working command is exactly the same as Chrome:

opera --new-window https://google.com
msg320922 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-07-02 22:59
I can use

opera -remote "openURL(https://google.com,new-window)"

without problems as per the opera documentation with the latest version:


$opera --version
53.0.2907.110
msg320923 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-07-02 22:59
What error do you get and what opera version are you using?
msg320926 - (view) Author: Bumsik Kim (kbumsik) * Date: 2018-07-02 23:10
$opera --version
53.0.2907.68

$opera -remote "openURL(https://google.com,new-window)"

would open a broken link: http://openurl%28https//google.com,new-window) 

I found that problem while answering a StackOverflow question: https://stackoverflow.com/questions/51123537/webbrowser-open-breaks-the-link-python-3-7
msg320927 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-07-02 23:20
Sorry, you are right! It seems that my Opera opened another tab with Google by default and I was confused by that. Thanks for the context.
msg320928 - (view) Author: Bumsik Kim (kbumsik) * Date: 2018-07-02 23:24
No problem :) To add more, the Opera's documentation (https://www.opera.com/docs/switches) says:

"This document was last updated for Opera 11.61"

This is the reason I guessed Opera changed its CLI format to Chrome's and forget to document it....
msg320964 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-07-03 11:30
New changeset 3cf1f154edb88c108877729ea09f4ac174697fea by Pablo Galindo (Bumsik Kim) in branch 'master':
 bpo-34019: Fix wrong arguments for Opera Browser (#8047)
https://github.com/python/cpython/commit/3cf1f154edb88c108877729ea09f4ac174697fea
msg320974 - (view) Author: miss-islington (miss-islington) Date: 2018-07-03 12:16
New changeset dd5f43a023f25e8aea8c9297b5297d76668d64e1 by Miss Islington (bot) in branch '3.6':
bpo-34019: Fix wrong arguments for Opera Browser (GH-8047)
https://github.com/python/cpython/commit/dd5f43a023f25e8aea8c9297b5297d76668d64e1
msg321077 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2018-07-05 05:52
Shouldn't this be backported to 2.7 as well?
msg321143 - (view) Author: Bumsik Kim (kbumsik) * Date: 2018-07-05 23:36
I also believe this can be backported to 2.7 as well.
msg321194 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-07-06 23:54
New changeset 8902a1d14e9fe6fb80f4145ad4ea27a579567289 by Pablo Galindo in branch '2.7':
[2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126)
https://github.com/python/cpython/commit/8902a1d14e9fe6fb80f4145ad4ea27a579567289
msg321257 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2018-07-08 05:36
Thanks for reporting the issue and the PR, Bumsik Kim!
History
Date User Action Args
2022-04-11 14:59:02adminsetgithub: 78200
2018-07-08 05:36:43taleinatsetstatus: open -> closed
resolution: fixed
messages: + msg321257

stage: patch review -> resolved
2018-07-06 23:54:13pablogsalsetmessages: + msg321194
2018-07-05 23:56:35pablogsalsetpull_requests: + pull_request7707
2018-07-05 23:36:55kbumsiksetmessages: + msg321143
2018-07-05 05:52:14taleinatsetnosy: + taleinat

messages: + msg321077
versions: - Python 3.4, Python 3.5
2018-07-03 12:16:59miss-islingtonsetnosy: + miss-islington
messages: + msg320974
2018-07-03 11:42:05miss-islingtonsetpull_requests: + pull_request7673
2018-07-03 11:41:15miss-islingtonsetpull_requests: + pull_request7672
2018-07-03 11:30:11pablogsalsetmessages: + msg320964
2018-07-02 23:24:24kbumsiksetmessages: + msg320928
2018-07-02 23:20:36pablogsalsetmessages: + msg320927
2018-07-02 23:10:44kbumsiksetmessages: + msg320926
2018-07-02 22:59:47pablogsalsetmessages: + msg320923
2018-07-02 22:59:31pablogsalsetnosy: + pablogsal
messages: + msg320922
2018-07-02 10:06:16kbumsiksetversions: + Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.8
2018-07-02 09:56:12kbumsiksetkeywords: + patch
stage: patch review
pull_requests: + pull_request7656
2018-07-02 09:51:20kbumsikcreate