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

MAINT: Remove python3.7 support #217

Merged
merged 2 commits into from
Aug 22, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
matrix:
include:
- os: ubuntu-latest
python-version: 3.7
toxenv: py37-test-pytest46
python-version: 3.8
toxenv: py38-test-pytestoldest
- os: windows-latest
python-version: 3.7
toxenv: py37-test-pytest50
python-version: 3.8
toxenv: py38-test-pytest50
- os: macos-latest
python-version: 3.7
toxenv: py37-test-pytest51
python-version: 3.8
toxenv: py38-test-pytest51
- os: ubuntu-latest
python-version: 3.7
toxenv: py37-test-pytest52
python-version: 3.8
toxenv: py38-test-pytest52
- os: windows-latest
python-version: 3.8
toxenv: py38-test-pytest53
Expand Down Expand Up @@ -80,11 +80,3 @@ jobs:
run: python -m pip install tox
- name: Run Tox
run: tox ${{ matrix.toxargs }} -v -e ${{ matrix.toxenv }}

# - name: Slack Notification
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
# if: always() # TODO: cron
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
1.1.0 (unreleased)
==================

- Versions of Python <3.8 are no longer supported. [#217]


1.0.0 (2023-08-11)
==================
Expand Down
12 changes: 6 additions & 6 deletions pytest_doctestplus/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def pytest_configure(config):
use_rst = config.getini('doctest_rst') or config.option.doctest_rst
file_ext = config.option.text_file_format or config.getini('text_file_format') or 'rst'
if use_rst:
config.option.doctestglob.append('*.{}'.format(file_ext))
config.option.doctestglob.append(f'*.{file_ext}')

# override default comment characters
ext_comment_pairs = [pair.split('=') for pair in config.getini('text_file_comment_chars')]
Expand Down Expand Up @@ -394,7 +394,7 @@ def parse(self, s, name=None):
skip_next = False
lines = entry.strip().splitlines()
if any(re.match(
'{} doctest-skip-all'.format(comment_char), x.strip()) for x in lines):
f'{comment_char} doctest-skip-all', x.strip()) for x in lines):
skip_all = True
continue

Expand All @@ -405,7 +405,7 @@ def parse(self, s, name=None):
# special environment to be in between, e.g. \begin{python}
last_lines = lines[-2:]
matches = [re.match(
r'{}\s+doctest-skip\s*::(\s+.*)?'.format(comment_char),
fr'{comment_char}\s+doctest-skip\s*::(\s+.*)?',
last_line) for last_line in last_lines]

if len(matches) > 1:
Expand All @@ -423,15 +423,15 @@ def parse(self, s, name=None):

if config.getoption('remote_data', 'none') != 'any':
matches = (re.match(
r'{}\s+doctest-remote-data\s*::'.format(comment_char),
fr'{comment_char}\s+doctest-remote-data\s*::',
last_line) for last_line in last_lines)

if any(matches):
skip_next = True
continue

matches = [re.match(
r'{}\s+doctest-requires\s*::\s+(.*)'.format(comment_char),
fr'{comment_char}\s+doctest-requires\s*::\s+(.*)',
last_line) for last_line in last_lines]

if len(matches) > 1:
Expand Down Expand Up @@ -487,7 +487,7 @@ def parse(self, s, name=None):
config.pluginmanager.unregister(doctest_plugin)


class DoctestPlus(object):
class DoctestPlus:
def __init__(self, doctest_module_item_cls, doctest_textfile_item_cls, file_globs):
"""
doctest_module_item_cls should be a class inheriting
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -29,7 +28,7 @@ keywords = doctest, rst, pytest, py.test
[options]
zip_safe = False
packages = find:
python_requires = >=3.7
python_requires = >=3.8
setup_requires =
setuptools_scm
install_requires =
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{37,38,39,310,311,312}-test
py{38,39,310,311,312}-test
codestyle
requires =
setuptools >= 30.3.0
Expand All @@ -14,7 +14,7 @@ setenv =
py312: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
description = run tests
deps =
pytest46: pytest==4.6.*
pytestoldest: pytest==4.6.0
pytest50: pytest==5.0.*
pytest51: pytest==5.1.*
pytest52: pytest==5.2.*
Expand Down