Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THRIFT-5715: Python non-user defined fields mutable with slots #2816

Merged
merged 1 commit into from
Jul 7, 2023

Commits on Jul 7, 2023

  1. THRIFT-5715 Python Exceptions mutable with slots

    In Python 3.11 exceptions generated by the compiler can't be used with a
    context manager because they are immutable. As of Python 3.11
    `contextlib.contextmanager` sets `exc.__traceback__` in the event that
    the code in the context manager errors.
    
    As of Thrift v0.18.1 exceptions are generated as immutable by default.
    See [PR#1835](apache#1835) for more
    information about why exceptions were made immutable by default.
    
    This change makes all non-Thrift fields mutable when slots is used
    without dynamic. This will allow exceptions to be re-raised properly by
    the contextmanager in Python 3.11.
    KTAtkinson committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    d3d8fd7 View commit details
    Browse the repository at this point in the history