Browse Source

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

This reverts commit 9d61eada0f47d7be793983638c4a29707b192d0c.
Daniel Kurka 5 năm trước cách đây
mục cha
commit
c5fedd61a4
1 tập tin đã thay đổi với 1 bổ sung5 xóa
  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*>(
             &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"));
-#endif
     if (collections == NULL) {
       return false;
     }