-
-
Notifications
You must be signed in to change notification settings - Fork 608
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 build deps compilation for setuptools < 70.1.0
#2106
base: main
Are you sure you want to change the base?
Conversation
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.
This is not a correct fix. It just shoves the problem under the carpet. We need to address the underlying problem, which is revealed not due to pip
but because setuptools
changed. Yet, the bug is in pip-tools: #2104 (comment). The correct change in the test is to include something like -P 'setuptools < 70.1.0'
. But that should be accompanied with a fix for the bug.
Alternatively, it's even better to emulate such a situation with artificial package stubs so that it doesn't need to hit the network. |
pip
24.0setuptools < 70.1.0
e89a2f4
to
66b6382
Compare
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
@webknjaz I reworked the PR; please have a look. Of course there are still the failing Windows tests, can we just drop that horrible Microsoft product ;-)? |
Slightly changing the order of assertions should help see more details into the errors: diff --git a/tests/test_cli_compile.py b/tests/test_cli_compile.py
index c5031fc..8db0038 100644
--- a/tests/test_cli_compile.py
+++ b/tests/test_cli_compile.py
@@ -787,13 +787,13 @@ def test_direct_reference_with_extras(runner):
"pip-tools[testing,coverage] @ git+https://github.com/jazzband/[email protected]"
)
out = runner.invoke(cli, ["-n", "--rebuild", "--no-build-isolation"])
- assert out.exit_code == 0
assert (
"pip-tools[coverage,testing] @ git+https://github.com/jazzband/[email protected]"
in out.stderr
)
assert "pytest==" in out.stderr
assert "pytest-cov==" in out.stderr
+ assert out.exit_code == 0
def test_input_file_without_extension(pip_conf, runner): Generally, I prefer to compare |
That won't be necessary if you'll follow the principle of a single assertion per test. Then pytest will print out everything. But personally, I have |
See #1681 (comment) for context.
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.