Fix a Python bug: when package is empty, DescriptorDatabase FindFileContainingSymbol method will able to find symbol names not start with '.'
The old behavior requires a prefix of '.' for empty packages like '.Foo'. To not break old behaviors, both 'Foo' and '.Foo' will be supported. The support for leading '.' will be removed around 2026 Jan. For example: db.FindFileContainingSymbol('Foo') db.FindFileContainingSymbol('.Foo') # with a warning will have same result PiperOrigin-RevId: 695493356pull/19202/head
parent
0df15fcbb0
commit
610702ed18
3 changed files with 47 additions and 23 deletions
@ -1,17 +0,0 @@ |
|||||||
#region Copyright notice and license |
|
||||||
// Protocol Buffers - Google's data interchange format |
|
||||||
// Copyright 2008 Google Inc. All rights reserved. |
|
||||||
// |
|
||||||
// Use of this source code is governed by a BSD-style |
|
||||||
// license that can be found in the LICENSE file or at |
|
||||||
// https://developers.google.com/open-source/licenses/bsd |
|
||||||
#endregion |
|
||||||
|
|
||||||
namespace Google.Protobuf.Reflection; |
|
||||||
|
|
||||||
internal sealed partial class FeatureSetDescriptor |
|
||||||
{ |
|
||||||
// Canonical serialized form of the edition defaults, generated by embed_edition_defaults. |
|
||||||
private const string DefaultsBase64 = |
|
||||||
"ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH"; |
|
||||||
} |
|
Loading…
Reference in new issue