1 new changeset in py: http://bitbucket.org/hpk42/py/changeset/abdcfe8f9417/ changeset: r1993:abdcfe8f9417 user: hpk date: 2011-01-12 17:17:54 summary: fix issue17 (of the pytest tracker): import-* statements could be processed wrong on python3 because they are disallowed in functions (which were temporarily created) affected #: 7 files (415 bytes)
--- a/CHANGELOG Mon Nov 29 16:57:53 2010 +0100 +++ b/CHANGELOG Wed Jan 12 17:17:54 2011 +0100 @@ -1,3 +1,8 @@ +Changes between 1.4.0 and 1.4.1 +================================================== + +- fix (pytest-) issue17 where python3 does not like "import *" + leading to misrepresentation of import-errors in test modules Changes between 1.3.4 and 1.4.0 ================================================== --- a/py/__init__.py Mon Nov 29 16:57:53 2010 +0100 +++ b/py/__init__.py Wed Jan 12 17:17:54 2011 +0100 @@ -8,7 +8,7 @@ (c) Holger Krekel and others, 2004-2010 """ -__version__ = '1.4.0' +__version__ = '1.4.1.dev1' from py import _apipkg --- a/py/_code/source.py Mon Nov 29 16:57:53 2010 +0100 +++ b/py/_code/source.py Wed Jan 12 17:17:54 2011 +0100 @@ -126,7 +126,7 @@ continue trylines = self.lines[start:lineno+1] # quick hack to indent the source and get it as a string in one go - trylines.insert(0, 'def xxx():') + trylines.insert(0, 'if xxx:') trysource = '\n '.join(trylines) # ^ space here try: --- a/setup.py Mon Nov 29 16:57:53 2010 +0100 +++ b/setup.py Wed Jan 12 17:17:54 2011 +0100 @@ -9,7 +9,7 @@ name='py', description='library with cross-python path, ini-parsing, io, code, log facilities', long_description = open('README.txt').read(), - version='1.4.0', + version='1.4.1.dev1', url='http://pylib.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], --- a/testing/code/__init__.py Mon Nov 29 16:57:53 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -# --- a/testing/code/test_source.py Mon Nov 29 16:57:53 2010 +0100 +++ b/testing/code/test_source.py Wed Jan 12 17:17:54 2011 +0100 @@ -230,6 +230,11 @@ assert len(source) == 9 assert source.getstatementrange(5) == (0, 9) + def test_getstatementrange_out_of_bounds_py3(self): + source = Source("if xxx:\n from .collections import *") + r = source.getstatementrange(1) + assert r == (1,2) + @py.test.mark.skipif("sys.version_info < (2,6)") def test_compile_to_ast(self): import ast @@ -423,3 +428,4 @@ _, A_lineno = py.std.inspect.findsource(A) assert fspath.basename == "test_source.py" assert lineno == A_lineno + --- a/tox.ini Mon Nov 29 16:57:53 2010 +0100 +++ b/tox.ini Wed Jan 12 17:17:54 2011 +0100 @@ -1,12 +1,12 @@ [tox] -envlist=py26,py27,py31,py27-xdist,py25,py24 +envlist=py26,py27,py31,py32,py27-xdist,py25,py24 indexserver= default=http://pypi.testrun.org [testenv] changedir=testing commands=py.test -rfsxX --junitxml={envlogdir}/junit-{envname}.xml [] -deps=pytest>=2.0.0.dev34 +deps=pytest>=2.0.0 [testenv:py27-xdist] basepython=python2.7 Repository URL: https://bitbucket.org/hpk42/py/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn