Commit 64255591 authored by Stefan Behnel's avatar Stefan Behnel

the ABCs are still in "collections" in Py3.2 and not yet in "collections.abc"

parent 34f656d0
...@@ -830,11 +830,11 @@ static int __Pyx_patch_abc(void) { ...@@ -830,11 +830,11 @@ static int __Pyx_patch_abc(void) {
static int abc_patched = 0; static int abc_patched = 0;
if (!abc_patched) { if (!abc_patched) {
PyObject *module; PyObject *module;
module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections");
if (!module) { if (!module) {
PyErr_WriteUnraisable(NULL); PyErr_WriteUnraisable(NULL);
if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch " if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch "
#if PY_MAJOR_VERSION >= 3 #if PY_VERSION_HEX >= 0x03030000
"collections.abc.Generator" "collections.abc.Generator"
#else #else
"collections.Generator" "collections.Generator"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment