GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Preserve pip patch markers and hash checks by mikolalysenko · Pull Request #237 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Sep 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

LLM Description written by Codex:gpt-6-astra

Pip ignores an environment marker placed after a per-requirement --hash option. Vendored requirements now put the marker before the hash, so python_version < "2" skips the wheel on Python 3 and a matching marker installs it.

Hosted requirements now remove inline comments before preserving the marker. Previously, django==3.2.3 ; python_version >= "2" # explanation became a URL whose generated --hash was inside the comment, disabling the intended hash check. Reruns remain stable.

Validation:

  • 34 existing PyPI requirements wiring and revert tests pass.
  • Both hosted marker rewrite tests pass, including the inline-comment regression and rerun check.
  • A new integration test runs the actual CLI and real pip with true/false markers, checks patched six bytes, and verifies byte-for-byte revert.
  • Live hosted CLI output installs Django 3.2.3 with pip 26.2.1 and --require-hashes after the comment fix.

These bugs were found while backtesting hosted and vendored pip annotations in https://github.com/SocketDev/depscan/pull/26138. The completed matrix checks all 16 published pip majors; supported installs verify the patched Django file hashes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mikolalysenko
Preserve pip patch markers and hash checks
4fbb375
Keep environment markers ahead of hash options in vendored
requirements. Strip hosted inline comments before appending hashes
so pip enforces them. Cover marker evaluation with real installs.

Assisted-by: Codex:gpt-6-astra
@mikolalysenko
Mikola Lysenko (mikolalysenko) force-pushed the codex/pip-vendor-marker branch from 132a2b3 to 4fbb375 Compare September 14, 2026 18:10
Tanmay182003
Tanmay Singla (Tanmay182003) approved these changes Sep 14, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) merged commit 90e1230 into main Sep 15, 2026
68 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the codex/pip-vendor-marker branch September 15, 2026 14:01
Mikola Lysenko (mikolalysenko) added a commit that referenced this pull request Sep 15, 2026
@mikolalysenko @claude
Merge origin/main into codex/uv-patch-compatibility
386505c
Resolve the conflict in patch/redirect/mod.rs: main (#237) patched the
inline requirements.txt rewriter to strip trailing inline comments so
the appended --hash is not swallowed into the comment; this branch had
already replaced that body with redirect::requirements::rewrite, which
splits the comment off outside quotes and re-appends it after the hash.
Keep the delegation and update #237's test to expect the preserved
comment (hash still active, user note kept).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Sep 30, 2026
Hosted and vendored requirements.txt rewrites add a --hash to one line, which turns on pip's hash-checking mode and breaks pip install -r for every other unhashed line #376
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Tanmay182003 Tanmay Singla (Tanmay182003) Tanmay182003 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mikolalysenko @Tanmay182003
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.