Skip to content

pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory #77841

Description

@QbLearningPython
BPO 33660
Nosy @pitrou, @ambv, @serhiy-storchaka, @timofurrer, @corona10, @miss-islington, @killerrex, @mbarkhau
PRs
  • bpo-33660: Fix PosixPath to resolve a relative path on root #7666
  • bpo-33660: Fix corner-case in PosixPath.resolve resulting in "//path" #21971
  • bpo-33660: Fix PosixPath to resolve a relative path on root #21972
  • [3.9] bpo-33660: Fix PosixPath to resolve a relative path on root #21974
  • [3.8] bpo-33660: Fix PosixPath to resolve a relative path on root #21975
  • [3.8] bpo-33660: Fix PosixPath to resolve a relative path on root #23750
  • [3.9] bpo-33660: Fix PosixPath to resolve a relative path on root #23751
  • Files
  • plbug.py: Test script of the pathlib behaviour
  • 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 2020-08-27.00:52:52.993>
    created_at = <Date 2018-05-27.10:58:32.972>
    labels = ['3.8', 'type-bug', 'library', '3.9', '3.10']
    title = 'pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory'
    updated_at = <Date 2020-12-13.00:59:01.487>
    user = 'https://bugs.python.org/QbLearningPython'

    bugs.python.org fields:

    activity = <Date 2020-12-13.00:59:01.487>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-08-27.00:52:52.993>
    closer = 'lukasz.langa'
    components = ['Library (Lib)']
    creation = <Date 2018-05-27.10:58:32.972>
    creator = 'QbLearningPython'
    dependencies = []
    files = ['47630']
    hgrepos = []
    issue_num = 33660
    keywords = ['patch']
    message_count = 10.0
    messages = ['317790', '318452', '319395', '320837', '375968', '375969', '375971', '375973', '375974', '375978']
    nosy_count = 9.0
    nosy_names = ['pitrou', 'lukasz.langa', 'serhiy.storchaka', 'tuxtimo', 'corona10', 'QbLearningPython', 'miss-islington', 'killerrex', 'mbarkhau']
    pr_nums = ['7666', '21971', '21972', '21974', '21975', '23750', '23751']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33660'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10only security fixes3.8 (EOL)end of life3.9 (EOL)end of lifestdlibStandard 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