|
@@ -2958,12 +2958,8 @@ bool InitProto2MessageModule(PyObject *m) {
|
|
reinterpret_cast<PyObject*>(
|
|
reinterpret_cast<PyObject*>(
|
|
&RepeatedCompositeContainer_Type));
|
|
&RepeatedCompositeContainer_Type));
|
|
|
|
|
|
- // Register them as MutableSequence.
|
|
|
|
-#if PY_MAJOR_VERSION >= 3
|
|
|
|
- ScopedPyObjectPtr collections(PyImport_ImportModule("collections.abc"));
|
|
|
|
-#else
|
|
|
|
|
|
+ // Register them as collections.Sequence
|
|
ScopedPyObjectPtr collections(PyImport_ImportModule("collections"));
|
|
ScopedPyObjectPtr collections(PyImport_ImportModule("collections"));
|
|
-#endif
|
|
|
|
if (collections == NULL) {
|
|
if (collections == NULL) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|