GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix "file:" URL to have right no. of /'s · Issue #36991 · python/cpython

Fix "file:" URL to have right no. of /'s #36991

New issue
Copy link
New issue
Copy link
Closed
Closed
Fix "file:" URL to have right no. of /'s#36991
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory

Description

callenish
mannequin
opened on Aug 6, 2002
Issue body actions
BPO 591713
Nosy @freddrake
Files
  • urlparse.patch
  • 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 2002-09-25.19:22:58.000>
    created_at = <Date 2002-08-06.19:26:03.000>
    labels = ['library']
    title = 'Fix "file:" URL to have right no. of /\'s'
    updated_at = <Date 2002-09-25.19:22:58.000>
    user = 'https://bugs.python.org/callenish'

    bugs.python.org fields:

    activity = <Date 2002-09-25.19:22:58.000>
    actor = 'nnorwitz'
    assignee = 'nnorwitz'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2002-08-06.19:26:03.000>
    creator = 'callenish'
    dependencies = []
    files = ['4487']
    hgrepos = []
    issue_num = 591713
    keywords = ['patch']
    message_count = 4.0
    messages = ['40855', '40856', '40857', '40858']
    nosy_count = 3.0
    nosy_names = ['fdrake', 'nnorwitz', 'callenish']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue591713'
    versions = []

    Activity

    1. callenish commented on Aug 6, 2002

      @callenish
      callenishmannequin
      on Aug 6, 2002
      MannequinAuthor
      More actions

      If you run urlparse.urljoin() on a file: URL, the resulting URL
      has together with the wrong number of '/'s in it.

      Properly formed, the URL (assuming no netloc) should have
      three slashes, so that it looks like "file:///...". The current
      code drops that down to one.

      The error appears to be in a condition in urlunsplit(). It
      doesn't show up except in this one instance because the
      test is only run iff the scheme is in the list of those that can
      take a netloc and there is no netloc present in the URL.
      Apparently, this is pretty rare.

      Patch attached that corrects the condition.

    2. callenish
      closed this as completedon Aug 6, 2002
    3. callenish
      assigned
      nnorwitz
      on Aug 6, 2002
    4. callenish
      added
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      on Aug 6, 2002
    5. nnorwitz commented on Sep 17, 2002

      @nnorwitz
      nnorwitzmannequin
      on Sep 17, 2002
      Mannequin
      More actions

      Logged In: YES
      user_id=33168

      Not sure who is best to review this? Fred? Jeremy?
      Someone else?

      This patch works for me. I have a test too. Assign back to
      me if you want me to check it in.

    6. freddrake commented on Sep 25, 2002

      @freddrake
      freddrake
      on Sep 25, 2002
      Member
      More actions

      Logged In: YES
      user_id=3066

      Looks good to me; go ahead and check it in with the tests.

      Thanks!

    7. nnorwitz commented on Sep 25, 2002

      @nnorwitz
      nnorwitzmannequin
      on Sep 25, 2002
      Mannequin
      More actions

      Logged In: YES
      user_id=33168

      Checked in as:

      • urlparse.py 1.33 and 1.31.6.2
      • test_urlparse.py 1.7 and 1.2.24.2
      • output/test_urlparse 1.2.24.2
    8. ezio-melotti
      transferred this issue fromon Apr 9, 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

      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — GeezerVison does not store the pages you look up.
        Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.