Skip to content

PYTHON_BASIC_REPL env var not fully documented #126172

Closed

Description

@teuncm

Documentation

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.

Linked PRs

Activity

  1. added
    docs
    on Oct 30, 2024
  2. added
    topic-repl
    on Oct 30, 2024
  3. added
    3.13
    on Oct 30, 2024
  4. mkashirin commented on Nov 22, 2024

    @mkashirin
    Contributor

    I would like to work on this one.

  5. added
    3.14
    on Nov 22, 2024
  6. gpshead commented on Nov 24, 2024

    @gpshead
    Member

    @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.

  7. whydoubt commented on Jan 12, 2025

    @whydoubt

    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'.

  8. added a commit that references this issue on Jan 21, 2025
  9. added a commit that references this issue on Jan 21, 2025
  10. pablogsal commented on Jan 21, 2025

    @pablogsal
    Member

    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

  11. added a commit that references this issue on Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.133.14docstopic-repl

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions