From b18061eb231f81a1327b15a4d09f51e54803c8c0 Mon Sep 17 00:00:00 2001 From: Charles OuGuo Date: Mon, 15 Jul 2024 17:51:31 -0400 Subject: [PATCH] Upgrade to Python 3.12 (#243) --- .python_version | 1 + MODULE.bazel | 6 +++--- ark_nova_stats/api/migrations/BUILD.bazel | 1 + fitbit_challenges/api/migrations/BUILD.bazel | 1 + fitbit_challenges/worker/BUILD.bazel | 1 + home_api/api/migrations/BUILD.bazel | 1 + mc_manager/api/migrations/BUILD.bazel | 1 + mc_manager/worker/BUILD.bazel | 1 + proto_registry/api/migrations/BUILD.bazel | 1 + py_proto/test/proto_file_test.py | 3 ++- requirements.lock.txt | 2 +- tools/build_rules/api_image.bzl | 1 + tools/build_rules/cross_platform_image.bzl | 1 + 13 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .python_version diff --git a/.python_version b/.python_version new file mode 100644 index 00000000..455808f8 --- /dev/null +++ b/.python_version @@ -0,0 +1 @@ +3.12.4 diff --git a/MODULE.bazel b/MODULE.bazel index d98c6531..6c296fc6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,14 +9,14 @@ bazel_dep(name = "rules_oci", version = "1.7.6") python = use_extension("@rules_python//python/extensions:python.bzl", "python") python.toolchain( - python_version = "3.11", + python_version = "3.12", ) -use_repo(python, "python_3_11") +use_repo(python, "python_3_12") pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") pip.parse( hub_name = "py_deps", - python_version = "3.11", + python_version = "3.12", requirements_lock = "//:requirements.lock.txt", ) use_repo(pip, "py_deps") diff --git a/ark_nova_stats/api/migrations/BUILD.bazel b/ark_nova_stats/api/migrations/BUILD.bazel index 382d88a6..57b58451 100644 --- a/ark_nova_stats/api/migrations/BUILD.bazel +++ b/ark_nova_stats/api/migrations/BUILD.bazel @@ -53,6 +53,7 @@ py_oci_image( "FITBIT_VERIFICATION_CODE": "testing", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //ark_nova_stats/api/migrations:image_tarball diff --git a/fitbit_challenges/api/migrations/BUILD.bazel b/fitbit_challenges/api/migrations/BUILD.bazel index b622cd5a..e4fb47b4 100644 --- a/fitbit_challenges/api/migrations/BUILD.bazel +++ b/fitbit_challenges/api/migrations/BUILD.bazel @@ -52,6 +52,7 @@ py_oci_image( "FITBIT_VERIFICATION_CODE": "testing", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //fitbit_challenges/api/migrations:image_tarball diff --git a/fitbit_challenges/worker/BUILD.bazel b/fitbit_challenges/worker/BUILD.bazel index 65394361..c87cea5e 100644 --- a/fitbit_challenges/worker/BUILD.bazel +++ b/fitbit_challenges/worker/BUILD.bazel @@ -46,6 +46,7 @@ py_oci_image( "FITBIT_VERIFICATION_CODE": "testing", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //fitbit_challenges/worker:image_tarball diff --git a/home_api/api/migrations/BUILD.bazel b/home_api/api/migrations/BUILD.bazel index 03cec802..ca592525 100644 --- a/home_api/api/migrations/BUILD.bazel +++ b/home_api/api/migrations/BUILD.bazel @@ -50,6 +50,7 @@ py_oci_image( "DATABASE_NAME": "api_development", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //home_api/api/migrations:image_tarball diff --git a/mc_manager/api/migrations/BUILD.bazel b/mc_manager/api/migrations/BUILD.bazel index d7f0831e..9022d36a 100644 --- a/mc_manager/api/migrations/BUILD.bazel +++ b/mc_manager/api/migrations/BUILD.bazel @@ -49,6 +49,7 @@ py_oci_image( "DATABASE_NAME": "api_development", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //mc_manager/api/migrations:image_tarball diff --git a/mc_manager/worker/BUILD.bazel b/mc_manager/worker/BUILD.bazel index fe023775..b3d958e8 100644 --- a/mc_manager/worker/BUILD.bazel +++ b/mc_manager/worker/BUILD.bazel @@ -44,6 +44,7 @@ py_oci_image( "HOST_PATH": "/var/minecraft", "S3_BUCKET": "", }, + tags = ["manual"], ) # $ bazel run //mc_manager/worker:image_tarball diff --git a/proto_registry/api/migrations/BUILD.bazel b/proto_registry/api/migrations/BUILD.bazel index 4089a1bd..b3932e78 100644 --- a/proto_registry/api/migrations/BUILD.bazel +++ b/proto_registry/api/migrations/BUILD.bazel @@ -49,6 +49,7 @@ py_oci_image( "DATABASE_NAME": "api_development", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //proto_registry/api/migrations:image_tarball diff --git a/py_proto/test/proto_file_test.py b/py_proto/test/proto_file_test.py index 9eb9c7c5..86ce0955 100644 --- a/py_proto/test/proto_file_test.py +++ b/py_proto/test/proto_file_test.py @@ -4,7 +4,8 @@ class ProtoFileTest(unittest.TestCase): - pass + def test_noop(self): + assert True if __name__ == "__main__": diff --git a/requirements.lock.txt b/requirements.lock.txt index 6fd89118..b6517e69 100644 --- a/requirements.lock.txt +++ b/requirements.lock.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # bazel run //:requirements.update diff --git a/tools/build_rules/api_image.bzl b/tools/build_rules/api_image.bzl index 1525ce99..9a8b5637 100644 --- a/tools/build_rules/api_image.bzl +++ b/tools/build_rules/api_image.bzl @@ -53,6 +53,7 @@ def api_image( deps = deps + [ "@rules_python//python/runfiles", ], + tags = ["manual"], ) if env == None: diff --git a/tools/build_rules/cross_platform_image.bzl b/tools/build_rules/cross_platform_image.bzl index d0feb55e..c77333a6 100644 --- a/tools/build_rules/cross_platform_image.bzl +++ b/tools/build_rules/cross_platform_image.bzl @@ -35,6 +35,7 @@ def cross_platform_image( "@platforms//cpu:arm64": "//tools/build_rules:aarch64_linux", "@platforms//cpu:x86_64": "//tools/build_rules:x86_64_linux", }), + tags = ["manual"], visibility = visibility, )