← Back to Pull requests

Fix remote build constraints to use network options #14403

Merged
notatallshaw merged 8 files (127 lines) on Oct 30, 2026 19:17 UTC
View on GitHub
notatallshaw notatallshaw commented on Oct 26, 2026 04:45 UTC
Author

<!---
Thank you for your pull request! Before submitting, please make sure you've:

  • Read the CONTRIBUTING.md file carefully

  • Added a news file fragment (see https://pip.pypa.io/en/latest/development/contributing/#news-entries)

  • -->

    What does this PR do?

    Fix remote build constraints to use network options instead of bare HTTP session.

    PR Checklist:


    <!--- Go over all the following points, and put an x in all the boxes that apply. -->
  • I agree to follow the PSF Code of Conduct.

  • I have read and have followed the CONTRIBUTING.md file.

  • I have added a news file fragment (or this PR does not need one).

  • I have read and followed the AI_POLICY.md file, and if any AI tools were used, I have disclosed it below.

  • <!-- If checked and you have used AI tools, add a line below: Assisted-by: <tool name, e.g. Claude> -->

    Diff: 127 lines (+99 / -28) across 8 files Reviewer: ichard26 Review duration: 6631m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.47) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 127 lines diff across 8 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 3 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    89%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.290
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    5 items
    notatallshaw notatallshaw commented on Oct 26, 2026 14:33 UTC
    Author

    I am going to land this one before 26.3 unless there is any objection.

    ichard26 ichard26 commented on code on Oct 26, 2026 20:17 UTC
    Code Review
    src/pip/_internal/cli/req_command.py:1
    @@ -146,6 +146,20 @@ def __init__(self, *args: Any, **kw: Any) -> None:
             self.cmd_opts.add_option(cmdoptions.dependency_groups())
             self.cmd_opts.add_option(cmdoptions.no_clean())
     
    +    def _check_build_constraints(self, options: Values) -> None:

    Shouldn't this be a public name since the child commands are using this?

    ichard26 ichard26 commented on code on Oct 26, 2026 20:18 UTC
    Code Review
    news/14403.bugfix.rst:1
    @@ -0,0 +1 @@
    +Use the configured network session when checking remote build constraint files.

    Respect configured network settings while checking build constraint files.
    

    ichard26 ichard26 approved these changes on Oct 26, 2026 20:18 UTC
    Approved Reviewer

    I thought I fixed this at some point, but that's in a draft branch somewhere or I just never did. Also, this looks like it can be cached, but that's a separate problem.

    Reviewers
    Assignees
    notatallshaw notatallshaw
    Labels
    risk: low confidence: 89.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.3% (MEDIUM) · Higher = larger blast radius
    47.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 89.1% · Lower = rushed or shallow review
    89.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.1% · Safe to merge
    5.1%
    Repository