Skip to content

Commit

Permalink
remove report timings from Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Oct 27, 2023
1 parent 665bf9f commit 04ad456
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion cylc/flow/scripts/report_timings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 04ad456

Please sign in to comment.