Hello community,
here is the log from the commit of package python-py for openSUSE:Factory checked in at 2015-07-19 11:44:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-py (Old)
and /work/SRC/openSUSE:Factory/.python-py.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-py"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-py/python-py-doc.changes 2015-07-05 17:55:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-py.new/python-py-doc.changes 2015-07-19 11:44:54.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Jul 2 10:01:08 UTC 2015 - aj@ajaissle.de
+
+- update to version 1.4.30
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/python-py/python-py.changes 2015-07-05 17:55:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-py.new/python-py.changes 2015-07-19 11:44:55.000000000 +0200
@@ -1,0 +2,14 @@
+Thu Jul 2 10:01:08 UTC 2015 - aj@ajaissle.de
+
+- update to version 1.4.30:
+ * fix issue68 an assert with a multiline list comprehension was not
+ reported correctly. Thanks Henrik Heibuerger.
+
+- changes from version 1.4.29:
+ * fix issue55: revert a change to the statement finding algorithm
+ which is used by pytest for generating tracebacks. Thanks Daniel
+ Hahler for initial analysis.
+ * fix pytest issue254 for when traceback rendering can’t find valid
+ source code. Thanks Ionel Cristian Maries.
+
+-------------------------------------------------------------------
Old:
----
py-1.4.28.tar.gz
New:
----
py-1.4.30.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-py-doc.spec ++++++
--- /var/tmp/diff_new_pack.YkK8PA/_old 2015-07-19 11:44:55.000000000 +0200
+++ /var/tmp/diff_new_pack.YkK8PA/_new 2015-07-19 11:44:55.000000000 +0200
@@ -17,7 +17,7 @@
Name: python-py-doc
-Version: 1.4.28
+Version: 1.4.30
Release: 0
Summary: Library with cross-python path, ini-parsing, io, code, log facilities
License: MIT
python-py.spec: same change
++++++ py-1.4.28.tar.gz -> py-1.4.30.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.28/CHANGELOG new/py-1.4.30/CHANGELOG
--- old/py-1.4.28/CHANGELOG 2015-05-22 08:30:55.000000000 +0200
+++ new/py-1.4.30/CHANGELOG 2015-06-26 12:31:25.000000000 +0200
@@ -1,3 +1,21 @@
+1.4.30
+==================================================
+
+- fix issue68 an assert with a multiline list comprehension
+ was not reported correctly. Thanks Henrik Heibuerger.
+
+
+1.4.29
+==================================================
+
+- fix issue55: revert a change to the statement finding algorithm
+ which is used by pytest for generating tracebacks.
+ Thanks Daniel Hahler for initial analysis.
+
+- fix pytest issue254 for when traceback rendering can't
+ find valid source code. Thanks Ionel Cristian Maries.
+
+
1.4.28
==================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.28/PKG-INFO new/py-1.4.30/PKG-INFO
--- old/py-1.4.28/PKG-INFO 2015-05-22 08:30:56.000000000 +0200
+++ new/py-1.4.30/PKG-INFO 2015-06-26 12:31:25.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: py
-Version: 1.4.28
+Version: 1.4.30
Summary: library with cross-python path, ini-parsing, io, code, log facilities
Home-page: http://pylib.readthedocs.org/
Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.28/conftest.py new/py-1.4.30/conftest.py
--- old/py-1.4.28/conftest.py 2015-05-22 08:30:55.000000000 +0200
+++ new/py-1.4.30/conftest.py 2015-06-26 12:31:25.000000000 +0200
@@ -14,26 +14,6 @@
group.addoption('--runslowtests',
action="store_true", dest="runslowtests", default=False,
help=("run slow tests"))
- group.addoption('--lsof',
- action="store_true", dest="lsof", default=False,
- help=("run FD checks if lsof is available"))
-
-def pytest_configure(config):
- if config.getvalue("lsof"):
- try:
- out = py.process.cmdexec("lsof -p %d" % pid)
- except py.process.cmdexec.Error:
- pass
- else:
- config._numfiles = len([x for x in out.split("\n") if "REG" in x])
-
-def pytest_unconfigure(config, __multicall__):
- if not hasattr(config, '_numfiles'):
- return
- __multicall__.execute()
- out2 = py.process.cmdexec("lsof -p %d" % pid)
- len2 = len([x for x in out2.split("\n") if "REG" in x])
- assert len2 < config._numfiles + 7, out2
def pytest_funcarg__sshhost(request):
val = request.config.getvalue("sshhost")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.28/doc/index.txt new/py-1.4.30/doc/index.txt
--- old/py-1.4.28/doc/index.txt 2015-05-22 08:30:55.000000000 +0200
+++ new/py-1.4.30/doc/index.txt 2015-06-26 12:31:25.000000000 +0200
@@ -33,6 +33,7 @@
announce/release-2.0.0
changelog
+ announce/*
Indices and tables
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.28/py/__init__.py new/py-1.4.30/py/__init__.py
--- old/py-1.4.28/py/__init__.py 2015-05-22 08:30:55.000000000 +0200
+++ new/py-1.4.30/py/__init__.py 2015-06-26 12:31:25.000000000 +0200
@@ -8,7 +8,7 @@
(c) Holger Krekel and others, 2004-2014
"""
-__version__ = '1.4.28'
+__version__ = '1.4.30'
from py import _apipkg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.28/py/_code/code.py new/py-1.4.30/py/_code/code.py
--- old/py-1.4.28/py/_code/code.py 2015-05-22 08:30:55.000000000 +0200
+++ new/py-1.4.30/py/_code/code.py 2015-06-26 12:31:25.000000000 +0200
@@ -470,7 +470,7 @@
def get_source(self, source, line_index=-1, excinfo=None, short=False):
""" return formatted and marked up source lines. """
lines = []
- if source is None:
+ if source is None or line_index >= len(source.lines):
source = py.code.Source("???")
line_index = 0
if line_index < 0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.28/py/_code/source.py new/py-1.4.30/py/_code/source.py
--- old/py-1.4.28/py/_code/source.py 2015-05-22 08:30:55.000000000 +0200
+++ new/py-1.4.30/py/_code/source.py 2015-06-26 12:31:25.000000000 +0200
@@ -1,4 +1,6 @@
from __future__ import generators
+
+from bisect import bisect_right
import sys
import inspect, tokenize
import py
@@ -291,14 +293,10 @@
while True:
yield ''
- r = readline_generator(lines)
- try:
- readline = r.next
- except AttributeError:
- readline = r.__next__
+ it = readline_generator(lines)
try:
- for _, _, (sline, _), (eline, _), _ in tokenize.generate_tokens(readline):
+ for _, _, (sline, _), (eline, _), _ in tokenize.generate_tokens(lambda: next(it)):
if sline > len(lines):
break # End of input reached
if sline > len(newlines):
@@ -317,46 +315,29 @@
newlines.extend(lines[len(newlines):])
return newlines
-def get_statement_startend(lineno, nodelist):
- from bisect import bisect_right
- # lineno starts at 0
- nextlineno = None
- while 1:
- lineno_list = [x.lineno-1 for x in nodelist] # ast indexes start at 1
- insert_index = bisect_right(lineno_list, lineno)
- if insert_index >= len(nodelist):
- insert_index -= 1
- elif lineno < (nodelist[insert_index].lineno - 1) and insert_index > 0:
- insert_index -= 1
- assert lineno >= (nodelist[insert_index].lineno - 1)
- nextnode = nodelist[insert_index]
-
- try:
- nextlineno = nodelist[insert_index+1].lineno - 1
- except IndexError:
- pass
- lastnodelist = nodelist
- nodelist = getnodelist(nextnode)
- if not nodelist:
- start, end = nextnode.lineno-1, nextlineno
- start = min(lineno, start)
- assert start <= lineno and (end is None or lineno < end)
- #print "returning", start, end
- return start, end
-def getnodelist(node):
- import _ast
+def get_statement_startend2(lineno, node):
+ import ast
+ # flatten all statements and except handlers into one lineno-list
+ # AST's line numbers start indexing at 1
l = []
- #print "node", node, "fields", node._fields, "lineno", getattr(node, "lineno", 0) - 1
- for subname in "test", "type", "body", "handlers", "orelse", "finalbody":
- attr = getattr(node, subname, None)
- if attr is not None:
- if isinstance(attr, list):
- l.extend(attr)
- elif hasattr(attr, "lineno"):
- l.append(attr)
- #print "returning nodelist", l
- return l
+ for x in ast.walk(node):
+ if isinstance(x, _ast.stmt) or isinstance(x, _ast.ExceptHandler):
+ l.append(x.lineno - 1)
+ for name in "finalbody", "orelse":
+ val = getattr(x, name, None)
+ if val:
+ # treat the finally/orelse part as its own statement
+ l.append(val[0].lineno - 1 - 1)
+ l.sort()
+ insert_index = bisect_right(l, lineno)
+ start = l[insert_index - 1]
+ if insert_index >= len(l):
+ end = None
+ else:
+ end = l[insert_index]
+ return start, end
+
def getstatementrange_ast(lineno, source, assertion=False, astnode=None):
if astnode is None:
@@ -368,26 +349,39 @@
except ValueError:
start, end = getstatementrange_old(lineno, source, assertion)
return None, start, end
- start, end = get_statement_startend(lineno, getnodelist(astnode))
+ start, end = get_statement_startend2(lineno, astnode)
# we need to correct the end:
# - ast-parsing strips comments
- # - else statements do not have a separate lineno
# - there might be empty lines
+ # - we might have lesser indented code blocks at the end
if end is None:
end = len(source.lines)
- import re
- prefix = re.match(r"\s*", source.lines[start]).group()
- i = start+1
- while i < end:
- line = source.lines[i]
- if not line or len(line)