Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into xds_bootstrap_ser…
Browse files Browse the repository at this point in the history
…ver_interface_for_grpc_transport
  • Loading branch information
markdroth committed Feb 7, 2025
2 parents 5d3e795 + 16715aa commit 8657dd5
Show file tree
Hide file tree
Showing 16 changed files with 196 additions and 167 deletions.
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ lang/python:
- any-glob-to-any-file:
- bazel/python_rules.bzl
- examples/python/**
- requirements.bazel.lock
- requirements.bazel.txt
- src/compiler/python*
- all-globs-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "grpc_python_dependencies",
python_version = python_version,
requirements_lock = "//:requirements.bazel.lock",
requirements_lock = "//:requirements.bazel.txt",
)
for python_version in PYTHON_VERSIONS
]
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ load("@rules_python//python:pip.bzl", "pip_parse")

pip_parse(
name = "grpc_python_dependencies",
requirements_lock = "@com_github_grpc_grpc//:requirements.bazel.lock",
requirements_lock = "@com_github_grpc_grpc//:requirements.bazel.txt",
)

load("@grpc_python_dependencies//:requirements.bzl", "install_deps")
Expand Down
60 changes: 60 additions & 0 deletions bazel/grpc_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,66 @@ def grpc_test_only_deps():
Loads dependencies that are only needed to run grpc library's tests.
"""

if "com_github_twisted_twisted" not in native.existing_rules():
http_archive(
name = "com_github_twisted_twisted",
sha256 = "ca17699d0d62eafc5c28daf2c7d0a18e62ae77b4137300b6c7d7868b39b06139",
strip_prefix = "twisted-twisted-17.5.0",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/twisted/twisted/archive/twisted-17.5.0.zip",
"https://github.com/twisted/twisted/archive/twisted-17.5.0.zip",
],
build_file = "@com_github_grpc_grpc//third_party:twisted.BUILD",
)

if "com_github_yaml_pyyaml" not in native.existing_rules():
http_archive(
name = "com_github_yaml_pyyaml",
sha256 = "e34d97db6d846f5e2ad51417fd646e7ce6a3a70726ccea2a857e0580a7155f39",
strip_prefix = "pyyaml-6.0.1",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/6.0.1.zip",
"https://github.com/yaml/pyyaml/archive/6.0.1.zip",
],
build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD",
)

if "com_github_twisted_incremental" not in native.existing_rules():
http_archive(
name = "com_github_twisted_incremental",
sha256 = "f0ca93359ee70243ff7fbf2d904a6291810bd88cb80ed4aca6fa77f318a41a36",
strip_prefix = "incremental-incremental-17.5.0",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/twisted/incremental/archive/incremental-17.5.0.zip",
"https://github.com/twisted/incremental/archive/incremental-17.5.0.zip",
],
build_file = "@com_github_grpc_grpc//third_party:incremental.BUILD",
)

if "com_github_zopefoundation_zope_interface" not in native.existing_rules():
http_archive(
name = "com_github_zopefoundation_zope_interface",
sha256 = "e9579fc6149294339897be3aa9ecd8a29217c0b013fe6f44fcdae00e3204198a",
strip_prefix = "zope.interface-4.4.3",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/zopefoundation/zope.interface/archive/4.4.3.zip",
"https://github.com/zopefoundation/zope.interface/archive/4.4.3.zip",
],
build_file = "@com_github_grpc_grpc//third_party:zope_interface.BUILD",
)

if "com_github_twisted_constantly" not in native.existing_rules():
http_archive(
name = "com_github_twisted_constantly",
sha256 = "2702cd322161a579d2c0dbf94af4e57712eedc7bd7bbbdc554a230544f7d346c",
strip_prefix = "constantly-15.1.0",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/twisted/constantly/archive/15.1.0.zip",
"https://github.com/twisted/constantly/archive/15.1.0.zip",
],
build_file = "@com_github_grpc_grpc//third_party:constantly.BUILD",
)

if "com_google_libprotobuf_mutator" not in native.existing_rules():
http_archive(
name = "com_google_libprotobuf_mutator",
Expand Down
116 changes: 0 additions & 116 deletions requirements.bazel.lock

This file was deleted.

82 changes: 41 additions & 41 deletions requirements.bazel.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Copyright 2025 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file provides the source for generating requirements.bazel.lock.
# Instructions for generation follow:
# Use the oldest supported version of Python
#
# $ docker run -it --rm -v $(pwd):/grpc python:3.8 /bin/bash
# # cd grpc
# # pip install pip-tools
# # pip-compile --allow-unsafe requirements.bazel.txt > requirements.bazel.lock
# # exit
# $ sudo chown $USER requirements.bazel.lock

absl-py
certifi
chardet
gevent
google-auth
googleapis-common-protos
idna
opentelemetry-api
opentelemetry-exporter-prometheus
opentelemetry-resourcedetector-gcp
opentelemetry-sdk
protobuf
pyyaml # for DNS test
requests
twisted # for DNS test
urllib3
# GRPC Python setup requirements
# The requirements listed below are solely for Bazel tests and should not be used elsewhere.
absl-py==1.4.0
cachetools==5.3.2
certifi==2023.7.22
chardet==3.0.4
charset-normalizer==3.3.2
coverage==4.5.4
cython==3.0.0
Deprecated==1.2.14
gevent==22.08.0
google-api-core==2.24.0
google-auth==2.23.4
google-cloud-monitoring==2.26.0
google-cloud-trace==1.15.0
googleapis-common-protos==1.63.1
greenlet==1.1.3.post0
idna==2.7
importlib-metadata==6.11.0
oauth2client==4.1.0
opencensus-context==0.1.3
opentelemetry-api==1.25.0
opentelemetry-exporter-prometheus==0.46b0
opentelemetry-resourcedetector-gcp==1.6.0a0
opentelemetry-sdk==1.25.0
opentelemetry-semantic-conventions==0.46b0
prometheus_client==0.20.0
proto-plus==1.25.0
protobuf>=5.27.1,<6.0dev
pyasn1-modules==0.3.0
pyasn1==0.5.0
requests==2.25.1
rsa==4.9
setuptools==44.1.1
typing-extensions==4.9.0
urllib3==1.26.18
wheel==0.38.1
wrapt==1.16.0
zipp==3.17.0
zope.event==4.5.0
zope.interface==6.1
2 changes: 1 addition & 1 deletion templates/MODULE.bazel.template
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
pip.parse(
hub_name = "grpc_python_dependencies",
python_version = python_version,
requirements_lock = "//:requirements.bazel.lock",
requirements_lock = "//:requirements.bazel.txt",
)
for python_version in PYTHON_VERSIONS
]
Expand Down
12 changes: 7 additions & 5 deletions test/cpp/naming/utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@ grpc_py_binary(
name = "dns_server",
testonly = True,
srcs = ["dns_server.py"],
python_version = "PY3",
deps = [
requirement("twisted"),
requirement("pyyaml"),
external_deps = [
"twisted",
"yaml",
],
python_version = "PY3",
)

grpc_py_binary(
name = "dns_resolver",
testonly = True,
srcs = ["dns_resolver.py"],
external_deps = [
"twisted",
],
python_version = "PY3",
deps = [requirement("twisted")],
)

grpc_py_binary(
Expand Down
12 changes: 12 additions & 0 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,15 @@ alias(
actual = "@com_google_googleapis//google/logging/v2:logging_cc_proto",
tags = ["manual"],
)

alias(
name = "twisted",
actual = "@com_github_twisted_twisted//:twisted",
tags = ["manual"],
)

alias(
name = "yaml",
actual = "@com_github_yaml_pyyaml//:yaml",
tags = ["manual"],
)
7 changes: 7 additions & 0 deletions third_party/constantly.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
py_library(
name = "constantly",
srcs = glob(["constantly/*.py"]),
visibility = [
"//visibility:public",
],
)
10 changes: 10 additions & 0 deletions third_party/incremental.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
py_library(
name = "incremental",
srcs = glob(["src/incremental/*.py"]),
imports = [
"src",
],
visibility = [
"//visibility:public",
],
)
15 changes: 15 additions & 0 deletions third_party/twisted.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
py_library(
name = "twisted",
srcs = glob(["src/twisted/**/*.py"]),
imports = [
"src",
],
visibility = [
"//visibility:public",
],
deps = [
"@com_github_twisted_incremental//:incremental",
"@com_github_twisted_constantly//:constantly",
"@com_github_zopefoundation_zope_interface//:zope_interface",
],
)
10 changes: 10 additions & 0 deletions third_party/yaml.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
py_library(
name = "yaml",
srcs = glob(["lib/yaml/*.py"]),
imports = [
"lib",
],
visibility = [
"//visibility:public",
],
)
Loading

0 comments on commit 8657dd5

Please sign in to comment.