From 6baf9f2d31ce0a7f65a52efbd42038b407a79e9c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 4 Jul 2023 17:20:51 +0300 Subject: [PATCH 1/2] Update docs and code after dropping EOL 3.7 --- doc/en/index.rst | 2 +- pyproject.toml | 2 +- testing/_py/test_local.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/en/index.rst b/doc/en/index.rst index 23b6964c9..90b720ea5 100644 --- a/doc/en/index.rst +++ b/doc/en/index.rst @@ -18,7 +18,7 @@ The ``pytest`` framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries. -``pytest`` requires: Python 3.7+ or PyPy3. +``pytest`` requires: Python 3.8+ or PyPy3. **PyPI package name**: :pypi:`pytest` diff --git a/pyproject.toml b/pyproject.toml index a4139a5c0..d540773c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,7 +113,7 @@ template = "changelog/_template.rst" showcontent = true [tool.black] -target-version = ['py37'] +target-version = ['py38'] # check-wheel-contents is executed by the build-and-inspect-python-package action. [tool.check-wheel-contents] diff --git a/testing/_py/test_local.py b/testing/_py/test_local.py index 348682b53..895066a9f 100644 --- a/testing/_py/test_local.py +++ b/testing/_py/test_local.py @@ -1519,9 +1519,9 @@ class TestPOSIXLocalPath: path1.chown(owner, group) -class TestUnicodePy2Py3: +class TestUnicode: def test_join_ensure(self, tmpdir, monkeypatch): - if sys.version_info >= (3, 0) and "LANG" not in os.environ: + if "LANG" not in os.environ: pytest.skip("cannot run test without locale") x = local(tmpdir.strpath) part = "hällo" @@ -1529,7 +1529,7 @@ class TestUnicodePy2Py3: assert x.join(part) == y def test_listdir(self, tmpdir): - if sys.version_info >= (3, 0) and "LANG" not in os.environ: + if "LANG" not in os.environ: pytest.skip("cannot run test without locale") x = local(tmpdir.strpath) part = "hällo" From 1f5058e9722ed59a857d3d568e2560ae0ec96059 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 4 Jul 2023 17:22:05 +0300 Subject: [PATCH 2/2] Use same Black version for blacken-docs as regular Black check --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 33816f0d0..d85abe263 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: rev: 1.14.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.1.0] + additional_dependencies: [black==23.3.0] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: