summaryrefslogtreecommitdiff
path: root/astroid/modutils.py
Commit message (Collapse)AuthorAgeFilesLines
* Initial formatting of astroidClaudiu Popa2018-10-021-60/+73
|
* Spelling fixesVille Skyttä2018-07-241-1/+1
|
* Update the copyright noticesastroid-2.0Claudiu Popa2018-07-151-1/+9
|
* Include abspath of sys.path on searches at load_from_moduleMario Corchero2018-07-051-2/+4
| | | | | | | | | | At the moment `load_from_module` is resolving all paths in `sys.path` to validate that the module being import is in a folder part of the path. This is done to resolve symlinks. This can be an issue though it both the file being imported and the path in `sys.path` resolve to different locations. Even if the symlinks are importable, the resolution of the paths in `sys.path` might not.
* Fix lintingClaudiu Popa2018-06-141-4/+3
|
* Remove six from a couple of filesClaudiu Popa2018-05-311-4/+2
|
* pyupgrade (#549)Anthony Sottile2018-05-221-2/+2
|
* Fix import of symlinks outside of path with modutils (#546)Mario Corchero2018-05-151-12/+49
| | | | | | | | | Makes load_module_from_file able to import files within the path that are just a symlink to a file outside of the path. modutils is using realpath at the moment which will resolve the symlink and don't allow the import as the file is detected outside of the available paths. By checking both abspath and realpath this patches add support for such scenarios.
* Ignore directories found in blacklistClaudiu Popa2017-10-121-0/+2
| | | | Close PyCQA/pylint#1700
* Remove pylint errorsDerek Gustafson2016-12-031-8/+3
|
* Use sys.base_exec_prefix in case sys.real_prefix is not definedClaudiu Popa2016-12-031-2/+10
| | | | | | | | sys.real_prefix is an addition of the *virtualenv* library, but it is not added when a virtual environment is created with the builtin *venv* library. In the latter's case, sys.base_exec_prefix is the one pointing to the original installation of Python. Now, in case sys.real_prefix is not defined, we fallback to sys.base_exec_prefix.
* Use the correct _replace member. Thanks to @dirthead for finding the bug. ↵Claudiu Popa2016-10-241-1/+1
| | | | Close #368
* Export two helpers for verifying the type of a spec.Claudiu Popa2016-08-241-0/+7
|
* Move the spec finder under a new namespace, interpreter._import.Claudiu Popa2016-08-241-261/+21
|
* Add support for discovering .pth file created by certain namespace packages.Claudiu Popa2016-08-241-4/+25
|
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+7
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
|
* Fix typosJakub Wilk2016-06-021-10/+10
|
* Try to canonicalize the lookup paths as well.Claudiu Popa2016-06-011-2/+9
|
* Canonicalize file paths in modpath_from_file, this should help when ↵Claudiu Popa2016-05-311-1/+2
| | | | | | receiving symlinks and whatnot. Close PyCQA/pylint#791
* Remove superfluous boilerplate the first regex missedCeridwen2016-05-171-17/+0
|
* Convert all files to new license headerCeridwen2016-05-161-0/+3
|
* Don't look for namespace packages implicitly into functions doing concrete ↵Claudiu Popa2016-05-101-21/+26
| | | | imports.
* Implicit namespace package support for modpath_from_file for Python 3.3+.Claudiu Popa2016-05-091-2/+4
|
* Improve the message.Claudiu Popa2016-05-081-3/+1
|
* Support namespace packages only for versions with the module spec feature ↵Claudiu Popa2016-05-081-1/+1
| | | | implemented.
* Don't introduce empty values for non-zip importers in path_importer_cache ↵Claudiu Popa2016-05-081-2/+2
| | | | and add a test for implicit namespace packages.
* Switch to a spec finder protocol for finding files or packagesClaudiu Popa2016-05-081-106/+209
|
* Add /usr/lib and /usr/lib64 to the list of stdlib pathsClaudiu Popa2015-12-211-6/+23
|
* Add lib_pypy from the real installation of PythonClaudiu Popa2015-12-151-0/+5
| | | | | | | This solves a problem with pypy and virtualenv, the latter deciding not to copy some of the modules into the virtual environment, such as datetime, which means that STD_LIB_DIRS needs to be updated in order to look there as well.
* Move code which doesn't trigger DistutilsPlatformError outside of the try block.Claudiu Popa2015-12-151-11/+12
|
* Improve the detection of lib_pypy, which was faulty.Claudiu Popa2015-12-151-2/+3
|
* Add lib_pypy into the list of standard library modules for PyPyClaudiu Popa2015-12-151-0/+3
| | | | | | Unfortunately it is not detected in any way by distutils.sysconfig.get_python_lib. This can detect datetime as a builtin module on PyPy.
* Disable errors caused by a custom version of distutils, created by virtualenv.Claudiu Popa2015-12-141-1/+6
|
* Cleanup pylint's warnings over astroid codebaseClaudiu Popa2015-12-141-8/+4
| | | | | | | | | | Some of the messages were disabled in pylintrc, since they're not very useful for our case. Other parameters, such as the number of arguments / statements / attributes etc were configured so that they won't be too restrictive for our codebase, since making the code to respect them right now requires too much development changes, which is not justified by the end result. Closes issue #284.
* Remove doctype and future imports which aren't useful.Claudiu Popa2015-10-111-1/+0
|
* Remove the use of scandir. Unfortunately it's supported only by CPython.Claudiu Popa2015-07-261-2/+1
|
* MergeClaudiu Popa2015-07-251-7/+16
|\
| * Get rid of logilab.common in doc example.Florian Bruhin2015-07-251-2/+2
| | | | | | | | | | --HG-- branch : no-logilab-common
| * Fix get_module_files documentation in modutils.Florian Bruhin2015-07-251-3/+2
| | | | | | | | | | --HG-- branch : no-logilab-common
| * get rid of logilab.common in modutils.Florian Bruhin2015-07-251-2/+12
| | | | | | | | | | --HG-- branch : no-logilab-common
* | Remove the useless __docformat__ variable.Claudiu Popa2015-07-231-2/+0
| |
* | CR fixesRadosław Ganczarek2015-07-251-3/+2
| |
* | Proper argument nameRadosław Ganczarek2015-07-251-4/+4
| |
* | Add option to search for all Python files in get_module_filesRadosław Ganczarek2015-07-251-3/+9
|/
* Fix pylint warnings.Claudiu Popa2015-07-021-3/+3
|
* Update modutils.py from logilab.common and add support for namespace packagesClaudiu Popa2015-07-021-13/+30
| | | | | | This patch is mostly a backport from logilab.common. The addition is the support for pkg_resources.declare_namespace, which created a good deal of problems so far with regard to virtualenvs.
* Fix pylint warnings over astroid, update the list of disabled messages in ↵Claudiu Popa2015-05-191-2/+4
| | | | pylintrc.
* Add some fixes which enhances the Jython support.Claudiu Popa2015-03-301-3/+21
| | | | | | | The fix mostly includes updates to modutils, which is modified in order to properly lookup paths from live objects, which ends in $py.class, not pyc as for Python 2, Closes issue #83.
* Make modutils._search_zip thread safe.Claudiu Popa2015-03-151-1/+1
| | | | | | The function was iterating on sys.path_importer_cache.items(), which gets modified sometimes when using multiple threads. This patch wraps the call to .items() in a list() call.