Skip to content

Commit adff70c

Browse files
Merge pull request #866 from MetRonnie/python
Minimum Python 3.12
2 parents b491d71 + d7850e7 commit adff70c

File tree

10 files changed

+36
-35
lines changed

10 files changed

+36
-35
lines changed

.github/workflows/create-conda-envs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
timeout-minutes: 30
2626
strategy:
2727
matrix:
28-
python: ['3.9']
28+
python: ['3.x']
2929
steps:
3030
- name: checkout cylc-doc
3131
uses: actions/checkout@v5

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: configure python
6868
uses: actions/setup-python@v5
6969
with:
70-
python-version: '3.9'
70+
python-version: '3.x'
7171

7272
- name: configure git
7373
uses: cylc/release-actions/configure-git@v1
@@ -105,7 +105,7 @@ jobs:
105105
uses: ./docs/.github/actions/create-conda-envs
106106
if: ${{ ! inputs.skip_conda_environment_check }}
107107
with:
108-
python_version: '3.9'
108+
python_version: '3.x'
109109
working_directory: ./docs
110110

111111
- name: checkout gh-pages

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: configure python
6565
uses: actions/setup-python@v5
6666
with:
67-
python-version: '3.9'
67+
python-version: '3.x'
6868

6969
- name: checkout cylc-doc
7070
uses: actions/checkout@v5

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ jobs:
3737
- name: configure python
3838
uses: actions/setup-python@v5
3939
with:
40-
python-version: '3.9'
40+
python-version: '3.x'
4141

4242
- name: configure node
4343
uses: actions/setup-node@v4
4444
with:
45-
node-version: '16'
45+
node-version: 'lts/*'
4646

4747
- name: checkout cylc-doc
4848
uses: actions/checkout@v5
@@ -80,8 +80,9 @@ jobs:
8080
print(enchant.list_dicts())
8181
8282
- name: build & test
83+
# TODO: re-enable spelling when https://github.com/sphinx-contrib/spelling/issues/234 fixed
8384
run: |
84-
make html spelling linkcheck \
85+
make html linkcheck \
8586
SPHINXOPTS='-Wn --keep-going' FORCE_COLOR=true
8687
8788
- name: debug sphinx failure

.github/workflows/undeploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: configure python
4242
uses: actions/setup-python@v5
4343
with:
44-
python-version: '3.9'
44+
python-version: '3.x'
4545

4646
- name: configure git
4747
uses: cylc/release-actions/configure-git@v1

bin/version

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import json
2121
import pathlib
2222
import sys
2323

24-
from pkg_resources import parse_version
24+
from packaging.version import Version
2525

2626

2727
DUMMY_FORMATS = [
@@ -66,10 +66,7 @@ def ls(args):
6666

6767
def tidy(args):
6868
# get list of documented versions
69-
versions = [
70-
parse_version(version)
71-
for version in get_formats(args.builddir)
72-
]
69+
versions = [Version(version) for version in get_formats(args.builddir)]
7370

7471
# build dictionary of minor versions
7572
# versions = [<Version('1.0.1')>, <Version('1.0.2')>]
@@ -78,17 +75,14 @@ def tidy(args):
7875
# }
7976
minor_versions = {}
8077
for version in versions:
81-
release = version._version.release
82-
if len(release) > 2:
83-
major_minor = release[:2]
84-
if major_minor not in minor_versions:
85-
minor_versions[major_minor] = []
86-
minor_versions[major_minor].append(version)
78+
if len(version.release) > 2:
79+
major_minor = version.release[:2]
80+
minor_versions.setdefault(major_minor, []).append(version)
8781

8882
# pull out the versions we don't want any more
8983
# e.g from ['1.0.1', '1.0.2', '1.0.3'] pull out ['1.0.1', '1.0.2']
9084
tidy = []
91-
for major_minor, versions in minor_versions.items():
85+
for _major_minor, versions in minor_versions.items():
9286
if len(versions) > 1:
9387
versions.sort()
9488
tidy.extend(versions[:-1])

setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ classifiers =
3636
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
3737
Operating System :: POSIX :: Linux
3838
Programming Language :: Python
39-
Programming Language :: Python :: 3.8
40-
Programming Language :: Python :: 3.9
4139
Programming Language :: Python :: 3 :: Only
4240
Programming Language :: Python :: Implementation :: CPython
4341
Topic :: Scientific/Engineering :: Atmospheric Science
@@ -50,7 +48,7 @@ install_requires =
5048
cylc-sphinx-extensions>=1.4.1
5149
eralchemy==1.2.*
5250
hieroglyph>=2.1.0
53-
setuptools>=50
51+
packaging
5452
sphinx>=7.1, !=7.4.4
5553
sphinx-copybutton
5654
sphinx-design>=0.5.0

src/installation.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ Quick Installation
1212

1313
Cylc runs on Unix-like systems including Linux and Mac OS.
1414

15-
Via Conda (recommended)
16-
^^^^^^^^^^^^^^^^^^^^^^^
17-
1815
.. admonition:: Supported Python versions
1916

20-
* cylc-flow supports Python 3.8+.
21-
* cylc-uiserver supports Python 3.9+.
17+
Cylc supports Python 3.12+.
18+
19+
Via Conda (recommended)
20+
^^^^^^^^^^^^^^^^^^^^^^^
2221

2322
.. tip::
2423

@@ -46,11 +45,6 @@ Via Conda (recommended)
4645
Via Pip (+npm)
4746
^^^^^^^^^^^^^^
4847

49-
.. admonition:: Supported Python versions
50-
51-
* cylc-flow supports Python 3.7+.
52-
* cylc-uiserver supports Python 3.9+.
53-
5448
.. important::
5549

5650
We recommend installing Cylc versions into virtual environments.

src/lib/cylc_release.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from cylc.flow import __version__
44

5-
from pkg_resources import parse_version
5+
from packaging.version import Version
66

77

88
def pinned_version(version):
@@ -31,7 +31,7 @@ def pinned_version(version):
3131
'8.0rc1'
3232
3333
"""
34-
ver = parse_version(version)
34+
ver = Version(version)
3535
if ver.pre and ver.minor == 0 and ver.micro == 0:
3636
# special handling of major version pre-releases
3737
ret = (ver.major, str(ver.minor) + ''.join(map(str, ver.pre)))

src/reference/changes.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ For more detail see the component changelogs:
2222

2323
----------
2424

25+
Cylc 8.6
26+
--------
27+
2528
.. TODO: Modify these URL's and uncomment this block before release
2629
2730
.. admonition:: Cylc Components
@@ -33,6 +36,13 @@ For more detail see the component changelogs:
3336
:cylc-rose: `1.5 <https://github.com/cylc/cylc-rose/blob/master/CHANGES.md>`__
3437
:rose: `2.4 <https://github.com/metomi/rose/blob/master/CHANGES.md>`__
3538
39+
Supported Python versions
40+
^^^^^^^^^^^^^^^^^^^^^^^^^
41+
42+
The minimum supported Python version is now 3.12.
43+
44+
45+
----------
3646

3747
Cylc 8.5
3848
--------
@@ -282,6 +292,8 @@ configurations in
282292
`tornado <https://www.tornadoweb.org/en/stable/web.html#tornado.web.Application.settings>`_.
283293

284294

295+
----------
296+
285297
Cylc 8.4
286298
--------
287299

@@ -391,6 +403,8 @@ An info view has been added, displaying
391403
:width: 80%
392404

393405

406+
----------
407+
394408
Cylc 8.3
395409
--------
396410

0 commit comments

Comments
 (0)