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 — codecs can use PEP-678 notes instead of wrapping/chaining exceptions · Issue #102406 · python/cpython

codecs can use PEP-678 notes instead of wrapping/chaining exceptions #102406

New issue
Copy link
New issue
Copy link
Closed
#102407
Closed
codecs can use PEP-678 notes instead of wrapping/chaining exceptions#102406
#102407
Copy link
Labels
3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)

Description

@iritkatriel
iritkatriel
opened on Mar 3, 2023
Issue body actions

In codecs.c there is a call to _PyErr_TrySetFromCause (a function that is only called from here), which tries to create a new exception of the same type with a different message, but bails out if there are any complications that make this unsafe. The purpose is to add information about the context of the operation that failed, without changing the type of the exception. This can be solved more easily and robustly with PEP-678 exception notes.

Linked PRs

  • gh-102406: replace exception chaining by PEP-678 notes in codecs #102407

Activity

  1. iritkatriel
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    3.12only security fixesonly security fixes
    on Mar 3, 2023
  2. iritkatriel
    added a commit that references this issue on Mar 3, 2023

    pythongh-102406: replace exception wrapping by PEP-678 notes

    2d9ab21
  3. iritkatriel
    changed the title [-]codecs can use PEP-678 notes instead of wrapping exceptions[/-] [+]codecs can use PEP-678 notes instead of wrapping/chaining exceptions[/+] on Mar 3, 2023
  4. iritkatriel
    closed this as completedin #102407on Mar 21, 2023
  5. iritkatriel
    added a commit that references this issue on Mar 21, 2023

    gh-102406: replace exception chaining by PEP-678 notes in codecs (#10…

    76350e8
  6. Fidget-Spinner
    added a commit that references this issue on Mar 27, 2023

    pythongh-102406: replace exception chaining by PEP-678 notes in codecs (

    43f13b9
  7. warsaw
    added a commit that references this issue on Apr 11, 2023

    pythongh-102406: replace exception chaining by PEP-678 notes in codecs (

    872ba04
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.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)

    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.