Commit Graph

23 Commits

Author SHA1 Message Date
Xuan Wang 149f5615ba
Remove enum and future (#31381)
* [Python][Remove enum34] Remove enum34

* [Python][Remove futures] Remove futures

* Remove empty deps from .bazel files
2022-10-18 14:58:30 -07:00
Xuan Wang 7aca6d4007
[Remove Six] Remove dependency on six (#31340)
* [Python][Remove Six] Remove Six from requirements
2022-10-17 09:34:45 -07:00
Richard Belleville 7992f162f3
Make repo for patch file explicit (#28933) 2022-02-23 12:13:48 -08:00
Michael P. Nitowski 9b964f8c46
Bump Bazel Python Cython dependency to 0.29.26 (#28398)
Prevents _PyGen_Send undefined symbol error when running on Python 3.10
(https://github.com/cython/cython/issues/3876)

This issue was fixed in Cython version 0.29.22
2021-12-21 16:11:30 -08:00
Richard Belleville 468768865b
Make Buildifier Sanity Test Strict (#27807)
* Fix all lint errors in repo.

* Use strict buildifier by default

* Whoops. That file does not exist

* Attempt fix to buildifier invocation

* Add missing copyright
2021-11-03 14:57:04 -07:00
Richard Belleville 7aa43b7a55
Create Bazel gevent test harness (#27507)
* WIP

* Add gevent test suite run under Bazel.

* Fix things up

* Yapf

* Fix up Bazel files

* Make py_grpc_test fancier

* Attempt to fix Windows RBE

* Attempt to kick GitHub

* Fix Python 2 runs

* Yet more fixes

* And the patch file too

* I am an idiot

* Mark gevent tests flaky

* Try to make rules_python more tolerant

* Typo

* Exclude reconnect test from gevent

* Remove unnecessary parts of patch

* Buildifier

* You saw nothing

* isort

* Move py_grpc_test to an internal-only file

* Review comments

* More reviewer comments

* Review
2021-10-07 14:04:34 -07:00
Lidi Zheng afc040b07a
Upgrade six from 1.12 to 1.16 in Bazel (#26451) 2021-06-08 14:37:44 -07:00
Richard Belleville 05aa736840
Fix bazel copyright notices (#26353)
* Add copyright to Bazel files

* Add check for copyright in Bazel files

* Remove unintentional file
2021-05-25 12:15:30 -07:00
Richard Belleville 269333ca85 Bump Cython version.
A breaking C-level API change was made in Python 3.9 which old versions
of Cython cannot handle. Since Bazel prescribes a single version of
dependency instead of ranges, like in setuptools, we must update this to
keep our downstream users working properly.

As a side note, since it was a point of confusion while debugging this,
interpreter versions installed by pyenv must be set *globally* rather
than just locally for Bazel to pick them up, since local pyenv
configuration will not be picked up from within the sandbox.
2021-01-21 10:20:51 -08:00
Jan Tattermusch b1d951787a grpc_python_deps.bzl: remove duplicate rules_python entry 2021-01-14 13:40:27 +01:00
Richard Belleville 69f990673f Conform to protobuf's usage of six 2020-01-15 04:43:59 -05:00
Lidi Zheng c34bef4ca4 Format all Bazel files with buildifier 2019-11-05 14:03:52 -08:00
Jan Tattermusch 0460b9bb4b fixup 2019-10-11 17:27:01 +02:00
Jan Tattermusch b77cb8ae7c replace git_repository occurence by http_archive 2019-10-11 13:25:39 +02:00
Richard Belleville 1444cd1dd3 Revert "Revert "Merge pull request #20097 from gnossen/dual_version_python_tests""
This reverts commit 24c562dbaa.
2019-08-29 10:51:36 -07:00
Richard Belleville 24c562dbaa Revert "Merge pull request #20097 from gnossen/dual_version_python_tests"
This reverts commit c9c847f334, reversing
changes made to 07ba4de392.
2019-08-29 10:47:44 -07:00
Richard Belleville 426450cd82 Implement dual testing 2019-08-27 17:22:45 -07:00
Richard Belleville 7b2c8c27b0 Separate py_grpc_library and py_proto_library.
By popular demand, we'll now be offering separate py_grpc_library and
py_proto_library targets sharing the same interface as within google3.
This change necessitated some modifications to how we pull in our own
Python-level dependencies and how we make those available to those
pulling in our project via Bazel.

There is now a grpc_python_deps() Bazel workspace rule that pulls in the
appropriate dependencies, which should be called from the client
project's WORKSPACE file. A test has been added to the bazel/test/
directory to verify that this behavior works as intended.

It's worth noting that the protobuf repository's usage of Starlark
bind() caused a great deal of trouble in ensuring that we could also
pull in six.

This change also required a change in the way generated proto code is
imported in the channelz and health-check modules, as well as in their
associated tests. We were importing them two different ways, each
relative. This resulted in two different module objects being imported
into the process, which were incompatible. I am not sure exactly what
caused this behavior to begin, as this should have been possible before
this PR. As a workaround, I am simply trying two different absolute
imports and using the one that works. This should function both inside
and outside of Bazel environments.
2019-08-01 15:16:22 -07:00
Richard Belleville 930cec4e27 Revert "Merge pull request #18912 from grpc/revert-bazel-changes"
This reverts commit c9a259aa3a, reversing
changes made to 9c882bc725.
2019-04-30 11:17:11 -07:00
Richard Belleville 50b5240d0a Revert "Merge pull request #18859 from grpc/internal_py_proto_library"
This reverts commit 5b720f19c1, reversing
changes made to a64ae3c0d5.
2019-04-29 17:47:56 -07:00
Richard Belleville 05f37c8143 Remove dependency on pubref/rules_proto.
This commit resolves #18331.
This commit resolves #18256.
This commit resolves... another TODO that apparently didn't have an
associated github issue.

We swap out pubref's implementation of py_proto_library with our own,
which more closely mirrors the interface of the internal
py_proto_library, taking the descriptor file output of a proto_library
rule as input.

One minor change in behavior was introduced for simplicity. When a
py_proto_library depends on a proto_library with a source proto file in
a subdirectory of the bazel package, the import module of the resultant
python library will reflect the package, *not* the full directory of the
proto file, including both the bazel package and the subdirectories, as
pubref did previously. This behavior also more closely mirrors google
internal behavior.

This commit also introduces a slightly more stringent bazel format
script. Buildifier on its own will not take care of long lines, but by
running yapf first, we end up with a more legible file. At the moment,
there is no sanity check associated with this formatter.
2019-04-24 17:36:08 -07:00
Richard Belleville f3f6237e6d Wrap long line 2019-04-03 18:16:24 -07:00
Richard Belleville 615c95ed5c Mitigate #18256 2019-04-03 18:13:52 -07:00