Skip to content

Commit 8ae73a0

Browse files
authored
Add PY3.12 & PYPY3.10 and drop 3.7
Update default version for non-version specific tests (linters, etc) to PY-3.11 (previously used 3.7). Fixes #1357. Skip version isvalid test except when version is changed.
1 parent fbb34ea commit 8ae73a0

File tree

7 files changed

+42
-14
lines changed

7 files changed

+42
-14
lines changed

.github/workflows/process.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
require_changelog:
1010

1111
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
1214
steps:
1315
- uses: actions/checkout@v2
1416
- uses: mskelton/changelog-reminder-action@v1

.github/workflows/tox.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ jobs:
2020
fail-fast: false
2121
max-parallel: 4
2222
matrix:
23-
tox-env: [py37, py38, py39, py310, py311, pypy37, pypy38, pypy39, pygments]
23+
tox-env: [py38, py39, py310, py311, py312, pypy38, pypy39, pypy310, pygments]
2424
include:
25-
- tox-env: py37
26-
python-version: '3.7'
2725
- tox-env: py38
2826
python-version: '3.8'
2927
- tox-env: py39
@@ -32,14 +30,16 @@ jobs:
3230
python-version: '3.10'
3331
- tox-env: py311
3432
python-version: '3.11'
35-
- tox-env: pypy37
36-
python-version: pypy-3.7
33+
- tox-env: py312
34+
python-version: '3.12.0-rc.1'
3735
- tox-env: pypy38
3836
python-version: pypy-3.8
3937
- tox-env: pypy39
4038
python-version: pypy-3.9
39+
- tox-env: pypy310
40+
python-version: pypy-3.10
4141
- tox-env: pygments
42-
python-version: '3.7'
42+
python-version: '3.11'
4343

4444
env:
4545
TOXENV: ${{ matrix.tox-env }}
@@ -81,7 +81,7 @@ jobs:
8181
- name: Setup Python
8282
uses: actions/setup-python@v2
8383
with:
84-
python-version: 3.7
84+
python-version: 3.11
8585
- name: Install dependencies
8686
run: |
8787
python -m pip install --upgrade pip tox

.github/workflows/version_check.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: version_check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
paths:
8+
# Only run when these files have been edited.
9+
- 'markdown/__meta__.py'
10+
11+
jobs:
12+
check_version:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.11'
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip packaging
23+
- name: Run tests
24+
run: |
25+
python -m unittest tests.test_meta.TestVersion.test__version__IsValid

docs/contributing.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,9 @@ Python-Markdown follows [Semantic Versioning] and uses the
423423
of the `master` branch should always be identified in the `__version_info__`
424424
tuple defined in [`markdown/__meta__.py`][markdown/__meta__.py]. The contents of
425425
that tuple will automatically be converted into a normalized version which
426-
conforms to [PEP 440]. An invalid `__version_info__` tuple will raise an error,
427-
preventing the library from running and the package from building.
426+
conforms to [PEP 440]. Each time the version is changed, the continuous
427+
integration server will run a test to ensure that the current version is in a
428+
valid normalized format.
428429

429430
### Version Status
430431

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ maintainers = [
1818
{name = 'Isaac Muse'}
1919
]
2020
license = {file = 'LICENSE.md'}
21-
requires-python = '>=3.7'
21+
requires-python = '>=3.8'
2222
dependencies = [
2323
"importlib-metadata>=4.4;python_version<'3.10'"
2424
]
@@ -29,11 +29,11 @@ classifiers = [
2929
'Operating System :: OS Independent',
3030
'Programming Language :: Python',
3131
'Programming Language :: Python :: 3',
32-
'Programming Language :: Python :: 3.7',
3332
'Programming Language :: Python :: 3.8',
3433
'Programming Language :: Python :: 3.9',
3534
'Programming Language :: Python :: 3.10',
3635
'Programming Language :: Python :: 3.11',
36+
'Programming Language :: Python :: 3.12',
3737
'Programming Language :: Python :: 3 :: Only',
3838
'Programming Language :: Python :: Implementation :: CPython',
3939
'Programming Language :: Python :: Implementation :: PyPy',
@@ -50,7 +50,7 @@ classifiers = [
5050
[project.optional-dependencies]
5151
testing = [
5252
'coverage',
53-
'pyyaml',
53+
'pyyaml'
5454
]
5555
docs = [
5656
'mkdocs>=1.0',

tests/test_meta.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ def test__version__IsValid(self):
1919
try:
2020
import packaging.version
2121
except ImportError:
22-
from pkg_resources.extern import packaging
22+
self.skipTest('packaging does not appear to be installed')
2323

2424
self.assertEqual(__version__, str(packaging.version.Version(__version__)))

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{37, 38, 39, 310, 311}, pypy{37, 38, 39}, pygments, flake8, checkspelling, pep517check, checklinks
2+
envlist = py{38, 39, 310, 311, 312}, pypy{38, 39, 310}, pygments, flake8, checkspelling, pep517check, checklinks
33
isolated_build = True
44

55
[testenv]

0 commit comments

Comments
 (0)