Hello community, here is the log from the commit of package python-pyupgrade for openSUSE:Factory checked in at 2020-11-09 13:57:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyupgrade (Old) and /work/SRC/openSUSE:Factory/.python-pyupgrade.new.11331 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyupgrade" Mon Nov 9 13:57:47 2020 rev:3 rq:846967 version:2.7.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyupgrade/python-pyupgrade.changes 2020-08-12 10:29:46.236024017 +0200 +++ /work/SRC/openSUSE:Factory/.python-pyupgrade.new.11331/python-pyupgrade.changes 2020-11-09 13:59:00.875754318 +0100 @@ -1,0 +2,7 @@ +Sun Nov 1 18:32:44 UTC 2020 - Sebastian Wagner <sebix+novell....@sebix.at> + +- Update to 2.7.3: + - fix off-by-one in encode() call fixer + - upgrade mypy to get typeshed fix + +------------------------------------------------------------------- Old: ---- python-pyupgrade-2.7.2.tar.gz New: ---- python-pyupgrade-2.7.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyupgrade.spec ++++++ --- /var/tmp/diff_new_pack.fWnlTK/_old 2020-11-09 13:59:01.295753402 +0100 +++ /var/tmp/diff_new_pack.fWnlTK/_new 2020-11-09 13:59:01.299753393 +0100 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyupgrade -Version: 2.7.2 +Version: 2.7.3 Release: 0 Summary: A tool to automatically upgrade syntax for newer versions License: MIT ++++++ python-pyupgrade-2.7.2.tar.gz -> python-pyupgrade-2.7.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyupgrade-2.7.2/.pre-commit-config.yaml new/pyupgrade-2.7.3/.pre-commit-config.yaml --- old/pyupgrade-2.7.2/.pre-commit-config.yaml 2020-07-24 17:28:26.000000000 +0200 +++ new/pyupgrade-2.7.3/.pre-commit-config.yaml 2020-10-22 20:26:32.000000000 +0200 @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.5.0 + rev: v3.2.0 hooks: - id: check-docstring-first - id: check-yaml @@ -11,20 +11,20 @@ - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.9.0 + rev: v1.11.0 hooks: - id: setup-cfg-fmt - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.0 + rev: 3.8.3 hooks: - id: flake8 additional_dependencies: [flake8-typing-imports==1.7.0] - repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v1.5.2 + rev: v1.5.4 hooks: - id: autopep8 - repo: https://github.com/asottile/reorder_python_imports - rev: v2.3.0 + rev: v2.3.5 hooks: - id: reorder-python-imports args: [--py3-plus] @@ -34,11 +34,11 @@ - id: add-trailing-comma args: [--py36-plus] - repo: https://github.com/asottile/pyupgrade - rev: v2.7.2 + rev: v2.7.3 hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.770 + rev: v0.782 hooks: - id: mypy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyupgrade-2.7.2/README.md new/pyupgrade-2.7.3/README.md --- old/pyupgrade-2.7.2/README.md 2020-07-24 17:28:26.000000000 +0200 +++ new/pyupgrade-2.7.3/README.md 2020-10-22 20:26:32.000000000 +0200 @@ -19,7 +19,7 @@ ```yaml - repo: https://github.com/asottile/pyupgrade - rev: v2.7.2 + rev: v2.7.3 hooks: - id: pyupgrade ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyupgrade-2.7.2/pyupgrade.py new/pyupgrade-2.7.3/pyupgrade.py --- old/pyupgrade-2.7.2/pyupgrade.py 2020-07-24 17:28:26.000000000 +0200 +++ new/pyupgrade-2.7.3/pyupgrade.py 2020-10-22 20:26:32.000000000 +0200 @@ -2233,7 +2233,7 @@ victims = _victims(tokens, i, call, gen=False) del tokens[victims.starts[0] + 1:victims.ends[-1]] elif token.offset in visitor.encode_calls: - i = _find_open_paren(tokens, i) + i = _find_open_paren(tokens, i + 1) call = visitor.encode_calls[token.offset] victims = _victims(tokens, i, call, gen=False) del tokens[victims.starts[0] + 1:victims.ends[-1]] @@ -2531,8 +2531,7 @@ return '{}()'.format(_unparse(node.func)) elif isinstance(node, ast.Subscript): if sys.version_info >= (3, 9): # pragma: no cover (py39+) - # https://github.com/python/typeshed/pull/3950 - node_slice: ast.expr = node.slice # type: ignore + node_slice: ast.expr = node.slice elif isinstance(node.slice, ast.Index): # pragma: no cover (<py39) node_slice = node.slice.value else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyupgrade-2.7.2/setup.cfg new/pyupgrade-2.7.3/setup.cfg --- old/pyupgrade-2.7.2/setup.cfg 2020-07-24 17:28:26.000000000 +0200 +++ new/pyupgrade-2.7.3/setup.cfg 2020-10-22 20:26:32.000000000 +0200 @@ -1,6 +1,6 @@ [metadata] name = pyupgrade -version = 2.7.2 +version = 2.7.3 description = A tool to automatically upgrade syntax for newer versions. long_description = file: README.md long_description_content_type = text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyupgrade-2.7.2/tests/default_encoding_test.py new/pyupgrade-2.7.3/tests/default_encoding_test.py --- old/pyupgrade-2.7.2/tests/default_encoding_test.py 2020-07-24 17:28:26.000000000 +0200 +++ new/pyupgrade-2.7.3/tests/default_encoding_test.py 2020-10-22 20:26:32.000000000 +0200 @@ -13,6 +13,14 @@ 'sys.stdout.buffer.write(\n "a"\n "b".encode("utf-8")\n)', 'sys.stdout.buffer.write(\n "a"\n "b".encode()\n)', ), + ( + 'x = (\n' + ' "y\\u2603"\n' + ').encode("utf-8")\n', + 'x = (\n' + ' "y\\u2603"\n' + ').encode()\n', + ), ), ) def test_fix_encode(s, expected):