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

PyModule_AddObject fix for Python 3.10 #5194

merged 3 commits into from
Jan 12, 2021


Copy link

@radarhere radarhere commented Jan 9, 2021

Resolves #5193

The first commit adds python3 -c "from PIL import Image" to .ci/ - for whatever reason, this fails in Python 3.10, while our pytest command does not.

The second commit replaces instances like

#ifdef HAVE_XCB
    PyModule_AddObject(m, "HAVE_XCB", Py_True);
    PyModule_AddObject(m, "HAVE_XCB", Py_False);


    PyObject *have_xcb;
#ifdef HAVE_XCB
    have_xcb = Py_True;
    have_xcb = Py_False;
    PyModule_AddObject(m, "HAVE_XCB", have_xcb);

This is per the example in, which calls Py_INCREF before PyModule_AddObject.

.ci/ Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Python 3.10: segfault due to invalid pointer
2 participants