From 0cf1ea48d40234dfd02d8d9683829a2a80ad1dde Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Mon, 7 Aug 2023 14:43:37 -0700 Subject: [PATCH] Fix typo in warning about the deprecated use of message.UnknownFields(). The message.UnknownFields() support will be removed soon. PiperOrigin-RevId: 554598474 --- python/google/protobuf/internal/python_message.py | 4 ++-- python/google/protobuf/pyext/message.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/google/protobuf/internal/python_message.py b/python/google/protobuf/internal/python_message.py index 084c1747b6..87c9b53afe 100755 --- a/python/google/protobuf/internal/python_message.py +++ b/python/google/protobuf/internal/python_message.py @@ -1364,8 +1364,8 @@ def _Clear(self): def _UnknownFields(self): warnings.warn( 'message.UnknownFields() is deprecated. Please use the add one ' - 'feature message_factotry.UnknownFieldSet(message) in ' - 'message_factotry.py instead.' + 'feature message_factory.UnknownFieldSet(message) in ' + 'message_factory.py instead.' ) if self._unknown_field_set is None: # pylint: disable=protected-access # pylint: disable=protected-access diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc index 0ad8285ffe..4b7fe995ad 100644 --- a/python/google/protobuf/pyext/message.cc +++ b/python/google/protobuf/pyext/message.cc @@ -2370,8 +2370,8 @@ static PyObject* GetExtensionDict(CMessage* self, void *closure) { static PyObject* GetUnknownFields(CMessage* self) { PyErr_Warn(nullptr, "message.UnknownFields() is deprecated. Please use the " - "add one feature message_factotry.UnknownFieldSet(message) in " - "message_factotry.py instead."); + "add one feature message_factory.UnknownFieldSet(message) in " + "message_factory.py instead."); if (self->unknown_field_set == nullptr) { self->unknown_field_set = unknown_fields::NewPyUnknownFields(self); } else {