diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | __init__.py | 2 | ||||
-rw-r--r-- | as_string.py | 3 | ||||
-rw-r--r-- | builder.py | 4 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | test/unittest_builder.py | 11 |
6 files changed, 6 insertions, 18 deletions
@@ -52,7 +52,7 @@ Change log for the astng package * fix #37105: Crash on AttributeError: 'NoneType' object has no attribute '_infer_name' - * python2.4: drop python < 2.4 support + * python2.4: drop python < 2.5 support diff --git a/__init__.py b/__init__.py index 41bc707f..70b2f3e3 100644 --- a/__init__.py +++ b/__init__.py @@ -24,7 +24,7 @@ python source code for projects such as pychecker, pyreverse, pylint... Well, actually the development of this library is essentially governed by pylint's needs. -It extends class defined in the compiler.ast [1] module with some +It extends class defined in the python's _ast module with some additional methods and attributes. Instance attributes are added by a builder object, which can either generate extended ast (let's call them astng ;) by visiting an existent ast tree or by inspecting living diff --git a/as_string.py b/as_string.py index 3eeda096..1e57f0ed 100644 --- a/as_string.py +++ b/as_string.py @@ -30,7 +30,8 @@ # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see <http://www.gnu.org/licenses/>. """This module renders ASTNG nodes to string representation. -It will probably not work on compiler.ast or _ast trees. + +It will probably not work on bare _ast trees. """ import sys @@ -17,9 +17,7 @@ # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see <http://www.gnu.org/licenses/>. -"""The ASTNGBuilder makes astng from living object and / or from compiler.ast - -With python >= 2.5, the internal _ast module is used instead +"""The ASTNGBuilder makes astng from living object and / or from _ast The builder is not thread safe and can't be used to parse different sources at the same time. diff --git a/debian/control b/debian/control index b4c21e39..bd99b7d2 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: python Priority: optional Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Uploaders: Sylvain Thénault <sylvain.thenault@logilab.fr>, Alexandre Fayolle <afayolle@debian.org>, Sandro Tosi <morph@debian.org> -Build-Depends: debhelper (>= 5.0.37.2), python (>= 2.4) +Build-Depends: debhelper (>= 5.0.37.2), python (>= 2.5) Build-Depends-Indep: python-support XS-Python-Version: all Standards-Version: 3.8.2 diff --git a/test/unittest_builder.py b/test/unittest_builder.py index 4dd203c9..3b98adc3 100644 --- a/test/unittest_builder.py +++ b/test/unittest_builder.py @@ -619,17 +619,6 @@ A.ass_type = A_ass_type self.assert_('ass_type' in lclass.locals, lclass.locals.keys()) self.assert_('type' in lclass.locals.keys()) -# def test_1(self): -# from logilab import astng -# import compiler -# sn = astng.MANAGER.astng_from_file(join(astng.__path__[0], 'inference.py')) -# astastng = astng.MANAGER.astng_from_file(join(compiler.__path__[0], 'ast.py')) -# # check monkey patching of the compiler module has been inferred -# lclass = list(astastng.igetattr('Function')) -# self.assertEqual(len(lclass), 1) -# lclass = lclass[0] -# self.assert_('ass_type' in lclass.locals, lclass.locals.keys()) - def test_augassign_attr(self): astng = self.builder.string_build("""class Counter: v = 0 |