forked from pool/python-pyflakes
Accepting request 1102806 from devel:languages:python
- Update to 3.1.0: * Drop support for EOL python 3.6 / 3.7 * Remove ``ContinueInFinally`` check (only relevant in python < 3.8) * Fix forward annotations inside a nested scope * Produce an error when a definition shadows an unused variable * Fix accessed global annotation being redefined in a local scope * Allow redefinition of functions across ``match`` arms * Fix potential ``None`` for ``lineno`` during tokenization errors * Add support for PEP 695 and python 3.12 - Switch to pyproject macros. - Drop patch py3114.patch, included now. OBS-URL: https://build.opensuse.org/request/show/1102806 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyflakes?expand=0&rev=37
This commit is contained in:
commit
d9e8e49441
44
py3114.patch
44
py3114.patch
@ -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):
|
|
||||||
"""
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd
|
|
||||||
size 63554
|
|
BIN
pyflakes-3.1.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
pyflakes-3.1.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 8 06:20:25 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 3.1.0:
|
||||||
|
* Drop support for EOL python 3.6 / 3.7
|
||||||
|
* Remove ``ContinueInFinally`` check (only relevant in python < 3.8)
|
||||||
|
* Fix forward annotations inside a nested scope
|
||||||
|
* Produce an error when a definition shadows an unused variable
|
||||||
|
* Fix accessed global annotation being redefined in a local scope
|
||||||
|
* Allow redefinition of functions across ``match`` arms
|
||||||
|
* Fix potential ``None`` for ``lineno`` during tokenization errors
|
||||||
|
* Add support for PEP 695 and python 3.12
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
- Drop patch py3114.patch, included now.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 11 13:45:34 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
Tue Jul 11 13:45:34 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@ -18,17 +18,16 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pyflakes
|
Name: python-pyflakes
|
||||||
Version: 3.0.1
|
Version: 3.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Passive checker of Python programs
|
Summary: Passive checker of Python programs
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/PyCQA/pyflakes
|
URL: https://github.com/PyCQA/pyflakes
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pyflakes/pyflakes-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pyflakes/pyflakes-%{version}.tar.gz
|
||||||
#PATCH-FIX-UPSTREAM https://github.com/PyCQA/pyflakes/commit/836631f2f73d45baa4021453d89fc9fd6f52be58 fix error reporter and testsuite in 3.11.4+
|
|
||||||
Patch: py3114.patch
|
|
||||||
BuildRequires: %{python_module base >= 3.8}
|
BuildRequires: %{python_module base >= 3.8}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# the pkg_resources module is required at runtime
|
# the pkg_resources module is required at runtime
|
||||||
@ -47,10 +46,10 @@ modules with side effects. It's also much faster.
|
|||||||
%autosetup -p1 -n pyflakes-%{version}
|
%autosetup -p1 -n pyflakes-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}/pyflakes/
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}/pyflakes/
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pyflakes
|
%python_clone -a %{buildroot}%{_bindir}/pyflakes
|
||||||
|
|
||||||
@ -68,6 +67,6 @@ modules with side effects. It's also much faster.
|
|||||||
%doc NEWS.rst README.rst AUTHORS
|
%doc NEWS.rst README.rst AUTHORS
|
||||||
%python_alternative %{_bindir}/pyflakes
|
%python_alternative %{_bindir}/pyflakes
|
||||||
%{python_sitelib}/pyflakes/
|
%{python_sitelib}/pyflakes/
|
||||||
%{python_sitelib}/pyflakes-%{version}-py*.egg-info
|
%{python_sitelib}/pyflakes-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user