Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-autopep8 for openSUSE:Factory
checked in at 2025-01-23 18:05:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-autopep8 (Old)
and /work/SRC/openSUSE:Factory/.python-autopep8.new.5589 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-autopep8"
Thu Jan 23 18:05:50 2025 rev:33 rq:1239863 version:2.3.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-autopep8/python-autopep8.changes
2024-11-19 22:23:51.749817905 +0100
+++
/work/SRC/openSUSE:Factory/.python-autopep8.new.5589/python-autopep8.changes
2025-01-23 18:06:49.871649558 +0100
@@ -1,0 +2,9 @@
+Thu Jan 23 10:39:57 UTC 2025 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to 2.3.2
+ * Update README.rst: Typo fix
+ * Bump codecov/codecov-action from 4 to 5
+ * support Python 3.13 and drop 3.8
+ * Fix E721 type comparison pattern handling
+
+-------------------------------------------------------------------
Old:
----
autopep8-2.3.1.tar.gz
New:
----
autopep8-2.3.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-autopep8.spec ++++++
--- /var/tmp/diff_new_pack.m59xvE/_old 2025-01-23 18:06:50.551677650 +0100
+++ /var/tmp/diff_new_pack.m59xvE/_new 2025-01-23 18:06:50.551677650 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-autopep8
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?sle15_python_module_pythons}
Name: python-autopep8
-Version: 2.3.1
+Version: 2.3.2
Release: 0
Summary: Automatic generated to pep8 checked code
License: MIT
++++++ autopep8-2.3.1.tar.gz -> autopep8-2.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autopep8-2.3.1/MANIFEST.in
new/autopep8-2.3.2/MANIFEST.in
--- old/autopep8-2.3.1/MANIFEST.in 2024-06-23 07:15:31.000000000 +0200
+++ new/autopep8-2.3.2/MANIFEST.in 2025-01-14 15:45:57.000000000 +0100
@@ -15,7 +15,6 @@
include tox.ini
recursive-exclude test/suite *.py
recursive-exclude test/suite/out *.py
-exclude .travis.yml
exclude CONTRIBUTING.rst
exclude Makefile
exclude hooks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autopep8-2.3.1/PKG-INFO new/autopep8-2.3.2/PKG-INFO
--- old/autopep8-2.3.1/PKG-INFO 2024-06-23 07:15:47.283583200 +0200
+++ new/autopep8-2.3.2/PKG-INFO 2025-01-14 15:46:06.206034000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.2
Name: autopep8
-Version: 2.3.1
+Version: 2.3.2
Summary: A tool that automatically formats Python code to conform to the PEP 8
style guide
Author-email: Hideo Hattori <[email protected]>
Project-URL: Repository, https://github.com/hhatto/autopep8
@@ -12,14 +12,14 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
-Requires-Python: >=3.8
+Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
@@ -339,7 +339,8 @@
Disabling line-by-line
----------------------
-It is possible to disable autopep8 untill it it turned back on again in the
file, using ``autopep8: off`` and then renabling ``autopep8: on``.
+It is possible to disable autopep8 until it is turned back on again in the
file,
+using ``autopep8: off`` and then reenabling with ``autopep8: on``.
.. code-block:: python
@@ -432,7 +433,7 @@
Test cases are in ``test/test_autopep8.py``. They can be run directly via
``python test/test_autopep8.py`` or via tox_. The latter is useful for
testing against multiple Python interpreters. (We currently test against
-CPython versions 3.8, 3.9, 3.10, 3.11 and 3.12. We also test against PyPy.)
+CPython versions 3.9, 3.10, 3.11, 3.12 and 3.13. We also test against PyPy.)
.. _`tox`: https://pypi.org/project/tox/
@@ -463,10 +464,8 @@
* PyPI_
* GitHub_
-* `Travis CI`_
* Codecov_
.. _PyPI: https://pypi.org/project/autopep8/
.. _GitHub: https://github.com/hhatto/autopep8
-.. _`Travis CI`: https://travis-ci.org/hhatto/autopep8
.. _`Codecov`: https://app.codecov.io/gh/hhatto/autopep8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autopep8-2.3.1/README.rst
new/autopep8-2.3.2/README.rst
--- old/autopep8-2.3.1/README.rst 2024-06-23 07:15:31.000000000 +0200
+++ new/autopep8-2.3.2/README.rst 2025-01-14 15:45:57.000000000 +0100
@@ -311,7 +311,8 @@
Disabling line-by-line
----------------------
-It is possible to disable autopep8 untill it it turned back on again in the
file, using ``autopep8: off`` and then renabling ``autopep8: on``.
+It is possible to disable autopep8 until it is turned back on again in the
file,
+using ``autopep8: off`` and then reenabling with ``autopep8: on``.
.. code-block:: python
@@ -404,7 +405,7 @@
Test cases are in ``test/test_autopep8.py``. They can be run directly via
``python test/test_autopep8.py`` or via tox_. The latter is useful for
testing against multiple Python interpreters. (We currently test against
-CPython versions 3.8, 3.9, 3.10, 3.11 and 3.12. We also test against PyPy.)
+CPython versions 3.9, 3.10, 3.11, 3.12 and 3.13. We also test against PyPy.)
.. _`tox`: https://pypi.org/project/tox/
@@ -435,10 +436,8 @@
* PyPI_
* GitHub_
-* `Travis CI`_
* Codecov_
.. _PyPI: https://pypi.org/project/autopep8/
.. _GitHub: https://github.com/hhatto/autopep8
-.. _`Travis CI`: https://travis-ci.org/hhatto/autopep8
.. _`Codecov`: https://app.codecov.io/gh/hhatto/autopep8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autopep8-2.3.1/autopep8.egg-info/PKG-INFO
new/autopep8-2.3.2/autopep8.egg-info/PKG-INFO
--- old/autopep8-2.3.1/autopep8.egg-info/PKG-INFO 2024-06-23
07:15:47.000000000 +0200
+++ new/autopep8-2.3.2/autopep8.egg-info/PKG-INFO 2025-01-14
15:46:06.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.2
Name: autopep8
-Version: 2.3.1
+Version: 2.3.2
Summary: A tool that automatically formats Python code to conform to the PEP 8
style guide
Author-email: Hideo Hattori <[email protected]>
Project-URL: Repository, https://github.com/hhatto/autopep8
@@ -12,14 +12,14 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
-Requires-Python: >=3.8
+Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
@@ -339,7 +339,8 @@
Disabling line-by-line
----------------------
-It is possible to disable autopep8 untill it it turned back on again in the
file, using ``autopep8: off`` and then renabling ``autopep8: on``.
+It is possible to disable autopep8 until it is turned back on again in the
file,
+using ``autopep8: off`` and then reenabling with ``autopep8: on``.
.. code-block:: python
@@ -432,7 +433,7 @@
Test cases are in ``test/test_autopep8.py``. They can be run directly via
``python test/test_autopep8.py`` or via tox_. The latter is useful for
testing against multiple Python interpreters. (We currently test against
-CPython versions 3.8, 3.9, 3.10, 3.11 and 3.12. We also test against PyPy.)
+CPython versions 3.9, 3.10, 3.11, 3.12 and 3.13. We also test against PyPy.)
.. _`tox`: https://pypi.org/project/tox/
@@ -463,10 +464,8 @@
* PyPI_
* GitHub_
-* `Travis CI`_
* Codecov_
.. _PyPI: https://pypi.org/project/autopep8/
.. _GitHub: https://github.com/hhatto/autopep8
-.. _`Travis CI`: https://travis-ci.org/hhatto/autopep8
.. _`Codecov`: https://app.codecov.io/gh/hhatto/autopep8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autopep8-2.3.1/autopep8.py
new/autopep8-2.3.2/autopep8.py
--- old/autopep8-2.3.1/autopep8.py 2024-06-23 07:15:31.000000000 +0200
+++ new/autopep8-2.3.2/autopep8.py 2025-01-14 15:45:57.000000000 +0100
@@ -89,7 +89,7 @@
import pycodestyle
-__version__ = '2.3.1'
+__version__ = '2.3.2'
CR = '\r'
@@ -1300,6 +1300,7 @@
# NOTE: match objects
# * type(a) == type(b) -> (None, None, 'a', '==')
# * str == type(b) -> ('==', 'b', None, None)
+ # * type(b) == str -> (None, None, 'b', '==')
# * type("") != type(b) -> (None, None, '""', '!=')
start = match.start()
end = match.end()
@@ -1320,6 +1321,10 @@
isinstance_stmt = " not isinstance"
_type_comp = f"{_target_obj}, {target[:start]}"
+ indent_match = re.match(r'^\s+', target)
+ indent = ""
+ if indent_match:
+ indent = indent_match.group()
_prefix_tmp = target[:start].split()
if len(_prefix_tmp) >= 1:
@@ -1332,15 +1337,28 @@
_suffix_tmp = target[end:]
_suffix_type_match = TYPE_REGEX.search(_suffix_tmp)
- if len(_suffix_tmp.split()) >= 1 and _suffix_type_match:
- if _suffix_type_match:
+ if _suffix_type_match:
+ if len(_suffix_tmp.split()) >= 1:
type_match_end = _suffix_type_match.end()
_suffix = _suffix_tmp[type_match_end:]
- if _suffix_type_match:
cmp_b = _suffix_type_match.groups()[0]
_type_comp = f"{_target_obj}, {cmp_b}"
+ else:
+ _else_suffix_match = re.match(
+ r"^\s*([^\s:]+)(.*)$",
+ _suffix_tmp,
+ )
+ if _else_suffix_match:
+ _else_suffix = _else_suffix_match.group(1)
+ _else_suffix_other = _else_suffix_match.group(2)
+ _type_comp = f"{_target_obj}, {_else_suffix}"
+ _else_suffix_end = _suffix_tmp[_else_suffix_match.end():]
+ _suffix = f"{_else_suffix_other}{_else_suffix_end}"
+ # `else` route is not care
- fix_line = f"{_prefix}{isinstance_stmt}({_type_comp}){_suffix}"
+ fix_line = (
+ f"{indent}{_prefix}{isinstance_stmt}({_type_comp}){_suffix}"
+ )
self.source[line_index] = fix_line
def fix_e722(self, result):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autopep8-2.3.1/pyproject.toml
new/autopep8-2.3.2/pyproject.toml
--- old/autopep8-2.3.1/pyproject.toml 2024-06-23 07:15:31.000000000 +0200
+++ new/autopep8-2.3.2/pyproject.toml 2025-01-14 15:45:57.000000000 +0100
@@ -20,15 +20,15 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
]
-requires-python = ">=3.8"
+requires-python = ">=3.9"
dependencies = [
"pycodestyle >= 2.12.0",
"tomli; python_version < '3.11'",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autopep8-2.3.1/test/test_autopep8.py
new/autopep8-2.3.2/test/test_autopep8.py
--- old/autopep8-2.3.1/test/test_autopep8.py 2024-06-23 07:15:31.000000000
+0200
+++ new/autopep8-2.3.2/test/test_autopep8.py 2025-01-14 15:45:57.000000000
+0100
@@ -4419,6 +4419,18 @@
with autopep8_context(line, options=['--aggressive']) as result:
self.assertEqual(fixed, result)
+ def test_e721_in_conditional_pat3(self):
+ line = "if type(res) == str:\n pass\n"
+ fixed = "if isinstance(res, str):\n pass\n"
+ with autopep8_context(line, options=['--aggressive']) as result:
+ self.assertEqual(fixed, result)
+
+ def test_e721_in_conditional_with_indent(self):
+ line = "if True:\n if str == type(''):\n pass\n"
+ fixed = "if True:\n if isinstance('', str):\n pass\n"
+ with autopep8_context(line, options=['--aggressive']) as result:
+ self.assertEqual(fixed, result)
+
def test_e721_in_not_conditional(self):
line = "if type(res) != type(''):\n pass\n"
fixed = "if not isinstance(res, type('')):\n pass\n"