Skip to content

Commit

Permalink
Drop support for Python 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Jan 15, 2022
1 parent adcdeea commit 76fa5a0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 21 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ jobs:
fail-fast: false
matrix:
name: [
"windows-py35",
"windows-py36",
"windows-py37",
"windows-py38",
"windows-py39",
"windows-py38-pytest53",

"ubuntu-py35",
"ubuntu-py36",
"ubuntu-py37",
"ubuntu-py38",
Expand All @@ -27,10 +25,6 @@ jobs:
]

include:
- name: "windows-py35"
python: "3.5"
os: windows-latest
tox_env: "py35"
- name: "windows-py36"
python: "3.6"
os: windows-latest
Expand All @@ -56,10 +50,6 @@ jobs:
os: windows-latest
tox_env: "py38-pytest54"

- name: "ubuntu-py35"
python: "3.5"
os: ubuntu-latest
tox_env: "py35"
- name: "ubuntu-py36"
python: "3.6"
os: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ repos:
- id: rst
name: rst
entry: rst-lint --encoding utf-8
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst)$
files: ^(CHANGELOG.rst|RELEASING.rst|README.rst)$
language: python
additional_dependencies: [pygments, restructuredtext_lint]
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
UNRELEASED
----------

* Dropped support for Python 3.5.
* Use ``SUBPASS`` and ``,`` for passed subtests instead of general ``PASSED``,
``SUBFAIL`` and ``u`` for failed ones instead of ``FAILED`` (`#30`_).

Expand Down
12 changes: 6 additions & 6 deletions pytest_subtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def nullcontext():


@attr.s
class SubTestContext(object):
class SubTestContext:
msg = attr.ib()
kwargs = attr.ib()

Expand All @@ -41,17 +41,17 @@ def count_towards_summary(self):
@property
def head_line(self):
_, _, domain = self.location
return "{} {}".format(domain, self.sub_test_description())
return f"{domain} {self.sub_test_description()}"

def sub_test_description(self):
parts = []
if isinstance(self.context.msg, str):
parts.append("[{}]".format(self.context.msg))
parts.append(f"[{self.context.msg}]")
if self.context.kwargs:
params_desc = ", ".join(
"{}={!r}".format(k, v) for (k, v) in sorted(self.context.kwargs.items())
f"{k}={v!r}" for (k, v) in sorted(self.context.kwargs.items())
)
parts.append("({})".format(params_desc))
parts.append(f"({params_desc})")
return " ".join(parts) or "(<subtest>)"

def _to_json(self):
Expand Down Expand Up @@ -114,7 +114,7 @@ def subtests(request):


@attr.s
class SubTests(object):
class SubTests:
ihook = attr.ib()
suspend_capture_ctx = attr.ib()
request = attr.ib()
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ def read(fname):
py_modules=["pytest_subtests"],
use_scm_version=True,
setup_requires=["setuptools-scm", "setuptools>=40.0"],
python_requires=">=3.5",
install_requires=["pytest>=5.3.0"],
python_requires=">=3.6",
install_requires=["pytest>=6.0"],
classifiers=[
"Development Status :: 4 - Beta",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py35,py36,py37,py38,py39,py38-pytest53,py38-pytest54,pypy3,linting
envlist = py36,py37,py38,py39,py38-pytest53,py38-pytest54,pypy3,linting

[testenv]
passenv = USER USERNAME TRAVIS PYTEST_ADDOPTS
Expand Down

0 comments on commit 76fa5a0

Please sign in to comment.