Skip to content

Skip non-regular files and dash in _determine_linesep - #2503

Closed
yagruda wants to merge 1 commit into
pypa:mainfrom
yagruda:fix-determine-linesep-fifo
Closed

yagruda wants to merge 1 commit into
pypa:mainfrom
yagruda:fix-determine-linesep-fifo

Conversation

@yagruda

@yagruda yagruda commented Oct 23, 2026

Copy link
Copy Markdown

When --newline=preserve runs after resolving dependencies, _determine_linesep iterates over (output_file.name, *src_files) and opens each file in binary mode to detect whether \r\n or \n is present.

If the input is a named pipe/FIFO (or output is stdout -), this re-opens the pipe for reading. Since the pipe was already drained while reading requirements during resolution, opening it again blocks indefinitely waiting for another writer (issue #2232). It also means a literal file named - in cwd would accidentally get read as standard output.

We skip fname == "-" and any path where not os.path.isfile(fname) so FIFOs, character devices, and standard streams aren't re-opened. Also broadened the FileNotFoundError catch to OSError so permission issues or broken descriptors don't crash linesep detection.

Fixes #2232.

Contributor checklist
  • Included tests for the changes.
  • A change note is created in changelog.d/ (see changelog.d/README.md
    for instructions) or the PR text says "no changelog needed".
Maintainer checklist
  • If no changelog is needed, apply the bot:chronographer:skip label.
  • Assign the PR to an existing or new milestone for the target version
    (following Semantic Versioning).

@yagruda
yagruda requested a review from a team as a code owner October 23, 2026 19:07
@agentscanapp

agentscanapp Bot commented Oct 23, 2026

Copy link
Copy Markdown

Automation signals

Activity patterns show signs of automation.

View full analysis →

Report this account →

Evidence
  • Fork spike detected: Burst of 8 fork events in a single 24-hour window

This is an automated analysis by AgentScan

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided A mark meaning that a new change log entry is present within the patch. label Oct 23, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 pip-tools | 🛠️ Build #35363180 | 📁 Comparing a04c01e against latest (b03df32)

  🔍 Preview build  

1 file changed
± changelog/index.html

@sirosen

sirosen commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

We have repeatedly rejected near-identical patches. Please read the issue discussion. I'm closing this on the grounds that it appears to be fully automated activity, and as such a violation of our project policy.

There is an appropriate fix; this is not it and this type of PR is actively harmful.

@sirosen sirosen closed this Oct 26, 2026
@sirosen sirosen added the ai-slop Fact-check this https://pip-tools.readthedocs.io/en/latest/contributing/#llm-generated-contributions label Oct 26, 2026
@webknjaz

Copy link
Copy Markdown
Member

Again? That issue starts being a true indicator for slop..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentscan:automation-signals ai-slop Fact-check this https://pip-tools.readthedocs.io/en/latest/contributing/#llm-generated-contributions bot:chronographer:provided A mark meaning that a new change log entry is present within the patch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[regression][6.10.0] pip-compile hangs on named pipes as input due to double-read

3 participants