Skip to content

Conversation

@Javed-Shekh777
Copy link

@Javed-Shekh777 Javed-Shekh777 commented Dec 24, 2025

This PR fixes incorrect documentation for PYTHONDONTWRITEBYTECODE.

The documentation previously stated that setting the variable to any
non-empty string disables writing .pyc files. In reality, the value is
parsed as an integer flag: non-zero values disable bytecode generation,
while setting it to 0 does not.

This change updates the documentation to accurately reflect the actual
runtime behavior, keeping it consistent with how the variable is handled
in Python/initconfig.c.

Closes #143134


📚 Documentation preview 📚: https://cpython-previews--143144.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Dec 24, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@StanFromIreland StanFromIreland changed the title Docs: clarify PYTHONDONTWRITEBYTECODE behavior gh-143134: Docs: clarify PYTHONDONTWRITEBYTECODE behavior Dec 24, 2025
@Javed-Shekh777 Javed-Shekh777 changed the title gh-143134: Docs: clarify PYTHONDONTWRITEBYTECODE behavior Docs: clarify PYTHONDONTWRITEBYTECODE behavior (gh-143134) Dec 24, 2025
@StanFromIreland
Copy link
Member

Please revert the title format change.

@Javed-Shekh777 Javed-Shekh777 changed the title Docs: clarify PYTHONDONTWRITEBYTECODE behavior (gh-143134) Docs: clarify PYTHONDONTWRITEBYTECODE behavior Dec 24, 2025
@StanFromIreland StanFromIreland changed the title Docs: clarify PYTHONDONTWRITEBYTECODE behavior gh-143134: Docs: clarify PYTHONDONTWRITEBYTECODE behavior Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

PYTHONDONTWRITEBYTECODE documentation is incorrect

3 participants