From 036cb6291ec2d6f837dc1db40738f688034da5b0 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 4 Jul 2023 19:52:05 +0530 Subject: [PATCH] fix: don't compile python files manually. (#1469) --- bench/commands/update.py | 2 +- bench/utils/bench.py | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/bench/commands/update.py b/bench/commands/update.py index d03c0f86..63b77652 100755 --- a/bench/commands/update.py +++ b/bench/commands/update.py @@ -33,7 +33,7 @@ from bench.utils.bench import post_upgrade, patch_sites, build_assets @click.option( "--no-compile", is_flag=True, - help="If set, Python bytecode won't be compiled before restarting the processes", + help="[DEPRECATED] This flag doesn't do anything now.", ) @click.option("--force", is_flag=True, help="Forces major version upgrades") @click.option( diff --git a/bench/utils/bench.py b/bench/utils/bench.py index 16fc206e..1fede3a2 100644 --- a/bench/utils/bench.py +++ b/bench/utils/bench.py @@ -456,13 +456,6 @@ def update( if version_upgrade[0] or (not version_upgrade[0] and force): post_upgrade(version_upgrade[1], version_upgrade[2], bench_path=bench_path) - if pull and compile: - from compileall import compile_dir - - print("Compiling Python files...") - apps_dir = os.path.join(bench_path, "apps") - compile_dir(apps_dir, quiet=1, rx=re.compile(".*node_modules.*")) - bench.reload(web=False, supervisor=restart_supervisor, systemd=restart_systemd) conf.update({"maintenance_mode": 0, "pause_scheduler": 0})