Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Mention env var PYTHONUNBUFFERED #12186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

quassy
Copy link

@quassy quassy commented Mar 15, 2025

Summary

I did not find any info about whether uv (run in particular) supports PYTHONUNBUFFERED but it seems to be implemented in env_vars.rs.

(Sadly still no CLI parameter -u exists.)

Test Plan

No testing as is purely a change in the markdown documentation.

I did not find any info about whether uv (run in particular) supports `PYTHONUNBUFFERED` but it seems to be implemented in [env_vars.rs](https://github.com/astral-sh/uv/blob/2f28d60ba3a959101a109d5912f565da08a117ba/crates/uv-static/src/env_vars.rs#L521).

(Sadly still no CLI parameter `-u` exists.)
@charliermarsh
Copy link
Member

Thanks for raising this! I think we tend to avoid documenting environment variables that affect python, but that we don't read or write directly (which includes PYTHONUNBUFFERED). If we add PYTHONUNBUFFERED, then we should probably add every environment variable that impacts the python runtime, which seems sort of untenable.

(We do have PYTHONUNBUFFERED in env_vars.rs, but it's only used when we compile bytecode, where we set it to "1" for a python process that we run within uv. That's why it's not exposed.)

@charliermarsh charliermarsh added the documentation Improvements or additions to documentation label Mar 15, 2025
@charliermarsh charliermarsh self-assigned this Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants