diff --git a/python/google/protobuf/internal/python_message.py b/python/google/protobuf/internal/python_message.py index 87c9b53afe9b..7e2cbc65d386 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_factory.UnknownFieldSet(message) in ' - 'message_factory.py instead.' + 'feature unknown_fields.UnknownFieldSet(message) in ' + 'unknown_fields.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 4b7fe995ad9b..a57b7f295c07 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_factory.UnknownFieldSet(message) in " - "message_factory.py instead."); + "add one feature unknown_fields.UnknownFieldSet(message) in " + "unknown_fields.py instead."); if (self->unknown_field_set == nullptr) { self->unknown_field_set = unknown_fields::NewPyUnknownFields(self); } else {