Skip to content

Replace Failure._findFailure dependency on bytecode with some mechanism that doesn't rely on bytecode #12288

@itamarst

Description

@itamarst

The problem:

  • As seen in Fix inlineCallbacks tests on Python 3.13 #12061, changes to generated bytecode can break Failure's special inlineCallbacks related code(and quite possibly async functions too).
  • In a world where a CPython JIT is a possibility, it's not clear if any of this will work at all in the future.

It would be better to have a mechanism for finding the current failure that is less tied to obscure implementation details of Python. Perhaps contextvars might do the trick?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions