summaryrefslogtreecommitdiff
path: root/pkg_resources
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-162-3/+7
| | | | | | | | | | 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-032-3/+489
|\
| * pkg_resources: improve WorkingSet.resolve(replace_conflicting=True)Benoit Pierre2017-08-292-3/+489
| | | | | | | | | | | | | | | | 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-312-4/+79
| | | | | | 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.
* tests: switch back to mock instead of backports.unittest_mockBenoit Pierre2017-07-151-1/+1
|
* Confusingly, the issue was fixed in a larger point release on Python 3.3 ↵Jason R. Coombs2017-07-131-2/+2
| | | | than on Python 3.2.
* Correct bounds and boolean selector.Jason R. Coombs2017-07-131-4/+4
|
* Restrict use of os.makedirs to those with the security patch introduced in ↵Jason R. Coombs2017-07-131-4/+9
| | | | Python 3.2.6, 3.3.5, and 3.4.1 per https://bugs.python.org/issue21082. Ref #1082.
* Correctly honor exist_ok. Ref #1083.Jason R. Coombs2017-07-131-1/+1
|
* Avoid race condition in ensure_directory. Ref #1083.Jason R. Coombs2017-07-132-2/+20
|
* Merge branch 'master' into feature/re-vendor-sadfaceJason R. Coombs2017-05-301-1/+1
|\
| * Python 3.6 invalid escape sequence deprecation fixesVille Skyttä2017-02-241-1/+1
| |
* | Revert "Merge pull request #933 from pypa/feature/581-depend-not-bundle"Jason R. Coombs2017-02-2418-10/+8946
|/ | | | | This reverts commit 089cdeb489a0fa94d11b7307b54210ef9aa40511, reversing changes made to aaec654d804cb78dbb6391afff721a63f26a71cd.
* support dist-info distributions inside zip filesAlexander Duryagin2017-02-101-0/+6
|
* Rely on backports.unittest_mock plugin to make mock available on old Python ↵Jason R. Coombs2017-01-301-4/+1
| | | | versions. Ref #949.
* 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-0118-8946/+10
| |
* | 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
|
* Merge pull request #854 from stepshal/packagingJason R. Coombs2016-12-043-7/+21
|\ | | | | Upgrade packaging to 16.8
| * Upgrade packaging to 16.8stepshal2016-12-043-7/+21
| |
* | 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-183-16/+5
|
* 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-142-3/+21
|\ \ | | | | | | fix for extra names containing '-'
| * | fix for extra names containing '-'Gabi Davar2016-08-232-3/+21
| | |
* | | Upgrade pyparsing to version 2.1.10stepshal2016-10-082-34/+53
| | |