Skip to content

Commit

Permalink
Add PY3.12 & PYPY3.10 and drop 3.7
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
waylan authored Aug 8, 2023
1 parent fbb34ea commit 8ae73a0
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
require_changelog:

runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: mskelton/changelog-reminder-action@v1
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
tox-env: [py37, py38, py39, py310, py311, pypy37, pypy38, pypy39, pygments]
tox-env: [py38, py39, py310, py311, py312, pypy38, pypy39, pypy310, pygments]
include:
- tox-env: py37
python-version: '3.7'
- tox-env: py38
python-version: '3.8'
- tox-env: py39
Expand All @@ -32,14 +30,16 @@ jobs:
python-version: '3.10'
- tox-env: py311
python-version: '3.11'
- tox-env: pypy37
python-version: pypy-3.7
- tox-env: py312
python-version: '3.12.0-rc.1'
- tox-env: pypy38
python-version: pypy-3.8
- tox-env: pypy39
python-version: pypy-3.9
- tox-env: pypy310
python-version: pypy-3.10
- tox-env: pygments
python-version: '3.7'
python-version: '3.11'

env:
TOXENV: ${{ matrix.tox-env }}
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/version_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: version_check

on:
pull_request:
branches:
- '**'
paths:
# Only run when these files have been edited.
- 'markdown/__meta__.py'

jobs:
check_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip packaging
- name: Run tests
run: |
python -m unittest tests.test_meta.TestVersion.test__version__IsValid
5 changes: 3 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,9 @@ Python-Markdown follows [Semantic Versioning] and uses the
of the `master` branch should always be identified in the `__version_info__`
tuple defined in [`markdown/__meta__.py`][markdown/__meta__.py]. The contents of
that tuple will automatically be converted into a normalized version which
conforms to [PEP 440]. An invalid `__version_info__` tuple will raise an error,
preventing the library from running and the package from building.
conforms to [PEP 440]. Each time the version is changed, the continuous
integration server will run a test to ensure that the current version is in a
valid normalized format.

### Version Status

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ maintainers = [
{name = 'Isaac Muse'}
]
license = {file = 'LICENSE.md'}
requires-python = '>=3.7'
requires-python = '>=3.8'
dependencies = [
"importlib-metadata>=4.4;python_version<'3.10'"
]
Expand All @@ -29,11 +29,11 @@ classifiers = [
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
Expand All @@ -50,7 +50,7 @@ classifiers = [
[project.optional-dependencies]
testing = [
'coverage',
'pyyaml',
'pyyaml'
]
docs = [
'mkdocs>=1.0',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ def test__version__IsValid(self):
try:
import packaging.version
except ImportError:
from pkg_resources.extern import packaging
self.skipTest('packaging does not appear to be installed')

self.assertEqual(__version__, str(packaging.version.Version(__version__)))
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37, 38, 39, 310, 311}, pypy{37, 38, 39}, pygments, flake8, checkspelling, pep517check, checklinks
envlist = py{38, 39, 310, 311, 312}, pypy{38, 39, 310}, pygments, flake8, checkspelling, pep517check, checklinks
isolated_build = True

[testenv]
Expand Down

0 comments on commit 8ae73a0

Please sign in to comment.