From ff8fa56ee2647afc359ee0f20a04ebb185badf7a Mon Sep 17 00:00:00 2001 From: liubo Date: Wed, 22 Nov 2023 17:37:22 +0800 Subject: [PATCH] remove old and unused "tracing" Signed-off-by: liubo --- ...move-old-and-unused-tracing-code-625.patch | 42 +++++++++++++++++++ pyflakes.spec | 9 +++- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 0001-remove-old-and-unused-tracing-code-625.patch diff --git a/0001-remove-old-and-unused-tracing-code-625.patch b/0001-remove-old-and-unused-tracing-code-625.patch new file mode 100644 index 0000000..c8b550f --- /dev/null +++ b/0001-remove-old-and-unused-tracing-code-625.patch @@ -0,0 +1,42 @@ +From da197ee94e791640d82940396c19d2d82ca8defb Mon Sep 17 00:00:00 2001 +From: Terence Honles +Date: Thu, 20 May 2021 07:47:19 -0700 +Subject: [PATCH] remove old and unused "tracing" code (#625) + +--- + pyflakes/checker.py | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/pyflakes/checker.py b/pyflakes/checker.py +index 48d3841..135ad33 100644 +--- a/pyflakes/checker.py ++++ b/pyflakes/checker.py +@@ -868,7 +868,6 @@ class Checker(object): + + nodeDepth = 0 + offset = None +- traceTree = False + _in_annotation = AnnotationState.NONE + _in_deferred = False + +@@ -1393,8 +1392,6 @@ class Checker(object): + if self.offset and getattr(node, 'lineno', None) is not None: + node.lineno += self.offset[0] + node.col_offset += self.offset[1] +- if self.traceTree: +- print(' ' * self.nodeDepth + node.__class__.__name__) + if self.futuresAllowed and not (isinstance(node, ast.ImportFrom) or + self.isDocstring(node)): + self.futuresAllowed = False +@@ -1406,8 +1403,6 @@ class Checker(object): + handler(node) + finally: + self.nodeDepth -= 1 +- if self.traceTree: +- print(' ' * self.nodeDepth + 'end ' + node.__class__.__name__) + + _getDoctestExamples = doctest.DocTestParser().get_examples + +-- +2.42.0.windows.2 + diff --git a/pyflakes.spec b/pyflakes.spec index 17f3015..d20b10c 100644 --- a/pyflakes.spec +++ b/pyflakes.spec @@ -1,6 +1,6 @@ Name: pyflakes Version: 2.3.1 -Release: 1 +Release: 2 Summary: A simple program which checks Python source files for errors License: MIT URL: https://github.com/PyCQA/pyflakes @@ -8,6 +8,8 @@ Source0: https://files.pythonhosted.org/packages/a8/0f/0dc480da9162749bf6 BuildArch: noarch BuildRequires: python2-devel >= 2.7 python2-setuptools +Patch0001: 0001-remove-old-and-unused-tracing-code-625.patch + %description This is a safe program which analyze programs and detects various errors.\ It works by parsing the source file and check for error.\ @@ -42,7 +44,7 @@ Summary: help document and man info Help document and man info for pyflakes package %prep -%autosetup -n pyflakes-2.3.1 +%autosetup -n pyflakes-2.3.1 -p1 %build %py2_build @@ -90,6 +92,9 @@ ln -s pyflakes-3.1 %{buildroot}%{_mandir}/man1/pyflakes.1 %changelog +* Wed Nov 22 2023 liubo - 2.3.1-2 +- remove old and unused "tracing" + * Tue Oct 24 2023 luxuexian - 2.3.1-1 - Update to version 2.3.1