Skip to content

Improve uses_relative in urllib.parse.urljoin #146301

@alexpdp7

Description

@alexpdp7

Feature or enhancement

Proposal:

I was trying to use urllib.parse.urljoin with Gemini URLs and noticed it doesn't have the proper behavior for Gemini URLs (which are very similar to http/https URLs), because gemini is not in uses_relative.

Gemini has the behavior for uses_relative, uses_netloc, and uses_params.

Probably it is not desired to grow these list with uncommon protocols, but it would be nice to add optional arguments to functions such as urljoin to override behavior for certain protocols.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions