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.

Author ograycode
Recipients ned.deily, ograycode, ronaldoussoren, serhiy.storchaka
Date 2018-07-26.19:55:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
Serhiy, I believe you are correct. I updated my local python and it passed.

However, I think there might be a bug with the implementation that doesn't
correctly respect the BROWSER preference. If I do:

➜  BROWSER=lynx python3

Python 3.7.0 (default, Jul 23 2018, 20:22:55)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser.register_standard_browsers()
>>> webbrowser._tryorder
['MacOSX', 'chrome', 'firefox', 'safari', 'lynx', 'lynx']
>>> webbrowser._browsers
{'macosx': [None, <webbrowser.MacOSXOSAScript object at 0x101c142e8>],
'chrome': [None, <webbrowser.MacOSXOSAScript object at 0x101c14358>],
'firefox': [None, <webbrowser.MacOSXOSAScript object at 0x101d70c50>],
'safari': [None, <webbrowser.MacOSXOSAScript object at 0x101d70cc0>],
'lynx': [None, <webbrowser.GenericBrowser object at 0x101c82048>]}
Notice how the webbrowser._tryorder has two 'lynx' items and both of them
are last. If you look at the comment in the code, it says that it should be
prepended to _tryorder because it's the preferred browser. See

If I change `cmd = _synthesize(cmdline, preferred=False)`, line 566, to
preferred=True then the output is like this:

>>> webbrowser._tryorder
['lynx', 'MacOSX', 'chrome', 'firefox', 'safari', 'lynx']

Which I believe is closer to being correct based upon the comments in the

Am I wrong about this, and should I open up a new bug report for it?


On Thu, Jul 26, 2018 at 1:49 PM Serhiy Storchaka <>

> Serhiy Storchaka <> added the comment:
> I think it is fixed in issue31014.
> ----------
> nosy: +serhiy.storchaka
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
Date User Action Args
2018-07-26 19:55:16ograycodesetrecipients: + ograycode, ronaldoussoren, ned.deily, serhiy.storchaka
2018-07-26 19:55:16ograycodelinkissue34238 messages
2018-07-26 19:55:16ograycodecreate