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 — Improve `raise from ValueError()` error message · Issue #134036 · python/cpython

Improve raise from ValueError() error message #134036

New issue
Copy link
New issue
Copy link
Closed
Closed
Improve raise from ValueError() error message#134036
Copy link
Assignees
sobolevn
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-featureA feature request or enhancementA feature request or enhancement

Description

@sobolevn
sobolevn
opened on May 15, 2025
Issue body actions

Feature or enhancement

#133999 gave me an idea. Right now it is:

Image

I suggest making it something similar to:

>>> raise from ValueError
  File "<python-input-1>", line 1
    raise from ValueError
          ^^^^
SyntaxError: invalid syntax, maybe you forgot an exception after `raise` keyword?

Wording is not the best at the moment, but we will figure it out :)

Linked PRs

  • gh-134036: Improve error messages for invalid raise statements #134077
  • gh-134036: Update test_syntax #135204
Reacted by Semyon Moroz, Sergey Miryanov, Kanishk Pachauri and Mikhail Efimov

Activity

  1. sobolevn
    self-assigned this
    on May 15, 2025
  2. sobolevn
    added
    type-featureA feature request or enhancementA feature request or enhancement
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    topic-parser
    3.15bugs and security fixesbugs and security fixes
    on May 15, 2025
  3. picnixz
    removed
    3.15bugs and security fixesbugs and security fixes
    on May 15, 2025
  4. sobolevn
    added a commit that references this issue on May 16, 2025

    pythongh-134036: Improve error messages for invalid `raise` statements

    d8c385a
  5. pablogsal
    added a commit that references this issue on Jun 6, 2025

    gh-134036: Improve error messages for invalid `raise` statements (#13…

    0d9ccc8
  6. vstinner
    added a commit that references this issue on Jun 6, 2025

    pythongh-134036: Update test_syntax

    db0ef98
  7. Yhg1s
    added a commit that references this issue on Jun 6, 2025

    gh-134036: Update test_syntax for gh-133999 (#135204)

    82415ac
  8. ZeroIntensity commented on Jun 11, 2025

    @ZeroIntensity
    ZeroIntensity
    on Jun 11, 2025
    Member
    More actions

    Triage: everything done here?

  9. sobolevn
    closed this as completedon Jun 11, 2025
  10. sobolevn
    added a commit that references this issue on Jun 12, 2025

    pythongh-135422: Fix regression in `SyntaxError` messages after pytho…

    0d94e64
  11. sobolevn
    added a commit that references this issue on Jun 30, 2025

    gh-135422: Fix regression in `SyntaxError` messages after #134036 (#1…

    7e33558
  12. AndPuQing
    added a commit that references this issue on Jul 11, 2025

    pythongh-135422: Fix regression in `SyntaxError` messages after pytho…

    88c9480
  13. Pranjal095
    added 3 commits that reference this issue on Jul 12, 2025

    pythongh-134036: Improve error messages for invalid `raise` statements (

    9aa467f

    pythongh-134036: Update test_syntax for pythongh-133999 (python#135204)

    f5396de

    pythongh-135422: Fix regression in `SyntaxError` messages after pytho…

    27a5841
  14. picnixz
    added a commit that references this issue on Jul 13, 2025

    pythongh-135422: Fix regression in `SyntaxError` messages after pytho…

    24a2572
  15. taegyunkim
    added 3 commits that reference this issue on Aug 4, 2025

    pythongh-134036: Improve error messages for invalid `raise` statements (

    c98fc9c

    pythongh-134036: Update test_syntax for pythongh-133999 (python#135204)

    1775d5d

    pythongh-135422: Fix regression in `SyntaxError` messages after pytho…

    94599d6
  16. Agent-Hellboy
    added 3 commits that reference this issue on Aug 19, 2025

    pythongh-134036: Improve error messages for invalid `raise` statements (

    58453c1

    pythongh-134036: Update test_syntax for pythongh-133999 (python#135204)

    1b4dac9

    pythongh-135422: Fix regression in `SyntaxError` messages after pytho…

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

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-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.