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: Fix _tryorder in webbrowser.py
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: doerwalter, mdehoon, rodsenra
Priority: normal Keywords: patch

Created on 2005-03-20 04:25 by rodsenra, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch_webbrowser rodsenra, 2005-03-20 04:25 Forward Patch file to fix webbrowser.py
libwebbrowser.tex.patch rodsenra, 2005-03-20 14:57 respective documentation patch
Messages (5)
msg48001 - (view) Author: Rodrigo Dias Arruda Senra (rodsenra) Date: 2005-03-20 04:25
At the present time (Py2.4):
"""
Under Unix, if the environment variable BROWSER exists,
it is 
interpreted to override the platform default list of
browsers,...
"""
(extract from
Python-2.4/Doc/html/lib/module-webbrowser.html)

But, when the environment variable BROWSER is messed up,
there is no reason not to try the other detected
browser alternatives.

In this patch, if the BROWSER variable is Ok, than it
is respected.
Otherwise, the previously detected browsers are tryied
out as if
BROWSER variable never existed.

This does not break backward compatibility and adds
more chance
for webbrowser.open() to succeed.

This patch was made against CVS head 2005-03-20, and
aims to 2.5, but can safely be apllied to any 2.4.x bug
fix release.

msg48002 - (view) Author: Michiel de Hoon (mdehoon) * Date: 2005-03-27 08:03
Logged In: YES 
user_id=488897

I agree that this patch will improve chances that
webbrowser.open() will succeed. I'm a bit worried though
that if a user sets BROWSER incorrectly, it may cause some
confusion to see another browser opening. So we might some
some bug reports saying "webbrowser.py ignores BROWSER
variable" because a user set BROWSER incorrectly. One
solution might be to print some warning message if the
browser specified in BROWSER cannot be used.
(I'm just a patch reviewer, not an official Python
developer, so you don't need to take my comment to seriously
:-)).
msg48003 - (view) Author: Rodrigo Dias Arruda Senra (rodsenra) Date: 2005-03-27 14:18
Logged In: YES 
user_id=9057

Michiel de Hoon,

this patch is obsolete after the latest revision of patch
 [ 754022 ] Enhanced webbrowser.py, that integrates this
functionality and others in a single patch.

Moreover, if a user sets BROWSER incorrectly, to see another
browser opening will probably lead him to find that BROWSER
was set incorrectly.
IMO it is better to see a different browser opening than no
browser at all. But thank you for revising this patch.
msg48004 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2005-05-16 07:52
Logged In: YES 
user_id=89016

If this patch is subsumed by 754022 can we close this one?
msg48005 - (view) Author: Rodrigo Dias Arruda Senra (rodsenra) Date: 2005-05-17 22:29
Logged In: YES 
user_id=9057

Closed because it is subsumed by 754022 
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41723
2005-03-20 04:25:48rodsenracreate