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

Fix support for url sourced packages in pip installer #1306

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

abn
Copy link
Member

@abn abn commented Aug 18, 2019

This change fixes the installation of packages using a url source.
Previously, the installer attempted to install the package using the
name ignoring the source url.

Closes: #1297

Pull Request Check List

  • Added tests for changed code.

This change fixes the installation of packages using a url source.
Previously, the installer attempted to install the package using the
name ignoring the source url.
@brycedrennan brycedrennan added the kind/bug Something isn't working as expected label Aug 18, 2019
@brycedrennan
Copy link
Contributor

You're on a roll with these fixes! thanks!

@brycedrennan
Copy link
Contributor

brycedrennan commented Aug 19, 2019

I'm trying to figure out how this interacts with

...especially if there are security implications. I'll need time to get up to speed. Any insights you have welcome.

Maybe a dumb question but would this feature allow replacement of arbitrary packages? For example if I pip install some-tool can some-tool have as a dependency:

[tool.poetry.dependencies]
requests = {url = "https://example.com/packages/malicious-requests-1.0.0.tar.gz"}

@abn
Copy link
Member Author

abn commented Aug 20, 2019

@brycedrennan my 2 cents here is that using a url to install a dependency, while not the best of solutions, has valid scenarios (#1297 being an example). This should be allowed at a project maintainer's discretion - hopefully with an understanding of the side-effects. Short answer to your question regarding arbitrary packages is, yes.

The changes in this PR are aimed at only fixing the current expected behavior that was introduced in #1260 .

I do think that we should keep track of the pypa community discussions around dependency links as we are relying on pip under the hood for installation. Additionally, I'd consider the security discussion to be of broader scope and warranting a separate issue discussing any actions, even if it is adding further documentation, that needs to be taken. With web url's, we could probably rely on content hash to detect changes but that would most likely be the extent of low-effort technical solutions.

@brycedrennan
Copy link
Contributor

well said. I agree that this is part of a broader discussion. I'll take a look at this.

@sdispater sdispater merged commit c5e54ad into python-poetry:develop Sep 3, 2019
@sdispater
Copy link
Member

Thanks!

@abn abn deleted the issue/1297 branch September 23, 2019 09:07
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants