Hello community, here is the log from the commit of package python3-autopep8 for openSUSE:Factory checked in at 2016-05-29 03:13:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-autopep8 (Old) and /work/SRC/openSUSE:Factory/.python3-autopep8.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-autopep8" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-autopep8/python3-autopep8.changes 2016-05-25 21:23:36.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-autopep8.new/python3-autopep8.changes 2016-05-29 03:14:36.000000000 +0200 @@ -1,0 +2,13 @@ +Sat May 28 03:27:19 UTC 2016 - a...@gmx.de + +- update to version 1.2.4: + * Increment patch version + +- changes from version 1.2.3: + * Mark wheel as Python 2 and 3 compatible + * Avoid reading too much data + * Avoid reading too much when detecting Python files + * Update output + * Support E129 + +------------------------------------------------------------------- @@ -7 +19,0 @@ - Old: ---- autopep8-1.2.2.tar.gz New: ---- autopep8-1.2.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-autopep8.spec ++++++ --- /var/tmp/diff_new_pack.nXsxxJ/_old 2016-05-29 03:14:37.000000000 +0200 +++ /var/tmp/diff_new_pack.nXsxxJ/_new 2016-05-29 03:14:37.000000000 +0200 @@ -17,7 +17,7 @@ Name: python3-autopep8 -Version: 1.2.2 +Version: 1.2.4 Release: 0 Url: https://github.com/hhatto/autopep8 Summary: Automatic generated to pep8 checked code ++++++ autopep8-1.2.2.tar.gz -> autopep8-1.2.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.2.2/PKG-INFO new/autopep8-1.2.4/PKG-INFO --- old/autopep8-1.2.2/PKG-INFO 2016-02-25 07:27:59.000000000 +0100 +++ new/autopep8-1.2.4/PKG-INFO 2016-05-21 02:38:26.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: autopep8 -Version: 1.2.2 +Version: 1.2.4 Summary: A tool that automatically formats Python code to conform to the PEP 8 style guide Home-page: https://github.com/hhatto/autopep8 Author: Hideo Hattori diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.2.2/autopep8.egg-info/PKG-INFO new/autopep8-1.2.4/autopep8.egg-info/PKG-INFO --- old/autopep8-1.2.2/autopep8.egg-info/PKG-INFO 2016-02-25 07:27:59.000000000 +0100 +++ new/autopep8-1.2.4/autopep8.egg-info/PKG-INFO 2016-05-21 02:38:26.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: autopep8 -Version: 1.2.2 +Version: 1.2.4 Summary: A tool that automatically formats Python code to conform to the PEP 8 style guide Home-page: https://github.com/hhatto/autopep8 Author: Hideo Hattori diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.2.2/autopep8.egg-info/SOURCES.txt new/autopep8-1.2.4/autopep8.egg-info/SOURCES.txt --- old/autopep8-1.2.2/autopep8.egg-info/SOURCES.txt 2016-02-25 07:27:59.000000000 +0100 +++ new/autopep8-1.2.4/autopep8.egg-info/SOURCES.txt 2016-05-21 02:38:26.000000000 +0200 @@ -3,6 +3,7 @@ MANIFEST.in README.rst autopep8.py +setup.cfg setup.py autopep8.egg-info/PKG-INFO autopep8.egg-info/SOURCES.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.2.2/autopep8.py new/autopep8-1.2.4/autopep8.py --- old/autopep8-1.2.2/autopep8.py 2016-02-25 07:26:47.000000000 +0100 +++ new/autopep8-1.2.4/autopep8.py 2016-05-21 02:38:14.000000000 +0200 @@ -2,7 +2,7 @@ # Copyright (C) 2010-2011 Hideo Hattori # Copyright (C) 2011-2013 Hideo Hattori, Steven Myint -# Copyright (C) 2013-2015 Hideo Hattori, Steven Myint, Bill Wendling +# Copyright (C) 2013-2016 Hideo Hattori, Steven Myint, Bill Wendling # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -66,7 +66,7 @@ unicode = str -__version__ = '1.2.2' +__version__ = '1.2.4' CR = '\r' @@ -122,25 +122,28 @@ PROJECT_CONFIG = ('setup.cfg', 'tox.ini', '.pep8') -def open_with_encoding(filename, encoding=None, mode='r'): +MAX_PYTHON_FILE_DETECTION_BYTES = 1024 + + +def open_with_encoding(filename, + encoding=None, mode='r', limit_byte_check=-1): """Return opened file with a specific encoding.""" if not encoding: - encoding = detect_encoding(filename) + encoding = detect_encoding(filename, limit_byte_check=limit_byte_check) return io.open(filename, mode=mode, encoding=encoding, newline='') # Preserve line endings -def detect_encoding(filename): +def detect_encoding(filename, limit_byte_check=-1): """Return file encoding.""" try: with open(filename, 'rb') as input_file: from lib2to3.pgen2 import tokenize as lib2to3_tokenize encoding = lib2to3_tokenize.detect_encoding(input_file.readline)[0] - # Check for correctness of encoding with open_with_encoding(filename, encoding) as test_file: - test_file.read() + test_file.read(limit_byte_check) return encoding except (LookupError, SyntaxError, UnicodeDecodeError): @@ -358,8 +361,11 @@ pep8.expand_indent(line) == indent_level + DEFAULT_INDENT_SIZE ): pos = (start[0], indent[0] + 4) - yield (pos, 'E125 {0}'.format(indent_level + - 2 * DEFAULT_INDENT_SIZE)) + desired_indent = indent_level + 2 * DEFAULT_INDENT_SIZE + if visual_indent: + yield (pos, 'E129 {0}'.format(desired_indent)) + else: + yield (pos, 'E125 {0}'.format(desired_indent)) del pep8._checks['logical_line'][pep8.continued_indentation] pep8.register_check(continued_indentation) @@ -2971,8 +2977,7 @@ else: return diff elif options.in_place: - fp = open_with_encoding(filename, encoding=encoding, - mode='w') + fp = open_with_encoding(filename, encoding=encoding, mode='w') fp.write(fixed_source) fp.close() else: @@ -3558,8 +3563,13 @@ return True try: - with open_with_encoding(filename) as f: - first_line = f.readlines(1)[0] + with open_with_encoding( + filename, + limit_byte_check=MAX_PYTHON_FILE_DETECTION_BYTES) as f: + text = f.read(MAX_PYTHON_FILE_DETECTION_BYTES) + if not text: + return False + first_line = text.splitlines()[0] except (IOError, IndexError): return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.2.2/setup.cfg new/autopep8-1.2.4/setup.cfg --- old/autopep8-1.2.2/setup.cfg 2016-02-25 07:27:59.000000000 +0100 +++ new/autopep8-1.2.4/setup.cfg 2016-05-21 02:38:26.000000000 +0200 @@ -1,5 +1,8 @@ +[bdist_wheel] +universal = 1 + [egg_info] -tag_build = tag_date = 0 +tag_build = tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.2.2/test/test_autopep8.py new/autopep8-1.2.4/test/test_autopep8.py --- old/autopep8-1.2.2/test/test_autopep8.py 2016-02-25 07:26:25.000000000 +0100 +++ new/autopep8-1.2.4/test/test_autopep8.py 2016-03-02 14:08:50.000000000 +0100 @@ -1527,7 +1527,7 @@ with autopep8_context(line, options=['--select=E12']) as result: self.assertEqual(fixed, result) - def test_e125(self): + def test_e129(self): line = """\ if (a and b in [ @@ -1538,13 +1538,13 @@ """ fixed = """\ if (a and - b in [ - 'foo', - ] or + b in [ + 'foo', + ] or c): pass """ - with autopep8_context(line, options=['--select=E125']) as result: + with autopep8_context(line, options=['--select=E129']) as result: self.assertEqual(fixed, result) def test_e125_with_multiline_string(self):