Skip to content

webbrowser.open firefox 3 issues #46206

Closed

Description

@elessar
mannequin
BPO 1911
Nosy @birkenfeld, @devdanzin
Files
  • webbrowser-nogconf-backport.diff: Backport from trunk
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2009-02-10.18:42:25.128>
    created_at = <Date 2008-01-23.01:29:30.515>
    labels = ['easy', 'type-bug', 'library']
    title = 'webbrowser.open firefox 3 issues'
    updated_at = <Date 2009-02-10.18:42:25.126>
    user = 'https://bugs.python.org/elessar'

    bugs.python.org fields:

    activity = <Date 2009-02-10.18:42:25.126>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-02-10.18:42:25.128>
    closer = 'georg.brandl'
    components = ['Library (Lib)']
    creation = <Date 2008-01-23.01:29:30.515>
    creator = 'elessar'
    dependencies = []
    files = ['9502']
    hgrepos = []
    issue_num = 1911
    keywords = ['patch', 'easy']
    message_count = 8.0
    messages = ['61552', '61553', '61554', '61555', '62757', '63887', '81451', '81577']
    nosy_count = 4.0
    nosy_names = ['georg.brandl', 'ajaksu2', 'elessar', 'lauromoura']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue1911'
    versions = ['Python 2.5']

    Activity

    1. elessar commented on Jan 23, 2008

      elessarmannequin
      MannequinAuthor
      webbrowser.open('http://example.com')

      opens something like:

      file:///path/to/home/directory/"http://example.com"

      in firefox 3 beta 2. this behavior of firefox will most like not change
      in the stable release.

    2. gvanrossum commented on Jan 23, 2008

      @gvanrossum
      Member

      What platform?

      How come?

      Got a fix that doesn't break for other browsers?

      There's a 1-2 week window at most for getting fixes into 2.5.2!

    3. elessar commented on Jan 23, 2008

      elessarmannequin
      MannequinAuthor

      I'm running 2.6.23.9 linux kernel fedora 8.

      I've gone ahead and downloaded the subversion checkout of the
      webbrowser.py file to see the differences. The svn version fixes the
      issue, so then I went a hunting as to why.

      In the 2.5 version, with a version of firefox running out of my home
      directory (but still in my path) webbrowser calles BackgroundBrowser
      instead of UnixBrowser.

      BackgroundBrowser calls subprocess.Popen(cmdline), where cmdline is a
      tuble in form ['/browser/path', '"http://example.com"'], and subprocess
      doesn't use/like the double quotes (probably legacy os.popen format)

      The difference in the two webbrowser scripts that fixes it is thus:

      446a445,455

      # The default Gnome browser
      if \_iscommand("gconftool-2"):
          # get the web browser string from gconftool
          gc = 'gconftool-2 -g /desktop/gnome/url-handlers/http/command
      

      2>/dev/n
      ull'

          out = os.popen(gc)
          commd = out.read().strip()
          retncode = out.close()
      
          # if successful, register it
          if retncode is None and commd:
              register("gnome", None, BackgroundBrowser(commd.split()))
      

      448,456c457
      < # The default GNOME browser
      < if "GNOME_DESKTOP_SESSION_ID" in os.environ and
      _iscommand("gnome-open"):
      < register("gnome-open", None, BackgroundBrowser("gnome-open"))
      <
      < # The default KDE browser
      < if "KDE_FULL_SESSION" in os.environ and _iscommand("kfmclient"):
      < register("kfmclient", Konqueror, Konqueror("kfmclient"))
      <
      < # The Mozilla/Netscape browsers

      so it appears to be a problem with gconf that python has to work around.

      see: https://bugs.launchpad.net/ubuntu/+source/python2.5/+bug/83974

      So as long as it is in trunk 2.5.2 should fix it! (the patch is not in
      2.5.1). thanks.

    4. gvanrossum commented on Jan 23, 2008

      @gvanrossum
      Member

      OK, since it's so simple I'll take it if noone else does. But anyone
      else who feels like backporting this please go ahead!

    5. self-assigned this
      on Jan 23, 2008
    6. lauromoura commented on Feb 23, 2008

      lauromouramannequin
      Mannequin

      Adding patch with backport from trunk to branches/release25-maint.
      Tested with firefox(2 and 3a3), epiphany and elinks on GNOME 2.20,
      altough I coulnd't reproduce the error before from python, even changing
      the gconf setting manually.

    7. gvanrossum commented on Mar 18, 2008

      @gvanrossum
      Member

      Sorry, I have lots of other things to do before I get to this. It's too
      late for 2.5.2; 2.5.3 won't be out until September or October 2008.
      Please ping before then.

    8. added
      stdlibStandard Library Python modules in the Lib/ directory
      and removed on Mar 18, 2008
    9. removed their assignment
      on Jan 6, 2009
    10. devdanzin commented on Feb 9, 2009

      devdanzinmannequin
      Mannequin

      Out-of-date: fixed in trunk.

    11. birkenfeld commented on Feb 10, 2009

      @birkenfeld
      Member

      Thanks, closing.

    12. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      easystdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions