8000 doc: switch to pypi.org (#1622) · tanan/rules_python@c1d407f · GitHub
[go: up one dir, main page]

Skip to content

Commit c1d407f

Browse files
authored
doc: switch to pypi.org (bazel-contrib#1622)
Before this PR all of our examples are referring to the default PyPI by its legacy URL. This PR just makes things more consistent by updating URLs to point to the pypi.org as pypi.python.org does not have any guarantees to be up. See https://packaging.python.org/en/latest/guides/migrating-to-pypi-org/
1 parent e1c9ad5 commit c1d407f

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

examples/bzlmod/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
--extra-index-url https://pypi.python.org/simple/
1+
--extra-index-url https://pypi.org/simple/
22

33
wheel
44
websockets

examples/bzlmod/requirements_lock_3_10.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# bazel run //:requirements_3_10.update
66
#
7-
--extra-index-url https://pypi.python.org/simple/
7+
--extra-index-url https://pypi.org/simple/
88

99
alabaster==0.7.13 \
1010
--hash=sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3 \

examples/bzlmod/requirements_lock_3_9.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# bazel run //:requirements_3_9.update
66
#
7-
--extra-index-url https://pypi.python.org/simple/
7+
--extra-index-url https://pypi.org/simple/
88

99
alabaster==0.7.13 \
1010
--hash=sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3 \

examples/bzlmod/requirements_windows_3_10.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# bazel run //:requirements_3_10.update
66
#
7-
--extra-index-url https://pypi.python.org/simple/
7+
--extra-index-url https://pypi.org/simple/
88

99
alabaster==0.7.13 \
1010
--hash=sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3 \

examples/bzlmod/requirements_windows_3_9.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# bazel run //:requirements_3_9.update
66
#
7-
--extra-index-url https://pypi.python.org/simple/
7+
--extra-index-url https://pypi.org/simple/
88

99
alabaster==0.7.13 \
1010
--hash=sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3 \

examples/pip_repository_annotations/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This flag allows for regression testing requirements arguments in
22
# `pip_repository` rules.
3-
--extra-index-url https://pypi.python.org/simple/
3+
--extra-index-url https://pypi.org/simple/
44

55
certifi>=2023.7.22 # https://security.snyk.io/vuln/SNYK-PYTHON-CERTIFI-5805047
66
wheel

examples/pip_repository_annotations/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# bazel run //:requirements.update
66
#
7-
--extra-index-url https://pypi.python.org/simple/
7+
--extra-index-url https://pypi.org/simple/
88

99
certifi==2023.7.22 \
1010
--hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \

internal_deps.bzl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,54 +105,54 @@ def rules_python_internal_deps():
105105
name = "futures_2_2_0_whl",
106106
downloaded_file_path = "futures-2.2.0-py2.py3-none-any.whl",
107107
sha256 = "9fd22b354a4c4755ad8c7d161d93f5026aca4cfe999bd2e53168f14765c02cd6",
108-
# From https://pypi.python.org/py 10000 pi/futures/2.2.0
108+
# From https://pypi.org/pypi/futures/2.2.0
109109
urls = [
110-
"https://mirror.bazel.build/pypi.python.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl",
111-
"https://pypi.python.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl",
110+
"https://mirror.bazel.build/pypi.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl",
111+
"https://pypi.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl",
112112
],
113113
)
114114

115115
http_file(
116116
name = "futures_3_1_1_whl",
117117
downloaded_file_path = "futures-3.1.1-py2-none-any.whl",
118118
sha256 = "c4884a65654a7c45435063e14ae85280eb1f111d94e542396717ba9828c4337f",
119-
# From https://pypi.python.org/pypi/futures
119+
# From https://pypi.org/pypi/futures
120120
urls = [
121-
"https://mirror.bazel.build/pypi.python.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl",
122-
"https://pypi.python.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl",
121+
"https://mirror.bazel.build/pypi.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl",
122+
"https://pypi.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl",
123123
],
124124
)
125125

126126
http_file(
127127
name = "google_cloud_language_whl",
128128
downloaded_file_path = "google_cloud_language-0.29.0-py2.py3-none-any.whl",
129129
sha256 = "a2dd34f0a0ebf5705dcbe34bd41199b1d0a55c4597d38ed045bd183361a561e9",
130-
# From https://pypi.python.org/pypi/google-cloud-language
130+
# From https://pypi.org/pypi/google-cloud-language
131131
urls = [
132-
"https://mirror.bazel.build/pypi.python.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl",
133-
"https://pypi.python.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl",
132+
"https://mirror.bazel.build/pypi.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl",
133+
"https://pypi.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl",
134134
],
135135
)
136136

137137
http_file(
138138
name = "grpc_whl",
139139
downloaded_file_path = "grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl",
140140
sha256 = "c232d6d168cb582e5eba8e1c0da8d64b54b041dd5ea194895a2fe76050916561",
141-
# From https://pypi.python.org/pypi/grpcio/1.6.0
141+
# From https://pypi.org/pypi/grpcio/1.6.0
142142
urls = [
143-
"https://mirror.bazel.build/pypi.python.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl",
144-
"https://pypi.python.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100 F1F3 b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl",
143+
"https://mirror.bazel.build/pypi.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl",
144+
"https://pypi.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl",
145145
],
146146
)
147147

148148
http_file(
149149
name = "mock_whl",
150150
downloaded_file_path = "mock-2.0.0-py2.py3-none-any.whl",
151151
sha256 = "5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1",
152-
# From https://pypi.python.org/pypi/mock
152+
# From https://pypi.org/pypi/mock
153153
urls = [
154-
"https://mirror.bazel.build/pypi.python.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl",
155-
"https://pypi.python.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl",
154+
"https://mirror.bazel.build/pypi.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl",
155+
"https://pypi.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl",
156156
],
157157
)
158158

tools/private/update_deps/update_coverage_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def _parse_args() -> argparse.Namespace:
151151
def main():
152152
args = _parse_args()
153153

154-
api_url = f"https://pypi.python.org/pypi/{args.name}/{args.version}/json"
154+
api_url = f"https://pypi.org/pypi/{args.name}/{args.version}/json"
155155
req = request.Request(api_url)
156156
with request.urlopen(req) as response:
157157
data = json.loads(response.read().decode("utf-8"))

0 commit comments

Comments
 (0)
0