Protobuf

Latest version: v5.27.2

Safety actively analyzes 641954 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 25 of 27

3.1.0

Not secure
General
- Proto3 support in PHP (alpha).
- Various bug fixes.

C++
- Added MessageLite::ByteSizeLong() that’s equivalent to
MessageLite::ByteSize() but returns the value in size_t. Useful to check
whether a message is over the 2G size limit that protobuf can support.
- Moved default_instances to global variables. This allows default_instance
addresses to be known at compile time.
- Adding missing generic gcc 64-bit atomicops.
- Restore New*Callback into google::protobuf namespace since these are used
by the service stubs code
- JSON support.
- Fixed some conformance issues.
- Fixed a JSON serialization bug for bytes fields.

Java
- Fixed a bug in TextFormat that doesn’t accept empty repeated fields (i.e.,
“field: [ ]”).
- JSON support
- Fixed JsonFormat to do correct snake_case-to-camelCase conversion for
non-style-conforming field names.
- Fixed JsonFormat to parse empty Any message correctly.
- Added an option to JsonFormat.Parser to ignore unknown fields.
- Experimental API
- Added UnsafeByteOperations.unsafeWrap(byte[]) to wrap a byte array into
ByteString without copy.

Python
- JSON support
- Fixed some conformance issues.

PHP (Alpha)
- We have added the proto3 support for PHP via both a pure PHP package and a
native c extension. The pure PHP package is intended to provide usability
to wider range of PHP platforms, while the c extension is intended to
provide higher performance. Both implementations provide the same runtime
APIs and share the same generated code. Users don’t need to re-generate
code for the same proto definition when they want to switch the
implementation later. The pure PHP package is included in the php/src
directory, and the c extension is included in the php/ext directory.

Both implementations provide idiomatic PHP APIs:
- All messages and enums are defined as PHP classes.
- All message fields can only be accessed via getter/setter.
- Both repeated field elements and map elements are stored in containers
that act like a normal PHP array.

Unlike several existing third-party PHP implementations for protobuf, our
implementations are built on a "strongly-typed" philosophy: message fields
and array/map containers will throw exceptions eagerly when values of the
incorrect type (not including those that can be type converted, e.g.,
double <-> integer <-> numeric string) are inserted.

Currently, pure PHP runtime supports php5.5, 5.6 and 7 on linux. C
extension runtime supports php5.5 and 5.6 on linux.

See php/README.md for more details about installment. See
https://developers.google.com/protocol-buffers/docs/phptutorial for more
details about APIs.

Objective-C
- Helpers are now provided for working the the Any well known type (see
GPBWellKnownTypes.h for the api additions).
- Some improvements in startup code (especially when extensions aren’t used).

Javascript
- Fixed missing import of jspb.Map
- Fixed valueWriterFn variable name

Ruby
- Fixed hash computation for JRuby's RubyMessage
- Make sure map parsing frames are GC-rooted.
- Added API support for well-known types.

C&35;
- Removed check on dependency in the C reflection API.

3.0.2

General
- Various bug fixes.

Objective C
- Fix for oneofs in proto3 syntax files where fields were set to the zero
value.
- Fix for embedded null character in strings.
- CocoaDocs support

Ruby
- Fixed memory corruption bug in parsing that could occur under GC pressure.

Javascript
- jspb.Map is now properly exported to CommonJS modules.

C&35;
- Removed legacy_enum_values flag.

3.0.0

Not secure
any future API breaking changes.
- For C++, Java Lite and Objective-C, source level compatibility is
guaranteed. Upgrading from v3.0.0 to newer minor version releases will be
source compatible. For example, if your code compiles against protobuf
v3.0.0, it will continue to compile after you upgrade protobuf library to
v3.1.0.
- For other languages, both source level compatibility and binary level
compatibility are guaranteed. For example, if you have a Java binary built
against protobuf v3.0.0. After switching the protobuf runtime binary to
v3.1.0, your built binary should continue to work.
- Compatibility is only guaranteed for documented API and documented
behaviors. If you are using undocumented API (e.g., use anything in the C++
internal namespace), it can be broken by minor version releases in an
undetermined manner.

3.0.0beta4

General
- Added a deterministic serialization API for C++. The deterministic
serialization guarantees that given a binary, equal messages will be
serialized to the same bytes. This allows applications like MapReduce to
group equal messages based on the serialized bytes. The deterministic
serialization is, however, NOT canonical across languages; it is also
unstable across different builds with schema changes due to unknown fields.
Users who need canonical serialization, e.g. persistent storage in a
canonical form, fingerprinting, etc, should define their own
canonicalization specification and implement the serializer using reflection
APIs rather than relying on this API.
- Added OneofOptions. You can now define custom options for oneof groups.


import "google/protobuf/descriptor.proto";
extend google.protobuf.OneofOptions {
optional int32 my_oneof_extension = 12345;
}
message Foo {
oneof oneof_group {
(my_oneof_extension) = 54321;
...
}
}


C++ (beta)
- Introduced a deterministic serialization API in
CodedOutputStream::SetSerializationDeterministic(bool). See the notes about
deterministic serialization in the General section.
- Added google::protobuf::Map::swap() to swap two map fields.
- Fixed a memory leak when calling Reflection::ReleaseMessage() on a message
allocated on arena.
- Improved error reporting when parsing text format protos.
- JSON
- Added a new parser option to ignore unknown fields when parsing JSON.
- Added convenient methods for message to/from JSON conversion.
- Various performance optimizations.

Java (beta)
- File option "java_generate_equals_and_hash" is now deprecated. equals() and
hashCode() methods are generated by default.
- Added a new JSON printer option "omittingInsignificantWhitespace" to produce
a more compact JSON output. The printer will pretty-print by default.
- Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos.

Python (beta)
- Added support to pretty print Any messages in text format.
- Added a flag to ignore unknown fields when parsing JSON.
- Bugfix: "type" field of a JSON Any message is now correctly put before
other fields.

Objective-C (beta)
- Updated the code to support compiling with more compiler warnings
enabled. (Issue 1616)
- Exposing more detailed errors for parsing failures. (PR 1623)
- Small (breaking) change to the naming of some methods on the support classes
for map<>. There were collisions with the system provided KVO support, so
the names were changed to avoid those issues. (PR 1699)
- Fixed for proper Swift bridging of error handling during parsing. (PR 1712)
- Complete support for generating sources that will go into a Framework and
depend on generated sources from other Frameworks. (Issue 1457)

C (beta)
- RepeatedField optimizations.
- Support for .NET Core.
- Minor bug fixes.
- Ability to format a single value in JsonFormatter (advanced usage only).
- Modifications to attributes applied to generated code.

Javascript (alpha)
- Maps now have a real map API instead of being treated as repeated fields.
- Well-known types are now provided in the google-protobuf package, and the
code generator knows to require() them from that package.
- Bugfix: non-canonical varints are correctly decoded.

Ruby (alpha)
- Accessors for oneof fields now return default values instead of nil.

Java Lite
- Java lite support is removed from protocol compiler. It will be supported
as a protocol compiler plugin in a separate code branch.


v3.0.0-beta-3.1
Fix iOS framework.

3.0.0beta3

General
- Supported Proto3 lite-runtime in C++/Java for mobile platforms.
- Any type now supports APIs to specify prefixes other than
type.googleapis.com
- Removed javanano_use_deprecated_package option; Nano will always has its own
".nano" package.

C++ (Beta)
- Improved hash maps.
- Improved hash maps comments. In particular, please note that equal hash
maps will not necessarily have the same iteration order and
serialization.
- Added a new hash maps implementation that will become the default in a
later release.
- Arenas
- Several inlined methods in Arena were moved to out-of-line to improve
build performance and code size.
- Added SpaceAllocatedAndUsed() to report both space used and allocated
- Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter
- Any
- Allow custom type URL prefixes in Any packing.
- TextFormat now expand the Any type rather than printing bytes.
- Performance optimizations and various bug fixes.

Java (Beta)
- Introduced an ExperimentalApi annotation. Annotated APIs are experimental
and are subject to change in a backward incompatible way in future releases.
- Introduced zero-copy serialization as an ExperimentalApi
- Introduction of the `ByteOutput` interface. This is similar to
`OutputStream` but provides semantics for lazy writing (i.e. no
immediate copy required) of fields that are considered to be immutable.
- `ByteString` now supports writing to a `ByteOutput`, which will directly
expose the internals of the `ByteString` (i.e. `byte[]` or `ByteBuffer`)
to the `ByteOutput` without copying.
- `CodedOutputStream` now supports writing to a `ByteOutput`. `ByteString`
instances that are too large to fit in the internal buffer will be
(lazily) written to the `ByteOutput` directly.
- This allows applications using large `ByteString` fields to avoid
duplication of these fields entirely. Such an application can supply a
`ByteOutput` that chains together the chunks received from
`CodedOutputStream` before forwarding them onto the IO system.
- Other related changes to `CodedOutputStream`
- Additional use of `sun.misc.Unsafe` where possible to perform fast
access to `byte[]` and `ByteBuffer` values and avoiding unnecessary
range checking.
- `ByteBuffer`-backed `CodedOutputStream` now writes directly to the
`ByteBuffer` rather than to an intermediate array.
- Improved lite-runtime.
- Lite protos now implement deep equals/hashCode/toString
- Significantly improved the performance of BuildermergeFrom() and
BuildermergeDelimitedFrom()
- Various bug fixes and small feature enhancement.
- Fixed stack overflow when in hashCode() for infinite recursive oneofs.
- Fixed the lazy field parsing in lite to merge rather than overwrite.
- TextFormat now supports reporting line/column numbers on errors.
- Updated to add appropriate Override for better compiler errors.

Python (Beta)
- Added JSON format for Any, Struct, Value and ListValue
- "[ ]" is now accepted for both repeated scalar fields and repeated message
fields in text format parser.
- Numerical field name is now supported in text format.
- Added DiscardUnknownFields API for python protobuf message.

Objective-C (Beta)
- Proto comments now come over as HeaderDoc comments in the generated sources
so Xcode can pick them up and display them.
- The library headers have been updated to use HeaderDoc comments so Xcode can
pick them up and display them.
- The per message and per field overhead in both generated code and runtime
object sizes was reduced.
- Generated code now include deprecated annotations when the proto file
included them.

C (Beta)

In general: some changes are breaking, which require regenerating messages.
Most user-written code will not be impacted _except_ for the renaming of enum
values.
- Allow custom type URL prefixes in `Any` packing, and ignore them when
unpacking
- `protoc` is now in a separate NuGet package (Google.Protobuf.Tools)
- New option: `internal_access` to generate internal classes
- Enum values are now PascalCased, and if there's a prefix which matches the
name of the enum, that is removed (so an enum `COLOR` with a value
`COLOR_BLUE` would generate a value of just `Blue`). An option
(`legacy_enum_values`) is temporarily available to disable this, but the
option will be removed for GA.
- `json_name` option is now honored
- If group tags are encountered when parsing, they are validated more
thoroughly (although we don't support actual groups)
- NuGet dependencies are better specified
- Breaking: `Preconditions` is renamed to `ProtoPreconditions`
- Breaking: `GeneratedCodeInfo` is renamed to `GeneratedClrTypeInfo`
- `JsonFormatter` now allows writing to a `TextWriter`
- New interface, `ICustomDiagnosticMessage` to allow more compact
representations from `ToString`
- `CodedInputStream` and `CodedOutputStream` now implement `IDisposable`,
which simply disposes of the streams they were constructed with
- Map fields no longer support null values (in line with other languages)
- Improvements in JSON formatting and parsing

Javascript (Alpha)
- Better support for "bytes" fields: bytes fields can be read as either a
base64 string or UInt8Array (in environments where TypedArray is supported).
- New support for CommonJS imports. This should make it easier to use the
JavaScript support in Node.js and tools like WebPack. See js/README.md for
more information.
- Some significant internal refactoring to simplify and modularize the code.

Ruby (Alpha)
- JSON serialization now properly uses camelCased names, with a runtime option
that will preserve original names from .proto files instead.
- Well-known types are now included in the distribution.
- Release now includes binary gems for Windows, Mac, and Linux instead of just
source gems.
- Bugfix for serializing oneofs.

C++/Java Lite (Alpha)

A new "lite" generator parameter was introduced in the protoc for C++ and
Java for Proto3 syntax messages. Example usage:


./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto


The protoc will treat the current input and all the transitive dependencies
as LITE. The same generator parameter must be used to generate the
dependencies.

In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported.

3.0.0beta2

General
- Introduced a new language implementation: JavaScript.
- Added a new field option "json_name". By default proto field names are
converted to "lowerCamelCase" in proto3 JSON format. This option can be
used to override this behavior and specify a different JSON name for the
field.
- Added conformance tests to ensure implementations are following proto3 JSON
specification.

C++ (Beta)
- Various bug fixes and improvements to the JSON support utility:
- Duplicate map keys in JSON are now rejected (i.e., translation will
fail).
- Fixed wire-format for google.protobuf.Value/ListValue.
- Fixed precision loss when converting google.protobuf.Timestamp.
- Fixed a bug when parsing invalid UTF-8 code points.
- Fixed a memory leak.
- Reduced call stack usage.

Java (Beta)
- Cleaned up some unused methods on CodedOutputStream.
- Presized lists for packed fields during parsing in the lite runtime to
reduce allocations and improve performance.
- Improved the performance of unknown fields in the lite runtime.
- Introduced UnsafeByteStrings to support zero-copy ByteString creation.
- Various bug fixes and improvements to the JSON support utility:
- Fixed a thread-safety bug.
- Added a new option “preservingProtoFieldNames” to JsonFormat.
- Added a new option “includingDefaultValueFields” to JsonFormat.
- Updated the JSON utility to comply with proto3 JSON specification.

Python (Beta)
- Added proto3 JSON format utility. It includes support for all field types
and a few well-known types except for Any and Struct.
- Added runtime support for Any, Timestamp, Duration and FieldMask.
- "[ ]" is now accepted for repeated scalar fields in text format parser.

Objective-C (Beta)
- Various bug-fixes and code tweaks to pass more strict compiler warnings.
- Now has conformance test coverage and is passing all tests.

C (Beta)
- Various bug-fixes.
- Code generation: Files generated in directories based on namespace.
- Code generation: Include comments from .proto files in XML doc
comments (naively)
- Code generation: Change organization/naming of "reflection class" (access
to file descriptor)
- Code generation and library: Add Parser property to MessageDescriptor,
and introduce a non-generic parser type.
- Library: Added TypeRegistry to support JSON parsing/formatting of Any.
- Library: Added Any.Pack/Unpack support.
- Library: Implemented JSON parsing.

Javascript (Alpha)
- Added proto3 support for JavaScript. The runtime is written in pure
JavaScript and works in browsers and in Node.js. To generate JavaScript
code for your proto, invoke protoc with "--js_out". See js/README.md
for more build instructions.

Page 25 of 27

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.