Upgrade package to version 3.1.0
This commit is contained in:
parent
e2011b80b4
commit
57d8b839ed
@ -1,44 +0,0 @@
|
||||
From 836631f2f73d45baa4021453d89fc9fd6f52be58 Mon Sep 17 00:00:00 2001
|
||||
From: Anthony Sottile <asottile@umich.edu>
|
||||
Date: Mon, 12 Jun 2023 21:00:45 -0400
|
||||
Subject: [PATCH] fix error reporter and testsuite in 3.11.4+ (#775)
|
||||
|
||||
---
|
||||
pyflakes/reporter.py | 3 ++-
|
||||
pyflakes/test/test_api.py | 8 ++++++--
|
||||
2 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: pyflakes-3.0.1/pyflakes/reporter.py
|
||||
===================================================================
|
||||
--- pyflakes-3.0.1.orig/pyflakes/reporter.py
|
||||
+++ pyflakes-3.0.1/pyflakes/reporter.py
|
||||
@@ -56,8 +56,9 @@ class Reporter:
|
||||
else:
|
||||
line = text.splitlines()[-1]
|
||||
|
||||
+ # lineno might be None if the error was during tokenization
|
||||
# lineno might be 0 if the error came from stdin
|
||||
- lineno = max(lineno, 1)
|
||||
+ lineno = max(lineno or 0, 1)
|
||||
|
||||
if offset is not None:
|
||||
if sys.version_info < (3, 8) and text is not None:
|
||||
Index: pyflakes-3.0.1/pyflakes/test/test_api.py
|
||||
===================================================================
|
||||
--- pyflakes-3.0.1.orig/pyflakes/test/test_api.py
|
||||
+++ pyflakes-3.0.1/pyflakes/test/test_api.py
|
||||
@@ -628,8 +628,12 @@ x = "%s"
|
||||
x = "%s"
|
||||
""" % SNOWMAN).encode('utf-16')
|
||||
with self.makeTempFile(source) as sourcePath:
|
||||
- self.assertHasErrors(
|
||||
- sourcePath, [f"{sourcePath}: problem decoding source\n"])
|
||||
+ if sys.version_info < (3, 11, 4):
|
||||
+ expected = f"{sourcePath}: problem decoding source\n"
|
||||
+ else:
|
||||
+ expected = f"{sourcePath}:1: source code string cannot contain null bytes\n" # noqa: E501
|
||||
+
|
||||
+ self.assertHasErrors(sourcePath, [expected])
|
||||
|
||||
def test_checkRecursive(self):
|
||||
"""
|
||||
Binary file not shown.
BIN
pyflakes-3.1.0.tar.gz
Normal file
BIN
pyflakes-3.1.0.tar.gz
Normal file
Binary file not shown.
@ -2,14 +2,12 @@
|
||||
%global common_desc \
|
||||
Pyflakes A simple program which checks Python source files for errors.Pyflakes
|
||||
Name: python-pyflakes
|
||||
Version: 3.0.1
|
||||
Release: 2
|
||||
Version: 3.1.0
|
||||
Release: 1
|
||||
Summary: passive checker of Python programs
|
||||
License: MIT
|
||||
URL: https://github.com/PyCQA/pyflakes
|
||||
Source0: https://files.pythonhosted.org/packages/f2/51/506ddcfab10d708e8460554cc1cf37c727a6a2cccbad8dfe57766cfce33c/pyflakes-3.0.1.tar.gz
|
||||
|
||||
Patch0: fix-error-reporter-and-testsuite-in-3.11.4-775.patch
|
||||
Source0: https://files.pythonhosted.org/packages/8b/fb/7251eaec19a055ec6aafb3d1395db7622348130d1b9b763f78567b2aab32/pyflakes-3.1.0.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
%description
|
||||
@ -34,7 +32,7 @@ Provides: python3-pyflakes-doc
|
||||
%{common_desc}
|
||||
|
||||
%prep
|
||||
%autosetup -n pyflakes-3.0.1 -p1
|
||||
%autosetup -n pyflakes-%{version} -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -79,6 +77,9 @@ mv %{buildroot}/doclist.lst .
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Aug 3 2023 Dongxing Wang <dxwangk@isoftstone.com> - 3.1.0-1
|
||||
- Upgrade package to version 3.1.0
|
||||
|
||||
* Sat Jul 22 2023 xu_ping <707078654@qq.com> - 3.0.1-2
|
||||
- fix test failure due to python3.11
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user