Skip to content

URLLib Join Behaviour #131814

@OfficiallySomeGuy

Description

@OfficiallySomeGuy

Bug report

Bug description:

This bug proposes that

urllib.parse.urljoin('https://example.com/thing', 'v1')

should resolve to https://example.com/thing/v1 rather than the current behaviour which resolves to https://example.com/v1 without warning. I believe the relevant code is here. This would also resolve some of the concerns in #96015.

CPython versions tested on:

3.11

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard 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