Skip to content

os.path.join() used with URLs in Updater #1077

@jku

Description

@jku

mirrors.py does this:

base = os.path.join(mirror_info['url_prefix'], mirror_info['metadata_path'])

This seems like an incorrect use of os.path.join(). I'm not sure what it does on Windows but there's probably room for bugs here. urllib.parse.join() is probably the safe choice (although it has some annoying corner cases that makes it different from os.path.join()) ?

There is a related issue here: I'm trying to figure out how to handle the case where metadata and targets are hosted on different hosts and the use of os.path.join() affects it. The discussion is in https://python.zulipchat.com/#narrow/stream/223926-pep458-implementation/topic/separate.20hosting.20for.20metadata.20and.20targets . Fixing this probably makes sense after we know the resolution of that discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientRelated to the client (updater) implementationmicrosoft-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions