Skip to content

Commit e1f19a4

Browse files
authored
Updates version of urllib3 used by bazel (#7016)
## Motivation for features / changes `urllib3` is a transitive dependency that "vendors" the `six` library in it, but the version of `six` vendored within the version of urllib3 that our code was using is not compatible with python >= 3.12. This newer version is still within the major version number, but [after 1.26.5, which updated the vendored version of `six`](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst#1265-2021-05-26) to one that runs with python >= 3.12.
1 parent b94d929 commit e1f19a4

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

third_party/python.bzl

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@
1313
# limitations under the License.
1414

1515
# TensorBoard external dependencies that are used on the python side.
16-
# Protobuf and six were deliberately left in the top-level workspace, as they
16+
#
17+
# A couple of these are "vendored" with our package, see:
18+
# https://github.com/tensorflow/tensorboard/blob/b94d9294eeb29ff5a673ef21843e060461ac78c2/tensorboard/pip_package/build_pip_package.sh#L87
19+
#
20+
# When building from source (i.e. whenever `bazel run` / `bazel test`
21+
# is used, including for CI), these are the dependencies used, rather than
22+
# whatever is already present (installed) in the system or runtime used.
23+
#
24+
# When not using bazel, but rather a "distributed" package of TB
25+
# (e.g. the one installed with pip), the non-vendored dependencies must be
26+
# already installed.
27+
#
28+
# Protobuf is deliberately left in the top-level workspace, as they
1729
# are used in TensorFlow as well.
1830

1931
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@@ -32,15 +44,17 @@ def tensorboard_python_workspace():
3244
build_file = str(Label("//third_party:markdown.BUILD")),
3345
)
3446

47+
# urllib3 is a transitive dependency from TF (or perhaps other
48+
# dependencies), not directly used in TB code. We use a specific version to
49+
# have a controlled environment, e.g. for CI.
3550
http_archive(
3651
name = "org_pythonhosted_urllib3",
3752
urls = [
38-
"http://mirror.tensorflow.org/pypi.python.org/packages/cb/34/db09a2f1e27c6ded5dd42afb0e3e2cf6f51ace7d75726385e8a3b1993b17/urllib3-1.25.tar.gz",
39-
"https://pypi.python.org/packages/cb/34/db09a2f1e27c6ded5dd42afb0e3e2cf6f51ace7d75726385e8a3b1993b17/urllib3-1.25.tar.gz",
40-
"https://files.pythonhosted.org/packages/cb/34/db09a2f1e27c6ded5dd42afb0e3e2cf6f51ace7d75726385e8a3b1993b17/urllib3-1.25.tar.gz",
53+
"http://mirror.tensorflow.org/files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz",
54+
"https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz",
4155
],
42-
sha256 = "f03eeb431c77b88cf8747d47e94233a91d0e0fdae1cf09e0b21405a885700266",
43-
strip_prefix = "urllib3-1.25/src",
56+
sha256 = "be35dfb571d8e1baefbf909756fa6526d000fd4e",
57+
strip_prefix = "urllib3-1.26.20/src",
4458
build_file = str(Label("//third_party:urllib3.BUILD")),
4559
)
4660

0 commit comments

Comments
 (0)