Hello community,

here is the log from the commit of package python-astor for openSUSE:Factory 
checked in at 2020-01-18 12:18:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-astor (Old)
 and      /work/SRC/openSUSE:Factory/.python-astor.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-astor"

Sat Jan 18 12:18:22 2020 rev:5 rq:765352 version:0.8.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-astor/python-astor.changes        
2019-11-22 10:27:32.133236196 +0100
+++ /work/SRC/openSUSE:Factory/.python-astor.new.26092/python-astor.changes     
2020-01-18 12:19:08.171171249 +0100
@@ -1,0 +2,8 @@
+Fri Jan 17 12:59:09 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to 0.8.1
+  * Create sdist before making a test release too
+  * remove expr_text handler from fstrings
+- Drop obsolete python38.patch and setuptools-gt-41_1.patch
+
+-------------------------------------------------------------------

Old:
----
  astor-0.8.tar.gz
  python38.patch
  setuptools-gt-41_1.patch

New:
----
  astor-0.8.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-astor.spec ++++++
--- /var/tmp/diff_new_pack.Zd852y/_old  2020-01-18 12:19:08.771171570 +0100
+++ /var/tmp/diff_new_pack.Zd852y/_new  2020-01-18 12:19:08.775171572 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-astor
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,17 +18,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-astor
-Version:        0.8
+Version:        0.8.1
 Release:        0
 Summary:        Read/rewrite/write Python ASTs
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
 URL:            https://github.com/berkerpeksag/astor
 Source:         
https://github.com/berkerpeksag/astor/archive/%{version}.tar.gz#/astor-%{version}.tar.gz
-Patch0:         python38.patch
-# PATCH-FIX-UPSTREAM setuptools-gt-41_1.patch gh#berkerpeksag/astor#163 
[email protected]
-# Remove weird acrobatics in setup.py and prefer proper use of setup.cfg.
-Patch1:         setuptools-gt-41_1.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros

++++++ astor-0.8.tar.gz -> astor-0.8.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/.travis.yml new/astor-0.8.1/.travis.yml
--- old/astor-0.8/.travis.yml   2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/.travis.yml 2019-12-10 02:48:43.000000000 +0100
@@ -5,18 +5,15 @@
   - 3.4
   - 3.5
   - 3.6
+  - 3.7
+  - 3.8
+  - 3.9-dev
   - pypy
   - pypy3.5
 matrix:
-  include:
-  # See https://github.com/travis-ci/travis-ci/issues/9069
-  # for more information.
-  - python: 3.7
-    sudo: required
-    dist: xenial
-  - python: 3.8-dev
-    sudo: required
-    dist: xenial
+  fast_finish: true
+  allow_failures:
+    - python: 3.9-dev
 cache: pip
 install:
   - pip install tox-travis
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/MANIFEST.in new/astor-0.8.1/MANIFEST.in
--- old/astor-0.8/MANIFEST.in   2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/MANIFEST.in 2019-12-10 02:48:43.000000000 +0100
@@ -1,3 +1,4 @@
 include README.rst AUTHORS LICENSE CHANGES
 include setuputils.py
+include astor/VERSION
 recursive-include tests *.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/Makefile new/astor-0.8.1/Makefile
--- old/astor-0.8/Makefile      2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/Makefile    2019-12-10 02:48:43.000000000 +0100
@@ -1,12 +1,14 @@
 testenv:
        pip install -e .
 
-release:
+create-sdist:
        python setup.py sdist bdist_wheel
+
+release: create-sdist
        twine upload dist/*
 
 # Test it via `pip install -i https://test.pypi.org/simple/ <project_name>`
-test-release:
+test-release: create-sdist
        twine upload -r test dist/*
 
 clean:
@@ -14,4 +16,4 @@
        rm -rf *.egg-info
        rm -rf build/ dist/ __pycache__/
 
-.PHONY: clean release
+.PHONY: clean release test-release create-sdist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/astor/VERSION new/astor-0.8.1/astor/VERSION
--- old/astor-0.8/astor/VERSION 1970-01-01 01:00:00.000000000 +0100
+++ new/astor-0.8.1/astor/VERSION       2019-12-10 02:48:43.000000000 +0100
@@ -0,0 +1 @@
+0.8.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/astor/__init__.py 
new/astor-0.8.1/astor/__init__.py
--- old/astor-0.8/astor/__init__.py     2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/astor/__init__.py   2019-12-10 02:48:43.000000000 +0100
@@ -9,6 +9,7 @@
 
 """
 
+import os
 import warnings
 
 from .code_gen import SourceGenerator, to_source  # NOQA
@@ -19,7 +20,9 @@
 from .op_util import symbol_data  # NOQA
 from .tree_walk import TreeWalk  # NOQA
 
-__version__ = '0.8.0'
+ROOT = os.path.dirname(__file__)
+with open(os.path.join(ROOT, 'VERSION')) as version_file:
+    __version__ = version_file.read().strip()
 
 parse_file = code_to_ast.parse_file
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/astor/code_gen.py 
new/astor-0.8.1/astor/code_gen.py
--- old/astor-0.8/astor/code_gen.py     2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/astor/code_gen.py   2019-12-10 02:48:43.000000000 +0100
@@ -18,6 +18,7 @@
 """
 
 import ast
+import inspect
 import math
 import sys
 
@@ -53,10 +54,10 @@
     """
     if source_generator_class is None:
         source_generator_class = SourceGenerator
-    elif not isinstance(source_generator_class, SourceGenerator):
+    elif not inspect.isclass(source_generator_class):
+        raise TypeError('source_generator_class should be a class')
+    elif not issubclass(source_generator_class, SourceGenerator):
         raise TypeError('source_generator_class should be a subclass of 
SourceGenerator')
-    elif not callable(source_generator_class):
-        raise TypeError('source_generator_class should be a callable')
     generator = source_generator_class(
         indent_with, add_line_information, pretty_string)
     generator.visit(node)
@@ -604,6 +605,7 @@
                             if getattr(value, 'expr_text', None):
                                 self.write(value.expr_text)
                             else:
+                                set_precedence(value, value.value)
                                 self.visit(value.value)
                             if value.conversion != -1:
                                 self.write('!%s' % chr(value.conversion))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/astor/op_util.py 
new/astor-0.8.1/astor/op_util.py
--- old/astor-0.8/astor/op_util.py      2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/astor/op_util.py    2019-12-10 02:48:43.000000000 +0100
@@ -34,6 +34,7 @@
         ExtSlice                1
     comprehension_target        1
            Tuple                0
+  FormattedValue                0
 
            Comma                1
        NamedExpr                1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/astor/source_repr.py 
new/astor-0.8.1/astor/source_repr.py
--- old/astor-0.8/astor/source_repr.py  2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/astor/source_repr.py        2019-12-10 02:48:43.000000000 
+0100
@@ -35,9 +35,9 @@
     line = []
     multiline = False
     count = 0
-    find = str.find
     for item in source:
-        index = find(item, '\n')
+        newline = type(item)('\n')
+        index = item.find(newline)
         if index:
             line.append(item)
             multiline = index > 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/docs/changelog.rst 
new/astor-0.8.1/docs/changelog.rst
--- old/astor-0.8/docs/changelog.rst    2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/docs/changelog.rst  2019-12-10 02:48:43.000000000 +0100
@@ -2,6 +2,39 @@
 Release Notes
 =============
 
+0.8.1 - 2019-12-10
+------------------
+
+Bug fixes
+~~~~~~~~~
+
+* Fixed precedence issue for f-string expressions that caused
+  redundant parenthesis around expression.
+  (Reported by Ilya Kamenshchikov in `Issue 153`_ and fixed by Batuhan Taskaya 
in `PR 155`_.)
+
+.. _`Issue 153`: https://github.com/berkerpeksag/astor/issues/153
+.. _`PR 155`: https://github.com/berkerpeksag/astor/pull/155
+
+* Fixed :func:`astor.to_source` incorrectly checking whether
+  *source_generator_class* is a subclass of 
:class:`astor.code_gen.SourceGenerator`.
+  (Reported by Yu-Chia "Hank" Liu in `Issue 158`_ and fixed by Will Crichton 
in `PR 164`_.)
+
+.. _`Issue 158`: https://github.com/berkerpeksag/astor/issues/158
+.. _`PR 164`: https://github.com/berkerpeksag/astor/pull/164
+
+* Fixed :exc:`TypeError` when AST nodes with unicode strings are passed to
+  :func:`astor.to_source`.
+  (Reported and fixed by Dominik Moritz in `PR 154`_.)
+
+.. _`PR 154`: https://github.com/berkerpeksag/astor/pull/154
+
+* Fixed installation issue with setuptools 41.4.0 or later due to the use of
+  an undocumented feature.
+  (Reported and fixed by Jonathan Ringer in `Issue 162`_ and `PR 163`_.)
+
+.. _`Issue 162`: https://github.com/berkerpeksag/astor/issues/162
+.. _`PR 163`: https://github.com/berkerpeksag/astor/pull/163
+
 0.8.0 - 2019-05-19
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/docs/conf.py new/astor-0.8.1/docs/conf.py
--- old/astor-0.8/docs/conf.py  2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/docs/conf.py        2019-12-10 02:48:43.000000000 +0100
@@ -19,7 +19,7 @@
 project = u'astor'
 copyright = u'2013-%s, Berker Peksag' % time.strftime('%Y')
 
-version = release = setuputils.find_version('astor/__init__.py')
+version = release = setuputils.read('astor/VERSION')
 
 exclude_patterns = ['_build']
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/setup.cfg new/astor-0.8.1/setup.cfg
--- old/astor-0.8/setup.cfg     2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/setup.cfg   2019-12-10 02:48:43.000000000 +0100
@@ -2,6 +2,7 @@
 name = astor
 description = Read/rewrite/write Python ASTs
 long_description = file:README.rst
+version = file:astor/VERSION
 author = Patrick Maupin
 author_email = [email protected]
 platforms = Independent
@@ -40,7 +41,7 @@
 [options.packages.find]
 exclude = tests
 
-[wheel]
+[bdist_wheel]
 universal = 1
 
 [build-system]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/setup.py new/astor-0.8.1/setup.py
--- old/astor-0.8/setup.py      2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/setup.py    2019-12-10 02:48:43.000000000 +0100
@@ -1,17 +1,3 @@
-import os
-import sys
-
 from setuptools import setup
-from setuptools.config import read_configuration
-
-from setuputils import find_version
-
-
-def here(*paths):
-    return os.path.join(os.path.dirname(__file__), *paths)
-
-config = read_configuration(here('setup.cfg'))
-config['metadata']['version'] = find_version(here('astor', '__init__.py'))
-config['options'].update(config['metadata'])
 
-setup(**config['options'])
+setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/setuputils.py new/astor-0.8.1/setuputils.py
--- old/astor-0.8/setuputils.py 2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/setuputils.py       2019-12-10 02:48:43.000000000 +0100
@@ -1,6 +1,5 @@
 import codecs
 import os.path
-import re
 
 
 def read(*parts):
@@ -8,12 +7,3 @@
     with codecs.open(file_path, 'r') as fobj:
         content = fobj.read()
     return content
-
-
-def find_version(*parts):
-    version_file = read(*parts)
-    version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]',
-                              version_file, re.M)
-    if version_match:
-        return version_match.group(1)
-    raise RuntimeError('Unable to find version string.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/tests/test_code_gen.py 
new/astor-0.8.1/tests/test_code_gen.py
--- old/astor-0.8/tests/test_code_gen.py        2019-05-19 18:51:56.000000000 
+0200
+++ new/astor-0.8.1/tests/test_code_gen.py      2019-12-10 02:48:43.000000000 
+0100
@@ -171,9 +171,11 @@
         def test(a, b, /, c, *, d, **kwargs):
             pass
 
+
         def test(a=3, b=4, /, c=7):
             pass
 
+
         def test(a, b=4, /, c=8, d=9):
             pass
         """
@@ -456,6 +458,7 @@
         x = f'{int(x)}'
         x = f'a{b:c}d'
         x = f'a{b!s:c{d}e}f'
+        x = f'{x + y}'
         x = f'""'
         x = f'"\\''
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astor-0.8/tests/test_misc.py 
new/astor-0.8.1/tests/test_misc.py
--- old/astor-0.8/tests/test_misc.py    2019-05-19 18:51:56.000000000 +0200
+++ new/astor-0.8.1/tests/test_misc.py  2019-12-10 02:48:43.000000000 +0100
@@ -8,6 +8,8 @@
 
 import astor
 
+from astor.source_repr import split_lines
+
 from .support import import_fresh_module
 
 
@@ -66,7 +68,7 @@
             )
         self.assertEqual(
             str(cm.exception),
-            'source_generator_class should be a callable',
+            'source_generator_class should be a class',
         )
 
 
@@ -99,5 +101,18 @@
         self.assertEqual(treewalk.__dict__['post_handlers'], {})
 
 
+class SourceReprTestCase(unittest.TestCase):
+    """
+    Tests for helpers in astor.source_repr module.
+
+    Note that these APIs are not public.
+    """
+
+    @unittest.skipUnless(sys.version_info[0] == 2, 'only applies to Python 2')
+    def test_split_lines_unicode_support(self):
+        source = [u'copy', '\n']
+        self.assertEqual(split_lines(source), source)
+
+
 if __name__ == '__main__':
     unittest.main()


Reply via email to