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 — Allow the repl to show source code and complete tracebacks · Issue #110805 · python/cpython

Allow the repl to show source code and complete tracebacks #110805

New issue
Copy link
New issue
Copy link
Closed
Closed
Allow the repl to show source code and complete tracebacks#110805
Copy link
Labels
3.13only security fixesonly security fixestype-featureA feature request or enhancementA feature request or enhancement

Description

@pablogsal
pablogsal
opened on Oct 13, 2023
Issue body actions

Currently the REPL doesn't show traceback source or augmented information for the source that is typed in the repl itself:

>>> def f(x):
...    1/x
...
>>> f(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in f
ZeroDivisionError: division by zero

To improve user experience, we want the REPL to be able to treat source lines thar were typed directly as any other kind and show proper tracebacks:

>>> def f(x):
...    1/x
...
>>> f(0)
Traceback (most recent call last):
  REPL, line 1, in <module>
    f(0)
  REPL, line 2, in f
    1/x
    ~^~
ZeroDivisionError: division by zero

Linked PRs

  • gh-110805: Allow the repl to show source code and complete tracebacks #110775
  • gh-110805: Fix test_peg_generator after the change in the parser for REPL tracebacks #110814
Reacted by Kazani and Juan Luis Cano Rodríguez

Activity

  1. pablogsal
    added 2 commits that reference this issue on Oct 13, 2023

    gh-110805: Allow the repl to show source code and complete tracebacks (…

    e1d8c65

    gh-110805: Fix test_peg_generator after the change in the parser for …

    8316769
  2. sunmy2019
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Oct 13, 2023
  3. sunmy2019
    closed this as completedon Oct 13, 2023
  4. merwok
    added
    3.13only security fixesonly security fixes
    on Oct 24, 2023
  5. aisk
    added 2 commits that reference this issue on Feb 11, 2024

    pythongh-110805: Allow the repl to show source code and complete trac…

    9a45bf7

    pythongh-110805: Fix test_peg_generator after the change in the parse…

    d6c9863
  6. Glyphack
    added 2 commits that reference this issue on Sep 2, 2024

    pythongh-110805: Allow the repl to show source code and complete trac…

    e59540e

    pythongh-110805: Fix test_peg_generator after the change in the parse…

    5775460
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 fixestype-featureA feature request or enhancementA feature request or enhancement

    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.