From 3b561a18fa8986febef734536d4c0977198fa495 Mon Sep 17 00:00:00 2001 From: "Jeffrey J. Persch" Date: Sat, 1 Aug 2026 16:12:49 -0400 Subject: [PATCH 1/2] Drop unused `future` dependency Nothing in the package imports `future`. The three entry-point modules use `from __future__ import print_function`, which is the stdlib `__future__` module and needs no third-party package. Co-authored-by: Claude Opus 5 --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index c6b7983..e2749d6 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,6 @@ requirements = [ "haproxy-stats", - "future", ] test_requirements = [ From d7180ece652d1cd7e13c79a1989dbe49acf29597 Mon Sep 17 00:00:00 2001 From: "Jeffrey J. Persch" Date: Sat, 1 Aug 2026 16:12:56 -0400 Subject: [PATCH 2/2] Declare and exercise Python 3.7 support The source was already dual-compatible: all three entry-point modules carry `from __future__ import print_function`, and there is no py2-only syntax anywhere in the package. Only the metadata said otherwise. tox.ini and the setup.py classifiers were narrowed to 2.7 in May 2017 (#3 and #5) on the stated grounds that "our dependency is unfortunately python 2.7 only". That does not hold up. The dependency is haproxy-stats, tested here at 1.3; haproxystats/__init__.py is a single module that upstream left untouched from 2016-03-10 until after 1.3 shipped, so it is identical across the whole 1.3 line, and it contains no py2-only constructs. It imports and runs on 3.7. Verified on both interpreters: all 27 tests pass under `python setup.py test` on 2.7.18 and 3.7.17 (one intentional skip, the disabled gmetric case), and all three console scripts run. Only 3.7 is claimed, not a bare `Programming Language :: Python :: 3`, since 3.8+ has not been tested. Co-authored-by: Claude Opus 5 --- setup.py | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e2749d6..ab97dd6 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ 'Intended Audience :: Developers', 'Natural Language :: English', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.7', ], test_suite='tests', tests_require=test_requirements diff --git a/tox.ini b/tox.ini index 4d0e390..3c251be 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, flake8 +envlist = py27, py37, flake8 [testenv:flake8] basepython=python