You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PYTHON_BASIC_REPL env var not fully documented #126172
In Python 3.13, a new REPL was introduced. There now also exists a way to switch back and forth between the two using PYTHON_BASIC_REPL. In the documentation entry for PYTHON_BASIC_REPL, the following is stated:
If this variable is set to 1, the interpreter will not attempt to load the Python-based REPL (...)
Indeed, the traditional REPL is used when setting PYTHON_BASIC_REPL=1. However, setting PYTHON_BASIC_REPL to any non-empty value (e.g. 0, False, 2 or "test") will currently also use the traditional REPL (this behavior might not be intended btw), but this is currently not documented.
@ambv - should we change the docs on this (as the exiting PR does) or change the behavior to make it look at the contents of the value? what do our other env vars do? are we consistent about how we handle this? it's awkward for PYTHON_BASIC_REPL=1 and PYTHON_BASIC_REPL=0 to do the same thing.
Until recently, most such env variables were documented as "If this environment variable is set to a non-empty string...".
More recently (3.12+ AFAICT) though, there have been a few that explicitly look for '0' or '1'.
I have merged the doc change as this reflects what's currently on 3.13 and is consistent on how we treat other env vars. We can open a new issue if we want to change the behavior
Activity
mkashirin commentedon Nov 22, 2024
I would like to work on this one.
gpshead commentedon Nov 24, 2024
@ambv - should we change the docs on this (as the exiting PR does) or change the behavior to make it look at the contents of the value? what do our other env vars do? are we consistent about how we handle this? it's awkward for PYTHON_BASIC_REPL=1 and PYTHON_BASIC_REPL=0 to do the same thing.
whydoubt commentedon Jan 12, 2025
Until recently, most such env variables were documented as "If this environment variable is set to a non-empty string...".
More recently (3.12+ AFAICT) though, there have been a few that explicitly look for '0' or '1'.
gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL documentat…
pythongh-126172: Fix a misleading statement in PYTHON_BASIC_REPL docu…
pablogsal commentedon Jan 21, 2025
I have merged the doc change as this reflects what's currently on 3.13 and is consistent on how we treat other env vars. We can open a new issue if we want to change the behavior
[3.13] gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL doc…