Skip to content

Commit e1bf1f0

Browse files
Update rules_python to 0.28.0
Closes #15849 PiperOrigin-RevId: 640633756
1 parent 5691847 commit e1bf1f0

File tree

9 files changed

+40
-52
lines changed

9 files changed

+40
-52
lines changed

.github/workflows/test_bazel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
runner: [ ubuntu, windows, macos ]
20-
bazelversion: [ '7.1.1' ]
20+
bazelversion: [ '7.1.2' ]
2121
bzlmod: [true, false ]
2222
include:
2323
- runner: ubuntu

.github/workflows/test_cpp.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626
- { name: No-RTTI, flags: --cxxopt=-fno-rtti }
2727
include:
2828
# Set defaults
29-
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:04cd765285bc52cbbf51d66c8c66d8603579cf0f19cc42df26b09d2c270541fb
29+
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:3d959f731dc5c54af4865c31ee2bd581ec40028adcdf4c038f3122581f595191
3030
- targets: //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/...
3131

3232
# Override cases with custom images
3333
- config: { name: "Bazel7" }
34-
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.1-75f2a85ece6526cc3d54087018c0f1097d78d42b"
34+
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-cf84e92285ca133b9c8104ad7b14d70e953cbb8e"
3535
targets: "//src/... //third_party/utf8_range/..."
3636
- config: { name: "TCMalloc" }
37-
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc@sha256:bd39119d74b8a3fad4ae335d4cf5294e70384676331b7e19949459fc7a8d8328"
37+
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc@sha256:1c5133455481f4d1bb8afa477029604f41f1a3c46cebe4d9958cf1af95b5c87c"
3838
targets: "//src/... //third_party/utf8_range/..."
3939
- config: { name: "aarch64" }
4040
targets: "//src/... //src/google/protobuf/compiler:protoc_aarch64_test //third_party/utf8_range/..."
41-
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:aarch64-63dd26c0c7a808d92673a3e52e848189d4ab0f17"
41+
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:6.3.0-aarch64-68e662b3a56b881804dc4e9d45f949791cbc4b94"
4242
name: Linux ${{ matrix.config.name }}
4343
runs-on: ${{ matrix.config.runner || 'ubuntu-latest' }}
4444
steps:
@@ -102,7 +102,7 @@ jobs:
102102
- name: Run tests
103103
uses: protocolbuffers/protobuf-ci/docker@v3
104104
with:
105-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:${{ matrix.arch }}-63dd26c0c7a808d92673a3e52e848189d4ab0f17
105+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:${{ matrix.arch }}-384d5abe83a791c6b1ce04f5d7bc0b1f84a30d38
106106
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
107107
entrypoint: bash
108108
command: >
@@ -328,7 +328,7 @@ jobs:
328328
os: macos-12
329329
cache_key: macos-12-bazel7
330330
bazel: test //src/... //third_party/utf8_range/...
331-
bazel_version: '7.1.1'
331+
bazel_version: '7.1.2'
332332
- name: MacOS Apple Silicon (build only) Bazel
333333
os: macos-12
334334
cache_key: macos-12-arm
@@ -343,7 +343,7 @@ jobs:
343343
os: windows-2022
344344
cache_key: windows-2022-bazel7
345345
bazel: test //src/... @com_google_protobuf_examples//... --test_tag_filters=-conformance --build_tag_filters=-conformance
346-
bazel_version: '7.1.1'
346+
bazel_version: '7.1.2'
347347
name: ${{ matrix.name }}
348348
runs-on: ${{ matrix.os }}
349349
steps:

.github/workflows/test_upb.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
- name: Run tests
124124
uses: protocolbuffers/protobuf-ci/bazel-docker@v3
125125
with:
126-
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-91a0ac83e968068672bc6001a4d474cfd9a50f1d
126+
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-8ae66c8e49db9a3db7ed62424524e63bab7a96e5
127127
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
128128
bazel-cache: "upb-bazel-no-python"
129129
bash: >-
@@ -144,7 +144,7 @@ jobs:
144144
- name: Build Wheels
145145
uses: protocolbuffers/protobuf-ci/bazel-docker@v3
146146
with:
147-
image: us-docker.pkg.dev/protobuf-build/release-containers/linux/apple@sha256:b3dc9b75d8e599b0e95ed245d89f44b5a4231112f975da89dd02006a484a58df
147+
image: us-docker.pkg.dev/protobuf-build/release-containers/linux/apple:6.3.0-53225851b051e66f8543e972c143f35be757a181
148148
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
149149
bazel-cache: upb-bazel-python
150150
bazel: build --crosstool_top=//toolchain:clang_suite --//toolchain:release=true --symlink_prefix=/ -c dbg //python/dist //python/dist:test_wheel //python/dist:source_wheel

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ conda:
1616
environment: python/docs/environment.yml
1717

1818
python:
19-
version: 3.7
19+
version: 3.8
2020
install:
2121
- method: setuptools
2222
path: python

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bazel_dep(name = "rules_cc", version = "0.0.9")
1919
bazel_dep(name = "rules_java", version = "5.3.5")
2020
bazel_dep(name = "rules_jvm_external", version = "5.1")
2121
bazel_dep(name = "rules_pkg", version = "0.7.0")
22-
bazel_dep(name = "rules_python", version = "0.10.2")
22+
bazel_dep(name = "rules_python", version = "0.28.0")
2323
bazel_dep(name = "platforms", version = "0.0.8")
2424
bazel_dep(name = "zlib", version = "1.2.11")
2525

WORKSPACE

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ load("@rules_python//python:repositories.bzl", "py_repositories")
2525

2626
py_repositories()
2727

28+
load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies")
29+
30+
pip_install_dependencies()
31+
2832
# Bazel platform rules.
2933
http_archive(
3034
name = "platforms",
@@ -177,9 +181,9 @@ install_deps()
177181

178182
http_archive(
179183
name = "rules_fuzzing",
180-
sha256 = "ff52ef4845ab00e95d29c02a9e32e9eff4e0a4c9c8a6bcf8407a2f19eb3f9190",
181-
strip_prefix = "rules_fuzzing-0.4.1",
182-
urls = ["https://github.com/bazelbuild/rules_fuzzing/releases/download/v0.4.1/rules_fuzzing-0.4.1.zip"],
184+
sha256 = "77206c54b71f4dd5335123a6ff2a8ea688eca5378d34b4838114dff71652cf26",
185+
strip_prefix = "rules_fuzzing-0.5.1",
186+
urls = ["https://github.com/bazelbuild/rules_fuzzing/releases/download/v0.5.1/rules_fuzzing-0.5.1.zip"],
183187
patches = ["//third_party:rules_fuzzing.patch"],
184188
patch_args = ["-p1"],
185189
)

protobuf_deps.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ def protobuf_deps():
100100
if not native.existing_rule("rules_python"):
101101
http_archive(
102102
name = "rules_python",
103-
sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
104-
strip_prefix = "rules_python-0.26.0",
105-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
103+
sha256 = "d70cd72a7a4880f0000a6346253414825c19cdd40a28289bdf67b8e6480edff8",
104+
strip_prefix = "rules_python-0.28.0",
105+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.28.0/rules_python-0.28.0.tar.gz",
106106
)
107107

108108
if not native.existing_rule("system_python"):
109109
system_python(
110110
name = "system_python",
111-
minimum_python_version = "3.7",
111+
minimum_python_version = "3.8",
112112
)
113113

114114
if not native.existing_rule("rules_jvm_external"):

python/dist/system_python.bzl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pip_parse = pip_install
3636

3737
# Alias rules_python's pip.bzl for cases where a system python is found.
3838
_alias_pip = """
39-
load("@rules_python//python:pip.bzl", _pip_install = "pip_install", _pip_parse = "pip_parse")
39+
load("@rules_python//python:pip.bzl", _pip_parse = "pip_parse")
4040
4141
def _get_requirements(requirements, requirements_overrides):
4242
for version, override in requirements_overrides.items():
@@ -45,18 +45,14 @@ def _get_requirements(requirements, requirements_overrides):
4545
break
4646
return requirements
4747
48-
def pip_install(requirements, requirements_overrides={{}}, **kwargs):
49-
_pip_install(
50-
python_interpreter_target = "@{repo}//:interpreter",
51-
requirements = _get_requirements(requirements, requirements_overrides),
52-
**kwargs,
53-
)
5448
def pip_parse(requirements, requirements_overrides={{}}, **kwargs):
5549
_pip_parse(
5650
python_interpreter_target = "@{repo}//:interpreter",
57-
requirements = _get_requirements(requirements, requirements_overrides),
51+
requirements_lock = _get_requirements(requirements, requirements_overrides),
5852
**kwargs,
5953
)
54+
55+
pip_install = pip_parse
6056
"""
6157

6258
_mock_fuzzing_py = """

third_party/rules_fuzzing.patch

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
diff --git a/fuzzing/tools/validate_dict.py b/fuzzing/tools/validate_dict.py
2-
index d561e68..52cbcb8 100644
3-
--- a/fuzzing/tools/validate_dict.py
4-
+++ b/fuzzing/tools/validate_dict.py
5-
@@ -19,7 +19,7 @@ Validates and merges a set of fuzzing dictionary files into a single output.
6-
7-
from absl import app
8-
from absl import flags
9-
-from dict_validation import validate_line
10-
+from fuzzing.tools.dict_validation import validate_line
11-
from sys import stderr
12-
13-
FLAGS = flags.FLAGS
14-
diff --git a/fuzzing/requirements.txt b/fuzzing/requirements.txt
15-
index 01482d4..4b36f4f 100644
16-
--- a/fuzzing/requirements.txt
17-
+++ b/fuzzing/requirements.txt
18-
@@ -1,5 +1,5 @@
19-
# Python requirements for the tools supporting the fuzzing rules. These are
20-
# installed automatically through the WORKSPACE configuration.
21-
22-
-absl-py==0.11.0 --hash=sha256:b3d9eb5119ff6e0a0125f6dabf2f9fae02f8acae7be70576002fac27235611c5
23-
-six==1.15.0 --hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced
24-
+absl-py==2.0.0 --hash=sha256:9a28abb62774ae4e8edbe2dd4c49ffcd45a6a848952a5eccc6a49f3f0fc1e2f3
25-
+six==1.16.0 --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
1+
diff --git a/fuzzing/private/binary.bzl b/fuzzing/private/binary.bzl
2+
index 4c85aed..8ff9723 100644
3+
--- a/fuzzing/private/binary.bzl
4+
+++ b/fuzzing/private/binary.bzl
5+
@@ -114,7 +114,7 @@ def _fuzzing_binary_impl(ctx):
6+
else:
7+
default_info = ctx.attr.binary[DefaultInfo]
8+
binary_runfiles = default_info.default_runfiles
9+
- binary_repo_mapping_manifest = getattr(default_info.files_to_run, "repo_mapping_manifest")
10+
+ binary_repo_mapping_manifest = getattr(default_info.files_to_run, "repo_mapping_manifest", None)
11+
other_runfiles = []
12+
if ctx.file.corpus:
13+
other_runfiles.append(ctx.file.corpus)

0 commit comments

Comments
 (0)