[py-svn] commit/py: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Fri Dec 16 11:36:31 CET 2011


2 new commits in py:


https://bitbucket.org/hpk42/py/changeset/a91d73e5ba60/
changeset:   a91d73e5ba60
user:        hpk42
date:        2011-12-14 18:20:24
summary:     raise a consistent IndexError when a statementrange cannot be determined
affected #:  4 files

diff -r f9ce5c222142aac5e838d2bd09fa0f8ab36a4dfa -r a91d73e5ba60f4c2fc577f2b349777f2fd5748d3 py/__init__.py
--- a/py/__init__.py
+++ b/py/__init__.py
@@ -8,7 +8,7 @@
 
 (c) Holger Krekel and others, 2004-2010
 """
-__version__ = '1.4.6.dev6'
+__version__ = '1.4.6'
 
 from py import _apipkg
 


diff -r f9ce5c222142aac5e838d2bd09fa0f8ab36a4dfa -r a91d73e5ba60f4c2fc577f2b349777f2fd5748d3 py/_code/source.py
--- a/py/_code/source.py
+++ b/py/_code/source.py
@@ -108,7 +108,7 @@
     def getstatementrange(self, lineno, assertion=False):
         """ return (start, end) tuple which spans the minimal
             statement region which containing the given lineno.
-            raise a ValueError if no such statementrange can be found.
+            raise an IndexError if no such statementrange can be found.
         """
         # XXX there must be a better than these heuristic ways ...
         # XXX there may even be better heuristics :-)
@@ -142,7 +142,7 @@
                 if trysource.isparseable():
                     return start, end
         if end is None:
-            raise ValueError("no valid source range around line %d " % (lineno,))
+            raise IndexError("no valid source range around line %d " % (lineno,))
         return start, end
 
     def getblockend(self, lineno):


diff -r f9ce5c222142aac5e838d2bd09fa0f8ab36a4dfa -r a91d73e5ba60f4c2fc577f2b349777f2fd5748d3 setup.py
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@
         name='py',
         description='library with cross-python path, ini-parsing, io, code, log facilities',
         long_description = open('README.txt').read(),
-        version='1.4.6.dev6',
+        version='1.4.6',
         url='http://pylib.org',
         license='MIT license',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],


diff -r f9ce5c222142aac5e838d2bd09fa0f8ab36a4dfa -r a91d73e5ba60f4c2fc577f2b349777f2fd5748d3 testing/code/test_source.py
--- a/testing/code/test_source.py
+++ b/testing/code/test_source.py
@@ -238,7 +238,7 @@
 
     def test_getstatementrange_with_syntaxerror_issue7(self):
         source = Source(":")
-        py.test.raises(ValueError, lambda: source.getstatementrange(0))
+        py.test.raises(IndexError, lambda: source.getstatementrange(0))
 
     @py.test.mark.skipif("sys.version_info < (2,6)")
     def test_compile_to_ast(self):



https://bitbucket.org/hpk42/py/changeset/b827dd156a36/
changeset:   b827dd156a36
user:        hpk42
date:        2011-12-16 11:36:14
summary:     finalize changelog for 1.4.6
affected #:  1 file

diff -r a91d73e5ba60f4c2fc577f2b349777f2fd5748d3 -r b827dd156a36753e32c7f3f15ce82d6fe9e356c8 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Changes between 1.4.5 and 1.4.x
+Changes between 1.4.5 and 1.4.6
 ==================================================
 
 - help to fix pytest issue99: unify output of

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.



More information about the pytest-commit mailing list