From 92b5e4332e3ca9de7bdf9c82ce702b5bb3de455c33523e84df46f3da81de1aa5 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Tue, 6 Feb 2024 18:29:11 +0000 Subject: [PATCH] - Add upstream support-python312.patch gh#PyCQA/autoflake#280 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autoflake?expand=0&rev=25 --- python-autoflake.changes | 5 +++++ python-autoflake.spec | 6 ++++-- support-python312.patch | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 support-python312.patch diff --git a/python-autoflake.changes b/python-autoflake.changes index cc97305..5fc0448 100644 --- a/python-autoflake.changes +++ b/python-autoflake.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 6 18:28:40 UTC 2024 - Daniel Garcia + +- Add upstream support-python312.patch gh#PyCQA/autoflake#280 + ------------------------------------------------------------------- Thu Dec 14 09:15:04 UTC 2023 - Petr Gajdos diff --git a/python-autoflake.spec b/python-autoflake.spec index 3707f95..1ec1a0a 100644 --- a/python-autoflake.spec +++ b/python-autoflake.spec @@ -1,7 +1,7 @@ # # spec file for package python-autoflake # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,6 +23,8 @@ Summary: Program to removes unused Python imports and variables License: MIT URL: https://github.com/myint/autoflake Source: https://files.pythonhosted.org/packages/source/a/autoflake/autoflake-%{version}.tar.gz +# PATCH-FIX-UPSTREAM support-python312.patch gh#PyCQA/autoflake#280 +Patch1: support-python312.patch Requires: python-tomli BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module hatchling} @@ -33,7 +35,7 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pyflakes >= 3.0.0 Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages diff --git a/support-python312.patch b/support-python312.patch new file mode 100644 index 0000000..d6f440a --- /dev/null +++ b/support-python312.patch @@ -0,0 +1,20 @@ +Index: autoflake-2.2.1/test_autoflake.py +=================================================================== +--- autoflake-2.2.1.orig/test_autoflake.py ++++ autoflake-2.2.1/test_autoflake.py +@@ -928,6 +928,7 @@ StrictVersion('1.0.0') + from distutils.version import LooseVersion, StrictVersion + StrictVersion('1.0.0') + """, ++ remove_all_unused_imports=True, + ), + ) + +@@ -941,6 +942,7 @@ version('1.0.0') + from distutils.version import LooseVersion, StrictVersion as version + version('1.0.0') + """, ++ remove_all_unused_imports=True, + ), + ) +