From 1817a01907d4fb504ad4bf0abbb824844474bd57 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 20 Nov 2020 11:06:07 -0800 Subject: [PATCH 1/6] Updated changelog. --- CHANGES.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index da3e51bc534d..d986d07cf873 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,26 @@ +Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + C++ + * MessageDifferencer: fixed bug when using custom ignore with multiple + unknown fields + * Use init_seg in MSVC to push initialization to an earlier phase. + * Runtime no longer triggers -Wsign-compare warnings. + * Fixed -Wtautological-constant-out-of-range-compare warning. + * DynamicCastToGenerated works for nullptr input for even if RTTI is disabled + * Arena is refactored and optimized. + * Change the signature of Any::PackFrom() to return false on error. + + Java + * Avoid possible UnsupportedOperationException when using CodedInputSteam + with a direct ByteBuffer. + * Make Durations.comparator() and Timestamps.comparator() Serializable. + * Add more detailed error information for dynamic message field type + validation failure + + Python + * Provided an override for the reverse() method that will reverse the internal + collection directly instead of using the other methods of the BaseContainer. + 2020-11-11 version 3.14.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) Protocol Compiler From 29e788d8e2d120bb932ed058e62ed2bc069cc921 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 20 Nov 2020 11:20:13 -0800 Subject: [PATCH 2/6] Fixed spelling mistake. --- src/google/protobuf/arena.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index c2404429532c..bf8f0eea7843 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -348,7 +348,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { } } - // The following are routines are for monitoring. They will aproximate the + // The following are routines are for monitoring. They will approximate the // total sum allocated and used memory, but the exact value is an // implementation deal. For instance allocated space depends on growth // policies. Do not use these in unit tests. From 9be042029b9a8e8e7fe03bdd3891c9fb7415fc1d Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 20 Nov 2020 11:43:17 -0800 Subject: [PATCH 3/6] Reverted unintentional change. --- python/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/setup.py b/python/setup.py index 39eb18d4bb49..d003c969ab99 100755 --- a/python/setup.py +++ b/python/setup.py @@ -254,7 +254,7 @@ def get_option_from_sys_argv(option_str): os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'] = 'cpp' # Keep this list of dependencies in sync with tox.ini. - install_requires = ['six>=1.9', 'setuptools'] + install_requires = ['six>=1.9'] if sys.version_info <= (2,7): install_requires.append('ordereddict') install_requires.append('unittest2') From 284f4b6dd1496ad03212b169c5a3afad0f02204c Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 20 Nov 2020 11:50:09 -0800 Subject: [PATCH 4/6] Fixed another spelling error. --- src/google/protobuf/arena_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/arena_impl.h b/src/google/protobuf/arena_impl.h index 0583987f07f6..84c5d058804f 100644 --- a/src/google/protobuf/arena_impl.h +++ b/src/google/protobuf/arena_impl.h @@ -229,7 +229,7 @@ class PROTOBUF_EXPORT SerialArena { char* ptr_; char* limit_; - // contructor private as to only New should be used. + // Constructor is private as only New() should be used. inline SerialArena(Block* b, void* owner); void* AllocateAlignedFallback(size_t n, const AllocationPolicy* policy); std::pair AllocateAlignedWithCleanupFallback( From c2c13a558ab1473b9b8ea60f9b550f96a2d1a577 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 20 Nov 2020 13:20:55 -0800 Subject: [PATCH 5/6] Fixed Python C++ extension for Python 3.8. Python 3.8 changed the meaning and type of the tp_print slot. --- python/google/protobuf/pyext/repeated_composite_container.cc | 2 +- python/google/protobuf/pyext/repeated_scalar_container.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/google/protobuf/pyext/repeated_composite_container.cc b/python/google/protobuf/pyext/repeated_composite_container.cc index d934f756bab5..1b739ae23936 100644 --- a/python/google/protobuf/pyext/repeated_composite_container.cc +++ b/python/google/protobuf/pyext/repeated_composite_container.cc @@ -567,7 +567,7 @@ PyTypeObject RepeatedCompositeContainer_Type = { sizeof(RepeatedCompositeContainer), // tp_basicsize 0, // tp_itemsize repeated_composite_container::Dealloc, // tp_dealloc - nullptr, // tp_print + 0, // tp_print, in Python >=3.8: Py_ssize_t tp_vectorcall_offset nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare diff --git a/python/google/protobuf/pyext/repeated_scalar_container.cc b/python/google/protobuf/pyext/repeated_scalar_container.cc index 8c937b7ccf69..6b15258fd81c 100644 --- a/python/google/protobuf/pyext/repeated_scalar_container.cc +++ b/python/google/protobuf/pyext/repeated_scalar_container.cc @@ -753,7 +753,7 @@ PyTypeObject RepeatedScalarContainer_Type = { sizeof(RepeatedScalarContainer), // tp_basicsize 0, // tp_itemsize repeated_scalar_container::Dealloc, // tp_dealloc - nullptr, // tp_print + 0, // tp_print, in Python >=3.8: Py_ssize_t tp_vectorcall_offset nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare From 7993c7456ce8d016e5fd3c88e5702807a1724dde Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 23 Nov 2020 09:09:05 -0800 Subject: [PATCH 6/6] Added note to CHANGES.txt about Arena::SpaceAllocated(). --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index d986d07cf873..b55e275deb25 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) * Fixed -Wtautological-constant-out-of-range-compare warning. * DynamicCastToGenerated works for nullptr input for even if RTTI is disabled * Arena is refactored and optimized. + * Clarified/specified that the exact value of Arena::SpaceAllocated() is an + implementation detail users must not rely on. It should not be used in + unit tests. * Change the signature of Any::PackFrom() to return false on error. Java