Skip to content

Commit 1462946

Browse files
MESH-2092 remove python 3.7 and 3.8 as EOL, added 3.12 and 3.13 into the mix and fix endpoint tests following Spine's migrations
1 parent 71f9a1a commit 1462946

16 files changed

Lines changed: 919 additions & 808 deletions

.github/workflows/merge-develop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
- name: setup python
1919
uses: actions/setup-python@v5
2020
with:
21-
python-version: "3.8"
21+
python-version-file: 'pyproject.toml'
2222

2323
- name: setup poetry
2424
uses: abatilo/actions-poetry@v3
2525
with:
26-
poetry-version: 1.8.3
26+
poetry-version: 2.1.3
2727

2828
- name: add poetry plugins
2929
run: |
@@ -34,7 +34,7 @@ jobs:
3434
with:
3535
path: |
3636
.venv
37-
key: ${{ runner.os }}-v3-poetry-py3.8-${{ hashFiles('./poetry.lock') }}
37+
key: ${{ runner.os }}-v3-poetry-py3.9-${{ hashFiles('./poetry.lock') }}
3838

3939
- name: git reset
4040
run: git reset --hard

.github/workflows/merge-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
- name: setup python
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: "3.8"
26+
python-version-file: 'pyproject.toml'
2727

2828
- name: setup poetry
2929
uses: abatilo/actions-poetry@v3
3030
with:
31-
poetry-version: 1.8.3
31+
poetry-version: 2.1.3
3232

3333
- name: add poetry plugins
3434
run: |

.github/workflows/pull-request.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
tox:
1010
strategy:
1111
matrix:
12-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1313

1414
runs-on: ubuntu-latest
1515
if: github.repository == 'NHSDigital/mesh-client'
@@ -95,12 +95,12 @@ jobs:
9595
- name: setup python
9696
uses: actions/setup-python@v5
9797
with:
98-
python-version: "3.8"
98+
python-version-file: 'pyproject.toml'
9999

100100
- name: setup poetry
101101
uses: abatilo/actions-poetry@v3
102102
with:
103-
poetry-version: 1.8.3
103+
poetry-version: 2.1.3
104104

105105
- name: add poetry plugins
106106
run: |
@@ -111,7 +111,7 @@ jobs:
111111
with:
112112
path: |
113113
.venv
114-
key: ${{ runner.os }}-v3-poetry-py3.8-${{ hashFiles('./poetry.lock') }}
114+
key: ${{ runner.os }}-v3-poetry-py3.9-${{ hashFiles('./poetry.lock') }}
115115

116116
- name: git reset
117117
run: git reset --hard
@@ -213,12 +213,12 @@ jobs:
213213
- name: setup python
214214
uses: actions/setup-python@v5
215215
with:
216-
python-version: "3.8"
216+
python-version-file: 'pyproject.toml'
217217

218218
- name: setup poetry
219219
uses: abatilo/actions-poetry@v3
220220
with:
221-
poetry-version: 1.8.3
221+
poetry-version: 2.1.3
222222

223223
- name: add poetry plugins
224224
run: |
@@ -229,7 +229,7 @@ jobs:
229229
with:
230230
path: |
231231
.venv
232-
key: ${{ runner.os }}-v3-poetry-py3.8-${{ hashFiles('./poetry.lock') }}
232+
key: ${{ runner.os }}-v3-poetry-py3.9-${{ hashFiles('./poetry.lock') }}
233233

234234
- name: git reset
235235
run: git reset --hard
@@ -298,12 +298,12 @@ jobs:
298298
- name: setup python
299299
uses: actions/setup-python@v5
300300
with:
301-
python-version: "3.8"
301+
python-version-file: 'pyproject.toml'
302302

303303
- name: setup poetry
304304
uses: abatilo/actions-poetry@v3
305305
with:
306-
poetry-version: 1.8.3
306+
poetry-version: 2.1.3
307307

308308
- name: add poetry plugins
309309
run: |

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
poetry 1.8.3
2-
python 3.10.12 3.9.13 3.7.12 3.8.14 3.11.4
1+
poetry 2.1.3
2+
python 3.10.18 3.9.23 3.11.13 3.12.11 3.13.5

CONTRIBUTING.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,4 @@ You can check for secrets / test patterns at any time though with
102102

103103
```shell
104104
make check-secrets-all
105-
```
106-
107-
## Supporting multiple versions of dependencies
108-
109-
Currently we still support version python 3.7 for the mesh-client but as some packages now have vulnerabilities that are only fixed in higher versions of python we must support multiple versions of the packages. As we use setuptools we have a defined way of doing this in `setup.py` which means packages in the `pyproject.toml` for multiple versions should be defined as a list of dictionaries with the keys of `version` and `markers` as so:
110-
111-
```toml
112-
requests = [{version = ">=2.26.0", markers = "python_version<'3.8'"},{version = ">=2.32.0", markers = "python_version>='3.8'"}]
113-
```
105+
```

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ delete-hooks:
4949
refresh-hooks: delete-hooks .git/hooks/pre-commit .git/hooks/commit-msg
5050

5151
install:
52-
poetry install --sync
52+
poetry sync
5353

5454
install-ci:
55-
poetry install --without local --sync
55+
poetry sync --without local
5656

5757
update:
5858
poetry update

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MESH Client
22
===========
33

4-
A Python client for [NHS Digital's MESH API](https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api).
4+
A Python client for [NHS England's MESH API](https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api).
55

66
Release Notes
77
------------

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Security
22

3-
NHS Digital takes security and the protection of private data extremely
3+
NHS England takes security and the protection of private data extremely
44
seriously. If you believe you have found a vulnerability or other issue which
55
has compromised or could compromise the security of any of our systems and/or
66
private data managed by our systems, please do not hesitate to contact us using
@@ -25,7 +25,7 @@ Programme, you can report directly to us at: https://hackerone.com/nhs
2525

2626
### NCSC
2727
You can send your report to the National Cyber Security Centre, who will assess
28-
your report and pass it on to NHS Digital if necessary.
28+
your report and pass it on to NHS England if necessary.
2929

3030
You can report vulnerabilities here:
3131
https://www.ncsc.gov.uk/information/vulnerability-reporting

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44

55
mesh_sandbox:
66
build:
7-
context: https://github.com/NHSDigital/mesh-sandbox.git#refs/tags/v1.0.13
7+
context: https://github.com/NHSDigital/mesh-sandbox.git#refs/tags/v1.0.27
88
ports:
99
- "8701:443"
1010
deploy:

mesh_client/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
import sys
1111
import uuid
1212
import warnings
13+
from collections.abc import Generator
1314
from dataclasses import dataclass
1415
from hashlib import sha256
1516
from io import BytesIO
1617
from itertools import chain
1718
from types import TracebackType
18-
from typing import Any, Dict, Generator, List, NoReturn, Optional, Tuple, Type, TypeVar, Union, cast
19+
from typing import Any, Dict, List, NoReturn, Optional, Tuple, Type, TypeVar, Union, cast
1920
from urllib.parse import quote as q
2021
from urllib.parse import urlparse
2122

0 commit comments

Comments
 (0)