Skip to content

Commit

Permalink
Merge pull request #17806 from anandolee/28.x
Browse files Browse the repository at this point in the history
Raise warnings for deprecated python cpp extension GetDebugString().
  • Loading branch information
zhangskz authored Aug 13, 2024
2 parents 40b5bda + 5fc5558 commit c6964f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/google/protobuf/pyext/descriptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,11 @@ static int SetHasOptions(PyFileDescriptor *self, PyObject *value,
}

static PyObject* GetDebugString(PyFileDescriptor* self) {
PyErr_Warn(nullptr,
"GetDebugString() API is deprecated. This API only "
"exists in protobuf c++ and does not exists in pure python, upb "
"or any other languages. GetDebugString() for python cpp "
"extension will be removed in Jan 2025");
return PyString_FromCppString(_GetDescriptor(self)->DebugString());
}

Expand Down

0 comments on commit c6964f6

Please sign in to comment.