Skip to content

Commit d73af39

Browse files
iindykcopybara-github
authored andcommitted
Add Python 3.14 build and deprecate 3.10.
Also: - fix test issues due to h5py build - bump version after the last release See google/grain#1092 PiperOrigin-RevId: 823609303
1 parent d614ea4 commit d73af39

File tree

6 files changed

+38
-22
lines changed

6 files changed

+38
-22
lines changed

.github/workflows/build_and_publish_template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
python-version: ["3.10", "3.11", "3.12", "3.13"]
30+
python-version: ["3.11", "3.12", "3.13", "3.14"]
3131
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-14]
3232

3333
env:

BUILD

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ArrayRecord is a new file format for IO intensive applications.
22
# It supports efficient random access and various compression algorithms.
33

4-
load("@python//3.10:defs.bzl", compile_pip_requirements_3_10 = "compile_pip_requirements")
54
load("@python//3.11:defs.bzl", compile_pip_requirements_3_11 = "compile_pip_requirements")
65
load("@python//3.12:defs.bzl", compile_pip_requirements_3_12 = "compile_pip_requirements")
76
load("@python//3.13:defs.bzl", compile_pip_requirements_3_13 = "compile_pip_requirements")
7+
load("@python//3.14:defs.bzl", compile_pip_requirements_3_14 = "compile_pip_requirements")
88

99

1010
package(default_visibility = ["//visibility:public"])
@@ -18,12 +18,6 @@ py_library(
1818
srcs = ["setup.py"],
1919
)
2020

21-
compile_pip_requirements_3_10(
22-
name = "requirements_3_10",
23-
requirements_in = "test_requirements.in",
24-
requirements_txt = "test_requirements_lock_3_10.txt",
25-
)
26-
2721
compile_pip_requirements_3_11(
2822
name = "requirements_3_11",
2923
requirements_in = "test_requirements.in",
@@ -41,3 +35,9 @@ compile_pip_requirements_3_13(
4135
requirements_in = "test_requirements.in",
4236
requirements_txt = "test_requirements_lock_3_13.txt",
4337
)
38+
39+
compile_pip_requirements_3_14(
40+
name = "requirements_3_14",
41+
requirements_in = "test_requirements.in",
42+
requirements_txt = "test_requirements_lock_3_14.txt",
43+
)

MODULE.bazel

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

1515
# TODO(fchern): automate version string alignment with setup.py
16-
VERSION = "0.8.1"
16+
VERSION = "0.8.2"
1717

1818
module(
1919
name = "array_record",
@@ -22,9 +22,17 @@ module(
2222
)
2323

2424
bazel_dep(name = "rules_proto", version = "7.0.2")
25-
bazel_dep(name = "rules_python", version = "0.37.0")
26-
bazel_dep(name = "platforms", version = "0.0.10")
27-
bazel_dep(name = "protobuf", version = "28.3")
25+
bazel_dep(name = "rules_python", version = "1.6.0")
26+
bazel_dep(name = "platforms", version = "0.0.11")
27+
28+
# We force the protobuf version to be 28.3 because 29.x (that is required by rules_python) causes
29+
# segfault when importing TensorFlow due to a conflict with TF's protobuf version.
30+
bazel_dep(name = "protobuf", version = "29.0-rc3")
31+
single_version_override(
32+
module_name = "protobuf",
33+
version = "28.3",
34+
)
35+
2836
bazel_dep(name = "googletest", version = "1.15.2")
2937
bazel_dep(name = "abseil-cpp", version = "20240722.0")
3038
bazel_dep(name = "abseil-py", version = "2.1.0")
@@ -33,13 +41,13 @@ bazel_dep(name = "riegeli", version = "0.0.0-20241218-3385e3c")
3341
bazel_dep(name = "pybind11_bazel", version = "2.12.0")
3442

3543
SUPPORTED_PYTHON_VERSIONS = [
36-
"3.10",
3744
"3.11",
3845
"3.12",
3946
"3.13",
47+
"3.14",
4048
]
4149

42-
DEFAULT_PYTHON_VERSION = "3.10"
50+
DEFAULT_PYTHON_VERSION = "3.13"
4351

4452
python_configure = use_extension("@pybind11_bazel//:python_configure.bzl", "extension")
4553
use_repo(python_configure, "local_config_python")

oss/build_whl.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ function main() {
2828
write_to_bazelrc "build --host_cxxopt=-std=c++17"
2929
write_to_bazelrc "build --experimental_repo_remote_exec"
3030
write_to_bazelrc "common --check_direct_dependencies=error"
31+
# Reduce noise during build.
32+
write_to_bazelrc "build --cxxopt=-Wno-deprecated-declarations --host_cxxopt=-Wno-deprecated-declarations"
33+
write_to_bazelrc "build --cxxopt=-Wno-parentheses --host_cxxopt=-Wno-parentheses"
34+
write_to_bazelrc "build --cxxopt=-Wno-sign-compare --host_cxxopt=-Wno-sign-compare"
35+
3136
PLATFORM="$(uname)"
3237

3338
if [ -n "${CROSSTOOL_TOP}" ]; then
@@ -90,9 +95,12 @@ function main() {
9095
$PYTHON_BIN -m pip install ${OUTPUT_DIR}/all_dist/array_record*.whl
9196
$PYTHON_BIN -c 'import array_record'
9297
$PYTHON_BIN -c 'from array_record.python import array_record_data_source'
93-
$PYTHON_BIN -m pip install jax tensorflow>=2.20.0 grain
94-
$PYTHON_BIN oss/test_import_grain.py
95-
$PYTHON_BIN oss/test_import_tensorflow.py
98+
# TF does not have a Python 3.14 wheel yet.
99+
if (( "${PYTHON_MINOR_VERSION}" < 14 )); then
100+
$PYTHON_BIN -m pip install jax tensorflow>=2.20.0 grain --only-binary h5py
101+
$PYTHON_BIN oss/test_import_tensorflow.py
102+
$PYTHON_BIN oss/test_import_grain.py
103+
fi
96104
}
97105

98106
main

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ def has_ext_modules(self):
3131

3232
setup(
3333
name='array_record',
34-
version='0.8.1',
34+
version='0.8.2',
3535
description='A file format that achieves a new frontier of IO efficiency',
3636
author='ArrayRecord team',
3737
author_email='[email protected]',
3838
packages=find_packages(),
3939
include_package_data=True,
4040
package_data={'': ['*.so']},
41-
python_requires='>=3.10',
41+
python_requires='>=3.11',
4242
install_requires=REQUIRED_PACKAGES,
4343
extras_require={'beam': BEAM_EXTRAS, 'test': TEST_EXTRAS},
4444
url='https://github.com/google/array_record',
4545
license='Apache-2.0',
4646
classifiers=[
47-
'Programming Language :: Python :: 3.10',
4847
'Programming Language :: Python :: 3.11',
4948
'Programming Language :: Python :: 3.12',
5049
'Programming Language :: Python :: 3.13',
50+
'Programming Language :: Python :: 3.14',
5151
],
5252
zip_safe=False,
5353
distclass=BinaryDistribution,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.10
2+
# This file is autogenerated by pip-compile with Python 3.14
33
# by the following command:
44
#
5-
# bazel run //:requirements_3_10.update
5+
# bazel run //:requirements_3_14.update
66
#
77
etils[epath,epy]==1.11.0 \
88
--hash=sha256:a394cf3476bcec51c221426a70c39cd1006e889456ba41e4d7f12fd6814be7a5 \

0 commit comments

Comments
 (0)