Skip to content

Commit 7c5bad2

Browse files
authored
CU-869aupp8v: Remove python 3.9 support (#172)
1 parent 03d3069 commit 7c5bad2

File tree

9 files changed

+16
-34
lines changed

9 files changed

+16
-34
lines changed

.github/workflows/medcat-den_main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
23+
python-version: [ '3.10', '3.11', '3.12' ]
2424
max-parallel: 4
2525
steps:
2626
- uses: actions/checkout@v5
@@ -57,7 +57,7 @@ jobs:
5757
- name: Set up Python
5858
uses: actions/setup-python@v6
5959
with:
60-
python-version: '3.9'
60+
python-version: '3.10'
6161

6262
- name: Install dependencies
6363
run: |

.github/workflows/medcat-den_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Python
2727
uses: actions/setup-python@v6
2828
with:
29-
python-version: '3.9'
29+
python-version: '3.10'
3030

3131
- name: Install dependencies
3232
run: |

.github/workflows/medcat-v1_main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
19+
python-version: [ '3.10', '3.11', '3.12' ]
2020
max-parallel: 4
2121

2222
steps:
@@ -93,10 +93,10 @@ jobs:
9393
ref: 'main'
9494
fetch-depth: 0
9595

96-
- name: Set up Python 3.9
96+
- name: Set up Python 3.10
9797
uses: actions/setup-python@v6
9898
with:
99-
python-version: 3.9
99+
python-version: "3.10"
100100

101101
- name: Install pypa/build
102102
run: >-

.github/workflows/medcat-v1_production.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
ref: ${{ github.event.release.target_commitish }}
3030
fetch-depth: 0
3131

32-
- name: Set up Python 3.9
32+
- name: Set up Python 3.10
3333
uses: actions/setup-python@v6
3434
with:
35-
python-version: 3.9
35+
python-version: "3.10"
3636

3737
- name: Run UATs
3838
run: |

.github/workflows/medcat-v2_main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
18+
python-version: [ '3.10', '3.11', '3.12' ]
1919
max-parallel: 4
2020
steps:
2121
- uses: actions/checkout@v5

.github/workflows/medcat-v2_release.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ jobs:
5050
git pull origin $BRANCH_NAME
5151
5252
# NOTE: building with the lowest python version supported by the package
53-
- name: Set up Python 3.9
53+
- name: Set up Python 3.10
5454
uses: actions/setup-python@v6
5555
with:
56-
python-version: "3.9"
56+
python-version: "3.10"
5757

5858
- name: Install build dependencies
5959
run: pip install --upgrade build
@@ -75,7 +75,7 @@ jobs:
7575
runs-on: ubuntu-latest
7676
strategy:
7777
matrix:
78-
python-version: ["3.9", "3.10", "3.11", "3.12"]
78+
python-version: ["3.10", "3.11", "3.12"]
7979
steps:
8080
- name: Checkout repository
8181
uses: actions/checkout@v5
@@ -90,25 +90,10 @@ jobs:
9090

9191
- name: Generate requirements and download (CPU)
9292
run: |
93-
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
94-
echo "Runnoing unsafe index strategy for Python 3.9 to avoid issues with torch / numpy compatibility"
95-
# NOTE: for python 3.9 it will otherwise look for `numpy>2` in torch's index
96-
# but there's (as of writing on 2025-07-02) none there that support 3.9
97-
# (though there are ones that support 3.10+) and because of that this
98-
# step would fail wihtout the unsafe index match
99-
# for some documentation on dependency confusion attacks, can reference:
100-
# https://docs.astral.sh/uv/reference/settings/#pip_index-strategy
101-
uv pip compile pyproject.toml --only-binary=:all: \
93+
uv pip compile pyproject.toml --only-binary=:all: \
10294
--extra spacy --extra deid --extra meta-cat --extra rel-cat \
10395
--extra-index-url https://download.pytorch.org/whl/cpu \
104-
--index-strategy unsafe-best-match \
10596
> req-cpu.txt
106-
else
107-
uv pip compile pyproject.toml --only-binary=:all: \
108-
--extra spacy --extra deid --extra meta-cat --extra rel-cat \
109-
--extra-index-url https://download.pytorch.org/whl/cpu \
110-
> req-cpu.txt
111-
fi
11297
uv venv .venv
11398
.venv/bin/python -m ensurepip
11499
.venv/bin/python -m pip download --only-binary=:all: --dest bundle-cpu -r req-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu

medcat-den/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = { text = "Apache-2.0" }
1111
authors = [
1212
{ name="Mart Ratas", email="mart.ratas@kcl.ac.uk" }
1313
]
14-
requires-python = ">=3.9"
14+
requires-python = ">=3.10"
1515

1616
keywords = ["NLP", "medical", "MedCAT", "model-registry"]
1717

@@ -20,7 +20,6 @@ classifiers = [
2020
"Intended Audience :: Science/Research",
2121
"Topic :: Scientific/Engineering :: Artificial Intelligence",
2222
"Programming Language :: Python :: 3",
23-
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Programming Language :: Python :: 3.12",

medcat-v2/docs/main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Some guides on how to use MedCAT v2 are available at [MedCAT Tutorials](https://
4141
- [MedCATtrainer](https://github.com/CogStack/cogstack-nlp/tree/main/medcat-trainer/) - an interface for building, improving and customising a given Named Entity Recognition and Linking (NER+L) model (MedCAT) for biomedical domain text.
4242
- [MedCATservice](https://github.com/CogStack/cogstack-nlp/blob/main/medcat-service/) - implements the MedCAT NLP application as a service behind a REST API.
4343

44-
## Install using PIP (Requires Python 3.9+)
44+
## Install using PIP (Requires Python 3.10+)
4545
Installation instructions are to follow upon a release of this version on PyPI.
4646
Though installation is likely to be simply `pip install "medcat>=2.0"` at that time.
4747
Currently the installation for the 2.0 beta release is simply:

medcat-v2/pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = "Medical Concept Annotation Toolkit (v2)"
77

88
readme = "README.md"
99

10-
requires-python = ">=3.9"
10+
requires-python = ">=3.10"
1111

1212
license = "Apache-2.0"
1313

@@ -42,7 +42,6 @@ classifiers = [
4242
# that you indicate you support Python 3. These classifiers are *not*
4343
# checked by "pip install". See instead "python_requires" below.
4444
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.9",
4645
"Programming Language :: Python :: 3.10",
4746
"Programming Language :: Python :: 3.11",
4847
"Programming Language :: Python :: 3.12",
@@ -85,7 +84,6 @@ dev = [
8584
]
8685
spacy = [
8786
"spacy",
88-
"spacy<3.8.4; python_version == '3.9'"
8987
]
9088
meta_cat = [
9189
"transformers>=4.41.0,<5.0", # avoid major bump

0 commit comments

Comments
 (0)