diff --git a/CHANGES.txt b/CHANGES.txt
index 88d1df92e5998..db2da27ab036c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -81,6 +81,19 @@
* Print full path name of source .proto file on error
* Include proto message type in the annotation comments.
+2022-12-13 version 21.12 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+
+ Python
+ * Fix broken enum ranges (#11171)
+ * Stop requiring extension fields to have a sythetic oneof (#11091)
+ * Python runtime 4.21.10 not works generated code can not load valid proto.
+ (#11171)
+
+2022-12-07 version 21.11 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+ Python
+ * Add license file to pypi wheels (#10936)
+ * Fix round-trip bug (#10158)
+
2022-11-29 version 21.10 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
Java
diff --git a/Protobuf-C++.podspec b/Protobuf-C++.podspec
index 9fad46b396c71..4999537e3ef6e 100644
--- a/Protobuf-C++.podspec
+++ b/Protobuf-C++.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Protobuf-C++'
- s.version = '3.21.10'
+ s.version = '3.21.12'
s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf'
s.license = 'BSD-3-Clause'
diff --git a/Protobuf.podspec b/Protobuf.podspec
index 3188764027dfb..b97dfea239eb7 100644
--- a/Protobuf.podspec
+++ b/Protobuf.podspec
@@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s|
s.name = 'Protobuf'
- s.version = '3.21.10'
+ s.version = '3.21.12'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = 'BSD-3-Clause'
diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec
index 9ef830b681d43..d74008a1c0484 100644
--- a/csharp/Google.Protobuf.Tools.nuspec
+++ b/csharp/Google.Protobuf.Tools.nuspec
@@ -5,7 +5,7 @@
Google Protocol Buffers tools
Tools for Protocol Buffers - Google's data interchange format.
See project site for more info.
- 3.21.10
+ 3.21.12
Google Inc.
protobuf-packages
https://github.com/protocolbuffers/protobuf/blob/main/LICENSE
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
index 8a156c39f956f..35f252db7ffee 100644
--- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj
+++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
@@ -5,7 +5,7 @@
C# runtime library for Protocol Buffers - Google's data interchange format.
Copyright 2015, Google Inc.
Google Protocol Buffers
- 3.21.10
+ 3.21.12
10.0
Google Inc.
netstandard1.1;netstandard2.0;net45;net50
diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs
index e252372eddfbb..a8637232afd14 100644
--- a/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs
+++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs
@@ -107,62 +107,64 @@ static DescriptorReflection() {
"cGFjZRgsIAEoCRIUCgxydWJ5X3BhY2thZ2UYLSABKAkSQwoUdW5pbnRlcnBy",
"ZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJw",
"cmV0ZWRPcHRpb24iOgoMT3B0aW1pemVNb2RlEgkKBVNQRUVEEAESDQoJQ09E",
- "RV9TSVpFEAISEAoMTElURV9SVU5USU1FEAMqCQjoBxCAgICAAkoECCYQJyKE",
+ "RV9TSVpFEAISEAoMTElURV9SVU5USU1FEAMqCQjoBxCAgICAAkoECCYQJyK4",
"AgoOTWVzc2FnZU9wdGlvbnMSJgoXbWVzc2FnZV9zZXRfd2lyZV9mb3JtYXQY",
"ASABKAg6BWZhbHNlEi4KH25vX3N0YW5kYXJkX2Rlc2NyaXB0b3JfYWNjZXNz",
"b3IYAiABKAg6BWZhbHNlEhkKCmRlcHJlY2F0ZW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tYW50aWMSCAoETk9O",
+ "RRAAEgcKA1NFVBABEgkKBUFMSUFTEAJCfgoTY29tLmdvb2dsZS5wcm90b2J1",
+ "ZkIQRGVzY3JpcHRvclByb3Rvc0gBWi1nb29nbGUuZ29sYW5nLm9yZy9wcm90",
+ "b2J1Zi90eXBlcy9kZXNjcmlwdG9ycGL4AQGiAgNHUEKqAhpHb29nbGUuUHJv",
+ "dG9idWYuUmVmbGVjdGlvbg=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
@@ -178,10 +180,10 @@ static DescriptorReflection() {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ServiceDescriptorProto), global::Google.Protobuf.Reflection.ServiceDescriptorProto.Parser, new[]{ "Name", "Method", "Options" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MethodDescriptorProto), global::Google.Protobuf.Reflection.MethodDescriptorProto.Parser, new[]{ "Name", "InputType", "OutputType", "Options", "ClientStreaming", "ServerStreaming" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FileOptions), global::Google.Protobuf.Reflection.FileOptions.Parser, new[]{ "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "JavaGenerateEqualsAndHash", "JavaStringCheckUtf8", "OptimizeFor", "GoPackage", "CcGenericServices", "JavaGenericServices", "PyGenericServices", "PhpGenericServices", "Deprecated", "CcEnableArenas", "ObjcClassPrefix", "CsharpNamespace", "SwiftPrefix", "PhpClassPrefix", "PhpNamespace", "PhpMetadataNamespace", "RubyPackage", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode) }, null, null),
- new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MessageOptions), global::Google.Protobuf.Reflection.MessageOptions.Parser, new[]{ "MessageSetWireFormat", "NoStandardDescriptorAccessor", "Deprecated", "MapEntry", "UninterpretedOption" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MessageOptions), global::Google.Protobuf.Reflection.MessageOptions.Parser, new[]{ "MessageSetWireFormat", "NoStandardDescriptorAccessor", "Deprecated", "MapEntry", "DeprecatedLegacyJsonFieldConflicts", "UninterpretedOption" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FieldOptions), global::Google.Protobuf.Reflection.FieldOptions.Parser, new[]{ "Ctype", "Packed", "Jstype", "Lazy", "UnverifiedLazy", "Deprecated", "Weak", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.CType), typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.JSType) }, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.OneofOptions), global::Google.Protobuf.Reflection.OneofOptions.Parser, new[]{ "UninterpretedOption" }, null, null, null, null),
- new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumOptions), global::Google.Protobuf.Reflection.EnumOptions.Parser, new[]{ "AllowAlias", "Deprecated", "UninterpretedOption" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumOptions), global::Google.Protobuf.Reflection.EnumOptions.Parser, new[]{ "AllowAlias", "Deprecated", "DeprecatedLegacyJsonFieldConflicts", "UninterpretedOption" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumValueOptions), global::Google.Protobuf.Reflection.EnumValueOptions.Parser, new[]{ "Deprecated", "UninterpretedOption" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ServiceOptions), global::Google.Protobuf.Reflection.ServiceOptions.Parser, new[]{ "Deprecated", "UninterpretedOption" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MethodOptions), global::Google.Protobuf.Reflection.MethodOptions.Parser, new[]{ "Deprecated", "IdempotencyLevel", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel) }, null, null),
@@ -6512,6 +6514,7 @@ public MessageOptions(MessageOptions other) : this() {
noStandardDescriptorAccessor_ = other.noStandardDescriptorAccessor_;
deprecated_ = other.deprecated_;
mapEntry_ = other.mapEntry_;
+ deprecatedLegacyJsonFieldConflicts_ = other.deprecatedLegacyJsonFieldConflicts_;
uninterpretedOption_ = other.uninterpretedOption_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
_extensions = pb::ExtensionSet.Clone(other._extensions);
@@ -6685,6 +6688,48 @@ public void ClearMapEntry() {
_hasBits0 &= ~8;
}
+ /// Field number for the "deprecated_legacy_json_field_conflicts" field.
+ public const int DeprecatedLegacyJsonFieldConflictsFieldNumber = 11;
+ private readonly static bool DeprecatedLegacyJsonFieldConflictsDefaultValue = false;
+
+ private bool deprecatedLegacyJsonFieldConflicts_;
+ ///
+ /// Enable the legacy handling of JSON field name conflicts. This lowercases
+ /// and strips underscored from the fields before comparison in proto3 only.
+ /// The new behavior takes `json_name` into account and applies to proto2 as
+ /// well.
+ ///
+ /// This should only be used as a temporary measure against broken builds due
+ /// to the change in behavior for JSON field name conflicts.
+ ///
+ /// TODO(b/261750190) This is legacy behavior we plan to remove once downstream
+ /// teams have had time to migrate.
+ ///
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool DeprecatedLegacyJsonFieldConflicts {
+ get { if ((_hasBits0 & 16) != 0) { return deprecatedLegacyJsonFieldConflicts_; } else { return DeprecatedLegacyJsonFieldConflictsDefaultValue; } }
+ set {
+ _hasBits0 |= 16;
+ deprecatedLegacyJsonFieldConflicts_ = value;
+ }
+ }
+ /// Gets whether the "deprecated_legacy_json_field_conflicts" field is set
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasDeprecatedLegacyJsonFieldConflicts {
+ get { return (_hasBits0 & 16) != 0; }
+ }
+ /// Clears the value of the "deprecated_legacy_json_field_conflicts" field
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearDeprecatedLegacyJsonFieldConflicts() {
+ _hasBits0 &= ~16;
+ }
+
/// Field number for the "uninterpreted_option" field.
public const int UninterpretedOptionFieldNumber = 999;
private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec
@@ -6718,6 +6763,7 @@ public bool Equals(MessageOptions other) {
if (NoStandardDescriptorAccessor != other.NoStandardDescriptorAccessor) return false;
if (Deprecated != other.Deprecated) return false;
if (MapEntry != other.MapEntry) return false;
+ if (DeprecatedLegacyJsonFieldConflicts != other.DeprecatedLegacyJsonFieldConflicts) return false;
if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false;
if (!Equals(_extensions, other._extensions)) {
return false;
@@ -6733,6 +6779,7 @@ public override int GetHashCode() {
if (HasNoStandardDescriptorAccessor) hash ^= NoStandardDescriptorAccessor.GetHashCode();
if (HasDeprecated) hash ^= Deprecated.GetHashCode();
if (HasMapEntry) hash ^= MapEntry.GetHashCode();
+ if (HasDeprecatedLegacyJsonFieldConflicts) hash ^= DeprecatedLegacyJsonFieldConflicts.GetHashCode();
hash ^= uninterpretedOption_.GetHashCode();
if (_extensions != null) {
hash ^= _extensions.GetHashCode();
@@ -6771,6 +6818,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(56);
output.WriteBool(MapEntry);
}
+ if (HasDeprecatedLegacyJsonFieldConflicts) {
+ output.WriteRawTag(88);
+ output.WriteBool(DeprecatedLegacyJsonFieldConflicts);
+ }
uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec);
if (_extensions != null) {
_extensions.WriteTo(output);
@@ -6801,6 +6852,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(56);
output.WriteBool(MapEntry);
}
+ if (HasDeprecatedLegacyJsonFieldConflicts) {
+ output.WriteRawTag(88);
+ output.WriteBool(DeprecatedLegacyJsonFieldConflicts);
+ }
uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec);
if (_extensions != null) {
_extensions.WriteTo(ref output);
@@ -6827,6 +6882,9 @@ public int CalculateSize() {
if (HasMapEntry) {
size += 1 + 1;
}
+ if (HasDeprecatedLegacyJsonFieldConflicts) {
+ size += 1 + 1;
+ }
size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec);
if (_extensions != null) {
size += _extensions.CalculateSize();
@@ -6855,6 +6913,9 @@ public void MergeFrom(MessageOptions other) {
if (other.HasMapEntry) {
MapEntry = other.MapEntry;
}
+ if (other.HasDeprecatedLegacyJsonFieldConflicts) {
+ DeprecatedLegacyJsonFieldConflicts = other.DeprecatedLegacyJsonFieldConflicts;
+ }
uninterpretedOption_.Add(other.uninterpretedOption_);
pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
@@ -6890,6 +6951,10 @@ public void MergeFrom(pb::CodedInputStream input) {
MapEntry = input.ReadBool();
break;
}
+ case 88: {
+ DeprecatedLegacyJsonFieldConflicts = input.ReadBool();
+ break;
+ }
case 7994: {
uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec);
break;
@@ -6927,6 +6992,10 @@ public void MergeFrom(pb::CodedInputStream input) {
MapEntry = input.ReadBool();
break;
}
+ case 88: {
+ DeprecatedLegacyJsonFieldConflicts = input.ReadBool();
+ break;
+ }
case 7994: {
uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec);
break;
@@ -7922,6 +7991,7 @@ public EnumOptions(EnumOptions other) : this() {
_hasBits0 = other._hasBits0;
allowAlias_ = other.allowAlias_;
deprecated_ = other.deprecated_;
+ deprecatedLegacyJsonFieldConflicts_ = other.deprecatedLegacyJsonFieldConflicts_;
uninterpretedOption_ = other.uninterpretedOption_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
_extensions = pb::ExtensionSet.Clone(other._extensions);
@@ -7997,6 +8067,44 @@ public void ClearDeprecated() {
_hasBits0 &= ~2;
}
+ /// Field number for the "deprecated_legacy_json_field_conflicts" field.
+ public const int DeprecatedLegacyJsonFieldConflictsFieldNumber = 6;
+ private readonly static bool DeprecatedLegacyJsonFieldConflictsDefaultValue = false;
+
+ private bool deprecatedLegacyJsonFieldConflicts_;
+ ///
+ /// Enable the legacy handling of JSON field name conflicts. This lowercases
+ /// and strips underscored from the fields before comparison in proto3 only.
+ /// The new behavior takes `json_name` into account and applies to proto2 as
+ /// well.
+ /// TODO(b/261750190) Remove this legacy behavior once downstream teams have
+ /// had time to migrate.
+ ///
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool DeprecatedLegacyJsonFieldConflicts {
+ get { if ((_hasBits0 & 4) != 0) { return deprecatedLegacyJsonFieldConflicts_; } else { return DeprecatedLegacyJsonFieldConflictsDefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ deprecatedLegacyJsonFieldConflicts_ = value;
+ }
+ }
+ /// Gets whether the "deprecated_legacy_json_field_conflicts" field is set
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasDeprecatedLegacyJsonFieldConflicts {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// Clears the value of the "deprecated_legacy_json_field_conflicts" field
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearDeprecatedLegacyJsonFieldConflicts() {
+ _hasBits0 &= ~4;
+ }
+
/// Field number for the "uninterpreted_option" field.
public const int UninterpretedOptionFieldNumber = 999;
private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec
@@ -8028,6 +8136,7 @@ public bool Equals(EnumOptions other) {
}
if (AllowAlias != other.AllowAlias) return false;
if (Deprecated != other.Deprecated) return false;
+ if (DeprecatedLegacyJsonFieldConflicts != other.DeprecatedLegacyJsonFieldConflicts) return false;
if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false;
if (!Equals(_extensions, other._extensions)) {
return false;
@@ -8041,6 +8150,7 @@ public override int GetHashCode() {
int hash = 1;
if (HasAllowAlias) hash ^= AllowAlias.GetHashCode();
if (HasDeprecated) hash ^= Deprecated.GetHashCode();
+ if (HasDeprecatedLegacyJsonFieldConflicts) hash ^= DeprecatedLegacyJsonFieldConflicts.GetHashCode();
hash ^= uninterpretedOption_.GetHashCode();
if (_extensions != null) {
hash ^= _extensions.GetHashCode();
@@ -8071,6 +8181,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(24);
output.WriteBool(Deprecated);
}
+ if (HasDeprecatedLegacyJsonFieldConflicts) {
+ output.WriteRawTag(48);
+ output.WriteBool(DeprecatedLegacyJsonFieldConflicts);
+ }
uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec);
if (_extensions != null) {
_extensions.WriteTo(output);
@@ -8093,6 +8207,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(24);
output.WriteBool(Deprecated);
}
+ if (HasDeprecatedLegacyJsonFieldConflicts) {
+ output.WriteRawTag(48);
+ output.WriteBool(DeprecatedLegacyJsonFieldConflicts);
+ }
uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec);
if (_extensions != null) {
_extensions.WriteTo(ref output);
@@ -8113,6 +8231,9 @@ public int CalculateSize() {
if (HasDeprecated) {
size += 1 + 1;
}
+ if (HasDeprecatedLegacyJsonFieldConflicts) {
+ size += 1 + 1;
+ }
size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec);
if (_extensions != null) {
size += _extensions.CalculateSize();
@@ -8135,6 +8256,9 @@ public void MergeFrom(EnumOptions other) {
if (other.HasDeprecated) {
Deprecated = other.Deprecated;
}
+ if (other.HasDeprecatedLegacyJsonFieldConflicts) {
+ DeprecatedLegacyJsonFieldConflicts = other.DeprecatedLegacyJsonFieldConflicts;
+ }
uninterpretedOption_.Add(other.uninterpretedOption_);
pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
@@ -8162,6 +8286,10 @@ public void MergeFrom(pb::CodedInputStream input) {
Deprecated = input.ReadBool();
break;
}
+ case 48: {
+ DeprecatedLegacyJsonFieldConflicts = input.ReadBool();
+ break;
+ }
case 7994: {
uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec);
break;
@@ -8191,6 +8319,10 @@ public void MergeFrom(pb::CodedInputStream input) {
Deprecated = input.ReadBool();
break;
}
+ case 48: {
+ DeprecatedLegacyJsonFieldConflicts = input.ReadBool();
+ break;
+ }
case 7994: {
uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec);
break;
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Any.pb.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Any.pb.cs
index d0ce71b1d3e97..b72a050ea695e 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Any.pb.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Any.pb.cs
@@ -64,6 +64,10 @@ static AnyReflection() {
/// if (any.is(Foo.class)) {
/// foo = any.unpack(Foo.class);
/// }
+ /// // or ...
+ /// if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+ /// foo = any.unpack(Foo.getDefaultInstance());
+ /// }
///
/// Example 3: Pack and unpack a message in Python.
///
diff --git a/java/README.md b/java/README.md
index 17de94d665416..85039148769e8 100644
--- a/java/README.md
+++ b/java/README.md
@@ -23,7 +23,7 @@ If you are using Maven, use the following:
com.google.protobuf
protobuf-java
- 3.21.10
+ 3.21.12
```
@@ -37,17 +37,16 @@ protobuf-java-util package:
com.google.protobuf
protobuf-java-util
- 3.21.10
+ 3.21.12
```
### Gradle
-If you are using Gradle, add the following to your `build.gradle` file's dependencies:
-```
- implementation 'com.google.protobuf:protobuf-java:3.21.10'
-```
-Again, be sure to check that the version number matches (or is newer than) the version number of protoc that you are using.
+If you are using Gradle, add the following to your `build.gradle` file's
+dependencies: `implementation 'com.google.protobuf:protobuf-java:3.21.12'`
+Again, be sure to check that the version number matches (or is newer than) the
+version number of protoc that you are using.
### Use Java Protocol Buffers on Android
diff --git a/java/bom/pom.xml b/java/bom/pom.xml
index b3389a8c14c05..31816764bf328 100644
--- a/java/bom/pom.xml
+++ b/java/bom/pom.xml
@@ -4,7 +4,7 @@
com.google.protobuf
protobuf-bom
- 3.21.10
+ 3.21.12
pom
Protocol Buffers [BOM]
diff --git a/java/core/pom.xml b/java/core/pom.xml
index d1bd6739974cb..83b7351f7ec95 100644
--- a/java/core/pom.xml
+++ b/java/core/pom.xml
@@ -4,7 +4,7 @@
com.google.protobuf
protobuf-parent
- 3.21.10
+ 3.21.12
protobuf-java
diff --git a/java/kotlin-lite/pom.xml b/java/kotlin-lite/pom.xml
index c8e2c34ce7f9d..50dcc8340b345 100644
--- a/java/kotlin-lite/pom.xml
+++ b/java/kotlin-lite/pom.xml
@@ -4,7 +4,7 @@
com.google.protobuf
protobuf-parent
- 3.21.10
+ 3.21.12
protobuf-kotlin-lite
diff --git a/java/kotlin/pom.xml b/java/kotlin/pom.xml
index e75d0bfda27b3..97b7f70c6ba0b 100644
--- a/java/kotlin/pom.xml
+++ b/java/kotlin/pom.xml
@@ -4,7 +4,7 @@
com.google.protobuf
protobuf-parent
- 3.21.10
+ 3.21.12
protobuf-kotlin
diff --git a/java/lite.md b/java/lite.md
index a10e9595b6a3b..ad920792f3f92 100644
--- a/java/lite.md
+++ b/java/lite.md
@@ -29,7 +29,7 @@ protobuf Java Lite runtime. If you are using Maven, include the following:
com.google.protobuf
protobuf-javalite
- 3.21.10
+ 3.21.12
```
diff --git a/java/lite/pom.xml b/java/lite/pom.xml
index ebaacbb7bcfe0..af34943dabf79 100644
--- a/java/lite/pom.xml
+++ b/java/lite/pom.xml
@@ -4,7 +4,7 @@
com.google.protobuf
protobuf-parent
- 3.21.10
+ 3.21.12
protobuf-javalite
diff --git a/java/pom.xml b/java/pom.xml
index dd292443c5f61..f2dbd0b5f9d59 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -4,7 +4,7 @@
com.google.protobuf
protobuf-parent
- 3.21.10
+ 3.21.12
pom
Protocol Buffers [Parent]
diff --git a/java/util/pom.xml b/java/util/pom.xml
index d2baaf474b016..c13df651c8e01 100644
--- a/java/util/pom.xml
+++ b/java/util/pom.xml
@@ -4,7 +4,7 @@
com.google.protobuf
protobuf-parent
- 3.21.10
+ 3.21.12
protobuf-java-util
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h
index a47abf625a01e..efbd45eac0526 100644
--- a/php/ext/google/protobuf/protobuf.h
+++ b/php/ext/google/protobuf/protobuf.h
@@ -127,7 +127,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setter, 0, 0, 1)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
-#define PHP_PROTOBUF_VERSION "3.21.10"
+#define PHP_PROTOBUF_VERSION "3.21.12"
// ptr -> PHP object cache. This is a weak map that caches lazily-created
// wrapper objects around upb types:
diff --git a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
index d26f517b83b8a..4247c09546d3a 100644
--- a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
+++ b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -177,6 +177,7 @@ public static function initOnce() {
->optional('no_standard_descriptor_accessor', \Google\Protobuf\Internal\GPBType::BOOL, 2)
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
->optional('map_entry', \Google\Protobuf\Internal\GPBType::BOOL, 7)
+ ->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 11)
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
->finalizeToPool();
@@ -210,6 +211,7 @@ public static function initOnce() {
$pool->addMessage('google.protobuf.internal.EnumOptions', \Google\Protobuf\Internal\EnumOptions::class)
->optional('allow_alias', \Google\Protobuf\Internal\GPBType::BOOL, 2)
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 6)
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
->finalizeToPool();
diff --git a/php/src/Google/Protobuf/Any.php b/php/src/Google/Protobuf/Any.php
index cc64bad3db307..feea41aad9c36 100644
--- a/php/src/Google/Protobuf/Any.php
+++ b/php/src/Google/Protobuf/Any.php
@@ -28,6 +28,10 @@
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
+ * // or ...
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+ * foo = any.unpack(Foo.getDefaultInstance());
+ * }
* Example 3: Pack and unpack a message in Python.
* foo = Foo(...)
* any = Any()
diff --git a/php/src/Google/Protobuf/Internal/EnumOptions.php b/php/src/Google/Protobuf/Internal/EnumOptions.php
index 838bc849f367a..6146a6a3b2699 100644
--- a/php/src/Google/Protobuf/Internal/EnumOptions.php
+++ b/php/src/Google/Protobuf/Internal/EnumOptions.php
@@ -31,6 +31,18 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
* Generated from protobuf field optional bool deprecated = 3 [default = false];
*/
protected $deprecated = null;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
+ * @deprecated
+ */
+ protected $deprecated_legacy_json_field_conflicts = null;
/**
* The parser stores options it doesn't recognize here. See above.
*
@@ -52,6 +64,13 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
* Depending on the target platform, this can emit Deprecated annotations
* for the enum, or it will be completely ignored; in the very least, this
* is a formalization for deprecating enums.
+ * @type bool $deprecated_legacy_json_field_conflicts
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
* @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
@@ -141,6 +160,58 @@ public function setDeprecated($var)
return $this;
}
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
+ * @return bool
+ * @deprecated
+ */
+ public function getDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false;
+ }
+
+ public function hasDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ public function clearDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ unset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
+ * @param bool $var
+ * @return $this
+ * @deprecated
+ */
+ public function setDeprecatedLegacyJsonFieldConflicts($var)
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkBool($var);
+ $this->deprecated_legacy_json_field_conflicts = $var;
+
+ return $this;
+ }
+
/**
* The parser stores options it doesn't recognize here. See above.
*
diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
index 617fdac4e5aa6..b1ef4ee95dd44 100644
--- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
+++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
@@ -37,12 +37,16 @@ class Annotation extends \Google\Protobuf\Internal\Message
protected $begin = null;
/**
* Identifies the ending offset in bytes in the generated code that
- * relates to the identified offset. The end offset should be one past
+ * relates to the identified object. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
*
* Generated from protobuf field optional int32 end = 4;
*/
protected $end = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;
+ */
+ protected $semantic = null;
/**
* Constructor.
@@ -60,8 +64,9 @@ class Annotation extends \Google\Protobuf\Internal\Message
* that relates to the identified object.
* @type int $end
* Identifies the ending offset in bytes in the generated code that
- * relates to the identified offset. The end offset should be one past
+ * relates to the identified object. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
+ * @type int $semantic
* }
*/
public function __construct($data = NULL) {
@@ -173,7 +178,7 @@ public function setBegin($var)
/**
* Identifies the ending offset in bytes in the generated code that
- * relates to the identified offset. The end offset should be one past
+ * relates to the identified object. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
*
* Generated from protobuf field optional int32 end = 4;
@@ -196,7 +201,7 @@ public function clearEnd()
/**
* Identifies the ending offset in bytes in the generated code that
- * relates to the identified offset. The end offset should be one past
+ * relates to the identified object. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
*
* Generated from protobuf field optional int32 end = 4;
@@ -211,6 +216,38 @@ public function setEnd($var)
return $this;
}
+ /**
+ * Generated from protobuf field optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;
+ * @return int
+ */
+ public function getSemantic()
+ {
+ return isset($this->semantic) ? $this->semantic : 0;
+ }
+
+ public function hasSemantic()
+ {
+ return isset($this->semantic);
+ }
+
+ public function clearSemantic()
+ {
+ unset($this->semantic);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;
+ * @param int $var
+ * @return $this
+ */
+ public function setSemantic($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation\Semantic::class);
+ $this->semantic = $var;
+
+ return $this;
+ }
+
}
// Adding a class alias for backwards compatibility with the previous class name.
diff --git a/php/src/Google/Protobuf/Internal/MessageOptions.php b/php/src/Google/Protobuf/Internal/MessageOptions.php
index 96e6f5291e27f..f09e8de16c985 100644
--- a/php/src/Google/Protobuf/Internal/MessageOptions.php
+++ b/php/src/Google/Protobuf/Internal/MessageOptions.php
@@ -75,6 +75,20 @@ class MessageOptions extends \Google\Protobuf\Internal\Message
* Generated from protobuf field optional bool map_entry = 7;
*/
protected $map_entry = null;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
+ * @deprecated
+ */
+ protected $deprecated_legacy_json_field_conflicts = null;
/**
* The parser stores options it doesn't recognize here. See above.
*
@@ -132,6 +146,15 @@ class MessageOptions extends \Google\Protobuf\Internal\Message
* use a native map in the target language to hold the keys and values.
* The reflection APIs in such implementations still need to work as
* if the field is a repeated message field.
+ * @type bool $deprecated_legacy_json_field_conflicts
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
* @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
@@ -357,6 +380,62 @@ public function setMapEntry($var)
return $this;
}
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
+ * @return bool
+ * @deprecated
+ */
+ public function getDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false;
+ }
+
+ public function hasDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ public function clearDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ unset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
+ * @param bool $var
+ * @return $this
+ * @deprecated
+ */
+ public function setDeprecatedLegacyJsonFieldConflicts($var)
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkBool($var);
+ $this->deprecated_legacy_json_field_conflicts = $var;
+
+ return $this;
+ }
+
/**
* The parser stores options it doesn't recognize here. See above.
*
diff --git a/protobuf_version.bzl b/protobuf_version.bzl
index 2ea278cb8d98d..4ac031cb3b04a 100644
--- a/protobuf_version.bzl
+++ b/protobuf_version.bzl
@@ -1,4 +1,4 @@
-PROTOC_VERSION = "21.10"
-PROTOBUF_JAVA_VERSION = "3.21.10"
-PROTOBUF_PYTHON_VERSION = "4.21.10"
-PROTOBUF_PHP_VERSION = "3.21.10"
+PROTOC_VERSION = "21.12"
+PROTOBUF_JAVA_VERSION = "3.21.12"
+PROTOBUF_PYTHON_VERSION = "4.21.12"
+PROTOBUF_PHP_VERSION = "3.21.12"
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
index e0121a4f6c9aa..e7555ee1010f9 100755
--- a/python/google/protobuf/__init__.py
+++ b/python/google/protobuf/__init__.py
@@ -30,4 +30,4 @@
# Copyright 2007 Google Inc. All Rights Reserved.
-__version__ = '4.21.10'
+__version__ = '4.21.12'
diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec
index 73abc8150943f..a925fdcd0405d 100644
--- a/ruby/google-protobuf.gemspec
+++ b/ruby/google-protobuf.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "google-protobuf"
- s.version = "3.21.10"
+ s.version = "3.21.12"
git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag
s.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers"
diff --git a/ruby/pom.xml b/ruby/pom.xml
index e5ea175f8978a..68dadacfb0a7d 100644
--- a/ruby/pom.xml
+++ b/ruby/pom.xml
@@ -9,7 +9,7 @@
com.google.protobuf.jruby
protobuf-jruby
- 3.21.10
+ 3.21.12
Protocol Buffer JRuby native extension
Protocol Buffers are a way of encoding structured data in an efficient yet
@@ -76,7 +76,7 @@
com.google.protobuf
protobuf-java-util
- 3.21.10
+ 3.21.12
org.jruby
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h
index e66ca5d24d259..6dff6146f5144 100644
--- a/src/google/protobuf/compiler/plugin.pb.h
+++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -15,7 +15,7 @@
#error "your headers."
#endif // PROTOBUF_VERSION
-#if 3021010 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION
#error "This file was generated by an older version of protoc which is"
#error "incompatible with your Protocol Buffer headers. Please"
#error "regenerate this file with a newer version of protoc."
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h
index fab1f2d55badc..445985d01dafa 100644
--- a/src/google/protobuf/descriptor.pb.h
+++ b/src/google/protobuf/descriptor.pb.h
@@ -15,7 +15,7 @@
#error "your headers."
#endif // PROTOBUF_VERSION
-#if 3021010 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION
#error "This file was generated by an older version of protoc which is"
#error "incompatible with your Protocol Buffer headers. Please"
#error "regenerate this file with a newer version of protoc."
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
index 1a05c4fd1bf7c..ed2b02260a70b 100644
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -217,7 +217,7 @@
#ifdef PROTOBUF_VERSION
#error PROTOBUF_VERSION was previously defined
#endif
-#define PROTOBUF_VERSION 3021010
+#define PROTOBUF_VERSION 3021012
#ifdef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC
#error PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC was previously defined
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h
index a3d0a24d8c109..df14c85c15f7c 100644
--- a/src/google/protobuf/stubs/common.h
+++ b/src/google/protobuf/stubs/common.h
@@ -92,7 +92,7 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
-#define GOOGLE_PROTOBUF_VERSION 3021010
+#define GOOGLE_PROTOBUF_VERSION 3021012
// A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""