pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-test-flake8



Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Nov 11 16:08:38 UTC 2026

Modified Files:
        pkgsrc/devel/py-test-flake8: Makefile distinfo
Added Files:
        pkgsrc/devel/py-test-flake8/patches: patch-pytest__flake8.py

Log Message:
py-test-flake8: fix compatibility with pytest 9.1.0

Patch from OpenIndiana.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/py-test-flake8/Makefile
cvs rdiff -u -r1.16 -r1.17 pkgsrc/devel/py-test-flake8/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/py-test-flake8/patches/patch-pytest__flake8.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-test-flake8/Makefile
diff -u pkgsrc/devel/py-test-flake8/Makefile:1.20 pkgsrc/devel/py-test-flake8/Makefile:1.21
--- pkgsrc/devel/py-test-flake8/Makefile:1.20   Sat Apr 12 21:10:56 2025
+++ pkgsrc/devel/py-test-flake8/Makefile        Wed Nov 11 16:08:38 2026
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2025/04/12 21:10:56 adam Exp $
+# $NetBSD: Makefile,v 1.21 2026/11/11 16:08:38 wiz Exp $
 
 DISTNAME=      pytest_flake8-1.3.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/py//:S/_/-/}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pytest-flake8/}
 
@@ -18,5 +18,8 @@ DEPENDS+=     ${PYPKGPREFIX}-test>=7.0:../..
 
 USE_LANGUAGES= # none
 
+# as of 1.3.0
+# 8 failed, 2 passed, 2 xfailed
+
 .include "../../lang/python/wheel.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/devel/py-test-flake8/distinfo
diff -u pkgsrc/devel/py-test-flake8/distinfo:1.16 pkgsrc/devel/py-test-flake8/distinfo:1.17
--- pkgsrc/devel/py-test-flake8/distinfo:1.16   Mon Nov 11 22:39:52 2024
+++ pkgsrc/devel/py-test-flake8/distinfo        Wed Nov 11 16:08:38 2026
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.16 2024/11/11 22:39:52 adam Exp $
+$NetBSD: distinfo,v 1.17 2026/11/11 16:08:38 wiz Exp $
 
 BLAKE2s (pytest_flake8-1.3.0.tar.gz) = bf1ca7b11450d03e3111bc421678e8eeb2e8fda158b63c95c2df97cf20aee30c
 SHA512 (pytest_flake8-1.3.0.tar.gz) = bdbd54edc7482cf16b29bbb7509a855edc7c2303da3728c16b1755e95ac4ddf2b6eab9cf4cafd20f025134fd1dce62f410cee1198629effa7109cde3d643bb50
 Size (pytest_flake8-1.3.0.tar.gz) = 13340 bytes
+SHA1 (patch-pytest__flake8.py) = 5764b961d02ebce93720af533141d4be28bb770e

Added files:

Index: pkgsrc/devel/py-test-flake8/patches/patch-pytest__flake8.py
diff -u /dev/null pkgsrc/devel/py-test-flake8/patches/patch-pytest__flake8.py:1.1
--- /dev/null   Wed Nov 11 16:08:39 2026
+++ pkgsrc/devel/py-test-flake8/patches/patch-pytest__flake8.py Wed Nov 11 16:08:38 2026
@@ -0,0 +1,43 @@
+$NetBSD: patch-pytest__flake8.py,v 1.1 2026/11/11 16:08:38 wiz Exp $
+
+pytest 9.1.0 compatibility from
+https://github.com/OpenIndiana/oi-userland/pull/19860/changes
+
+--- pytest_flake8.py.orig      2026-11-11 16:03:58.215003395 +0000
++++ pytest_flake8.py
+@@ -4,6 +4,7 @@ from io import BytesIO, TextIOWrapper
+ import re
+ from contextlib import redirect_stdout, redirect_stderr
+ from io import BytesIO, TextIOWrapper
++from fnmatch import fnmatch
+ 
+ from flake8.main import application
+ 
+@@ -59,11 +60,11 @@ def pytest_configure(config):
+             config._flake8mtimes = config.cache.get(HISTKEY, {})
+ 
+ 
+-def pytest_collect_file(file_path, path, parent):
++def pytest_collect_file(file_path, parent):
+     """Filter files down to which ones should be checked."""
+     config = parent.config
+     if config.option.flake8 and file_path.suffix in config._flake8exts:
+-        flake8ignore = config._flake8ignore(path)
++        flake8ignore = config._flake8ignore(file_path)
+         if flake8ignore is not None:
+             item = Flake8File.from_parent(
+                 parent,
+@@ -203,7 +204,12 @@ class Ignorer:
+     def __call__(self, path):
+         l = []  # noqa: E741
+         for glob, ignlist in self.ignores:
+-            if not glob or path.fnmatch(glob):
++            mpath = path
++            if glob and '/' in glob:
++                glob = "*" + glob
++            else:
++                mpath = str(path).split("/")[-1]
++            if not glob or fnmatch(mpath, glob):
+                 if ignlist is None:
+                     return None
+                 l.extend(ignlist)



Home | Main Index | Thread Index | Old Index