Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2e4086e
Implement build constraints
notatallshaw Aug 9, 2025
1aa1d32
Add build constraints tests
notatallshaw Aug 9, 2025
db4fcf7
Add build constraints to user guide
notatallshaw Aug 9, 2025
d9d5f5d
NEWS ENTRY
notatallshaw Aug 9, 2025
8d170b5
Imply using new behavior when build constraints are provided without …
notatallshaw Aug 9, 2025
9f9032c
Update src/pip/_internal/cli/req_command.py
notatallshaw Aug 14, 2025
a9e81d7
Update src/pip/_internal/build_env.py
notatallshaw Aug 14, 2025
4fbafeb
Merge branch 'main' into add-build-constraints
notatallshaw Aug 14, 2025
8943172
Fix linting
notatallshaw Aug 19, 2025
ef06010
Fix test
notatallshaw Aug 19, 2025
d564457
Consistently use "build constraints" in variables and documentation
notatallshaw Aug 19, 2025
ebd55e7
Simplify deprecation warning
notatallshaw Aug 19, 2025
c41496e
Only emit pip constraint deprecation warning once
notatallshaw Aug 19, 2025
e015f3d
Move `ExtraEnviron` into type checking block
notatallshaw Aug 19, 2025
b333b85
Use standard `assert_installed` in functional tests for build constra…
notatallshaw Aug 20, 2025
bc48f0b
Eagerly assert build constraints files
notatallshaw Aug 20, 2025
fc1bfb5
Add deprecation news item.
notatallshaw Aug 20, 2025
74b08e1
Remove pointless check for `_PIP_IN_BUILD_IGNORE_CONSTRAINTS` in `_de…
notatallshaw Aug 20, 2025
41164aa
Exit `_deprecation_constraint_check` early when build constraints pre…
notatallshaw Aug 20, 2025
e53db93
Remove superfluous `constraints` parameter
notatallshaw Aug 21, 2025
f372c74
Merge branch 'main' into add-build-constraints
notatallshaw Aug 29, 2025
d86d520
Merge branch 'main' into add-build-constraints
notatallshaw Sep 8, 2025
05aeb84
Merge branch 'main' into add-build-constraints
notatallshaw Sep 19, 2025
4c04652
Merge branch 'main' into add-build-constraints
notatallshaw Sep 25, 2025
ab36b15
Merge branch 'main' into add-build-constraints
notatallshaw Oct 5, 2025
d8f372c
Use with to close pip session.
notatallshaw Oct 11, 2025
d0cf197
Remove deprication supression logic
notatallshaw Oct 11, 2025
b091be2
Update tests
notatallshaw Oct 11, 2025
aa5fcd9
Merge branch 'main' into add-build-constraints
notatallshaw Oct 11, 2025
d0bcf5c
fix lint
notatallshaw Oct 11, 2025
11676b0
Merge branch 'main' into add-build-constraints
notatallshaw Oct 14, 2025
035396d
Merge branch 'main' into add-build-constraints
notatallshaw Oct 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use standard assert_installed in functional tests for build constra…
…ints
  • Loading branch information
notatallshaw committed Aug 20, 2025
commit b333b85e2d9bd9d303987f2ed397379713de315b
17 changes: 6 additions & 11 deletions tests/functional/test_build_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ def _run_pip_install_with_build_constraints(
return script.pip(*args, expect_error=expect_error)


def _assert_successful_installation(result: TestPipResult, package_name: str) -> None:
"""Assert that the package was successfully installed."""
assert f"Successfully installed {package_name}" in result.stdout


def _run_pip_install_with_build_constraints_no_feature_flag(
script: PipTestEnvironment,
project_dir: Path,
Expand Down Expand Up @@ -85,8 +80,8 @@ def test_build_constraints_basic_functionality_simple(
result = _run_pip_install_with_build_constraints(
script=script, project_dir=project_dir, build_constraints_file=constraints_file
)
_assert_successful_installation(
result=result, package_name="test_build_constraints"
result.assert_installed(
"test-build-constraints", editable=False, without_files=["."]
)


Expand Down Expand Up @@ -139,7 +134,7 @@ def test_build_constraints_environment_isolation_simple(
build_constraints_file=constraints_file,
extra_args=["--isolated"],
)
_assert_successful_installation(result=result, package_name="test_env_isolation")
result.assert_installed("test-env-isolation", editable=False, without_files=["."])


def test_build_constraints_file_not_found(
Expand All @@ -155,8 +150,8 @@ def test_build_constraints_file_not_found(
project_dir=project_dir,
build_constraints_file=missing_constraints,
)
_assert_successful_installation(
result=result, package_name="test_missing_constraints"
result.assert_installed(
"test-missing-constraints", editable=False, without_files=["."]
)


Expand All @@ -173,4 +168,4 @@ def test_build_constraints_without_feature_flag(
)
# Should succeed now that --build-constraint auto-enables the feature
assert result.returncode == 0
_assert_successful_installation(result=result, package_name="test_no_feature")
result.assert_installed("test-no-feature", editable=False, without_files=["."])