From 04ad456eefaab588f06a3d592164d9561478e84c Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Fri, 27 Oct 2023 10:52:23 +0100 Subject: [PATCH] remove report timings from Python 3.12 --- cylc/flow/scripts/report_timings.py | 10 +++++++++- setup.cfg | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cylc/flow/scripts/report_timings.py b/cylc/flow/scripts/report_timings.py index 8d05ed2748d..fa57577c194 100755 --- a/cylc/flow/scripts/report_timings.py +++ b/cylc/flow/scripts/report_timings.py @@ -243,10 +243,18 @@ def write_category(self, buf, category, df_reshape, df_describe): pass def _check_imports(self): + if sys.version_info > (3, 11): + raise CylcError( + 'Cylc Report Timings is deprecated: It is incompatible' + ' with Python > 3.11' + ) try: import pandas except ImportError: - raise CylcError('Cannot import pandas - summary unavailable.') + raise CylcError( + 'Cannot import pandas - summary unavailable.' + ' try: pip install cylc-flow[report-timings]' + ) else: del pandas diff --git a/setup.cfg b/setup.cfg index 6581f341571..d5fd84a80b8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -141,7 +141,6 @@ all = %(main_loop-log_db)s %(main_loop-log_main_loop)s %(main_loop-log_memory)s - %(report-timings)s %(tests)s %(tutorials)s