From 81a29503494d12ac0aa299bc5b444f9342793e85 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:29:46 +0200 Subject: [PATCH 1/8] chore: update dependencies --- requirements.txt | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/requirements.txt b/requirements.txt index ffb93ca..43957b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,32 +1,24 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.14 # by the following command: # -# pip-compile requirements.in +# pip-compile --no-index requirements.in # -attrs==22.1.0 +coverage[toml]==7.15.4 + # via pytest-cov +iniconfig==2.3.0 # via pytest -coverage[toml]==6.5.0 +packaging==26.3 + # via pytest +pluggy==1.6.0 # via - # coverage + # pytest # pytest-cov -exceptiongroup==1.1.3 - # via pytest -iniconfig==1.1.1 - # via pytest -packaging==21.3 +pygments==2.21.0 # via pytest -pluggy==1.0.0 - # via pytest -pyparsing==3.0.9 - # via packaging -pytest==7.2.0 +pytest==9.1.1 # via # -r requirements.in # pytest-cov -pytest-cov==4.0.0 +pytest-cov==7.1.0 # via -r requirements.in -tomli==2.0.1 - # via - # coverage - # pytest From 94037d50f3b40c88fb2441c72c8a50c8780c038a Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:31:50 +0200 Subject: [PATCH 2/8] chore: update python versions --- .github/workflows/tests.yml | 4 ++-- pyproject.toml | 9 ++++----- tox.ini | 12 +++++------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3903639..499bc5b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: ["3.12", "3.11", "3.10", "3.9", "3.8", "pypy-3.9"] + python-version: ["3.14", "3.13", "3.12", "3.11", "pypy-3.11"] steps: - uses: actions/checkout@v4 - name: Set up Python @@ -36,7 +36,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: [3.8] + python-version: [3.14] steps: - uses: actions/checkout@v4 - name: Set up Python diff --git a/pyproject.toml b/pyproject.toml index 9986747..223a46e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ description = "Analayze HAProxy log files" keywords = ["haproxy", "log", "sysadmin", "devops", "report" ] license = {file = "LICENSE"} readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.11" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", @@ -22,11 +22,10 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "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 :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: Log Analysis", @@ -44,5 +43,5 @@ haproxy_log_analysis = "haproxy.main:console_script" profile = "plone" [tool.black] -target-version = ["py38"] +target-version = ["py311"] skip-string-normalization = true diff --git a/tox.ini b/tox.ini index 78e689e..c98c6d6 100644 --- a/tox.ini +++ b/tox.ini @@ -4,20 +4,18 @@ envlist = format lint coverage - py38 - py39 - py310 py311 py312 + py313 + py314 pypy3 [gh-actions] python = - 3.8: py38 - 3.9: py39 - 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 + 3.14: py314 [testenv] description = run the distribution tests @@ -58,7 +56,7 @@ commands = [testenv:generate-constrains] description = update the constrains.txt file -basepython = python3.8 +basepython = python3.11 skip_install = true deps = pip-tools From 81e58c5c7d2e00e87946719b54a4589c818baf7b Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:34:32 +0200 Subject: [PATCH 3/8] chore: update pre-commit version pins --- .pre-commit-config.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d2847e..e449a03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,20 +4,20 @@ ci: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.14.0 + rev: v3.21.2 hooks: - id: pyupgrade - args: [--py38-plus] + args: [--py311-plus] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 9.0.0a3 hooks: - id: isort -- repo: https://github.com/psf/black - rev: 23.9.1 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.5.1 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 additional_dependencies: @@ -32,20 +32,20 @@ repos: - flake8-pytest-style - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.4.2 hooks: - id: codespell additional_dependencies: - tomli - repo: https://github.com/mgedmin/check-manifest - rev: "0.49" + rev: "0.51" hooks: - id: check-manifest - repo: https://github.com/regebro/pyroma - rev: "4.2" + rev: "5.0.1" hooks: - id: pyroma - repo: https://github.com/mgedmin/check-python-versions - rev: "0.21.3" + rev: "0.24.2" hooks: - id: check-python-versions From d44c8f5ad23f375556ad7e80b00add1227f2260d Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:34:56 +0200 Subject: [PATCH 4/8] chore: isort --- src/haproxy/line.py | 1 - src/haproxy/utils.py | 1 - tests/conftest.py | 1 - tests/test_log_line.py | 1 - tests/test_main.py | 1 - 5 files changed, 5 deletions(-) diff --git a/src/haproxy/line.py b/src/haproxy/line.py index eb502a8..95405ac 100644 --- a/src/haproxy/line.py +++ b/src/haproxy/line.py @@ -2,7 +2,6 @@ import re - # Example log line, to understand the regex below (truncated to fit into # 80 chars): # diff --git a/src/haproxy/utils.py b/src/haproxy/utils.py index 4b6f0b6..87331ae 100644 --- a/src/haproxy/utils.py +++ b/src/haproxy/utils.py @@ -3,7 +3,6 @@ import re - DELTA_REGEX = re.compile(r'\A(?P\d+)(?P[smhd])\Z') START_REGEX = re.compile( diff --git a/tests/conftest.py b/tests/conftest.py index 2b6e88d..87be76e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,6 @@ import pytest - DEFAULT_DATA = { 'syslog_date': 'Dec 9 13:01:26', 'process_name_and_pid': 'localhost haproxy[28029]:', diff --git a/tests/test_log_line.py b/tests/test_log_line.py index add9ed4..8cfffaf 100644 --- a/tests/test_log_line.py +++ b/tests/test_log_line.py @@ -3,7 +3,6 @@ import pytest - NOW = datetime.now() TWO_DAYS_AGO = NOW - timedelta(days=2) IN_TWO_DAYS = NOW + timedelta(days=2) diff --git a/tests/test_main.py b/tests/test_main.py index c6f5c71..0722b98 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -7,7 +7,6 @@ import pytest import sys - PY310_OR_HIGHER = sys.version_info[1] > 9 From 6a5cd63e7b9d5f32a15274293ddb413e04732051 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:35:14 +0200 Subject: [PATCH 5/8] chore: black --- tests/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 87be76e..bb3ce9b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -41,9 +41,9 @@ def __call__(self, *args, **kwargs): self.data['client_ip_and_port'] = '{client_ip}:{client_port}'.format( **self.data ) - self.data[ - 'server_names' - ] = '{frontend_name} {backend_name}/{server_name}'.format(**self.data) + self.data['server_names'] = ( + '{frontend_name} {backend_name}/{server_name}'.format(**self.data) + ) self.data['timers'] = '{tq}/{tw}/{tc}/{tr}/{tt}'.format(**self.data) self.data['status_and_bytes'] = '{status} {bytes}'.format(**self.data) self.data['connections_and_retries'] = '{act}/{fe}/{be}/{srv}/{retries}'.format( From 7ac7df6ce8cb96808c6c7fbe209fa27a0ab7f13d Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:38:34 +0200 Subject: [PATCH 6/8] chore: flake8 --- tests/conftest.py | 4 ++-- tests/test_main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index bb3ce9b..8726b1c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -55,12 +55,12 @@ def __call__(self, *args, **kwargs): return Line(log_line) -@pytest.fixture() +@pytest.fixture def default_line_data(): return DEFAULT_DATA -@pytest.fixture() +@pytest.fixture def line_factory(): # queues and headers parameters are together because if no headers are # saved the field is completely empty and thus there is no double space diff --git a/tests/test_main.py b/tests/test_main.py index 0722b98..c6e12bc 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -10,7 +10,7 @@ PY310_OR_HIGHER = sys.version_info[1] > 9 -@pytest.fixture() +@pytest.fixture def default_arguments(): """Return all the expected arguments the main function expects.""" return { From e22b34087ae9cffc3524ea35ac9ac97326dbf57e Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:41:40 +0200 Subject: [PATCH 7/8] chore: add dependabot config --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..df4d15b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" From 14f5afcf7c81cf249d9806cadce177c6e24267e7 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 28 Aug 2026 08:50:19 +0200 Subject: [PATCH 8/8] chore: bump GHA versions --- .github/workflows/tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 499bc5b..7e9efe8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,13 +14,13 @@ jobs: matrix: python-version: ["3.14", "3.13", "3.12", "3.11", "pypy-3.11"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Cache packages - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('tox.ini') }} @@ -38,13 +38,13 @@ jobs: matrix: python-version: [3.14] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Cache packages - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: | ~/.cache/pre-commit