Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for PY36 #1259

Merged
merged 5 commits into from May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Expand Up @@ -3,4 +3,3 @@ omit=
*site-packages*
tests/*
markdown/test_tools.py
markdown/pep562.py
14 changes: 8 additions & 6 deletions .github/workflows/tox.yml
Expand Up @@ -20,10 +20,8 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
tox-env: [py36, py37, py38, py39, py310, pypy3, pygments]
tox-env: [py37, py38, py39, py310, pypy37, pypy38, pypy39, pygments]
include:
- tox-env: py36
python-version: '3.6'
- tox-env: py37
python-version: '3.7'
- tox-env: py38
Expand All @@ -32,8 +30,12 @@ jobs:
python-version: '3.9'
- tox-env: py310
python-version: '3.10'
- tox-env: pypy3
python-version: pypy3
- tox-env: pypy37
python-version: pypy-3.7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we wait for the next release of actions/setup-python, it will presumably include the changes in actions/setup-python#349. Then we can exclude the - from the version (like this pypy3.7), which is more consistent with all other version indicators.

Additionally, I wonder if we should perhaps run pypy tests for all supported versions (3.7, 3.8, 3.9).

- tox-env: pypy38
python-version: pypy-3.8
- tox-env: pypy39
python-version: pypy-3.9
- tox-env: pygments
python-version: '3.7'

Expand All @@ -43,7 +45,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/change_log/release-3.4.md
Expand Up @@ -2,7 +2,7 @@ title: Release Notes for v3.4

# Python-Markdown 3.4 Release Notes

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

## Backwards-incompatible changes
Expand Down
8 changes: 1 addition & 7 deletions markdown/__init__.py
Expand Up @@ -27,8 +27,6 @@
raise ImportError('A recent version of Python 3 is required.')

from .core import Markdown, markdown, markdownFromFile # noqa: E402
from .util import PY37 # noqa: E402
from .pep562 import Pep562 # noqa: E402
from .__meta__ import __version__, __version_info__ # noqa: E402
import warnings # noqa: E402

Expand All @@ -51,11 +49,7 @@ def __getattr__(name):
warnings.warn(
"'{}' is deprecated. Use '{}' instead.".format(name, deprecated[0]),
category=DeprecationWarning,
stacklevel=(3 if PY37 else 4)
stacklevel=(3 if (3, 7) <= sys.version_info else 4)
)
return deprecated[1]
raise AttributeError("module '{}' has no attribute '{}'".format(__name__, name))


if not PY37:
Pep562(__name__)
2 changes: 1 addition & 1 deletion markdown/__meta__.py
Expand Up @@ -26,7 +26,7 @@
# (1, 2, 0, 'beta', 2) => "1.2b2"
# (1, 2, 0, 'rc', 4) => "1.2rc4"
# (1, 2, 0, 'final', 0) => "1.2"
__version_info__ = (3, 3, 7, 'final', 0)
__version_info__ = (3, 4, 0, 'dev', 0)


def _get_version(version_info):
Expand Down
245 changes: 0 additions & 245 deletions markdown/pep562.py

This file was deleted.

10 changes: 1 addition & 9 deletions markdown/util.py
Expand Up @@ -27,10 +27,6 @@
from functools import wraps, lru_cache
from itertools import count

from .pep562 import Pep562

PY37 = (3, 7) <= sys.version_info


# TODO: Remove deprecated variables in a future release.
__deprecated__ = {
Expand Down Expand Up @@ -462,11 +458,7 @@ def __getattr__(name):
warnings.warn(
"'{}' is deprecated. Use '{}' instead.".format(name, deprecated[0]),
category=DeprecationWarning,
stacklevel=(3 if PY37 else 4)
stacklevel=(3 if (3, 7) <= sys.version_info else 4)
)
return deprecated[1]
raise AttributeError("module '{}' has no attribute '{}'".format(__name__, name))


if not PY37:
Pep562(__name__)
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -73,7 +73,7 @@ def get_version():
maintainer_email='python.markdown@gmail.com',
license='BSD License',
packages=['markdown', 'markdown.extensions'],
python_requires='>=3.6',
python_requires='>=3.7',
install_requires=["importlib-metadata>=4.4;python_version<'3.10'"],
extras_require={
'testing': [
Expand Down Expand Up @@ -113,7 +113,6 @@ def get_version():
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py36, py37, py38, py39, py310, pypy3, pygments, flake8, checkspelling, pep517check, checklinks
envlist = py{37, 38, 39, 310}, pypy{37, 38, 39}, pygments, flake8, checkspelling, pep517check, checklinks
isolated_build = True

[testenv]
Expand Down Expand Up @@ -41,4 +41,3 @@ skip_install = true

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