Hello community,

here is the log from the commit of package python-pep8 for openSUSE:Factory 
checked in at 2014-05-09 20:30:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pep8 (Old)
 and      /work/SRC/openSUSE:Factory/.python-pep8.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pep8"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pep8/python-pep8.changes  2014-04-25 
11:35:24.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-pep8.new/python-pep8.changes     
2014-05-09 20:30:39.000000000 +0200
@@ -1,0 +2,8 @@
+Fri May  9 09:57:18 UTC 2014 - [email protected]
+
+- update to 1.5.6:
+  * Check the last line even if it has no end-of-line.
+- update to 1.5.5:
+  * Fix regression with E22 checks and inline comments.
+
+-------------------------------------------------------------------

Old:
----
  pep8-1.5.4.tar.gz

New:
----
  pep8-1.5.6.tar.gz

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

Other differences:
------------------
++++++ python-pep8.spec ++++++
--- /var/tmp/diff_new_pack.muEcnL/_old  2014-05-09 20:30:40.000000000 +0200
+++ /var/tmp/diff_new_pack.muEcnL/_new  2014-05-09 20:30:40.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-pep8
-Version:        1.5.4
+Version:        1.5.6
 Release:        0
 Url:            http://github.com/jcrocholl/pep8
 Summary:        Python style guide checker

++++++ pep8-1.5.4.tar.gz -> pep8-1.5.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/CHANGES.txt new/pep8-1.5.6/CHANGES.txt
--- old/pep8-1.5.4/CHANGES.txt  2014-04-06 21:09:04.000000000 +0200
+++ new/pep8-1.5.6/CHANGES.txt  2014-04-14 19:02:37.000000000 +0200
@@ -2,9 +2,27 @@
 =========
 
 
+1.5.6 (2014-04-14)
+------------------
+
+Bug fixes:
+
+* Check the last line even if it has no end-of-line. (Issue #273)
+
+
+1.5.5 (2014-04-10)
+------------------
+
+Bug fixes:
+
+* Fix regression with E22 checks and inline comments. (Issue #271)
+
+
 1.5.4 (2014-04-07)
 ------------------
 
+Bug fixes:
+
 * Fix negative offset with E303 before a multi-line docstring.
   (Issue #269)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/PKG-INFO new/pep8-1.5.6/PKG-INFO
--- old/pep8-1.5.4/PKG-INFO     2014-04-07 07:56:42.000000000 +0200
+++ new/pep8-1.5.6/PKG-INFO     2014-04-14 19:05:22.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pep8
-Version: 1.5.4
+Version: 1.5.6
 Summary: Python style guide checker
 Home-page: http://pep8.readthedocs.org/
 Author: Johann C. Rocholl
@@ -103,9 +103,27 @@
         =========
         
         
+        1.5.6 (2014-04-14)
+        ------------------
+        
+        Bug fixes:
+        
+        * Check the last line even if it has no end-of-line. (Issue #273)
+        
+        
+        1.5.5 (2014-04-10)
+        ------------------
+        
+        Bug fixes:
+        
+        * Fix regression with E22 checks and inline comments. (Issue #271)
+        
+        
         1.5.4 (2014-04-07)
         ------------------
         
+        Bug fixes:
+        
         * Fix negative offset with E303 before a multi-line docstring.
           (Issue #269)
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/docs/developer.rst 
new/pep8-1.5.6/docs/developer.rst
--- old/pep8-1.5.4/docs/developer.rst   2014-04-04 10:59:58.000000000 +0200
+++ new/pep8-1.5.6/docs/developer.rst   2014-04-14 17:03:03.000000000 +0200
@@ -52,8 +52,9 @@
 * ``lines``: a list of the raw lines from the input file
 * ``tokens``: the tokens that contribute to this logical line
 * ``line_number``: line number in the input file
+* ``total_lines``: number of lines in the input file
 * ``blank_lines``: blank lines before this one
-* ``indent_char``: first indentation character in this file (``" "`` or 
``"\t"``)
+* ``indent_char``: indentation character in this file (``" "`` or ``"\t"``)
 * ``indent_level``: indentation (with tabs expanded to multiples of 8)
 * ``previous_indent_level``: indentation on previous line
 * ``previous_logical``: previous logical line
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/pep8.egg-info/PKG-INFO 
new/pep8-1.5.6/pep8.egg-info/PKG-INFO
--- old/pep8-1.5.4/pep8.egg-info/PKG-INFO       2014-04-07 07:56:41.000000000 
+0200
+++ new/pep8-1.5.6/pep8.egg-info/PKG-INFO       2014-04-14 19:05:22.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pep8
-Version: 1.5.4
+Version: 1.5.6
 Summary: Python style guide checker
 Home-page: http://pep8.readthedocs.org/
 Author: Johann C. Rocholl
@@ -103,9 +103,27 @@
         =========
         
         
+        1.5.6 (2014-04-14)
+        ------------------
+        
+        Bug fixes:
+        
+        * Check the last line even if it has no end-of-line. (Issue #273)
+        
+        
+        1.5.5 (2014-04-10)
+        ------------------
+        
+        Bug fixes:
+        
+        * Fix regression with E22 checks and inline comments. (Issue #271)
+        
+        
         1.5.4 (2014-04-07)
         ------------------
         
+        Bug fixes:
+        
         * Fix negative offset with E303 before a multi-line docstring.
           (Issue #269)
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/pep8.py new/pep8-1.5.6/pep8.py
--- old/pep8-1.5.4/pep8.py      2014-04-06 21:09:17.000000000 +0200
+++ new/pep8-1.5.6/pep8.py      2014-04-14 19:03:06.000000000 +0200
@@ -46,7 +46,7 @@
 """
 from __future__ import with_statement
 
-__version__ = '1.5.4'
+__version__ = '1.5.6'
 
 import os
 import sys
@@ -88,8 +88,10 @@
     '**=', '*=', '/=', '//=', '+=', '-=', '!=', '<>', '<', '>',
     '%=', '^=', '&=', '|=', '==', '<=', '>=', '<<=', '>>=', '='])
 WHITESPACE = frozenset(' \t')
-SKIP_TOKENS = frozenset([tokenize.NL, tokenize.NEWLINE,
-                         tokenize.INDENT, tokenize.DEDENT])
+NEWLINE = frozenset([tokenize.NL, tokenize.NEWLINE])
+SKIP_TOKENS = NEWLINE.union([tokenize.INDENT, tokenize.DEDENT])
+# ERRORTOKEN is triggered by backticks in Python 3
+SKIP_COMMENTS = SKIP_TOKENS.union([tokenize.COMMENT, tokenize.ERRORTOKEN])
 BENCHMARK_KEYS = ['directories', 'files', 'logical lines', 'physical lines']
 
 INDENT_REGEX = re.compile(r'([ \t]*)')
@@ -169,23 +171,20 @@
             return 0, "W293 blank line contains whitespace"
 
 
-def trailing_blank_lines(physical_line, lines, line_number):
+def trailing_blank_lines(physical_line, lines, line_number, total_lines):
     r"""Trailing blank lines are superfluous.
 
     Okay: spam(1)
     W391: spam(1)\n
-    """
-    if not physical_line.rstrip() and line_number == len(lines):
-        return 0, "W391 blank line at end of file"
-
-
-def missing_newline(physical_line):
-    r"""The last line should have a newline.
 
-    Reports warning W292.
+    However the last line should end with a new line (warning W292).
     """
-    if physical_line.rstrip() == physical_line:
-        return len(physical_line), "W292 no newline at end of file"
+    if line_number == total_lines:
+        stripped_last_line = physical_line.rstrip()
+        if not stripped_last_line:
+            return 0, "W391 blank line at end of file"
+        if stripped_last_line == physical_line:
+            return len(physical_line), "W292 no newline at end of file"
 
 
 def maximum_line_length(physical_line, max_line_length, multiline):
@@ -433,8 +432,7 @@
         newline = row < start[0] - first_row
         if newline:
             row = start[0] - first_row
-            newline = (not last_token_multiline and
-                       token_type not in (tokenize.NL, tokenize.NEWLINE))
+            newline = not last_token_multiline and token_type not in NEWLINE
 
         if newline:
             # this is the beginning of a continuation line.
@@ -656,8 +654,7 @@
     prev_type = tokenize.OP
     prev_text = prev_end = None
     for token_type, text, start, end, line in tokens:
-        if token_type in (tokenize.NL, tokenize.NEWLINE, tokenize.ERRORTOKEN):
-            # ERRORTOKEN is triggered by backticks in Python 3
+        if token_type in SKIP_COMMENTS:
             continue
         if text in ('(', 'lambda'):
             parens += 1
@@ -697,14 +694,8 @@
                 # Check if the operator is being used as a binary operator
                 # Allow unary operators: -123, -x, +1.
                 # Allow argument unpacking: foo(*args, **kwargs).
-                if prev_type == tokenize.OP:
-                    binary_usage = (prev_text in '}])')
-                elif prev_type == tokenize.NAME:
-                    binary_usage = (prev_text not in KEYWORDS)
-                else:
-                    binary_usage = (prev_type not in SKIP_TOKENS)
-
-                if binary_usage:
+                if (prev_text in '}])' if prev_type == tokenize.OP
+                        else prev_text not in KEYWORDS):
                     need_space = None
             elif text in WS_OPTIONAL_OPERATORS:
                 need_space = None
@@ -1169,11 +1160,11 @@
 
 if COMMENT_WITH_NL:
     def _is_eol_token(token):
-        return (token[0] in (tokenize.NEWLINE, tokenize.NL) or
+        return (token[0] in NEWLINE or
                 (token[0] == tokenize.COMMENT and token[1] == token[4]))
 else:
     def _is_eol_token(token):
-        return token[0] in (tokenize.NEWLINE, tokenize.NL)
+        return token[0] in NEWLINE
 
 
 ##############################################################################
@@ -1271,10 +1262,10 @@
 
     def readline(self):
         """Get the next line from the input buffer."""
-        self.line_number += 1
-        if self.line_number > len(self.lines):
+        if self.line_number >= self.total_lines:
             return ''
-        line = self.lines[self.line_number - 1]
+        line = self.lines[self.line_number]
+        self.line_number += 1
         if self.indent_char is None and line[:1] in WHITESPACE:
             self.indent_char = line[0]
         return line
@@ -1414,6 +1405,7 @@
     def check_all(self, expected=None, line_offset=0):
         """Run all checks on the input file."""
         self.report.init_file(self.filename, self.lines, expected, line_offset)
+        self.total_lines = len(self.lines)
         if self._ast_checks:
             self.check_ast()
         self.line_number = 0
@@ -1439,11 +1431,11 @@
                 elif text in '}])':
                     parens -= 1
             elif not parens:
-                if token_type == tokenize.NEWLINE:
-                    self.check_logical()
-                    self.blank_before = 0
-                elif token_type == tokenize.NL:
-                    if len(self.tokens) == 1:
+                if token_type in NEWLINE:
+                    if token_type == tokenize.NEWLINE:
+                        self.check_logical()
+                        self.blank_before = 0
+                    elif len(self.tokens) == 1:
                         # The physical line contains only this token.
                         self.blank_lines += 1
                         del self.tokens[0]
@@ -1457,6 +1449,11 @@
                         token[3] = (token[2][0], token[2][1] + len(token[1]))
                         self.tokens = [tuple(token)]
                         self.check_logical()
+        if len(self.tokens) > 1 and (token_type == tokenize.ENDMARKER and
+                                     self.tokens[-2][0] not in SKIP_TOKENS):
+            self.tokens.pop()
+            self.check_physical(self.tokens[-1][4])
+            self.check_logical()
         return self.report.get_file_results()
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/setup.cfg new/pep8-1.5.6/setup.cfg
--- old/pep8-1.5.4/setup.cfg    2014-04-07 07:56:42.000000000 +0200
+++ new/pep8-1.5.6/setup.cfg    2014-04-14 19:05:22.000000000 +0200
@@ -8,6 +8,6 @@
 
 [egg_info]
 tag_build = 
-tag_date = 0
 tag_svn_revision = 0
+tag_date = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/testsuite/E22.py 
new/pep8-1.5.6/testsuite/E22.py
--- old/pep8-1.5.4/testsuite/E22.py     2014-04-03 23:11:29.000000000 +0200
+++ new/pep8-1.5.6/testsuite/E22.py     2014-04-09 00:27:08.000000000 +0200
@@ -149,4 +149,9 @@
 
 def squares(n):
     return (i ** 2 for i in range(n))
+
+ENG_PREFIXES = {
+    -6: "\u03bc",  # Greek letter mu
+    -3: "m",
+}
 #:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/testsuite/W29.py 
new/pep8-1.5.6/testsuite/W29.py
--- old/pep8-1.5.4/testsuite/W29.py     2014-03-25 19:08:10.000000000 +0100
+++ new/pep8-1.5.6/testsuite/W29.py     2014-04-14 16:08:57.000000000 +0200
@@ -1,13 +1,17 @@
 #: Okay
 # 情
-#: W291
+#: W291:1:6
 print 
-#: W293
+#: W293:2:1
 class Foo(object):
     
     bang = 12
-#: W291
+#: W291:2:35
 '''multiline
 string with trailing whitespace'''   
-#: W292
-# This line doesn't have a linefeed
\ No newline at end of file
+#: W292:1:36 noeol
+# This line doesn't have a linefeed
+#: W292:1:5 E225:1:2 noeol
+1+ 1
+#: W292:1:27 E261:1:12 noeol
+import this # no line feed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/testsuite/support.py 
new/pep8-1.5.6/testsuite/support.py
--- old/pep8-1.5.4/testsuite/support.py 2014-04-03 23:02:11.000000000 +0200
+++ new/pep8-1.5.6/testsuite/support.py 2014-04-14 15:50:46.000000000 +0200
@@ -157,7 +157,10 @@
                     testcase.append(line)
                 continue
             if codes and index:
-                codes = [c for c in codes if c != 'Okay']
+                if 'noeol' in codes:
+                    testcase[-1] = testcase[-1].rstrip('\n')
+                codes = [c for c in codes
+                         if c not in ('Okay', 'noeol')]
                 # Run the checker
                 runner(filename, testcase, expected=codes,
                        line_offset=line_offset)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep8-1.5.4/testsuite/test_api.py 
new/pep8-1.5.6/testsuite/test_api.py
--- old/pep8-1.5.4/testsuite/test_api.py        2014-03-26 00:48:22.000000000 
+0100
+++ new/pep8-1.5.6/testsuite/test_api.py        2014-04-14 16:56:04.000000000 
+0200
@@ -246,7 +246,7 @@
         pep8style = pep8.StyleGuide(paths=[E11])
 
         # Default lists of checkers
-        self.assertTrue(len(pep8style.options.physical_checks) > 5)
+        self.assertTrue(len(pep8style.options.physical_checks) > 4)
         self.assertTrue(len(pep8style.options.logical_checks) > 10)
         self.assertEqual(len(pep8style.options.ast_checks), 0)
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to