summaryrefslogtreecommitdiff
path: root/pkg_resources/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary serialization/parsing of extras in EntryPoint.__init__. ↵Jason R. Coombs2017-10-121-3/+1
| | | | Fixes #1132.
* Use simpler Requirement from packaging.requirementsJason R. Coombs2017-10-121-1/+3
|
* Feed the hobgoblins (delint).Jason R. Coombs2017-10-121-25/+47
|
* Clean up resource warnings during testsJon Dufresne2017-09-161-1/+5
| | | | | | | | | | When tests are invoked with the Python flag -Wall, warnings appear in the form of: ResourceWarning: unclosed file ... Close all files and resources deterministically to avoid such warnings. Most often, easiest to do using a context manager.
* Screen entries before sorting in find_on_path. Ref #1134.Jason R. Coombs2017-09-091-1/+13
|
* Extract function for resolving the dist factory for a path item entryJason R. Coombs2017-09-091-12/+16
|
* Create a NoDists factory for returning no dists, whose boolean value is False.Jason R. Coombs2017-09-091-1/+18
|
* Extract function for listdirJason R. Coombs2017-09-091-15/+23
|
* Short circuit and dedent large blockJason R. Coombs2017-09-091-32/+33
|
* Extract variable for is_metaJason R. Coombs2017-09-091-2/+2
|
* Assign dists just onceJason R. Coombs2017-09-091-12/+12
|
* Extract distributions_from_metadataJason R. Coombs2017-09-091-11/+18
|
* Extract functions for resolving egg_link and reading non-empty lines from a ↵Jason R. Coombs2017-09-091-12/+26
| | | | file.
* Remove unnecessary paretheses.Jason R. Coombs2017-09-091-3/+1
|
* Extract variable for ignorable errors to improve indentation.Jason R. Coombs2017-09-091-2/+5
|
* Merge branch 'master' into less-statJason R. Coombs2017-09-031-3/+11
|\
| * pkg_resources: improve WorkingSet.resolve(replace_conflicting=True)Benoit Pierre2017-08-291-3/+11
| | | | | | | | | | | | | | | | Correctly replace conflicting distributions in sub-requirements if possible (instead of only for top-level requirements passed as arguments). Fix #1124.
* | pkg_resources: do not call stat() and access()Julien Danjou2017-08-281-39/+56
|/ | | | | | | | | | | | The current code in find_on_path is doing a lot of stat() calls which are actually useless and prone to race conditions. As described in Python documentation (https://docs.python.org/3/library/os.html#os.access), os.access must not be used before opening a file. Same goes for a directory. This patch removes those checks by handling exceptions correctly when using os.listdir() instead, which improves pkg_resources import time.
* Better detect unpacked eggsLeonardo Rochael Almeida2017-07-311-4/+14
| | | | | | Do not assume a directory named in `.egg` is an egg, unless it has an actual egg metadata directory. Closes #462
* Use inspect.getmro to inspect the mro. Alternate implementation to that ↵Jason R. Coombs2017-07-261-10/+11
| | | | proposed in #1092.
* Avoid race condition in ensure_directory. Ref #1083.Jason R. Coombs2017-07-131-2/+3
|
* Revert "Merge pull request #933 from pypa/feature/581-depend-not-bundle"Jason R. Coombs2017-02-241-7/+8
| | | | | This reverts commit 089cdeb489a0fa94d11b7307b54210ef9aa40511, reversing changes made to aaec654d804cb78dbb6391afff721a63f26a71cd.
* support dist-info distributions inside zip filesAlexander Duryagin2017-02-101-0/+6
|
* Merge pull request #883 from jimporter/extrasJason R. Coombs2017-01-241-5/+17
|\ | | | | Fix usage of extras when installing via Wheels; resolves #882
| * Fix usage of extras when installing via Wheels; resolves #882Jim Porter2016-12-291-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resolving requirements, we now pass the list of extras we're using along to Marker.evaluate, since we want to include the extra's requirements in our list of required packages. This is sort of papering over the underlying issue; namely, that the dependency map for dist-info distributions looks like: { None : ['common_dep'], 'my_extra': ['extra_dep; extra = "my_extra"'] } If we eliminated 'extra = "my_extra"' when creating this map, the problem would go away because the WorkingSet would no longer treat `extra_dep` as a purely optional dependency. However, this would require copying and manipulating Requirement objects, which is somewhat more complicated than the current solution.
* | Strip out vendored packages and require them instead. Ref #581.Jason R. Coombs2017-01-011-8/+7
| |
* | Bypass sort behavior altogether when module.__path__ isn't a list. Fixes #885.Jason R. Coombs2016-12-131-1/+5
| |
* | As sometimes orig_path may be something other than a list (i.e. ↵Jason R. Coombs2016-12-131-1/+1
|/ | | | _NamespacePath), use iterator tools to sort the items in place. Fixes #885.
* Use generator expression to manage the scope of 'dist'Jason R. Coombs2016-12-041-3/+3
|
* Prefer update and generator expression to for/if loopJason R. Coombs2016-12-041-3/+5
|
* Hard fail on Python 3 prior to 3.3. Fixes #864.Jason R. Coombs2016-12-011-5/+1
|
* Use packaging.version.Version to sort filenames by the version of the ↵Jason R. Coombs2016-11-041-5/+28
| | | | package they represent. Alternate implementation of that proposed in #829. Also ref #629.
* Fix quantity of blank lines.stepshal2016-10-181-7/+2
|
* Merge pull request #629 from kata198/masterJason R. Coombs2016-10-161-1/+9
|\ | | | | Fix issues with distribution location from eggs
| * Ammend: fb1867e305660161c2960dfcfc5a95d41310e19d add missing sortTim Savannah2016-07-051-0/+1
| |
| * Scan for distributions in reverse order, so we find the newest version of a ↵Tim Savannah2016-07-051-1/+5
| | | | | | | | distribution (instead of the oldest)
| * Skip empty egg directories, which may be leftover from previous installationsTim Savannah2016-07-051-0/+3
| |
* | Merge pull request #732 from mindw/fix_extra_names_dashJason R. Coombs2016-10-141-3/+3
|\ \ | | | | | | fix for extra names containing '-'
| * | fix for extra names containing '-'Gabi Davar2016-08-231-3/+3
| | |
* | | Put main logic in the top-level body of the function.Jason R. Coombs2016-09-271-6/+7
| | |
* | | Merge fix for issue #719.Jason R. Coombs2016-09-271-8/+13
|\ \ \
| * | | Restore Python 2 compatibility. Ref #719.Jason R. Coombs2016-08-051-1/+2
| | | |
| * | | Forget the environment variable, and just log a warning when a metadata ↵Jason R. Coombs2016-08-051-10/+12
| | | | | | | | | | | | | | | | can't be decoded. Ref #719.
| * | | Allow an environment to suppress errors when reading metadata by setting ↵Jason R. Coombs2016-08-041-1/+3
| | | | | | | | | | | | | | | | PKG_RESOURCES_METADATA_ERRORS='replace'. Ref #719.
* | | | Suppress ValueError in fixup_namespace_packages. Fixes #520. Fixes #513.Jason R. Coombs2016-09-141-1/+10
| | | |
* | | | Rely on appdirs for resolving a cache dir for Python-Eggs. Fixes #763.Jason R. Coombs2016-08-271-41/+9
| |/ / |/| |
* | | Make exactly one space after comma. (#756)stepshal2016-08-221-1/+1
| | |
* | | Fix quantity of blank lines after code object, class of function definition.stepshal2016-08-201-0/+55
| | |
* | | Merge pull request #747 from stepshal/comment_hashJason R. Coombs2016-08-191-1/+1
|\ \ \ | | | | | | | | Fix spacing after comment hash.
| * | | Fix spacing after comment hash.stepshal2016-08-181-1/+1
| | | |