浏览代码

Revert "Import MutableSequence from collections.abc on Python 3. (#6272)"

This reverts commit 9d61eada0f47d7be793983638c4a29707b192d0c.
Daniel Kurka 5 年之前
父节点
当前提交
c5fedd61a4
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      python/google/protobuf/pyext/message.cc

+ 1 - 5
python/google/protobuf/pyext/message.cc

@@ -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;
     }
     }