Skip to content

Commit cebe1de

Browse files
authored
Drop support for PY36
Python dropped support on 2021-12-23. Our policy (#760) is to drop support on the next point release after Python does. * Remove py36 tests * Test multiple recent versions of pypy * Remove pep562 backport
1 parent e958ec4 commit cebe1de

File tree

9 files changed

+14
-274
lines changed

9 files changed

+14
-274
lines changed

.coveragerc

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ omit=
33
*site-packages*
44
tests/*
55
markdown/test_tools.py
6-
markdown/pep562.py

.github/workflows/tox.yml

+8-6
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: [py36, py37, py38, py39, py310, pypy3, pygments]
23+
tox-env: [py37, py38, py39, py310, pypy37, pypy38, pypy39, pygments]
2424
include:
25-
- tox-env: py36
26-
python-version: '3.6'
2725
- tox-env: py37
2826
python-version: '3.7'
2927
- tox-env: py38
@@ -32,8 +30,12 @@ jobs:
3230
python-version: '3.9'
3331
- tox-env: py310
3432
python-version: '3.10'
35-
- tox-env: pypy3
36-
python-version: pypy3
33+
- tox-env: pypy37
34+
python-version: pypy-3.7
35+
- tox-env: pypy38
36+
python-version: pypy-3.8
37+
- tox-env: pypy39
38+
python-version: pypy-3.9
3739
- tox-env: pygments
3840
python-version: '3.7'
3941

@@ -43,7 +45,7 @@ jobs:
4345
steps:
4446
- uses: actions/checkout@v2
4547
- name: Setup Python ${{ matrix.python-version }}
46-
uses: actions/setup-python@v2
48+
uses: actions/setup-python@v3
4749
with:
4850
python-version: ${{ matrix.python-version }}
4951
- name: Install dependencies

docs/change_log/release-3.4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ title: Release Notes for v3.4
22

33
# Python-Markdown 3.4 Release Notes
44

5-
Python-Markdown version 3.4 supports Python versions 3.6, 3.7, 3.8, 3.9, 3.10 and
5+
Python-Markdown version 3.4 supports Python versions 3.7, 3.8, 3.9, 3.10 and
66
PyPy3.
77

88
## Backwards-incompatible changes

markdown/__init__.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
raise ImportError('A recent version of Python 3 is required.')
2828

2929
from .core import Markdown, markdown, markdownFromFile # noqa: E402
30-
from .util import PY37 # noqa: E402
31-
from .pep562 import Pep562 # noqa: E402
3230
from .__meta__ import __version__, __version_info__ # noqa: E402
3331
import warnings # noqa: E402
3432

@@ -51,11 +49,7 @@ def __getattr__(name):
5149
warnings.warn(
5250
"'{}' is deprecated. Use '{}' instead.".format(name, deprecated[0]),
5351
category=DeprecationWarning,
54-
stacklevel=(3 if PY37 else 4)
52+
stacklevel=(3 if (3, 7) <= sys.version_info else 4)
5553
)
5654
return deprecated[1]
5755
raise AttributeError("module '{}' has no attribute '{}'".format(__name__, name))
58-
59-
60-
if not PY37:
61-
Pep562(__name__)

markdown/__meta__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# (1, 2, 0, 'beta', 2) => "1.2b2"
2727
# (1, 2, 0, 'rc', 4) => "1.2rc4"
2828
# (1, 2, 0, 'final', 0) => "1.2"
29-
__version_info__ = (3, 3, 7, 'final', 0)
29+
__version_info__ = (3, 4, 0, 'dev', 0)
3030

3131

3232
def _get_version(version_info):

markdown/pep562.py

-245
This file was deleted.

markdown/util.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
from functools import wraps, lru_cache
2828
from itertools import count
2929

30-
from .pep562 import Pep562
31-
32-
PY37 = (3, 7) <= sys.version_info
33-
3430

3531
# TODO: Remove deprecated variables in a future release.
3632
__deprecated__ = {
@@ -462,11 +458,7 @@ def __getattr__(name):
462458
warnings.warn(
463459
"'{}' is deprecated. Use '{}' instead.".format(name, deprecated[0]),
464460
category=DeprecationWarning,
465-
stacklevel=(3 if PY37 else 4)
461+
stacklevel=(3 if (3, 7) <= sys.version_info else 4)
466462
)
467463
return deprecated[1]
468464
raise AttributeError("module '{}' has no attribute '{}'".format(__name__, name))
469-
470-
471-
if not PY37:
472-
Pep562(__name__)

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_version():
7373
maintainer_email='[email protected]',
7474
license='BSD License',
7575
packages=['markdown', 'markdown.extensions'],
76-
python_requires='>=3.6',
76+
python_requires='>=3.7',
7777
install_requires=["importlib-metadata>=4.4;python_version<'3.10'"],
7878
extras_require={
7979
'testing': [
@@ -113,7 +113,6 @@ def get_version():
113113
'Operating System :: OS Independent',
114114
'Programming Language :: Python',
115115
'Programming Language :: Python :: 3',
116-
'Programming Language :: Python :: 3.6',
117116
'Programming Language :: Python :: 3.7',
118117
'Programming Language :: Python :: 3.8',
119118
'Programming Language :: Python :: 3.9',

tox.ini

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

55
[testenv]
@@ -41,4 +41,3 @@ skip_install = true
4141

4242
[flake8]
4343
max-line-length = 119
44-
exclude=markdown/pep562.py

0 commit comments

Comments
 (0)