forked from pool/python-autopep8
- add python312-skip-tests.patch to skip failing tests from py312
* disallow 0 for indent-size option - python3 package added OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autopep8?expand=0&rev=66
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 4 09:42:01 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add python312-skip-tests.patch to skip failing tests from py312
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 6 19:31:30 UTC 2023 - Giacomo Comes <gcomes.obs@gmail.com>
|
||||
|
||||
@@ -73,7 +78,7 @@ Tue May 11 21:16:05 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.5.7:
|
||||
* python 3.9
|
||||
* disallow 0 for indent-size option
|
||||
* disallow 0 for indent-size option
|
||||
* exit code is 99 when error occured cli option parsing
|
||||
* exit code correctly on permission denied failure
|
||||
|
||||
@@ -400,7 +405,7 @@ Thu Oct 24 10:59:02 UTC 2013 - speilicke@suse.com
|
||||
Tue Aug 21 06:09:49 UTC 2012 - highwaystar.ru@gmail.com
|
||||
|
||||
- updated to version 0.7.3
|
||||
- python3 package added
|
||||
- python3 package added
|
||||
- spec improved
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-autopep8
|
||||
#
|
||||
# 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
|
||||
@@ -26,9 +26,11 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/hhatto/autopep8
|
||||
Source: https://files.pythonhosted.org/packages/source/a/autopep8/autopep8-%{version}.tar.gz
|
||||
Patch1: https://github.com/hhatto/autopep8/commit/6ebcb3cfadd9b8764405e1cab24f4412f05b36bb.patch#/python312-skip-tests.patch
|
||||
BuildRequires: %{python_module base >= 3.6}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pycodestyle >= 2.8}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module tomli if %python-base < 3.11}
|
||||
BuildRequires: %{python_module wheel}
|
||||
@@ -38,7 +40,7 @@ Requires: python-pycodestyle >= 2.10.0
|
||||
Requires: python-tomli
|
||||
%endif
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -59,7 +61,7 @@ sed -i '1s/^#!.*//' autopep8.py # Remove she-bang line
|
||||
|
||||
%check
|
||||
export LANG="en_US.UTF-8"
|
||||
%pyunittest discover -v
|
||||
%pytest -k 'not test_e701_with_escaped_newline_and_spaces'
|
||||
|
||||
%pre
|
||||
# Since /usr/bin/autopep8 became ghosted to be used with update-alternatives, we have to get rid
|
||||
|
||||
45
python312-skip-tests.patch
Normal file
45
python312-skip-tests.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From 6ebcb3cfadd9b8764405e1cab24f4412f05b36bb Mon Sep 17 00:00:00 2001
|
||||
From: Hideo Hattori <hhatto.jp@gmail.com>
|
||||
Date: Mon, 9 Oct 2023 22:12:07 +0900
|
||||
Subject: [PATCH] skip tests for python3.12+
|
||||
|
||||
---
|
||||
test/test_autopep8.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/test/test_autopep8.py b/test/test_autopep8.py
|
||||
index c64143d7..4c314e52 100755
|
||||
--- a/test/test_autopep8.py
|
||||
+++ b/test/test_autopep8.py
|
||||
@@ -4418,6 +4418,7 @@ def test_e731_with_default_arguments(self):
|
||||
with autopep8_context(line, options=['--select=E731']) as result:
|
||||
self.assertEqual(fixed, result)
|
||||
|
||||
+ @unittest.skipIf(sys.version_info >= (3, 12), 'not detech in Python3.12+')
|
||||
def test_e901_should_cause_indentation_screw_up(self):
|
||||
line = """\
|
||||
def tmp(g):
|
||||
@@ -5466,6 +5467,7 @@ def test_help(self):
|
||||
stdout=PIPE)
|
||||
self.assertIn('usage:', p.communicate()[0].decode('utf-8').lower())
|
||||
|
||||
+ @unittest.skipIf(sys.version_info >= (3, 12), 'not detech in Python3.12+')
|
||||
def test_verbose(self):
|
||||
line = 'bad_syntax)'
|
||||
with temporary_file_context(line) as filename:
|
||||
@@ -7206,6 +7208,7 @@ def f(self):
|
||||
with autopep8_context(line, options=['--experimental']) as result:
|
||||
self.assertEqual(fixed, result)
|
||||
|
||||
+ @unittest.skipIf(sys.version_info >= (3, 12), 'not detech in Python3.12+')
|
||||
def test_e501_experimental_parsing_dict_with_comments(self):
|
||||
line = """\
|
||||
self.display['xxxxxxxxxxxx'] = [{'title': _('Library'), #. This is the first comment.
|
||||
@@ -7229,6 +7232,7 @@ def test_e501_experimental_parsing_dict_with_comments(self):
|
||||
with autopep8_context(line, options=['--experimental']) as result:
|
||||
self.assertEqual(fixed, result)
|
||||
|
||||
+ @unittest.skipIf(sys.version_info >= (3, 12), 'not detech in Python3.12+')
|
||||
def test_e501_experimental_if_line_over_limit(self):
|
||||
line = """\
|
||||
if not xxxxxxxxxxxx(aaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbb, cccccccccccccc, dddddddddddddddddddddd):
|
||||
Reference in New Issue
Block a user