27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From 4a8f3c9bd69320359d3b7f83f8849d54d8b68f94 Mon Sep 17 00:00:00 2001
|
|
From: Zhipeng Xie <xiezhipeng1@huawei.com>
|
|
Date: Sun, 12 Jun 2022 23:14:49 +0800
|
|
Subject: [PATCH] Fix module 'collections' has no attribute 'MutableSequence'
|
|
|
|
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
|
|
---
|
|
com_google_protobuf/python/google/protobuf/pyext/message.cc | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/com_google_protobuf/python/google/protobuf/pyext/message.cc b/com_google_protobuf/python/google/protobuf/pyext/message.cc
|
|
index 3530a9b37..1c4f33fcd 100755
|
|
--- a/com_google_protobuf/python/google/protobuf/pyext/message.cc
|
|
+++ b/com_google_protobuf/python/google/protobuf/pyext/message.cc
|
|
@@ -2992,7 +2992,7 @@ bool InitProto2MessageModule(PyObject *m) {
|
|
&RepeatedCompositeContainer_Type));
|
|
|
|
// Register them as collections.Sequence
|
|
- ScopedPyObjectPtr collections(PyImport_ImportModule("collections"));
|
|
+ ScopedPyObjectPtr collections(PyImport_ImportModule("collections.abc"));
|
|
if (collections == NULL) {
|
|
return false;
|
|
}
|
|
--
|
|
2.27.0
|
|
|