Ver Fonte

Fix python bugs for internal integration.

Bo Yang há 9 anos atrás
pai
commit
c8b9d41f99

+ 6 - 2
conformance/failure_list_python.txt

@@ -1,14 +1,18 @@
 Recommended.JsonInput.DoubleFieldInfinityNotQuoted
 Recommended.JsonInput.DoubleFieldInfinityNotQuoted
 Recommended.JsonInput.DoubleFieldNanNotQuoted
 Recommended.JsonInput.DoubleFieldNanNotQuoted
 Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted
 Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted
+Recommended.JsonInput.FieldNameWithDoubleUnderscores.JsonOutput
+Recommended.JsonInput.FieldNameWithDoubleUnderscores.ProtobufOutput
+Recommended.JsonInput.FieldNameWithDoubleUnderscores.Validator
 Recommended.JsonInput.FloatFieldInfinityNotQuoted
 Recommended.JsonInput.FloatFieldInfinityNotQuoted
 Recommended.JsonInput.FloatFieldNanNotQuoted
 Recommended.JsonInput.FloatFieldNanNotQuoted
 Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted
 Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted
-Recommended.JsonInput.OneofZeroMessage.JsonOutput
-Recommended.JsonInput.OneofZeroMessage.ProtobufOutput
 Required.JsonInput.BytesFieldInvalidBase64Characters
 Required.JsonInput.BytesFieldInvalidBase64Characters
 Required.JsonInput.DoubleFieldTooSmall
 Required.JsonInput.DoubleFieldTooSmall
 Required.JsonInput.EnumFieldUnknownValue.Validator
 Required.JsonInput.EnumFieldUnknownValue.Validator
+Required.JsonInput.FieldNameInLowerCamelCase.Validator
+Required.JsonInput.FieldNameInSnakeCase.JsonOutput
+Required.JsonInput.FieldNameInSnakeCase.ProtobufOutput
 Required.JsonInput.FloatFieldTooLarge
 Required.JsonInput.FloatFieldTooLarge
 Required.JsonInput.FloatFieldTooSmall
 Required.JsonInput.FloatFieldTooSmall
 Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool
 Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool

+ 6 - 2
conformance/failure_list_python_cpp.txt

@@ -10,14 +10,18 @@
 Recommended.JsonInput.DoubleFieldInfinityNotQuoted
 Recommended.JsonInput.DoubleFieldInfinityNotQuoted
 Recommended.JsonInput.DoubleFieldNanNotQuoted
 Recommended.JsonInput.DoubleFieldNanNotQuoted
 Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted
 Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted
+Recommended.JsonInput.FieldNameWithDoubleUnderscores.JsonOutput
+Recommended.JsonInput.FieldNameWithDoubleUnderscores.ProtobufOutput
+Recommended.JsonInput.FieldNameWithDoubleUnderscores.Validator
 Recommended.JsonInput.FloatFieldInfinityNotQuoted
 Recommended.JsonInput.FloatFieldInfinityNotQuoted
 Recommended.JsonInput.FloatFieldNanNotQuoted
 Recommended.JsonInput.FloatFieldNanNotQuoted
 Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted
 Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted
-Recommended.JsonInput.OneofZeroMessage.JsonOutput
-Recommended.JsonInput.OneofZeroMessage.ProtobufOutput
 Required.JsonInput.BytesFieldInvalidBase64Characters
 Required.JsonInput.BytesFieldInvalidBase64Characters
 Required.JsonInput.DoubleFieldTooSmall
 Required.JsonInput.DoubleFieldTooSmall
 Required.JsonInput.EnumFieldUnknownValue.Validator
 Required.JsonInput.EnumFieldUnknownValue.Validator
+Required.JsonInput.FieldNameInLowerCamelCase.Validator
+Required.JsonInput.FieldNameInSnakeCase.JsonOutput
+Required.JsonInput.FieldNameInSnakeCase.ProtobufOutput
 Required.JsonInput.FloatFieldTooLarge
 Required.JsonInput.FloatFieldTooLarge
 Required.JsonInput.FloatFieldTooSmall
 Required.JsonInput.FloatFieldTooSmall
 Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool
 Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool

+ 1 - 1
python/google/protobuf/internal/testing_refleaks.py

@@ -89,7 +89,7 @@ class ReferenceLeakCheckerTestCase(unittest.TestCase):
       super(ReferenceLeakCheckerTestCase, self).run(result=local_result)
       super(ReferenceLeakCheckerTestCase, self).run(result=local_result)
       newrefcount = self._getRefcounts()
       newrefcount = self._getRefcounts()
       refcount_deltas.append(newrefcount - oldrefcount)
       refcount_deltas.append(newrefcount - oldrefcount)
-    print refcount_deltas, self
+    print(refcount_deltas, self)
 
 
     try:
     try:
       self.assertEqual(refcount_deltas, [0] * self.NB_RUNS)
       self.assertEqual(refcount_deltas, [0] * self.NB_RUNS)