summaryrefslogtreecommitdiff
path: root/builder.py
Commit message (Collapse)AuthorAgeFilesLines
* Move all astroid modules into a its own directory, which is now the package.Torsten Marek2014-11-081-237/+0
| | | | python setup.py develop now works.
* Make the source compatible with Python 2.7 and 3.3+.Claudiu Popa2014-10-271-3/+3
|
* pylint source codeSylvain Th?nault2014-07-251-5/+5
|
* Make astroid compatible with Python 2.5 again.Torsten Marek2014-07-241-0/+1
|
* Fix names grabed using wildcard import in "absolute import mode"Sylvain Th?nault2014-07-241-3/+3
| | | | | | | | | (ie with absolute_import activated from the __future__ or with python 3). To do so, refactor do_import_module a bit so it may be easily used for wildcard import as well. Fix pylint issue #58.
* Use the with statement to prevent resource warnings.cpopa2014-07-241-3/+2
|
* backport (most of) logilab.common.modutils and related tests into astroid itselfSylvain Th?nault2014-07-231-2/+1
| | | | most of this code is for astroid/pylint only.
* Only cache modules if no other module with the same name is known yet, andTorsten Marek2014-04-261-1/+1
| | | | only return cached modules if name and filepath match.
* Add future imports to Module.future_imports.Torsten Marek2014-04-251-0/+3
|
* Merged in flyingsheep/astroid (pull request #15)Sylvain Th?nault2014-03-261-0/+7
|\ | | | | | | AstroidBuilder.string_build was incompatible with file_stream
| * call transformation for builtin modules as well (though not yet for their ↵Sylvain Th?nault2014-03-191-0/+6
| | | | | | | | child nodes)
| * close the byte stream avoid warning w/ python3Sylvain Th?nault2013-12-241-0/+1
| |
* | moved setting of module.file_encoding to _post_build()Phil Schaf2013-11-251-7/+9
| |
* | extracted string_build from file_build. now string_build allows for ↵Phil Schaf2013-11-241-4/+9
|/ | | | file_stream to be accessed.
* [transforms] allow transformation functions on any nodes, not only modulesSylvain Th?nault2013-06-181-4/+1
|
* work on thread safetySylvain Th?nault2013-06-181-5/+4
| | | | to start with, rebuilder should not be a class attribute
* rename the project astroidDavid Douard2013-06-171-23/+23
|
* import cleanupsSylvain Th?nault2013-03-291-2/+2
|
* minor cleanups: drop copyright by me, update others to 2013, droip those in ↵Sylvain Th?nault2013-03-281-3/+1
| | | | dumb test data files, delete some trailing whitespaces
* properly call parent's __init__Sylvain Th?nault2013-03-281-0/+1
|
* closes #62295: avoid "OSError: Too many open files"Sylvain Th?nault2011-12-081-1/+0
| | | | by moving .file_stream as a Module property opening the file only when needed
* only call transformers if modname specifiedSylvain Th?nault2011-10-251-2/+3
|
* closes #77253: provide a way for user code to register astng transformersSylvain Th?nault2011-09-291-2/+3
|
* cosmetic changes: update/fix copyright and comments, d-t-wSylvain Th?nault2011-09-271-1/+1
|
* we actually dropped support for python < 2.5 in 0.21Sylvain Th?nault2011-09-271-3/+1
|
* remove sys.path manipulation around builder.string_build (closes #76159)Sylvain Th?nault2011-09-161-6/+2
| | | | | | | | That has probably been added in the past as a work around to have relative import working. Not sure if it's still necessary or not, but that's not a correct solution anyway, as this may cause pb with some module wrongly named and added to sys.modules, which may lead to crash (see details on stack overflow, link on the ticket)
* fix file encoding detection with python2.x (closes #70494)alain lefroy2011-07-081-1/+1
| | | | | | | | | | | | | file encoding declaration shall be in a magic *comment*. from PEP0263:: More precisely, the first or second line must match the regular expression "coding[:=]\s*([-\w.]+)". The first group of this expression is then interpreted as encoding name. If the encoding is unknown to Python, an error is raised during compilation. There must not be any Python statement on the line that contains the encoding declaration.
* cleanuplogilab-astng-version-0.21.1Sylvain Th?nault2011-01-111-2/+1
|
* change ASTManager cache attribute to astng_cache so it doesn't sound ↵Sylvain Th?nault2011-01-111-1/+1
| | | | protected (actually used externally)
* mergeEmile Anclin2010-12-151-28/+31
|\
| * py3k: handle file encoding and stream definition in builderEmile Anclin2010-11-221-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | In Py3k, We can't do "data = open(path, 'U').read()" anymore since we need to know the encoding to read the file (UnicodeError); instead we have to first guess the encoding by reading the file as a byte stream. We then define + node.file_encoding = encoding + node.file_stream = file_stream to be used by the Pylint checkers
* | py3k: handle file encoding and stream definition in builderEmile Anclin2010-11-221-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | In Py3k, We can't do "data = open(path, 'U').read()" anymore since we need to know the encoding to read the file (UnicodeError); instead we have to first guess the encoding by reading the file as a byte stream. We then define + node.file_encoding = encoding + node.file_stream = file_stream to be used by the Pylint checkers
* | cleanup: move raw building stuff from builder to raw_buildingEmile Anclin2010-12-141-109/+2
|/
* refactoring for tree rebuildingEmile Anclin2010-12-091-29/+44
| | | | | | | | | rebuilder: move all post build process to builder and don't depend on manager builder: - instanciate ASTNGBuilder's ASTNGManager and TreeRebuilder only once - cleanup build methods; - "_data_build" should become entry point for possible astng pickle cache
* reduce circular imports I: import exceptions directlyEmile Anclin2010-12-021-1/+1
| | | | - rename exceptions module: it's exported to Pylint anyway
* instance attribute support for functionsEmile Anclin2010-12-011-0/+2
|
* rename ASTNGBuilder.build to tree_buildEmile Anclin2010-12-011-2/+2
|
* cleanup: move some rebuilder stuff to builder; fix _delayed_assattr cacheEmile Anclin2010-12-011-3/+61
| | | | indeed, _delayed_assattr was not reset before building a tree !
* cleanup: merge _nodes_ast into rebuilderEmile Anclin2010-11-301-1/+1
|
* cleanup: remove python < 2.5 supportEmile Anclin2010-11-101-9/+4
|
* cleanup: norm_read can be done directlyEmile Anclin2010-11-101-2/+1
|
* remove unused "_file" attribute ; node.file has already been setEmile Anclin2010-11-101-4/+0
|
* explicit importsEmile Anclin2010-10-111-1/+3
|
* BORG : use the borg pattern for ASTNGManager, not singletonEmile Anclin2010-10-111-1/+2
| | | | Hence we can start breaking the circular imports
* remove other has_key occurencesEmile Anclin2010-10-051-1/+1
|
* fix #45959: AttributeError: 'NoneType' object has no attribute 'frame'Sylvain Th?nault2010-09-211-0/+2
| | | | | due to handling of __class__ when importing from living object (because of missing source code or C-compiled object)
* licence cleanupsSylvain Th?nault2010-09-101-14/+0
|
* fix astng building bug: we've to set module.package flag at the node ↵Sylvain Th?nault2010-09-101-2/+1
| | | | | | | creation time otherwise we'll miss this information when infering relative import during the build process (this should fix for instance some problems with numpy)
* proper licensing information (LGPL-2.1). Hope I get it right this time.Sylvain Th?nault2010-04-281-5/+19
|
* more license updatesSylvain Th?nault2010-04-261-3/+3
|