Skip to content

Commit

Permalink
Python3.11+: Fix, need to make sure we have "split" as a constant value.
Browse files Browse the repository at this point in the history
* Needed for exception groups handling.
  • Loading branch information
kayhayen committed Jul 11, 2024
1 parent 91f5382 commit cb183be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions nuitka/build/include/nuitka/exception_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ NUITKA_MAY_BE_UNUSED static int CHECK_EXCEPTION_STAR_VALID(PyThreadState *tstate
return 0;
}

extern PyObject *const_str_plain_split;

NUITKA_MAY_BE_UNUSED static int EXCEPTION_GROUP_MATCH(PyThreadState *tstate, PyObject *exc_value, PyObject *match_type,
PyObject **match, PyObject **rest) {
// TODO: Avoid this from happening, we should not call it then.
Expand Down
3 changes: 3 additions & 0 deletions nuitka/code_generation/GlobalConstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def getConstantDefaultPopulation():
result.append("__aenter__")
result.append("__aexit__")

# Exception group split method call
result.append("split")

if isWin32Windows():
result.append("fileno")

Expand Down

0 comments on commit cb183be

Please sign in to comment.