diff --git a/py3114.patch b/py3114.patch deleted file mode 100644 index 2e21bc4..0000000 --- a/py3114.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 836631f2f73d45baa4021453d89fc9fd6f52be58 Mon Sep 17 00:00:00 2001 -From: Anthony Sottile -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): - """ diff --git a/pyflakes-3.0.1.tar.gz b/pyflakes-3.0.1.tar.gz deleted file mode 100644 index ac6a602..0000000 --- a/pyflakes-3.0.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd -size 63554 diff --git a/pyflakes-3.1.0.tar.gz b/pyflakes-3.1.0.tar.gz new file mode 100644 index 0000000..ddb616a --- /dev/null +++ b/pyflakes-3.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc +size 63636 diff --git a/python-pyflakes.changes b/python-pyflakes.changes index 34fa6b1..3d20c24 100644 --- a/python-pyflakes.changes +++ b/python-pyflakes.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Aug 8 06:20:25 UTC 2023 - Steve Kowalik + +- 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á diff --git a/python-pyflakes.spec b/python-pyflakes.spec index 845d5a6..7265a82 100644 --- a/python-pyflakes.spec +++ b/python-pyflakes.spec @@ -18,17 +18,16 @@ %{?sle15_python_module_pythons} Name: python-pyflakes -Version: 3.0.1 +Version: 3.1.0 Release: 0 Summary: Passive checker of Python programs License: MIT -Group: Development/Languages/Python URL: https://github.com/PyCQA/pyflakes 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 pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros # 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} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib}/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 %python_alternative %{_bindir}/pyflakes %{python_sitelib}/pyflakes/ -%{python_sitelib}/pyflakes-%{version}-py*.egg-info +%{python_sitelib}/pyflakes-%{version}.dist-info %changelog