You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We fail to run SAR on Python versions above 3.9 because of this and receive the following error
>>> sar.add_regexp(".+", lambda f, t: print(f"Match!"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<SOME-PATH>/python3.11/site-packages/regexp_sar/__init__.py", line 13, in add_regexp
_regexp_sar_c.add_regexp(self._internal_sar_object, regexp, callback)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
This is caused because of Pythons C-API change for versions above 3.9.
Per Pythons C-API docs:
For all # variants of formats (s#, y#, etc.), the macro PY_SSIZE_T_CLEAN must be defined before including Python.h. On Python 3.9 and older, the type of the length argument is [Py_ssize_t](https://docs.python.org/3/c-api/intro.html#c.Py_ssize_t) if the PY_SSIZE_T_CLEAN macro is defined, or int otherwise.
The text was updated successfully, but these errors were encountered:
We fail to run SAR on Python versions above 3.9 because of this and receive the following error
This is caused because of Pythons C-API change for versions above 3.9.
Per Pythons C-API docs:
The text was updated successfully, but these errors were encountered: