Skip to content

Commit 84e0d21

Browse files
committed
GitHub Actions & test fixes, Python versions, myst-parser versions
1 parent b63c3c2 commit 84e0d21

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

.github/workflows/lint.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ jobs:
55
lint:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@v4
99
- name: Setup python
10-
uses: actions/setup-python@v2
10+
uses: actions/setup-python@v5
1111
with:
12-
python-version: 3.8
12+
python-version: 3.12
1313
architecture: x64
14-
- uses: actions/cache@v1
15-
with:
16-
path: ~/.cache/pip
17-
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
1814
- run: pip install -e .[test]
1915
- run: flake8 .

.github/workflows/test.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,22 @@ jobs:
77
runs-on: ubuntu-20.04
88
strategy:
99
matrix:
10-
python-version: [ '3.8', '3.9', '3.10', '3.11']
10+
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
1111
# Removed testing of myst-parser-version<0.18.0
12-
myst-parser-version: [ '>=0.18.0,<0.19', '>=0.19.0,<1.0', '>=1.0.0,<2', '>=2.0.0,<3', '>=3.0.0,<4']
12+
myst-parser-version: [ '>=0.18.0,<0.19', '>=0.19.0,<1.0', '>=1.0.0,<2', '>=2.0.0,<3', '>=3.0.0,<4', '>=4,<5' ]
1313
jsonref-version: [">1"]
1414
include:
1515
# jsonref 1.0 has a backwards incompatible change - make sure we test just once with an older version of jsonref
1616
- python-version: '3.11'
1717
jsonref-version: "==0.3"
1818
myst-parser-version: '>=3.0.0,<4'
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: Setup python
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
architecture: x64
26-
- uses: actions/cache@v1
27-
with:
28-
path: ~/.cache/pip
29-
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{ matrix.python-version }}
30-
restore-keys: |
31-
${{ runner.os }}-pip-
3226
- run: pip install -e .[test]
3327
- run: pip install 'jsonref${{ matrix.jsonref-version }}'
3428
- run: pip install "myst-parser${{ matrix.myst-parser-version }}"

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- Dropped support for Python 3.8 and lower, as these are end of life
12+
913
## [0.7.1] - 2024-11-25
1014

1115
### Fixed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
platforms='any',
3333
packages=find_packages(),
3434
include_package_data=True,
35-
python_requires='>=3.8',
35+
python_requires='>=3.9',
3636
install_requires=[
3737
'docutils',
3838
'jsonref',

tests/test_directive.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77

88

99
def normalize(string):
10-
# Remove all newlines and indentation to normalise, but then add some
10+
# Remove all newlines and indentation to normalise
11+
string = re.sub(r"\n *", "", string)
12+
# Remove <div class="clearer"></div> - some versions add this in and some don't,
13+
# so we need to normalise to one to make our test work with all versions
14+
string = string.replace('<div class="clearer"></div>', "")
15+
# but then add some
1116
# newlines back in to make pytest comparison output easier to read.
12-
return re.sub(r'\n *', '', string).replace(">", ">\n")
17+
string = string.replace(">", ">\n")
18+
return string
1319

1420

1521
def assert_build(app, status, warning, basename, buildername='html', messages=None):

0 commit comments

Comments
 (0)