From 25f1847b4e9fd053681b35d6b6b0133f711c1101 Mon Sep 17 00:00:00 2001 From: lb1107039128 Date: Fri, 26 Jan 2024 10:58:41 +0800 Subject: [PATCH] remove old and unused "tracing" code (#625) Signed-off-by: lb1107039128 --- ...move-old-and-unused-tracing-code-625.patch | 42 +++++++++++++++++++ pyflakes.spec | 6 ++- 2 files changed, 47 insertions(+), 1 deletion(-) 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 0ed0cc1..b5aa164 100644 --- a/pyflakes.spec +++ b/pyflakes.spec @@ -3,7 +3,7 @@ Pyflakes A simple program which checks Python source files for errors.Pyflakes Name: python-pyflakes Version: 2.3.1 -Release: 3 +Release: 4 Summary: passive checker of Python programs License: MIT URL: https://github.com/PyCQA/pyflakes @@ -14,6 +14,7 @@ BuildArch: noarch Patch0001: 0001-Detect-typing-module-attributes-with-import-typing-a.patch Patch0002: 0001-fix-typo-annoation-annotation-636.patch +Patch0003: 0001-remove-old-and-unused-tracing-code-625.patch %package -n python3-pyflakes Summary: passive checker of Python programs @@ -79,6 +80,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Fri Jan 26 2024 liubo - 2.3.1-4 +- remove old and unused "tracing" code (#625) + * Fri Jan 19 2024 liubo - 2.3.1-3 - fix typo: annoation -> annotation (#636)