Commit Graph

629 Commits

Author SHA1 Message Date
Joshua Haberman
4a6dc34d3a Sync from Piper @365872496
PROTOBUF_SYNC_PIPER
2021-03-30 12:37:31 -07:00
Jan Tattermusch
0ebbd7d7c3
Enable crosscompiling aarch64 python wheels under dockcross manylinux docker image (#8280)
This uses the dockcross manylinux docker image to enable crosscompiling aarch64 python wheels. The wheels built for aarch64 linux are excluded from the release for now, pending testing (pending, in PR#8392).
2021-03-29 19:04:16 -07:00
Joshua Haberman
96307d28f6 Sync from Piper @364389596
PROTOBUF_SYNC_PIPER
2021-03-22 13:05:55 -07:00
Joshua Haberman
77334e39a7 Merge tag 'refs/tags/sync-piper' into sync-stage 2021-03-22 13:05:55 -07:00
Adam Cozzette
9db84d08fb Merge branch '3.15.x' into merge-3-15-x 2021-03-12 15:05:10 -08:00
Adam Cozzette
6aa539bf01 Update protobuf version 2021-03-10 14:53:26 -08:00
Adam Cozzette
673971834c
Merge branch 'master' into 3.15.x 2021-03-04 17:53:03 -08:00
Adam Cozzette
4fff47a418 Update protobuf version 2021-03-04 13:35:04 -08:00
Alexander Shadchin
87dd07b436
Switch on "new" buffer API (#8339)
"Old" buffer API will removed in Python 3.10. This is also fix #7930.
2021-03-04 11:00:41 -08:00
Adam Cozzette
541b1735a8
Merge branch 'master' into 3.15.x-202103031418 2021-03-03 15:01:11 -08:00
Joshua Haberman
27f4e8b5d9
Merge pull request #8350 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2021-03-03 14:59:34 -08:00
Adam Cozzette
13fa25013a Merge branch '3.15.x' into 3.15.x-202103031418 2021-03-03 14:29:11 -08:00
Adam Cozzette
fd8aabf32d Update protobuf version 2021-03-03 11:37:48 -08:00
Yuriy Chernyshov
e9091e6d8c
Fix some constness / char literal issues being found by MSVC standard conforming mode (#8344)
* Fix some constness / char literal issues being found by MSVC standard conforming mode

* Switch to const_cast from C-style casts
2021-03-01 12:59:39 -08:00
Joshua Haberman
899c276248 Merge tag 'refs/tags/sync-piper' into sync-stage 2021-02-26 10:37:38 -08:00
Joshua Haberman
9df42757f9 Sync from Piper @359788468
PROTOBUF_SYNC_PIPER
2021-02-26 10:37:37 -08:00
Adam Cozzette
983d115bd9 Update protobuf version 2021-02-25 09:20:20 -08:00
Adam Cozzette
d7e943b8d2 Update protobuf version 2021-02-23 13:21:42 -08:00
Alexander Reynolds
393e453033 Add MethodDescriptor.CopyToProto() 2021-02-22 02:25:37 -08:00
Adam Cozzette
052dc799d2 Update protobuf version 2021-02-19 15:12:24 -08:00
Adam Cozzette
133e5e7526 Update protobuf version 2021-02-18 16:53:24 -08:00
Adam Cozzette
de701c660b Update protobuf version 2021-02-18 16:53:24 -08:00
Adam Cozzette
ac9218c5d9 Update protobuf version 2021-02-18 16:53:24 -08:00
Adam Cozzette
ae50d9b990 Update protobuf version 2021-02-18 11:50:15 -08:00
Adam Cozzette
8260126500 Update protobuf version 2021-02-17 10:51:33 -08:00
Adam Cozzette
e9f2ef308c Update protobuf version 2021-02-05 15:37:10 -08:00
Joshua Haberman
51daaba638 Sync from Piper @355707933
PROTOBUF_SYNC_PIPER
2021-02-04 14:09:49 -08:00
Jan Tattermusch
aa13fde017
remove obsolete scripts for python wheels (#8250)
Nowadays, this seems to be script where python wheels are being built:
https://github.com/protocolbuffers/protobuf/blob/ac63e80/kokoro/release/python/linux/build_artifacts.sh

Removing the obsolete scripts to avoid confusion.
2021-02-02 16:53:26 -08:00
gerben-s
10ecb080cb
Merge pull request #8121 from busunkim96/add-39
add python 3.9
2021-02-01 19:34:02 -08:00
deannagarcia
c89cb8a57d
Reverse unintentional change 2021-01-26 11:55:47 -08:00
deannagarcia
37e88c474e
Change install_requires 2021-01-26 09:48:24 -08:00
Deanna Garcia
a00125024e Sync from Piper @353127564
PROTOBUF_SYNC_PIPER
2021-01-22 00:24:30 +00:00
Thomas BACCELLI
26c0fbc15b Add macOS big sur compatibility 2020-12-07 14:36:56 -08:00
Bu Sun Kim
51c80ce1d5 add python 3.9 2020-12-04 21:16:47 +00:00
Joshua Haberman
c2c13a558a Fixed Python C++ extension for Python 3.8.
Python 3.8 changed the meaning and type of the tp_print slot.
2020-11-20 13:20:55 -08:00
Joshua Haberman
9be042029b Reverted unintentional change. 2020-11-20 11:43:17 -08:00
Joshua Haberman
5c028d6cf4 Sync from Piper @343521567
PROTOBUF_SYNC_PIPER
2020-11-20 10:44:58 -08:00
Joshua Haberman
920803e18d Merge tag 'refs/tags/sync-piper' into sync-stage 2020-11-20 10:44:58 -08:00
Adam Cozzette
f3192d6128 Update protobuf version 2020-11-13 11:27:32 -08:00
Adam Cozzette
1b851b3fe6 Update protobuf version 2020-11-12 12:44:26 -08:00
Aurélien Grenotton
99149badc0 Fix PyUnknownFields memory leak (#7928)
Properly release internal data structure on deallocation.
Fix #7301
2020-11-12 12:31:39 -08:00
Adam Cozzette
a8ab1fade9 Update protobuf version 2020-11-10 17:15:32 -08:00
Adam Cozzette
b45ce5eee5 Updated python/release.sh to use Python 3 for setup.py
This fixed an error I was getting about bdist_wheel not being found.
2020-11-10 15:39:42 -08:00
Adam Cozzette
27100b40fd Update protobuf version 2020-11-05 14:30:53 -08:00
Joshua Haberman
fdc35840b9
Merge pull request #7925 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2020-10-28 12:02:24 -07:00
Joshua Haberman
b70695dd68 Sync from Piper @338707351
PROTOBUF_SYNC_PIPER
2020-10-23 11:07:04 -07:00
Joshua Haberman
73ac11febe Merge tag 'refs/tags/sync-piper' into sync-stage 2020-10-23 11:07:04 -07:00
Joshua Haberman
de371235c9 Sync from Piper @338284531
PROTOBUF_SYNC_PIPER
2020-10-21 10:04:14 -07:00
Joshua Haberman
820d1ca5af Merge tag 'refs/tags/sync-piper' into sync-stage 2020-10-21 10:04:14 -07:00
Misha Seltzer
7daf0aa7b0 Removed the unnecessary setuptools package dependency for Python package.
The setuptools package was added to allow definition of namespaces using
the now outdated (and discouraged from use) pkg_resources-style.

The code here, for a long while now, uses a try/except (`ImportError`)
protection around the setuptools code, and falls back to the more
encoraged pkgutil-style.

Removing this library won't affect any current workflow, and in the case
of setuptools not found, it'll actually use a more modern (and
encouraged) flow.
2020-10-12 17:27:33 -07:00
David L. Jones
ad29d402c4
Enhance documentation for generate_py_protobufs. (#7937)
This change updates the README.md to describe the order of resolution
between `options['generate_py_protobufs']`, `--protoc`, and the `PROTOC`
env var.

Since the `setup.py` script is not the main way to find docs, this change
deletes the parts of the docstring that are redundant with `README.md`.
2020-10-02 13:36:49 -07:00
David L. Jones
344f28d4a2
Allow generate_py_protobufs to find a custom protoc (#7936)
Currently, the logic in `generate_py_protobufs` cannot find a custom `protoc` (even though it's supposed to be possible). Fixes:

1. Mark the `--protoc` flag as accepting an argument.
2. If the `--protoc` flag was not passed, try finding `PROTOC` in the environment.
3. (Existing behavior) Otherwise, fall back to `spawn.find_executable`.

Hat tip to @bobhancock for uncovering the problem(s).
2020-10-01 17:17:55 -07:00
David L. Jones
b774da0d42
Change Python kokoro configs to test only their specified version. (#7927)
Using non-versioned scripts for `build_file` means every Python version is
tested (under Tox), and this is multiplied by each Python version running Tox.

For example, when the `python38` config is used to run Tox, the
Tox layer runs on Python 3.8. This then tests all of the Python versions
individually, including, for example, python27 tests.

This change fixes the `build_file` paths to point to the same-pathed build
script. For example, `kokoro/linux/python27/presubmit.cfg` now uses
`kokoro/linux/python27/build.sh`.

Some additional fixes:

*  Use `python -m tox` in tests.sh instead of just `tox`. This helps non-site
   installations of tox, where the `tox` script may not be on `$PATH`.
*  Ensure tox (and other Python build-related packages) are available in
   Python testing images. (New images have been pushed.)
*  Disable `--warnings_as_errors` due to deprecated function.
*  Remove apt lists per [Docker best practices][1].

[1]: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
2020-09-30 15:56:17 -07:00
Joshua Haberman
aefc1e7670 Merge tag 'refs/tags/sync-piper' into sync-stage
# Conflicts:
#	conformance/failure_list_js.txt
#	src/google/protobuf/generated_message_reflection.h
2020-09-28 11:55:10 -07:00
Joshua Haberman
38d6de1eef Sync from Piper @334206209
PROTOBUF_SYNC_PIPER
2020-09-28 11:54:54 -07:00
David L. Jones
66e3562aaf
Remove uses of pkg_resources in non-namespace packages. (#7902)
In #713 and #1296, the `google` package in protobuf sources was found
to cause conflicts with other Google projects, because it was not
properly configured as a namespace package [1]. The initial fix in
786f80f addressed part of the issue, and #1298 fixed the rest.

However, 786f80f (the initial fix) also made `google.protobuf` and
`google.protobuf.pyext` into namespace packages. This was not correct:
they are both regular, non-namespace, sub-subpackages.

However (still), the follow-up #1298 did not nominate them as
namespace packages, so the namespace registration behavior has
remained, but without benefit.

This change removes the unnecessary namespace registration, which has
substantial overhead, thus reducing startup time substantially when
using protobufs.

Because this change affects the import internals, quantifying the
overhead requires a full tear-down/start-up of the Python interpreter.
So, to capture the full cost for every run, I measured the time to
launching a _fresh_ Python instance in a subprocess, varying the
imports and code under test. In other words, I used `timeit` to
measure the time to launch a _fresh_ Python subprocess which actually
performs the imports.

* Reference: normal Python startup (i.e., don't import protobuf at all).
  ```
   % python3 -m timeit -s 'import subprocess' -r 3 -n 10 'subprocess.call(["python3", "-c", "pass"])'
  10 loops, best of 3: 27.1 msec per loop
  ```

* Baseline: cost to import `google.protobuf.descriptor`, with
  extraneous namespace packages.
  ```
  % python3 -m timeit -s 'import subprocess' -r 3 -n 10 'subprocess.call(["python3", "-c", "import google.protobuf.descriptor"])'
  10 loops, best of 3: 133 msec per loop
  ```

* This change: cost to import `google.protobuf.descriptor`, without
  extraneous namespace packages.
  ```
  % python3 -m timeit -s 'import subprocess' -r 3 -n 10 'subprocess.call(["python3", "-c", "import google.protobuf.descriptor"])'
  10 loops, best of 3: 43.1 msec per loop
  ```

[1]:  https://packaging.python.org/guides/packaging-namespace-packages/
2020-09-22 20:46:07 -07:00
Fabrice Fontaine
3abbbd8870 python/setup.py: remove unneeded wheel dependency
wheel is required since version 3.13.0 and
ff92cee10b

This will result in the following build failure when cross-compiling:

Download error on https://pypi.org/simple/wheel/: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'wheel' (maybe misspelled?)
Download error on https://pypi.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or working download links found for wheel

Remove wheel requirement from setup.py as it is only needed by
release.sh, not by setup.py

Fixes:
 - http://autobuild.buildroot.org/results/371c686a10d6870933011b46d36b1879d29046b9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-09-21 12:25:14 -07:00
David L. Jones
f4aa17b28a Update documentation for protobuf_distutils Python package.
This updates README.md to use an example with pip instead of setup.py.
The README.md is then used as the long_description argument to setup(),
so that the doc shows up on pypi.
2020-09-14 20:14:32 -07:00
David L. Jones
ff06e23d23
Add a setuptools extension for generating Python protobufs (#7783)
This extension allows Python code to be generated from setup.py files, so they
are created as part of a normal Python build. The extension uses an already-existing
protoc binary, which can be explicitly specified if needed.
2020-08-31 10:40:57 -07:00
Joshua Haberman
5c26cae18c Re-add change that was somehow lost. 2020-08-25 14:42:47 -07:00
Joshua Haberman
28d6aa04f6 Merge tag 'refs/tags/sync-piper' into sync-stage 2020-08-24 15:48:44 -07:00
Joshua Haberman
f3cf99c0fb Sync from Piper @328224070
PROTOBUF_SYNC_PIPER
2020-08-24 15:48:43 -07:00
Misha Seltzer
223e89157a Removed test files from pypi distribution generation code.
Fixes #7493

By removing all test files from the distribution, we've reduced the .whl
file size from 1259808B (1.2MB) to 996042B (973K), which is 21% reduction,
And reduced the unpacked size from 5317178B (5.1MB) to 3251811B (3.2MB),
which is 39% reduction.

Size was measured for the protobuf-3.11.3-cp35-cp35m-manylinux1_x86_64.whl release.
2020-08-19 17:16:36 -07:00
Joshua Haberman
32a94ce353 Merge tag 'refs/tags/sync-piper' into sync-stage
# Conflicts:
#	csharp/src/Google.Protobuf.Test/testprotos.pb
2020-08-17 15:26:33 -07:00
Joshua Haberman
95e6c5b474 Sync from Piper @327110949
PROTOBUF_SYNC_PIPER
2020-08-17 15:26:13 -07:00
Adam Cozzette
58f4260e8e Merged 3.13.x into master 2020-08-17 11:06:11 -07:00
Adam Cozzette
fde7cf7358 Update protobuf version 2020-08-14 15:20:53 -07:00
Adam Cozzette
2ad43bfd3d Fixed tests for Python 2 in python/release.sh
Setuptools 45.0 removed support for Python 2, so to keep these tests
working for Python 2 I updated the script to install an older setuptools
version.
2020-08-14 09:50:38 -07:00
Adam Cozzette
98c2e69f8c Update protobuf version 2020-08-12 14:49:20 -07:00
Peter Newman
e2cc2de304
Fix lots of spelling errors (#7751)
* Fix a typo

* Fix lots of spelling errors

* Fix a few more spelling mistakes

* s/parsable/parseable/

* Don't touch the third party files

* Cloneable is the preferred C# term

* Copyable is the preferred C++ term

* Revert "s/parsable/parseable/"

This reverts commit 534ecf7675.

* Revert unparseable->unparsable corrections
2020-08-10 11:08:25 -07:00
Adam Cozzette
1c587a8059 Updated version to 3.13.0-rc2 2020-08-07 14:44:49 -07:00
Adam Cozzette
ff92cee10b Fixed release.sh and setup.py for Python
Newer versions of virtualenv lack the --no-site-packages option, so I
had to remove it to keep the release.sh script working. I read that this
option has already been the default for a long time, so removing it
shouldn't chany any behavior.

For the setup.py script, I was getting some errors about the bdist_wheel
argument to setup.py, but I was able to fix that by adding 'wheel' to
setup_requires.
2020-08-07 14:44:49 -07:00
Adam Cozzette
8940150706 Updated version to 3.13.0-rc1. 2020-08-07 14:44:49 -07:00
Joshua Haberman
6ba52411d0 Sync from Piper @320514613
PROTOBUF_SYNC_PIPER
2020-07-09 18:17:47 -07:00
Joshua Haberman
25755efc4f Sync from Piper @319848517
PROTOBUF_SYNC_PIPER
2020-07-06 13:54:50 -07:00
Joshua Haberman
dfab275eca Sync from Piper @317197168
PROTOBUF_SYNC_PIPER
2020-06-18 15:47:49 -07:00
Joshua Haberman
f47e9345a9 Merge branch 'sync-piper' into sync-stage 2020-06-15 12:03:54 -07:00
Joshua Haberman
f77065d4eb Sync from Piper @316511779
PROTOBUF_SYNC_PIPER
2020-06-15 11:48:47 -07:00
Joshua Haberman
b971243fe0 Merge branch '3.12.x' into merge-release-branch 2020-06-02 13:24:30 -07:00
Joshua Haberman
183cdec7cd Sync from Piper @314226556
PROTOBUF_SYNC_PIPER
2020-06-01 16:32:31 -07:00
Joshua Haberman
9ce8c330e7
Updated version to 3.12.3 and updated CHANGES.txt. (#7580)
* Updated version to 3.12.3 and updated CHANGES.txt.

* Re-ran generate_descriptor_protos.sh and made it more parallel.
2020-06-01 13:36:50 -07:00
Joshua Haberman
0ff639994d
Fixed Python release script to upload using twine instead of distutils. (#7571) 2020-05-28 10:56:10 -07:00
Joshua Haberman
c077d949d8 Merge branch '3.12.x' into merge-312 2020-05-26 16:45:43 -07:00
Joshua Haberman
beeb621f50
Update protobuf version (#7557) 2020-05-26 15:46:39 -07:00
Joshua Haberman
eee43838f3 Merge branch 'sync-piper' into sync-stage
# Conflicts:
#	java/core/src/test/java/com/google/protobuf/TextFormatTest.java
2020-05-26 00:26:47 -07:00
Joshua Haberman
0a737d8eb0 Sync from Piper @313142438
PROTOBUF_SYNC_PIPER
2020-05-26 00:26:15 -07:00
Joshua Haberman
6ad138d85a
Update protobuf version (#7535) 2020-05-20 10:54:29 -07:00
Joshua Haberman
9952e36f92
Merge release branch into master. (#7517)
* Added background information about proto3 presence. (#7501)

* Fixed bug in map key sorting for Java TextFormat. (#7508)

Fixes: https://github.com/protocolbuffers/protobuf/issues/7505

* Update protobuf version

* Added a changelog entry about the Java fix. (#7516)
2020-05-16 16:42:02 -07:00
Joshua Haberman
e90b71cdee Update protobuf version 2020-05-15 13:28:07 -07:00
Joshua Haberman
3dcf368c2f Merge branch 'sync-piper' into sync-stage 2020-05-13 13:46:16 -07:00
Joshua Haberman
6ed738305b Sync from Piper @311396324
PROTOBUF_SYNC_PIPER
2020-05-13 13:46:15 -07:00
Joshua Haberman
62ab8333c9 Merge branch '3.12.x' into merge-312-branch 2020-05-12 16:59:55 -07:00
Joshua Haberman
f597a24627 Update protobuf version 2020-05-12 12:49:46 -07:00
Joshua Haberman
01e8c0fa34 Cherry-pick the fix to #7480 from #7485. 2020-05-12 11:34:02 -07:00
Joshua Haberman
6b5fb807c0 Sync from Piper @310858019
PROTOBUF_SYNC_PIPER
2020-05-11 00:12:20 -07:00
Joshua Haberman
2d80a70048 Sync from Piper @310457838
PROTOBUF_SYNC_PIPER
2020-05-07 16:21:50 -07:00
Joshua Haberman
c05b55880f Sync from Piper @309848308
PROTOBUF_SYNC_PIPER
2020-05-04 17:10:15 -07:00
Joshua Haberman
a9f11d7d64
Updated version to 3.12.0-rc1. (#7449) 2020-04-30 15:34:10 -07:00
Joshua Haberman
32e5deb1ac Sync from Piper @308829107
PROTOBUF_SYNC_PIPER
2020-04-28 08:40:38 -07:00
David L. Jones
c953182fa9
Generate documentation for internal.container. (#7294)
Since our (public) generated APIs document their use of repeated fields, we should probably document its API, too.

This includes some changes to generate_docs.py to explicitly allow named modules, since the repeated field implementation lives in the "internal" tree.
2020-04-22 21:41:12 -07:00