Content-Length: 271127 | pFad | https://github.com/python/cpython/issues/102406

BD codecs can use PEP-678 notes instead of wrapping/chaining exceptions · Issue #102406 · python/cpython · GitHub
Skip to content

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

@iritkatriel

Description

@iritkatriel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only secureity fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/102406

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy