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

add BaseExceptionGroup.__init__, following CPython #142

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cfbolz
Copy link
Contributor

@cfbolz cfbolz commented Feb 26, 2025

This was reported to PyPy as an incompatibility in this issue: pypy/pypy#5218

CPython's BaseExceptionGroup.init looks like this:

static int
BaseExceptionGroup_init(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!_PyArg_NoKeywords(Py_TYPE(self)->tp_name, kwds)) {
        return -1;
    }
    if (BaseException_init(self, args, kwds) == -1) {
        return -1;
    }
    return 0;
}

cfbolz and others added 3 commits February 26, 2025 13:58
This was reported to PyPy as an incompatibility in this issue:
pypy/pypy#5218

CPython's BaseExceptionGroup.__init__ looks like this:

```c
static int
BaseExceptionGroup_init(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!_PyArg_NoKeywords(Py_TYPE(self)->tp_name, kwds)) {
        return -1;
    }
    if (BaseException_init(self, args, kwds) == -1) {
        return -1;
    }
    return 0;
}
```
@agronholm
Copy link
Owner

I would be much more comfortable with this if we first asked on the CPython tracker if emulating this bug is okay or if they're going to fix it (or willing to accept a patch) over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants