From 45ac9a7168f5ee632aa95494c4ccfb0a42dc6e94 Mon Sep 17 00:00:00 2001 From: Tomas Zarate <102381901+TOMASEZARATE@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:21:55 +0000 Subject: [PATCH 1/2] Move project configuration to pyproject.toml Closes #126 --- AUTHORS | 1 + pyproject.toml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++- setup.cfg | 3 --- setup.py | 54 ------------------------------------------------- 4 files changed, 55 insertions(+), 58 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/AUTHORS b/AUTHORS index 0ca48bb..e63415c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -20,3 +20,4 @@ Raphael Boidol Pierre Sassoulas Alissa Huskey Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> +Tomas Zarate <102381901+TOMASEZARATE@users.noreply.github.com> diff --git a/pyproject.toml b/pyproject.toml index 35f68f9..ba8d4f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,60 @@ [build-system] -requires = ["setuptools >=42", "setuptools_scm[toml] >=3.4.1"] +requires = ["setuptools >=77", "setuptools_scm[toml] >=3.4.1"] build-backend = "setuptools.build_meta" +[project] +name = "pytest-localserver" +dynamic = ["version"] +description = "pytest plugin to test server connections locally." +readme = "README.rst" +license = "MIT" +license-files = ["LICENSE"] +authors = [ + {name = "Sebastian Rahlf", email = "basti@redtoad.de"}, +] +maintainers = [ + {name = "David Zaslavsky", email = "diazona@ellipsix.net"}, +] +requires-python = ">=3.7" +keywords = ["pytest", "server", "localhost", "http", "smtp"] +classifiers = [ + "Framework :: Pytest", + "Operating System :: OS Independent", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "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", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", + "Topic :: Software Development :: Testing", +] +dependencies = [ + "werkzeug>=0.10", +] + +[project.optional-dependencies] +smtp = [ + "aiosmtpd", +] + +[project.urls] +Homepage = "https://github.com/pytest-dev/pytest-localserver" + +[project.entry-points.pytest11] +localserver = "pytest_localserver.plugin" + +[tool.setuptools] +packages = ["pytest_localserver"] +include-package-data = true +zip-safe = false + [tool.setuptools_scm] write_to = "pytest_localserver/_version.py" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 622d480..0000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ - -[metadata] -description_file = README.rst diff --git a/setup.py b/setup.py deleted file mode 100644 index 9a91bb1..0000000 --- a/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -from setuptools import setup - - -def read(fname): - # makes sure that setup can be executed from a different location - import os.path - - _here = os.path.abspath(os.path.dirname(__file__)) - return open(os.path.join(_here, fname)).read() - - -setup( - name="pytest-localserver", - author="Sebastian Rahlf", - author_email="basti@redtoad.de", - maintainer="David Zaslavsky", - maintainer_email="diazona@ellipsix.net", - license_files=["LICENSE"], - license_expression="MIT", - description="pytest plugin to test server connections locally.", - long_description=read("README.rst"), - url="https://github.com/pytest-dev/pytest-localserver", - packages=["pytest_localserver"], - python_requires=">=3.7", - install_requires=["werkzeug>=0.10"], - extras_require={ - "smtp": [ - "aiosmtpd", - ], - }, - tests_require=["pytest>=2.0.0", "requests"], - entry_points={"pytest11": ["localserver = pytest_localserver.plugin"]}, - zip_safe=False, - include_package_data=True, - keywords="pytest server localhost http smtp", - classifiers=[ - "Framework :: Pytest", - "Operating System :: OS Independent", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "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", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "Programming Language :: Python :: 3.15", - "Topic :: Software Development :: Testing", - ], -) From 6ea1eb32a13324de733f60ea9bfc0163df01d0bb Mon Sep 17 00:00:00 2001 From: Tomas Zarate <102381901+TOMASEZARATE@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:09:33 +0000 Subject: [PATCH 2/2] Drop Python 3.7-3.9 and update setuptools-scm config --- .github/workflows/tests.yml | 14 -------------- .pre-commit-config.yaml | 2 +- CHANGES | 6 ++++++ pyproject.toml | 12 +++++------- tox.ini | 3 +-- 5 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b901813..3d2b4df 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,13 +19,6 @@ jobs: os: ['ubuntu-latest'] # The forced pytest versions correspond with the lower bounds in tox.ini versions: - - python: '3.7' - min-deps: '--force-dep pytest==4.6' - os: 'ubuntu-22.04' - - python: '3.8' - min-deps: '--force-dep pytest==4.6' - - python: '3.9' - min-deps: '--force-dep pytest==4.6' - python: '3.10' min-deps: '--force-dep pytest==6.2.4' - python: '3.11' @@ -38,13 +31,6 @@ jobs: min-deps: '--force-dep pytest==7.3.2' - python: '3.15' min-deps: '--force-dep pytest==7.3.2' - - python: 'pypy-3.7' - min-deps: '--force-dep pytest==4.6' - os: 'ubuntu-22.04' - - python: 'pypy-3.8' - min-deps: '--force-dep pytest==4.6' - - python: 'pypy-3.9' - min-deps: '--force-dep pytest==4.6' - python: 'pypy-3.10' min-deps: '--force-dep pytest==6.2.4' - python: 'pypy-3.11' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f87df2..3e6e281 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: rev: v3.22.0 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py310-plus] - repo: https://github.com/rhysd/actionlint rev: v1.7.12 diff --git a/CHANGES b/CHANGES index be63e00..be32844 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Unreleased +---------- + +Drop Python 3.7, 3.8 and 3.9 support +Move project metadata from setup.py to pyproject.toml + 0.10.0 (2026-10-12) ------------------- diff --git a/pyproject.toml b/pyproject.toml index ba8d4f5..645ec27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools >=77", "setuptools_scm[toml] >=3.4.1"] +requires = ["setuptools>=77", "setuptools-scm>=10"] build-backend = "setuptools.build_meta" [project] @@ -15,7 +15,7 @@ authors = [ maintainers = [ {name = "David Zaslavsky", email = "diazona@ellipsix.net"}, ] -requires-python = ">=3.7" +requires-python = ">=3.10" keywords = ["pytest", "server", "localhost", "http", "smtp"] classifiers = [ "Framework :: Pytest", @@ -24,9 +24,6 @@ classifiers = [ "Intended Audience :: Developers", "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", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -56,8 +53,9 @@ include-package-data = true zip-safe = false [tool.setuptools_scm] -write_to = "pytest_localserver/_version.py" +version_file = "pytest_localserver/_version.py" +write_to_source = true [tool.black] -target-version = ['py37'] +target-version = ['py310'] line-length = 120 diff --git a/tox.ini b/tox.ini index 77f8a03..1c67cdc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{37,38,39,310,311,312,313,314,315,py3}{,-smtp},lint +envlist = py{310,311,312,313,314,315,py3}{,-smtp},lint recreate = True isolated_build = True @@ -22,7 +22,6 @@ deps = # works with your code. Don't forget to modify the corresponding entries in # the Github workflows configuration file if you do change these lower # bounds. - pytest >=4.6, <10; python_version <'3.10' pytest >=6.2.4, <10; python_version >='3.10' and python_version <'3.14' pytest >=7.3.2, <10; python_version >='3.14' pytest-cov !=6.2.0