Commit Graph

8813 Commits

Author SHA1 Message Date
Deanna Garcia
97c901cfb6 Fixing formatting 2021-11-10 21:27:20 +00:00
Deanna Garcia
a5fa4fb019 Creating bazel toolchains to compile for macOS. 2021-11-10 21:12:44 +00:00
Adam Cozzette
9c3af64ae4
Update checked-in C# generated code (#9158)
This change fixes the test that verifies that the checked-in generated
code for descriptor.proto is up to date.
2021-10-26 14:31:46 -07:00
deannagarcia
247649cdb0
Merge pull request #9150 from Shopify/pz-message-encode-mem-leak
[Ruby] Fix memory leak in MessageClass.encode
2021-10-26 13:01:52 -07:00
Marnix Bouhuis
e350ef8c20
JS: Fixed ReferenceError: window is not defined when getting the global object (#9156) 2021-10-26 09:48:47 -07:00
Elliotte Rusty Harold
b3b3162219
Merge pull request #9148 from belugabehr/nio-charsets
Transition to NIO StandardCharsets
2021-10-25 21:44:38 +00:00
deannagarcia
d630f96dce
Merge pull request #9144 from appledragon/master
for windows build fail issue, confliction with std max
2021-10-25 14:30:45 -07:00
Dennis Shao
2007a39db0
Merge pull request #9151 from Inconnu08/patch-1
Fix grammatical error in the descriptor protobuf definition
2021-10-25 15:46:36 -05:00
Taufiq Rahman
84c2e1e502
Fix grammatical error in comments #7603 2021-10-26 02:09:13 +06:00
Peter Zhu
3a18299cc0 Fix memory leak in MessageClass.encode
If the line above raises an exception, the upb_arena is lost and memory
is leaked.
2021-10-25 15:55:12 -04:00
David Mollitor
3370cc4456 Transition to NIO StandardCharsets 2021-10-25 13:46:34 -04:00
appledragon
02d2e5fdd7
Update stl_util.h 2021-10-25 15:31:06 +08:00
Nipunn Koorapati
0707f2e7f5
Provide a type alias field ValueType on EnumTypeWrapper (#8182)
This should provide a runtime alias, which can be
used in mypy stubs to provide better typing for enum values

Fixes #8175
2021-10-21 15:09:41 -07:00
Derek Perez
adc1f931e3
Fix wkt dupes (#8942)
* properly ignore WKTs in lang_proto_toolchain for java

We already pre-compile the well known types into the runtimes so they shouldn't be re-compiled. #8925

* remove accidental proto addition.
2021-10-21 14:17:20 -07:00
Adam Cozzette
f4af0bc931
Fix distcheck test by updating example Go file paths (#9137) 2021-10-21 14:15:54 -07:00
Damien Neil
c8dfe32b5a
examples: update Go example (#7217)
Update the Go example to use Go modules: Move the example into a
directory containing a go.mod file, change the installation instructions
to use "go install".

Update the go_package option in addressbook.proto to an actual module path.

Update examples to use the google.golang.org/protobuf/proto module.
2021-10-21 13:27:40 -07:00
Adam Cozzette
42db8a3f96
Make IsDescriptor* helpers lenient about descriptor name (#9127)
Our internal version of the codebase has a different path and package
name for descriptor.proto, so this change updates IsDescriptorProto()
and IsDescriptorOptionMessage() to be able to handle both the internal
and external descriptor types.
2021-10-21 11:47:05 -07:00
Adam Cozzette
e6430dd4a0
Merge pull request #9136 from protocolbuffers/3.19.x
Merge 3.19.x into master
2021-10-21 11:45:51 -07:00
Upils
1e1c1cd884
Reserve extension id range for protoc-gen-checker (#9133) 2021-10-21 08:24:38 -07:00
Adam Cozzette
67c2a92f82
Ensure that release archives contain everything needed for Bazel (#9131)
This change adds some files to EXTRA_DIST in Makefile.am so that our
published tar and zip files will have everything needed for Bazel
builds. I also added a basic test for this so that next time we should
find out sooner if we're missing any important files.

This should fix #9129.
2021-10-21 06:47:17 -07:00
Adam Cozzette
63f952b987
Fix Python 3.10 C++ tests (#9128)
The first change is to make sure we always define PY_SSIZE_T_CLEAN
before including Python.h. Starting from Python 3.10 this is required.
Otherwise we get errors like this:

SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

The second change is to update reflection_test.py to account for the
fact that with Python 3.10, we get a TypeError even with the C++
implementation when trying to assign a float to a bool field. I'm not
sure why this changed with Python 3.10, but it seems like a good thing
since this is the desired behavior anyway.
2021-10-20 14:51:07 -07:00
Adam Cozzette
17b30e9647
Update protobuf version (#9119) 2021-10-20 10:14:02 -07:00
Joshua Haberman
912eb8b89e
Merge pull request #9121 from haberman/rubyfix
Fix for descriptor_pb.rb: google/protobuf should be required first.
2021-10-19 17:14:26 -07:00
Joshua Haberman
bb5a2684de Minor whitespace fixes and test fixups. 2021-10-19 16:21:24 -07:00
deannagarcia
51cb7f99d7
Merge pull request #9120 from protocolbuffers/kotlinInlining
Fixing inlining and deprecation for repeated string fields in kotlin
2021-10-19 15:21:52 -07:00
Joshua Haberman
4c445b1803 Fix for descriptor_pb.rb: google/protobuf should be required first. 2021-10-19 14:51:52 -07:00
Deanna Garcia
ad9eb238cc Fixing formatting 2021-10-19 21:36:30 +00:00
Deanna Garcia
33113ce9f9 Fixing inlining and deprecation for repeated string fields in kotlin 2021-10-19 21:34:32 +00:00
Adam Cozzette
3f3e6f47c6
Update version to 3.19.0-rc2 and fix changelog about Java 7 (#9116)
* Update protobuf version

* Update CHANGES.txt to reflect that we're not yet dropping Java 7
2021-10-19 09:01:57 -07:00
Masaki Hara
d08bc71c96
Suppress dot-delimiter warning if ruby_package consists of a single component (#7276) 2021-10-15 20:11:59 -07:00
Chris Povirk
62d59d7d4c
Update maven-surefire-plugin to 3.0.0-M5. (#7830)
This avoids https://issues.apache.org/jira/browse/SUREFIRE-1439,
which I hit while investigating
https://github.com/protocolbuffers/protobuf/issues/7827
2021-10-15 20:02:36 -07:00
Adam Cozzette
454778d011
Python: fix usages of deprecated assertRaisesRegxp (#9098)
assertRaisesRegexp has been deprecated in favor of the slightly
different spelling assertRaisesRegex. Let's fix this just to clean up a
bunch of deprecation warnings in the tests.
2021-10-15 19:00:04 -07:00
Adam Cozzette
53a1d66d9d
Update PHP release notes for 3.19.0 (#9110) 2021-10-15 15:35:27 -07:00
Adam Cozzette
d0a2c395e9
Merge pull request #9109 from protocolbuffers/3.18.x
Merge 3.18.x into master
2021-10-15 15:26:42 -07:00
Adam Cozzette
d1c6620347 Update CHANGES.txt for 3.19.0 2021-10-15 15:21:08 -07:00
deannagarcia
df5b7fabb8
Merge pull request #7498 from psobot/add-python-descriptor-debug-string
Add GetDebugString to Python FileDescriptor interface.
2021-10-15 15:03:02 -07:00
deannagarcia
6c0168bd65
Merge pull request #7016 from roehling/fix-6205-unknown-fields-integer-overflow
Prevent integer overflow for unknown fields in Python
2021-10-15 14:59:57 -07:00
Adam Cozzette
8a0aa4b372
Update Mac test runs to download RVM directly from GitHub (#9107)
Our Mac test runs recently started failing to download RVM. The issue
appears to be a combination of an SSL certificate expiring and old
OpenSSL versions having a bug preventing them from validating the
replacement certificate: https://github.com/rvm/rvm/issues/5133

This commit works around the problem by downloading RVM from GitHub as
suggested in one of the comments on the issue above.
2021-10-15 14:41:59 -07:00
Adam Cozzette
519340d662
Update protobuf version (#9106) 2021-10-15 14:33:06 -07:00
Adam Cozzette
f367bfb13d
Use dedicated helper functions for map descriptors (#9099)
The Descriptor class now has map_key() and map_value() methods for
accessing the special key and value fields in generated map entry
messages. This commit updates all the relevant code to use these
accessors instead of the clunkier FindFieldByName("key") or
FindFieldByName("value") approach.
2021-10-15 14:26:54 -07:00
Nils
6b0a1c2407
Add prost and quick-protobuf to third_party.md (#9104) 2021-10-15 13:12:01 -07:00
Adam Cozzette
d049bce844
Remove references to HAVE_PTHREAD (#9100)
This is based on @haberman's changes in #8257. Now that we're using
std::mutex we no longer need to check whether pthreads are available, so
this commit removes references to HAVE_PTHREAD. I left the autotools
build alone, though, since we are likely to drop support for it soon
anyway.
2021-10-15 13:10:38 -07:00
Bu Sun Kim
c01cd6ec79
Add python 3.10 (#9034)
* Add python 3.10

* Update setup.py and tox.ini

* fix: fix 3.9 -> 3.10

* fix: py310-cpp
2021-10-15 10:24:49 -07:00
Peter Sobot
ef0bd1343b Only run GetDebugString test with cpp impl. 2021-10-15 11:39:21 -04:00
Jorg Brown
72f085747e
Use int32_t rather than int32. 2021-10-14 19:44:18 -07:00
Marnix Bouhuis
6bc21b531e
Update the way we get the global object, to comply with CSP no-unsafe-eval (#8864) 2021-10-14 15:15:20 -07:00
Daniel Kuschny
3e02f65f5c
Skip exports if not available by CommonJS (#8856) 2021-10-14 15:02:21 -07:00
Timo Röhling
5100be2b77 Prevent integer overflow for unknown fields
The PyInt_FromLong() conversion function will truncate 64 bit integer
values on 32 bit architectures. We will now use the PyLong_* functions
with the appropriate minimum size for each field.

Note that this commit also switches to the unsigned versions, since the
unknown integer fields have been declared unsigned anyway.

Fixes #6205
2021-10-14 23:30:01 +02:00
Peter Sobot
4e176f29b4 Added GetDebugString to Python FileDescriptor interface. 2021-10-14 16:51:22 -04:00
deannagarcia
8b69867fef
Merge pull request #7642 from philjdf/master
[C#] Make FieldDescriptor propertyName public
2021-10-14 12:43:55 -07:00