-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Subdirectory vcs installs are never passing the subdirectory in requirementslib which is now required by setuptools #5017
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ce927d3
Bugfix: Not loading .env when quiet
smac89 0fcaacb
Create 5010.bugfix.md
smac89 0788b01
Refactor test into a version that also check quiet mode, move to corr…
matteius 3d23755
Revert "Safely pin setuptools to fix failing test."
matteius ec69972
Revert "Attempt to pin setuptools to fix failing test."
matteius 2669b4c
patch newly occuring test failure where the base_dir does not contain…
matteius 39acdff
restrict to the one failing test for now.
matteius a53a035
Revert "restrict to the one failing test for now."
matteius 2140a00
Add requirementslib patch file.
matteius bdfce04
Add news fragment for CI broke issue
matteius 40aa960
Merge pull request #5018 from pypa/5011-more-tests3-final
matteius File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Environment variables were not being loaded when the `--quiet` flag was set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Adds missing unit test coverage for recent bug fixes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
It would appear that ``requirementslib`` was not fully specifying the subdirectory to ``build_pep517`` and | ||
and when a new version of ``setuptools`` was released, the test ``test_lock_nested_vcs_direct_url`` | ||
broke indicating the Pipfile.lock no longer contained the extra dependencies that should have been resolved. | ||
This regression affected ``pipenv>=2021.11.9`` but has been fixed by a patch to ``requirementslib``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
tasks/vendoring/patches/vendor/requirementslib-subdir-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/pipenv/vendor/requirementslib/models/setup_info.py b/pipenv/vendor/requirementslib/models/setup_info.py | ||
index 772a4d81..dc001f36 100644 | ||
--- a/pipenv/vendor/requirementslib/models/setup_info.py | ||
+++ b/pipenv/vendor/requirementslib/models/setup_info.py | ||
@@ -13,7 +13,7 @@ import sys | ||
from collections.abc import Iterable, Mapping | ||
from functools import lru_cache, partial | ||
from pathlib import Path | ||
-from urllib.parse import urlparse, urlunparse | ||
+from urllib.parse import parse_qs, urlparse, urlunparse | ||
from weakref import finalize | ||
|
||
import pipenv.vendor.attr as attr | ||
@@ -1230,8 +1230,15 @@ build-backend = "{1}" | ||
) | ||
) | ||
need_delete = True | ||
+ | ||
+ parsed = urlparse(str(self.ireq.link)) | ||
+ subdir = parse_qs(parsed.fragment).get('subdirectory', []) | ||
+ if subdir: | ||
+ directory = f"{self.base_dir}/{subdir[0]}" | ||
+ else: | ||
+ directory = self.base_dir | ||
result = build_pep517( | ||
- self.base_dir, | ||
+ directory, | ||
self.extra_kwargs["build_dir"], | ||
config_settings=self.pep517_config, | ||
dist_type="wheel", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote this test recently but technically put it in the wrong file -- relocated it in this PR and extended it's use case.