* Rollback pull request #9852, which will break clients who don't IWYU and depend on us for these STL headers
* Rolling forward https://github.com/protocolbuffers/protobuf/pull/9852 after confirming it doesn't break google internals
* WIP.
* Restore deleted __init__.py files.
* Updated version of upb.
* Moved upb from a submodule to a Bazel dep.
* Updated to new upb which can tolerate missing system_python.
* Updated to a new upb.
* Fix NPE during encoding and add regression test for issue 9507.
(cherry picked from commit 58e320a732)
* Implement `respond_to?` in RubyMessage (#9677)
All synthetic methods implemented by `method_missing` are now supported by `respond_to?`.
Fixes issue #9202.
* Fix null pointer exceptions exposed by new regression tests.
* Fix clear_ on oneofs so that it is safe to call repeatedly and so that respond_to? does not depend on whether the oneof is currently cleared.
* Code cleanup: reenable more tests on JRuby.
* Align JRuby behavior with CRuby by throwing a RuntimeError when attempting to assign to a oneof.
(cherry picked from commit 8e7f936696)
* Update protobuf version
* Merge pull request #9727 from mlocati/build-packaged-php-extension
Fix building packaged PHP extension
(cherry picked from commit 7f9901c5f6)
* Update protobuf version
* Update changelogs for 3.20.1-rc1
Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
Co-authored-by: Jorg Brown <jorg.brown@gmail.com>
* Drop Python versions <3.7.
* Updated README to clarify that Python 3.7 is the minimum.
* Removed more Python 3.5-specific code.
Also changed tests to skip missing interpreters.
* Invoke tox directly instead of through Python.
Hopefully this will pick up python3.
* Updated java_stretch image to bullseye to get Python >= 3.7.
* Use jdk11 instead of jdk8.
* Installed python2 for gtest.
* Use "python3 -m venv" instead of "virtualenv."
* Install python3-venv.
The base class/documentation suggest that the argument
names are `self` and `done`, while the runtime used
argument names `srvc` and `callback`.
`mypy.stubtest` was able to identify this - as it compares
the types (autogenerated by
[`mypy-protobuf`](https://github.com/dropbox/mypy-protobuf/))
to the actual code generated by protoc at runtime.
Since the stubs assume the generated code matches the abstract
interface in service.py - it saw these differences.
The previously used term "3-Clause BSD License" is not properly
standarized. A common standard is SPDX, therefore "3-Clause BSD License"
is substituted with "BSD-3-Clause" which is a SPDX identifier.
`grep -rl "3-Clause BSD License" | xargs -n1 sed -i "s/3-Clause BSD
License/BSD-3-Clause/g"`
The Windows build for Python 3.10 is giving us an error about ssize_t
being undefined, so this commit fixes the problem by replacing it with
Py_ssize_t, which is consistent with what we do elsewhere in the file.
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.
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.
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.
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.
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