Date: Monday, April 10, 2023 @ 14:02:58
  Author: felixonmars
Revision: 1444417

upgpkg: pylama 7.7.1-9: rebuild with python 3.11

Added:
  pylama/trunk/pylama-pyflakes-2.5.patch
Modified:
  pylama/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   11 +++++---
 pylama-pyflakes-2.5.patch |   57 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-10 14:02:18 UTC (rev 1444416)
+++ PKGBUILD    2023-04-10 14:02:58 UTC (rev 1444417)
@@ -4,7 +4,7 @@
 
 pkgname=pylama
 pkgver=7.7.1
-pkgrel=8
+pkgrel=9
 pkgdesc="Code audit tool for python"
 arch=('any')
 url="https://github.com/klen/pylama";
@@ -14,13 +14,16 @@
 checkdepends=('python-pytest' 'git' 'mypy')
 optdepends=('python-radon: radon support')
 
source=("$pkgname-$pkgver.tar.gz::https://github.com/klen/pylama/archive/$pkgver.tar.gz";
-        pylama-pytest-6.patch::https://github.com/klen/pylama/pull/189.patch)
+        pylama-pytest-6.patch::https://github.com/klen/pylama/pull/189.patch
+        pylama-pyflakes-2.5.patch)
 sha256sums=('acec2b80ad6a4781dc2626992b10ecac7b81be6c0145750c11688c281298f6fe'
-            '6a025bb41afe783841ecb28ab6faada4be9d7b3d152f0a58970757953d343cba')
+            '6a025bb41afe783841ecb28ab6faada4be9d7b3d152f0a58970757953d343cba'
+            'a236eb95ad4c835ae4bdc50950f8ede89bdb84c89726d38304f896ce553604fc')
 
 prepare() {
   cd $pkgname-$pkgver
   patch -p1 -i ../pylama-pytest-6.patch
+  patch -p1 -i ../pylama-pyflakes-2.5.patch
 }
 
 build() {
@@ -41,5 +44,5 @@
   cd $pkgname-$pkgver
   python setup.py install --root="$pkgdir/" --optimize=1
 
-  mv "$pkgdir"/usr/lib/python3.10/site-packages/{,pylama/}tests
+  mv "$pkgdir"/usr/lib/python3.11/site-packages/{,pylama/}tests
 }

Added: pylama-pyflakes-2.5.patch
===================================================================
--- pylama-pyflakes-2.5.patch                           (rev 0)
+++ pylama-pyflakes-2.5.patch   2023-04-10 14:02:58 UTC (rev 1444417)
@@ -0,0 +1,57 @@
+From c6f3175c00a7e2b30e4ff5ab0e61c39967366c81 Mon Sep 17 00:00:00 2001
+From: Tsuyoshi Hombashi <[email protected]>
+Date: Sun, 31 Jul 2022 21:44:07 +0900
+Subject: [PATCH 1/2] Remove messages that were removed at pyflakes 2.5.0
+
+---
+ pylama/lint/pylama_pyflakes.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/pylama/lint/pylama_pyflakes.py b/pylama/lint/pylama_pyflakes.py
+index 81f695a..c828fdb 100644
+--- a/pylama/lint/pylama_pyflakes.py
++++ b/pylama/lint/pylama_pyflakes.py
+@@ -9,7 +9,6 @@
+
+ checker.messages.UnusedImport.message = "W0611 %r imported but unused"
+ checker.messages.RedefinedWhileUnused.message = "W0404 redefinition of unused 
%r from line %r"
+-checker.messages.RedefinedInListComp.message = "W0621 list comprehension 
redefines %r from line %r"
+ checker.messages.ImportShadowedByLoopVar.message = "W0621 import %r from line 
%r shadowed by loop variable"
+ checker.messages.ImportStarUsed.message = "W0401 'from %s import *' used; 
unable to detect undefined names"
+ checker.messages.ImportStarUsage.message = "W0401 '%s may be undefined, or 
defined from star imports: %s'"
+@@ -20,7 +19,6 @@
+ checker.messages.DuplicateArgument.message = "E1122 duplicate argument %r in 
function definition"
+ checker.messages.LateFutureImport.message = "W0410 future import(s) %r after 
other statements"
+ checker.messages.UnusedVariable.message = "W0612 local variable %r is 
assigned to but never used"
+-checker.messages.ReturnWithArgsInsideGenerator.message = "E0106 'return' with 
argument inside generator"
+ checker.messages.ReturnOutsideFunction.message = "E0104 'return' outside 
function"
+ 
+ 
+
+From 897b3fb9f923fd6eed77e50f22ecb0b9dfb8e472 Mon Sep 17 00:00:00 2001
+From: Tsuyoshi Hombashi <[email protected]>
+Date: Sat, 6 Aug 2022 15:45:06 +0900
+Subject: [PATCH 2/2] Modify to keep backward compatibility
+
+---
+ pylama/lint/pylama_pyflakes.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/pylama/lint/pylama_pyflakes.py b/pylama/lint/pylama_pyflakes.py
+index c828fdb..8a1a606 100644
+--- a/pylama/lint/pylama_pyflakes.py
++++ b/pylama/lint/pylama_pyflakes.py
+@@ -22,6 +22,13 @@
+ 
+ checker.messages.ReturnOutsideFunction.message = "E0104 'return' outside 
function"
+ 
++# RedefinedInListComp and ReturnWithArgsInsideGenerator were removed at 
pyflakes 2.5.0:
++#   
https://github.com/PyCQA/pyflakes/commit/2246217295dc8cb30ef4a7b9d8dc449ce32e603a
++if hasattr(checker.messages, "RedefinedInListComp"):
++    CODES[checker.messages.RedefinedInListComp.message] = "W0621"
++if hasattr(checker.messages, "ReturnWithArgsInsideGenerator"):
++    CODES[checker.messages.ReturnWithArgsInsideGenerator.message] = "E0106"
++
+ 
+ class Linter(Abstract):
+     """Pyflakes runner."""

Reply via email to