@@ -863,22 +863,6 @@ static PyObject* GetCppType(PyBaseDescriptor* self, void* closure) {
863863 return PyLong_FromLong (_GetDescriptor (self)->cpp_type ());
864864}
865865
866- static void WarnDeprecatedLabel () {
867- static int deprecated_label_count = 100 ;
868- if (deprecated_label_count > 0 ) {
869- --deprecated_label_count;
870- PyErr_WarnEx (
871- PyExc_DeprecationWarning,
872- " label() is deprecated. Use is_required() or is_repeated() instead." ,
873- 3 );
874- }
875- }
876-
877- static PyObject* GetLabel (PyBaseDescriptor* self, void * closure) {
878- WarnDeprecatedLabel ();
879- return PyLong_FromLong (_GetDescriptor (self)->label ());
880- }
881-
882866static PyObject* IsRequired (PyBaseDescriptor* self, void * closure) {
883867 return PyBool_FromLong (_GetDescriptor (self)->is_required ());
884868}
@@ -1094,7 +1078,6 @@ static PyGetSetDef Getters[] = {
10941078 {" file" , (getter)GetFile, nullptr , " File Descriptor" },
10951079 {" type" , (getter)GetType, nullptr , " C++ Type" },
10961080 {" cpp_type" , (getter)GetCppType, nullptr , " C++ Type" },
1097- {" label" , (getter)GetLabel, nullptr , " Label" },
10981081 {" is_required" , (getter)IsRequired, nullptr , " Is Required" },
10991082 {" is_repeated" , (getter)IsRepeated, nullptr , " Is Repeated" },
11001083 {" number" , (getter)GetNumber, nullptr , " Number" },
0 commit comments