Skip to content

Commit 5fcb2d7

Browse files
authored
Add support for python 3.13 (#295)
Add support for python 3.13 drop support for python 3.8, sphinx 3, clang 6-10 use uv as the project manager
1 parent 9fa144c commit 5fcb2d7

File tree

12 files changed

+1162
-1209
lines changed

12 files changed

+1162
-1209
lines changed
Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Python package
2+
name: CI
33

44
"on": [push]
55

@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
11+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1212
steps:
1313
- uses: actions/checkout@v4
1414
- name: Set up Python ${{ matrix.python-version }}
@@ -32,10 +32,15 @@ jobs:
3232
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
3333
- name: Symlink libclang.so
3434
run: sudo ln -s ${{ env.LLVM_PATH }}/lib/libclang.so /usr/lib/x86_64-linux-gnu/libclang-17.so
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v3
37+
with:
38+
version: "0.4.22"
39+
enable-cache: true
40+
cache-suffix: ${{ matrix.python-version }}
3541
- name: Install dependencies
3642
run: |
37-
python -m pip install --upgrade pip
38-
pip install tox
43+
uv tool install tox --with tox-uv
3944
- name: Test with tox
4045
run: |
4146
tox -e py${{ steps.tox-env.outputs.environment }}
@@ -57,10 +62,15 @@ jobs:
5762
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
5863
- name: Symlink libclang.so
5964
run: sudo ln -s ${{ env.LLVM_PATH }}/lib/libclang.so /usr/lib/x86_64-linux-gnu/libclang-17.so
65+
- name: Install uv
66+
uses: astral-sh/setup-uv@v3
67+
with:
68+
version: "0.4.22"
69+
enable-cache: true
70+
cache-suffix: "coverage"
6071
- name: Install dependencies
6172
run: |
62-
python -m pip install --upgrade pip
63-
pip install tox
73+
uv tool install tox --with tox-uv
6474
- name: Test with tox
6575
run: |
6676
tox -e cov
@@ -72,7 +82,7 @@ jobs:
7282
verbose: true
7383
fail_ci_if_error: true
7484

75-
checks:
85+
check:
7686
runs-on: ubuntu-latest
7787
strategy:
7888
matrix:
@@ -92,10 +102,15 @@ jobs:
92102
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
93103
- name: Symlink libclang.so
94104
run: sudo ln -s ${{ env.LLVM_PATH }}/lib/libclang.so /usr/lib/x86_64-linux-gnu/libclang-17.so
105+
- name: Install uv
106+
uses: astral-sh/setup-uv@v3
107+
with:
108+
version: "0.4.22"
109+
enable-cache: true
110+
cache-suffix: "check"
95111
- name: Install dependencies
96112
run: |
97-
python -m pip install --upgrade pip
98-
pip install tox
113+
uv tool install tox --with tox-uv
99114
- name: Static code checks
100115
run: |
101116
tox -e check-${{ matrix.check }}
@@ -117,37 +132,50 @@ jobs:
117132
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
118133
- name: Symlink libclang.so
119134
run: sudo ln -s ${{ env.LLVM_PATH }}/lib/libclang.so /usr/lib/x86_64-linux-gnu/libclang-17.so
135+
- name: Install uv
136+
uses: astral-sh/setup-uv@v3
137+
with:
138+
version: "0.4.22"
139+
enable-cache: true
140+
cache-suffix: "docs"
120141
- name: Install dependencies
121142
run: |
122-
python -m pip install --upgrade pip
123-
pip install tox
143+
uv tool install tox --with tox-uv
124144
- name: Build docs
125145
run: |
126146
tox -e docs
127147
sphinx:
128-
runs-on: ubuntu-latest
148+
runs-on: ubuntu-22.04
129149
strategy:
130150
matrix:
131-
sphinx-version: ["three", "four"]
151+
sphinx-version: ["four"]
132152
steps:
133153
- uses: actions/checkout@v4
134154
- name: Cache LLVM and Clang
135155
id: cache-llvm
136156
uses: actions/cache@v4
137157
with:
138158
path: llvm/lib/libclang.so*
139-
key: llvm-6
159+
key: llvm-11
140160
- name: Install LLVM and Clang
141161
uses: KyleMayes/install-llvm-action@v1
142162
with:
143-
version: "6.0"
163+
version: "11.0"
144164
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
145165
- name: Symlink libclang.so
146-
run: sudo ln -s ${{ env.LLVM_PATH }}/lib/libclang.so /usr/lib/x86_64-linux-gnu/libclang.so
166+
run: |
167+
sudo ln -s ${{ env.LLVM_PATH }}/lib/libclang.so /usr/lib/x86_64-linux-gnu/libclang-11.so
168+
sudo apt-get update
169+
sudo apt install libtinfo5
170+
- name: Install uv
171+
uses: astral-sh/setup-uv@v3
172+
with:
173+
version: "0.4.22"
174+
enable-cache: true
175+
cache-suffix: ${{ matrix.sphinx-version }}
147176
- name: Install dependencies
148177
run: |
149-
python -m pip install --upgrade pip
150-
pip install tox
178+
uv tool install tox --with tox-uv
151179
- name: Test with tox
152180
run: |
153181
tox -e sphinx-${{ matrix.sphinx-version }}

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version: 2
88
build:
99
os: ubuntu-22.04
1010
tools:
11-
python: "3.8"
11+
python: "3.9"
1212
apt_packages:
1313
- libclang1
1414

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
# -- Options for intersphinx extension ---------------------------------------
198198

199199
# Example configuration for intersphinx: refer to the Python standard library.
200-
intersphinx_mapping = {'https://docs.python.org/': None}
200+
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
201201

202202
# -- Options for todo extension ----------------------------------------------
203203

docs/minimum_supported_versions.rst

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,43 @@ Planned support calendar. The end dates aren't December 31st, they're the
1515
October end of life dates for the associated Python version.
1616

1717
+------+------+------+------+------+------+------+------+------+
18-
| 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 |
18+
| 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 |
1919
+======+======+======+======+======+======+======+======+======+
20-
| Python 3.8 | xxxx | xxxx | xxxx | xxxx |
20+
| Python 3.9 | xxxx | xxxx | xxxx | xxxx |
2121
+----------------------------------+------+------+------+------+
22-
| Python 3.9 | xxxx | xxxx | xxxx |
22+
| Python 3.10 | xxxx | xxxx | xxxx |
2323
+------+----------------------------------+------+------+------+
24-
| xxxx | Python 3.10 | xxxx | xxxx |
24+
| xxxx | Python 3.11 | xxxx | xxxx |
2525
+------+------+----------------------------------+------+------+
26-
| xxxx | xxxx | Python 3.11 | xxxx |
26+
| xxxx | xxxx | Python 3.12 | xxxx |
2727
+------+------+------+----------------------------------+------+
28-
| xxxx | xxxx | xxxx | Python 3.12 |
29-
+------+------+------+-------------+------+------+------+------+
30-
| Sphinx 3.1 | xxxx | xxxx | xxxx | xxxx |
31-
+------+------+--------------------+------+------+------+------+
32-
| xxxx | Sphinx 4.x | xxxx | xxxx |
33-
+------+------+------+---------------------------+------+------+
34-
| xxxx | xxxx | Sphinx 5.x | xxxx |
35-
+------+------+------+----------------------------------+------+
36-
| xxxx | xxxx | Sphinx 6.x | xxxx |
28+
| xxxx | xxxx | xxxx | Python 3.13 |
29+
+-----------------------------------------+------+------+------+
30+
| Sphinx 4.x | xxxx | xxxx | xxxx |
31+
+------+----------------------------------+------+------+------+
32+
| xxxx | Sphinx 5.x | xxxx | xxxx |
33+
+------+-----------------------------------------+------+------+
34+
| xxxx | Sphinx 6.x | xxxx | xxxx |
35+
+------+------+----------------------------------+------+------+
36+
| xxxx | xxxx | Sphinx 7.x | xxxx |
3737
+------+------+------+----------------------------------+------+
38-
| xxxx | xxxx | xxxx | Sphinx 7.x |
38+
| xxxx | xxxx | xxxx | Sphinx 8.x |
3939
+------+------+------+-------------+------+------+------+------+
40-
| Clang 6.x | xxxx | xxxx | xxxx | xxxx |
41-
+----------------------------------+------+------+------+------+
42-
| Clang 7.x | xxxx | xxxx | xxxx | xxxx |
43-
+----------------------------------+------+------+------+------+
44-
| Clang 8.x | xxxx | xxxx | xxxx | xxxx |
45-
+----------------------------------+------+------+------+------+
46-
| Clang 9.x | xxxx | xxxx | xxxx | xxxx |
47-
+----------------------------------+------+------+------+------+
48-
| Clang 10.x | xxxx | xxxx | xxxx | xxxx |
49-
+----------------------------------+------+------+------+------+
50-
| Clang 11.x | xxxx | xxxx | xxxx |
51-
+------+------+---------------------------+------+------+------+
52-
| xxxx | xxxx | Clang 12.x | xxxx | xxxx |
40+
| Clang 11.x | xxxx | xxxx | xxxx | xxxx |
41+
+------+---------------------------+------+------+------+------+
42+
| xxxx | Clang 12.x | xxxx | xxxx | xxxx |
43+
+------+----------------------------------+------+------+------+
44+
| xxxx | Clang 13.x | xxxx | xxxx | xxxx |
45+
+------+----------------------------------+------+------+------+
46+
| xxxx | Clang 14.x | xxxx | xxxx |
5347
+------+------+----------------------------------+------+------+
54-
| xxxx | xxxx | Clang 13.x | xxxx | xxxx |
48+
| xxxx | xxxx | Clang 15.x | xxxx | xxxx |
5549
+------+------+----------------------------------+------+------+
56-
| xxxx | xxxx | Clang 14.x | xxxx |
57-
+------+------+------+----------------------------------+------+
58-
| xxxx | xxxx | xxxx | Clang 15.x | xxxx |
50+
| xxxx | xxxx | Clang 16.x | xxxx |
5951
+------+------+------+----------------------------------+------+
60-
| xxxx | xxxx | xxxx | Clang 16.x |
52+
| xxxx | xxxx | xxxx | Clang 17.x |
6153
+------+------+------+-----------------------------------------+
62-
| Beautiful Soup 4 |
54+
| Beautiful Soup 4 |
6355
+--------------------------------------------------------------+
6456

6557
.. note:: The different Clang versions are *not* exercised in CI. Most of the

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sphinx >= 3.1
1+
sphinx >= 7.2
22
furo
33
beautifulsoup4
44
sphinxcontrib.autoprogram

0 commit comments

Comments
 (0)