Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pathlib.PureWindowsPath doesn't join relative paths correctly when a drive is present #64107

Closed
serhiy-storchaka opened this issue Dec 6, 2013 · 9 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 19908
Nosy @pitrou, @serhiy-storchaka
Files
  • joinwinpath.patch
  • joinwinpath_2.patch
  • joinwinpath_3.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 2013-12-06.15:20:54.320>
    created_at = <Date 2013-12-06.11:50:09.609>
    labels = ['type-bug', 'library']
    title = "pathlib.PureWindowsPath doesn't join relative paths correctly when a drive is present"
    updated_at = <Date 2013-12-06.15:26:17.761>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2013-12-06.15:26:17.761>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-12-06.15:20:54.320>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2013-12-06.11:50:09.609>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['33003', '33006', '33007']
    hgrepos = []
    issue_num = 19908
    keywords = ['patch']
    message_count = 9.0
    messages = ['205364', '205365', '205369', '205374', '205375', '205376', '205377', '205378', '205379']
    nosy_count = 3.0
    nosy_names = ['pitrou', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue19908'
    versions = ['Python 3.4']

    @serhiy-storchaka
    Copy link
    Member Author

    >>> pathlib.PureWindowsPath('C:/a/b').joinpath('D:x/y')
    PureWindowsPath('D:/a/b/D:/x/y')

    See also bpo-19456.

    @serhiy-storchaka serhiy-storchaka added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 6, 2013
    @pitrou
    Copy link
    Member

    pitrou commented Dec 6, 2013

    Here is a patch.

    @serhiy-storchaka
    Copy link
    Member Author

    Here is simplified patch.

    @pitrou
    Copy link
    Member

    pitrou commented Dec 6, 2013

    Thanks! Patch looks ok to me.

    @serhiy-storchaka
    Copy link
    Member Author

    Ah, drives should be compared with ignored cases.

    @pitrou
    Copy link
    Member

    pitrou commented Dec 6, 2013

    Good point :)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 6, 2013

    New changeset 1ba15c3f45fa by Serhiy Storchaka in branch 'default':
    Issue bpo-19908: pathlib now joins relative Windows paths correctly when a drive
    http://hg.python.org/cpython/rev/1ba15c3f45fa

    @serhiy-storchaka
    Copy link
    Member Author

    Thank you Antoine for your patch.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 6, 2013

    New changeset 0c508d87f80b by Serhiy Storchaka in branch 'default':
    Test same drive in different cases (issue bpo-19908).
    http://hg.python.org/cpython/rev/0c508d87f80b

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants