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

Add PEP 610 support #3876

Merged
merged 2 commits into from
Apr 6, 2021
Merged

Add PEP 610 support #3876

merged 2 commits into from
Apr 6, 2021

Conversation

sdispater
Copy link
Member

This PR adds support for PEP-610 which introduced a standard way of recording the origin of direct URL packages (i.e. file, directory, url and VCS packages).

Two things needed to be done for Poetry to be fully compliant:

  • Write the direct_url.json file to record the origin of the package
  • Read the direct_url.json file in InstalledRepository.load() to retrieve the origin of the information. This also avoids some of the heuristics we are currently doing to guess the origin of the installed packages.

One thing of note is that existing environments will see updates for all their "standard" packages due to the fact that pip already supports PEP-610 and since we are installing wheels from our own cache, pip consider them as file packages. That's also why we need to remove the direct_url.json file generated by pip when installing packages. This will be a one-time thing to set the current environments right. New environments will not be affected.

Pull Request Check List

Resolves: #2452

  • Added tests for changed code.
  • Updated documentation for changed code.

@sdispater sdispater added area/installer Related to the dependency installer kind/feature Feature requests/implementations area/peps Related to PEP support/compliance labels Apr 2, 2021
@sdispater sdispater added this to the 1.2 milestone Apr 2, 2021
@sdispater sdispater requested a review from a team April 2, 2021 14:31
Copy link
Member

@abn abn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor feedback.

@sdispater sdispater force-pushed the pep-610 branch 2 times, most recently from 0d203b5 to 897a1ad Compare April 4, 2021 12:21
@sdispater
Copy link
Member Author

@abn Most of your requested changes have been addressed.

tests/installation/test_executor.py Outdated Show resolved Hide resolved
@abn abn merged commit 3d74ddf into master Apr 6, 2021
@abn abn deleted the pep-610 branch April 6, 2021 17:10
@sdispater sdispater mentioned this pull request Apr 23, 2021
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
area/installer Related to the dependency installer area/peps Related to PEP support/compliance kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement PEP-610
2 participants