summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-11-15 10:58:48 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-11-15 10:58:48 +0100
commit43760158e1a1fdedabdd80f33dfe8f96592762f5 (patch)
tree8cfd8683a24897636f22f385ce49c7be9a6829f7
parent8f9eb1423cf2baf721ebdcfdc790530040522093 (diff)
downloadastroid-43760158e1a1fdedabdd80f33dfe8f96592762f5.tar.gz
remove more py2.4 relative stuff and fix readme
-rw-r--r--MANIFEST.in1
-rw-r--r--README12
-rw-r--r--README._ast_compatibility42
-rw-r--r--bases.py2
-rw-r--r--debian/control3
-rw-r--r--scoped_nodes.py2
-rw-r--r--test/unittest_scoped_nodes.py1
-rw-r--r--utils.py1
8 files changed, 7 insertions, 57 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 09f84cd..60dba3b 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,6 +1,5 @@
include ChangeLog
include README
-include README._ast_compatibility
include COPYING
include COPYING.LESSER
include test/fulltest.sh
diff --git a/README b/README
index 843ead9..c7ac2a3 100644
--- a/README
+++ b/README
@@ -9,14 +9,10 @@ python source code for projects such as pychecker, pyreverse,
pylint... Well, actually the development of this library is essentially
governed by pylint's needs.
-Since 0.18, it provides a compatible representation which may come
-from the `compiler` module (for python <= 2.4) pr the `_ast` module
-(for python >= 2.5).
-
-It rebuilds the tree generated by the compiler.ast [1] module or by
-the builtin _ast module by recursively walking down the AST and
-building an extended ast (let's call it astng ;). The new node classes
-have additional methods and attributes for different usages.
+It provides a compatible representation which comes from the `_ast` module.
+It rebuilds the tree generated by the builtin _ast module by recursively
+walking down the AST and building an extended ast (let's call it astng ;). The
+new node classes have additional methods and attributes for different usages.
They include some support for static inference and local name scopes.
Furthermore, astng builds partial trees by inspecting living objects.
diff --git a/README._ast_compatibility b/README._ast_compatibility
deleted file mode 100644
index f7079ff..0000000
--- a/README._ast_compatibility
+++ /dev/null
@@ -1,42 +0,0 @@
-XXX deprecated, update by describing the unified tree structure, how we achieve this and remaining differences...
-
-this branch aims to provide compatibility between the `compiler` module and the
-new `_ast` module provided by python >= 2.5.
-
-The problem is that there are several differences between both representations:
-* class names
-* attributes of those classes
-* structure of the tree
-
-So whatever the backend used, astng will return a somewhat compatible tree
-which is a mix of compiler and _ast tree. Hopefully it will
-evolve to stick to the _ast representation, though at this time I want to
-minimize backward incompatibilities, so pylint for instance can work with this
-new representation without too much modifications.
-
-Nodes' class names will still differ, though the provided visitor will map _ast
-class names to compiler class names (e.g. for instance when a `_ast.ClassDef` node
-is visited, the `visit_class` method will be called). This is done to ease
-compatibility with code using earlier astng version.
-
-Attribute names are made compatible, and I've chosen _ast or compiler's name
-by using the most relevant, imo. Those can be found using the `_astng_fields`
-attribute on each node class.
-
-In the same way tree structure is made compatible, using the simplest or the
-more expressive alternative.
-
-The work is not yet finished: XXX insert what's missing here.
-The primary goal is to have test working with python >= 2.5, and then to have
-pylint tests green as well when using the _ast backend.
-
-
-
-Of course all of this is discussable, and I've made choices to have something
-working with the minimal amount of work, both in astng or in client code, even
-if as I said above I would like at some point to be as close as possible to
-the _ast representation.
-
-
-Note: this may be interesting at some point:
-http://lucumr.pocoo.org/cogitations/2008/03/30/high-level-ast-module-for-python
diff --git a/bases.py b/bases.py
index 3e187a0..f03a13e 100644
--- a/bases.py
+++ b/bases.py
@@ -50,7 +50,7 @@ except ImportError:
class BaseClass:
pass
-from logilab.common.compat import set, builtins
+from logilab.common.compat import builtins
from logilab.astng._exceptions import InferenceError, ASTNGError, \
NotFoundError, UnresolvableName
from logilab.astng.as_string import as_string
diff --git a/debian/control b/debian/control
index 13a635b..2c0bfed 100644
--- a/debian/control
+++ b/debian/control
@@ -19,8 +19,7 @@ Description: rebuild a new abstract syntax tree from Python's ast
The aim of this module is to provide a common base representation of
Python source code for projects such as pyreverse or pylint.
.
- It rebuilds the tree generated by the compiler.ast [1] module (python <= 2.4)
- or by the builtin _ast module (python >= 2.5) by recursively walking down the
+ It rebuilds the tree generated by the _ast module by recursively walking down the
AST and building an extended ast (let's call it astng ;). The new node classes
have additional methods and attributes for different usages.
Furthermore, astng builds partial trees by inspecting living objects.
diff --git a/scoped_nodes.py b/scoped_nodes.py
index 3542eaa..9d249f6 100644
--- a/scoped_nodes.py
+++ b/scoped_nodes.py
@@ -29,7 +29,7 @@ __doctype__ = "restructuredtext en"
import sys
from itertools import chain
-from logilab.common.compat import set, builtins
+from logilab.common.compat import builtins
from logilab.common.decorators import cached
from logilab.astng import NotFoundError, NoDefault, \
diff --git a/test/unittest_scoped_nodes.py b/test/unittest_scoped_nodes.py
index e83b89f..9235d65 100644
--- a/test/unittest_scoped_nodes.py
+++ b/test/unittest_scoped_nodes.py
@@ -25,7 +25,6 @@ import sys
from os.path import join, abspath, dirname
from logilab.common.testlib import TestCase, unittest_main
-from logilab.common.compat import sorted
from logilab.astng import builder, nodes, scoped_nodes, \
InferenceError, NotFoundError
diff --git a/utils.py b/utils.py
index eee33ce..cb4e37e 100644
--- a/utils.py
+++ b/utils.py
@@ -37,7 +37,6 @@ extract information from it
__docformat__ = "restructuredtext en"
from logilab.astng._exceptions import IgnoreChild, ASTNGBuildingException
-from logilab.common.compat import set
class ASTVisitor(object):
"""Abstract Base Class for Python AST Visitors.