diff -Nru python-pytest-flake8-1.1.1/debian/changelog python-pytest-flake8-1.1.1/debian/changelog --- python-pytest-flake8-1.1.1/debian/changelog 2023-10-15 15:09:19.000000000 +0200 +++ python-pytest-flake8-1.1.1/debian/changelog 2024-04-02 17:44:04.000000000 +0200 @@ -1,3 +1,10 @@ +python-pytest-flake8 (1.1.1-4ubuntu1) noble-proposed; urgency=medium + + * Replace patch to work with flake8 version 7.x + (Closes: #2058914) + + -- Jose Luis Rivero Tue, 02 Apr 2024 17:44:04 +0200 + python-pytest-flake8 (1.1.1-4) unstable; urgency=medium * Team upload. diff -Nru python-pytest-flake8-1.1.1/debian/control python-pytest-flake8-1.1.1/debian/control --- python-pytest-flake8-1.1.1/debian/control 2023-10-15 15:04:19.000000000 +0200 +++ python-pytest-flake8-1.1.1/debian/control 2024-04-02 17:44:04.000000000 +0200 @@ -1,11 +1,12 @@ Source: python-pytest-flake8 Section: python Priority: optional -Maintainer: Debian Python Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Python Team Uploaders: Sergio Durigan Junior Build-Depends: debhelper-compat (= 13), dh-python, - python3-flake8 (>= 5.0.4), + python3-flake8 (>= 7.0.0), python3-pytest , python3-py , python3-setuptools, diff -Nru python-pytest-flake8-1.1.1/debian/patches/flake8-5.x-support.patch python-pytest-flake8-1.1.1/debian/patches/flake8-5.x-support.patch --- python-pytest-flake8-1.1.1/debian/patches/flake8-5.x-support.patch 2023-10-15 15:04:19.000000000 +0200 +++ python-pytest-flake8-1.1.1/debian/patches/flake8-5.x-support.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,51 +0,0 @@ -From 976e6180201f7808a3007c8c5903a1637b18c0c8 Mon Sep 17 00:00:00 2001 -From: Dominic Oram -Date: Fri, 5 Aug 2022 17:55:24 +0100 -Subject: [PATCH] Update to work for flake8==5.0.0 -Origin: https://github.com/tholo/pytest-flake8/pull/88 - ---- - pytest_flake8.py | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) - -diff --git a/pytest_flake8.py b/pytest_flake8.py -index 2555f8a..c693789 100644 ---- a/pytest_flake8.py -+++ b/pytest_flake8.py -@@ -212,23 +212,28 @@ def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, - args += ['--show-source'] - if statistics: - args += ['--statistics'] -+ args += [str(path)] - app = application.Application() - prelim_opts, remaining_args = app.parse_preliminary_options(args) -- config_finder = config.ConfigFileFinder( -- app.program, -- prelim_opts.append_config, -- config_file=prelim_opts.config, -- ignore_config_files=prelim_opts.isolated, -+ cfg, cfg_dir = config.load_config( -+ config=prelim_opts.config, -+ extra=prelim_opts.append_config, -+ isolated=prelim_opts.isolated, -+ ) -+ app.find_plugins( -+ cfg, -+ cfg_dir, -+ enable_extensions=prelim_opts.enable_extensions, -+ require_plugins=prelim_opts.require_plugins, - ) -- app.find_plugins(config_finder) - app.register_plugin_options() -- app.parse_configuration_and_cli(config_finder, remaining_args) -+ app.parse_configuration_and_cli(cfg, cfg_dir, remaining_args) - if flake8ignore: - app.options.ignore = flake8ignore - app.make_formatter() # fix this - app.make_guide() - app.make_file_checker_manager() -- app.run_checks([str(path)]) -+ app.run_checks() - app.formatter.start() - app.report_errors() - app.formatter.stop() diff -Nru python-pytest-flake8-1.1.1/debian/patches/flake8-7.x-pytest-greater-7.x.patch python-pytest-flake8-1.1.1/debian/patches/flake8-7.x-pytest-greater-7.x.patch --- python-pytest-flake8-1.1.1/debian/patches/flake8-7.x-pytest-greater-7.x.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-pytest-flake8-1.1.1/debian/patches/flake8-7.x-pytest-greater-7.x.patch 2024-04-02 17:44:04.000000000 +0200 @@ -0,0 +1,89 @@ +Description: Patch to work with flake8 7.x series + Upstream is known to be broken with new flake8 versions: + https://github.com/tholo/pytest-flake8/pull/96. Patch is part of the + discussion in the PR but upstream does not seem very responsive. +Author: clalancette@intrinsic.ai +Reviewed-by: jrivero@osrfoundation.org +Bug: https://github.com/tholo/pytest-flake8/pull/96#issuecomment-2032433686 +Origin: https://github.com/clalancette/pytest-flake8/commits/modern-flake8/ +Last-Update: 2024-04-02 + +diff --git a/pytest_flake8.py b/pytest_flake8.py +index 2555f8a..254b8b5 100644 +--- a/pytest_flake8.py ++++ b/pytest_flake8.py +@@ -6,7 +6,7 @@ + from io import BytesIO, TextIOWrapper + + from flake8.main import application +-from flake8.options import config ++from flake8.options.parse_args import parse_args + + import pytest + +@@ -213,22 +213,14 @@ def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, + if statistics: + args += ['--statistics'] + app = application.Application() +- prelim_opts, remaining_args = app.parse_preliminary_options(args) +- config_finder = config.ConfigFileFinder( +- app.program, +- prelim_opts.append_config, +- config_file=prelim_opts.config, +- ignore_config_files=prelim_opts.isolated, +- ) +- app.find_plugins(config_finder) +- app.register_plugin_options() +- app.parse_configuration_and_cli(config_finder, remaining_args) ++ app.plugins, app.options = parse_args(args) + if flake8ignore: + app.options.ignore = flake8ignore + app.make_formatter() # fix this + app.make_guide() +- app.make_file_checker_manager() +- app.run_checks([str(path)]) ++ app.make_file_checker_manager([]) ++ app.options.filenames = [str(path)] ++ app.run_checks() + app.formatter.start() + app.report_errors() + app.formatter.stop() +diff --git a/test_flake8.py b/test_flake8.py +index 0bc2461..e70860f 100644 +--- a/test_flake8.py ++++ b/test_flake8.py +@@ -2,7 +2,6 @@ + """Unit tests for flake8 pytest plugin.""" + from __future__ import print_function + +-import py + import pytest + + pytest_plugins = "pytester", +@@ -44,8 +43,8 @@ def test_default_flake8_ignores(self, testdir): + + [flake8] + ignore = E203 +- *.py E300 +- tests/*.py ALL E203 # something ++ E300 ++ ALL E203 + """) + testdir.tmpdir.ensure("xy.py") + testdir.tmpdir.ensure("tests/hello.py") +@@ -164,13 +163,13 @@ def test_unicode_error(testdir): + x = testdir.tmpdir.join("x.py") + import codecs + f = codecs.open(str(x), "w", encoding="utf8") +- f.write(py.builtin._totext(""" ++ f.write(""" + # coding=utf8 + + accent_map = { + u'\\xc0': 'a', # À -> a non-ascii comment crashes it + } +-""", "utf8")) ++""") + f.close() + # result = testdir.runpytest("--flake8", x, "-s") + # result.stdout.fnmatch_lines("*non-ascii comment*") diff -Nru python-pytest-flake8-1.1.1/debian/patches/series python-pytest-flake8-1.1.1/debian/patches/series --- python-pytest-flake8-1.1.1/debian/patches/series 2023-10-15 15:04:19.000000000 +0200 +++ python-pytest-flake8-1.1.1/debian/patches/series 2024-04-02 17:24:35.000000000 +0200 @@ -1 +1 @@ -flake8-5.x-support.patch +flake8-7.x-pytest-greater-7.x.patch