Skip to content

Silence bytecode compile failures during install - #347

Open
itscloud0 wants to merge 1 commit into
pypa:mainfrom
itscloud0:fix-311-silent-bytecode-failures
Open

Silence bytecode compile failures during install#347
itscloud0 wants to merge 1 commit into
pypa:mainfrom
itscloud0:fix-311-silent-bytecode-failures

Conversation

@itscloud0

Copy link
Copy Markdown

Summary

  • silence bytecode compilation failures by using compileall's fully quiet mode
  • keep installer behavior aligned with pip by still ignoring compile failures instead of aborting installation
  • add a regression test that locks in silent handling for failed bytecode compilation

Closes #311

Problem

installer currently ignores bytecode compilation failures, but it still emits *** Error compiling ... messages to stderr. That is noisy for wheels that intentionally contain Python files targeting newer syntax, and it does not match pip's behavior noted in the issue discussion.

Testing

  • uv run --python 3.10 --with pytest pytest tests/test_main.py -q
  • uv run --python 3.10 --with pytest --with pytest-cov --with pytest-xdist pytest -q
  • uv run --python 3.10 --with ruff ruff check src/installer/destinations.py tests/test_main.py
  • uv run --python 3.10 --with ruff ruff format --check src/installer/destinations.py tests/test_main.py

Notes

  • I did not change install success/failure semantics; this only removes the noisy stderr output while preserving the existing ignore-and-continue behavior discussed on the issue.
@itscloud0
itscloud0 marked this pull request as ready for review June 29, 2026 05:06
yangfan-yf-yf

This comment was marked as spam.

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

Labels

None yet

2 participants