Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 #5794

Merged
merged 12 commits into from
Nov 13, 2023
2 changes: 1 addition & 1 deletion .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false # Don't let a failed MacOS run stop the Ubuntu runs
matrix:
os: ['ubuntu-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3']
include:
- os: 'macos-latest'
python-version: '3.7'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
# NOTE: includes must define ALL of the matrix values
include:
# latest python
- name: 'py-3.11'
- name: 'py-3-latest'
os: 'ubuntu-latest'
python-version: '3.11'
python-version: '3'
test-base: 'tests/f'
chunk: '1/4'
platform: '_local_background*'
Expand Down
1 change: 1 addition & 0 deletions changes.d/5794.break.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove `cylc report-timings` from automatic installation with `pip install cylc-flow[all]`. If you now wish to install it use `pip install cylc-flow[report-timings]`. `cylc report-timings` is incompatible with Python 3.12.
17 changes: 10 additions & 7 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,9 @@ def default_for(

{PLATFORM_REPLACES.format("[job]batch system")}
''')
replaces = PLATFORM_REPLACES.format(
"[job]batch submit command template"
)
Conf('job runner command template', VDR.V_STRING, desc=f'''
Set the command used by the chosen job runner.

Expand All @@ -1230,9 +1233,7 @@ def default_for(

.. versionadded:: 8.0.0

{PLATFORM_REPLACES.format(
"[job]batch submit command template"
)}
{replaces}
wxtim marked this conversation as resolved.
Show resolved Hide resolved
''')
Conf('shell', VDR.V_STRING, '/bin/bash', desc='''

Expand Down Expand Up @@ -1465,16 +1466,19 @@ def default_for(
{REPLACES}``global.rc[hosts][<host>]retrieve job logs
command``.
''')
replaces = PLATFORM_REPLACES.format(
"[remote]retrieve job logs max size")
Conf('retrieve job logs max size', VDR.V_STRING, desc=f'''
{LOG_RETR_SETTINGS['retrieve job logs max size']}

.. versionchanged:: 8.0.0

{REPLACES}``global.rc[hosts][<host>]retrieve job logs
max size``.
{PLATFORM_REPLACES.format(
"[remote]retrieve job logs max size")}
{replaces}
wxtim marked this conversation as resolved.
Show resolved Hide resolved
''')
replaces = PLATFORM_REPLACES.format(
"[remote]retrieve job logs retry delays")
Conf('retrieve job logs retry delays', VDR.V_INTERVAL_LIST,
desc=f'''
{LOG_RETR_SETTINGS['retrieve job logs retry delays']}
Expand All @@ -1483,8 +1487,7 @@ def default_for(

{REPLACES}``global.rc[hosts][<host>]retrieve job logs
retry delays``.
{PLATFORM_REPLACES.format(
"[remote]retrieve job logs retry delays")}
{replaces}
wxtim marked this conversation as resolved.
Show resolved Hide resolved
''')
Conf('tail command template',
VDR.V_STRING, 'tail -n +1 --follow=name %(filename)s',
Expand Down
10 changes: 5 additions & 5 deletions cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
# differentiate between not set vs set to empty
default = None
elif item.endswith("handlers"):
desc = desc + '\n\n' + dedent(rf'''
desc = desc + '\n\n' + dedent(f'''
wxtim marked this conversation as resolved.
Show resolved Hide resolved
Examples:

.. code-block:: cylc
Expand All @@ -413,9 +413,9 @@ def get_script_common_text(this: str, example: Optional[str] = None):
{item} = echo %(workflow)s

# configure multiple event handlers
{item} = \
'echo %(workflow)s, %(event)s', \
'my_exe %(event)s %(message)s' \
{item} = \\
'echo %(workflow)s, %(event)s', \\
'my_exe %(event)s %(message)s' \\
'curl -X PUT -d event=%(event)s host:port'
''')
elif item.startswith("abort on"):
Expand Down Expand Up @@ -1856,7 +1856,7 @@ def upg(cfg, descr):
['scheduling', 'max active cycle points'],
['scheduling', 'runahead limit'],
cvtr=converter(
lambda x: f'P{int(x)-1}' if x != '' else '',
lambda x: f'P{int(x) - 1}' if x != '' else '',
'"{old}" -> "{new}"'
),
silent=cylc.flow.flags.cylc7_back_compat,
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/id.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def duplicate(
)?
(?:
# cycle/task/job
{ RELATIVE_PATTERN }
{RELATIVE_PATTERN}
)?
)?
)?
Expand Down
13 changes: 12 additions & 1 deletion cylc/flow/scripts/report_timings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
import sys
from typing import TYPE_CHECKING


from cylc.flow import LOG
from cylc.flow.exceptions import CylcError
from cylc.flow.id_cli import parse_id
from cylc.flow.option_parsers import (
Expand Down Expand Up @@ -123,6 +125,12 @@ def main(parser: COP, options: 'Values', workflow_id: str) -> None:
constraint='workflows',
)

LOG.warning(
"cylc report-timings is deprecated."
" The analysis view in the GUI provides"
" similar functionality."
)

output_options = [
options.show_raw, options.show_summary, options.html_summary
]
Expand Down Expand Up @@ -246,7 +254,10 @@ def _check_imports(self):
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
wxtim marked this conversation as resolved.
Show resolved Hide resolved
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
Loading