GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — New REPL exposes its internal imports/definitions to top-level environment · Issue #118908 · python/cpython

New REPL exposes its internal imports/definitions to top-level environment #118908

New issue
Copy link
New issue
Copy link
Open
Open
New REPL exposes its internal imports/definitions to top-level environment#118908
Copy link
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@chgnrdv
chgnrdv
opened on May 10, 2024
Issue body actions

Bug report

Bug description:

Top-level scope now contains globals of _pyrepl.__main__:

Python 3.14.0a0 (heads/main:a895756aec, May 10 2024, 16:56:55) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> dir()
['CAN_USE_PYREPL', '__annotations__', '__builtins__', '__cached__', '__doc__', '__file__',
'__loader__', '__name__', '__package__', '__spec__', 'interactive_console', 'os', 'sys']

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

  • gh-118908: Limit exposed globals from internal imports and definitions on new REPL startup #119547
  • [3.13] gh-118908: Limit exposed globals from internal imports and definitions on new REPL startup (GH-119547) #120362
  • gh-118908: Fix completions after namespace change in REPL #120370
  • [3.13] gh-118908: Fix completions after namespace change in REPL (GH-120370) #120392
  • gh-118908: Protect the REPL subprocess with a timeout in tests #120408
  • [3.13] gh-118908: Protect the REPL subprocess with a timeout in tests (GH-120408) #120430
  • gh-118908: Use __main__ for the default PyREPL namespace #121054
  • [3.13] gh-118908: Use __main__ for the default PyREPL namespace (GH-121054) #121059

Activity

Next
  1. chgnrdv
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 10, 2024
  2. hugovk
    added
    topic-replRelated to the interactive shellRelated to the interactive shell
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    on May 10, 2024
  3. pablogsal
    added a commit that references this issue on Jun 11, 2024

    gh-118908: Limit exposed globals from internal imports and definition…

    86a8a1c
  4. miss-islington
    added a commit that references this issue on Jun 11, 2024

    pythongh-118908: Limit exposed globals from internal imports and defi…

    7039225
  5. pablogsal
    added a commit that references this issue on Jun 11, 2024

    [3.13] gh-118908: Limit exposed globals from internal imports and def…

    f5289c4
  6. lysnikolaou
    closed this as completedon Jun 11, 2024
  7. lysnikolaou
    added a commit that references this issue on Jun 11, 2024

    pythongh-118908: Fix completions after namespace change in REPL

    be15c89
  8. encukou commented on Jun 12, 2024

    @encukou
    encukou
    on Jun 12, 2024
    Member
    More actions

    It seems that this change broke a buildbot, see: https://buildbot.python.org/all/#/builders/249/builds/8895/steps/5/logs/stdio

  9. encukou
    reopened this on Jun 12, 2024
  10. lysnikolaou
    added a commit that references this issue on Jun 12, 2024

    gh-118908: Fix completions after namespace change in REPL (#120370)

    02e74c3
  11. miss-islington
    added a commit that references this issue on Jun 12, 2024

    pythongh-118908: Fix completions after namespace change in REPL (pyth…

    f7e572c
  12. lysnikolaou
    added a commit that references this issue on Jun 12, 2024

    [3.13] gh-118908: Fix completions after namespace change in REPL (GH-…

    10821cc
  13. pablogsal commented on Jun 12, 2024

    @pablogsal
    pablogsal
    on Jun 12, 2024
    Member
    More actions

    It seems that this change broke a buildbot, see: https://buildbot.python.org/all/#/builders/249/builds/8895/steps/5/logs/stdio

    It looks like a timeout.... I will try to investigate today

  14. 6 remaining items

  15. ambv
    reopened this on Jun 26, 2024
  16. ambv commented on Jun 26, 2024

    @ambv
    ambv
    on Jun 26, 2024
    Contributor
    More actions

    The fix is invalid. It makes it impossible to auto-import stuff with PYTHONSTARTUP.

  17. ambv
    added 3 commits that reference this issue on Jun 26, 2024

    pythongh-118908: Use __main__ for the default PyREPL namespace

    edd1f3c

    pythongh-118908: Use __main__ for the default PyREPL namespace

    3f82ebc

    gh-118908: Use __main__ for the default PyREPL namespace (#121054)

    d611c4c
  18. miss-islington
    added a commit that references this issue on Jun 26, 2024

    pythongh-118908: Use __main__ for the default PyREPL namespace (pytho…

    34c417c
  19. ambv
    added a commit that references this issue on Jun 26, 2024

    [3.13] gh-118908: Use __main__ for the default PyREPL namespace (GH-1…

    38cfa92
  20. mrahtz
    added 4 commits that reference this issue on Jun 30, 2024

    pythongh-118908: Limit exposed globals from internal imports and defi…

    f78e612

    pythongh-118908: Fix completions after namespace change in REPL (pyth…

    f721d1d

    pythongh-118908: Protect the REPL subprocess with a timeout in tests (p…

    a7dc70b

    pythongh-118908: Use __main__ for the default PyREPL namespace (pytho…

    0256ec0
  21. estyxx
    added 4 commits that reference this issue on Jul 17, 2024

    pythongh-118908: Limit exposed globals from internal imports and defi…

    1f09cb7

    pythongh-118908: Fix completions after namespace change in REPL (pyth…

    4b5ad7e

    pythongh-118908: Protect the REPL subprocess with a timeout in tests (p…

    06e9e62

    pythongh-118908: Use __main__ for the default PyREPL namespace (pytho…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.