summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Rocca <ema@debian.org>2022-09-07 20:09:06 +0200
committerEmanuele Rocca <ema@debian.org>2022-09-07 20:09:06 +0200
commit67bc3f6fa7ab68fd4e0db9d0b66fc06b1da5e13e (patch)
tree78561be088f48d0918dda1e0013cde5177bde5ae
parent24cd4a1806bc8eb9c1ebedb5033e7db5affa0fa6 (diff)
Drop fix-flake8-4.x-support.patch
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/fix-flake8-4.x-support.patch94
-rw-r--r--debian/patches/series2
3 files changed, 1 insertions, 96 deletions
diff --git a/debian/changelog b/debian/changelog
index c059edb..9260868 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ python-pytest-flake8 (1.1.1-1) UNRELEASED; urgency=medium
* Team upload.
* New upstream release.
+ * Drop fix-flake8-4.x-support.patch, applied upstream.
-- Emanuele Rocca <ema@debian.org> Wed, 07 Sep 2022 20:06:47 +0200
diff --git a/debian/patches/fix-flake8-4.x-support.patch b/debian/patches/fix-flake8-4.x-support.patch
deleted file mode 100644
index b692d55..0000000
--- a/debian/patches/fix-flake8-4.x-support.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From eda4ef74c0f25b856fe282742ea206b21e94c24c Mon Sep 17 00:00:00 2001
-From: Erik Kemperman <erikkemperman@gmail.com>
-Date: Sun, 17 Oct 2021 00:41:51 +0200
-Subject: [PATCH] Remove Python 2 support and dependency on py, fixes #81
-
----
- pytest_flake8.py | 29 ++++++++++++++++++-----------
- setup.py | 6 +++---
- tox.ini | 2 +-
- 3 files changed, 22 insertions(+), 15 deletions(-)
-
-diff --git a/pytest_flake8.py b/pytest_flake8.py
-index 1e45d8f..5774714 100644
---- a/pytest_flake8.py
-+++ b/pytest_flake8.py
-@@ -2,12 +2,12 @@
-
- import os
- import re
-+from contextlib import redirect_stdout, redirect_stderr
-+from io import BytesIO, TextIOWrapper
-
- from flake8.main import application
- from flake8.options import config
-
--import py
--
- import pytest
-
- __version__ = '0.6'
-@@ -116,15 +116,22 @@ def setup(self):
- pytest.skip("file(s) previously passed FLAKE8 checks")
-
- def runtest(self):
-- call = py.io.StdCapture.call
-- found_errors, out, err = call(
-- check_file,
-- self.fspath,
-- self.flake8ignore,
-- self.maxlength,
-- self.maxcomplexity,
-- self.showshource,
-- self.statistics)
-+ with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \
-+ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \
-+ redirect_stdout(to), redirect_stderr(te):
-+ found_errors = check_file(
-+ self.fspath,
-+ self.flake8ignore,
-+ self.maxlength,
-+ self.maxcomplexity,
-+ self.showshource,
-+ self.statistics
-+ )
-+ to.flush()
-+ te.flush()
-+ out = bo.getvalue().decode('utf-8')
-+ err = be.getvalue().decode('utf-8')
-+
- if found_errors:
- raise Flake8Error(out, err)
- # update mtime only if test passed
-diff --git a/setup.py b/setup.py
-index 50e91c9..1dfdf3c 100644
---- a/setup.py
-+++ b/setup.py
-@@ -14,13 +14,13 @@
- "Intended Audience :: Developers",
- "License :: OSI Approved :: BSD License",
- "Programming Language :: Python",
-- "Programming Language :: Python :: 2",
-- "Programming Language :: Python :: 2.7",
- "Programming Language :: Python :: 3",
-- "Programming Language :: Python :: 3.4",
- "Programming Language :: Python :: 3.5",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
-+ "Programming Language :: Python :: 3.8",
-+ "Programming Language :: Python :: 3.9",
-+ "Programming Language :: Python :: 3.10",
- "Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
- "Topic :: Software Development",
-diff --git a/tox.ini b/tox.ini
-index 12da49e..343cfdd 100644
---- a/tox.ini
-+++ b/tox.ini
-@@ -1,5 +1,5 @@
- [tox]
--envlist=py27,py36-pytesttrunk,py36-xdist,py34,py35,py36,py37,py38,pypy,pypy3
-+envlist=py36-pytesttrunk,py36-xdist,py35,py36,py37,py38,py39,py310,pypy,pypy3
-
- [testenv]
- deps=pytest
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 928676f..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-# From https://github.com/tholo/pytest-flake8/pull/82
-fix-flake8-4.x-support.patch