diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-12-11 15:20:32 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-12-11 15:32:28 -0500 |
commit | 3dd506f01d48b98aeea9bdbca0105d4c7d8ad538 (patch) | |
tree | 07b3933bd8651b7ac184736f2a3463a483e4e7b5 /pkg_resources/__init__.py | |
parent | 2268fb9887cfea2e28e156bd2c8314132261402f (diff) | |
parent | 5c9406987aacf17d9c004aa1456797e0044306e5 (diff) | |
download | external_python_setuptools-develop-nspkg-always.tar.gz external_python_setuptools-develop-nspkg-always.tar.bz2 external_python_setuptools-develop-nspkg-always.zip |
Merge branch 'master' into develop-nspkg-alwaysdevelop-nspkg-always
Diffstat (limited to 'pkg_resources/__init__.py')
-rw-r--r-- | pkg_resources/__init__.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a323857c..92503288 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -75,11 +75,7 @@ __import__('pkg_resources.extern.packaging.requirements') __import__('pkg_resources.extern.packaging.markers') if (3, 0) < sys.version_info < (3, 3): - msg = ( - "Support for Python 3.0-3.2 has been dropped. Future versions " - "will fail here." - ) - warnings.warn(msg) + raise RuntimeError("Python 3.3 or later is required") # declare some globals that will be defined later to # satisfy the linters. @@ -3009,9 +3005,11 @@ def _initialize(g=globals()): "Set up global resource manager (deliberately not state-saved)" manager = ResourceManager() g['_manager'] = manager - for name in dir(manager): - if not name.startswith('_'): - g[name] = getattr(manager, name) + g.update( + (name, getattr(manager, name)) + for name in dir(manager) + if not name.startswith('_') + ) @_call_aside @@ -3040,10 +3038,10 @@ def _initialize_master_working_set(): # ensure that all distributions added to the working set in the future # (e.g. by calling ``require()``) will get activated as well, # with higher priority (replace=True). - dist = None # ensure dist is defined for del dist below - for dist in working_set: + tuple( dist.activate(replace=False) - del dist + for dist in working_set + ) add_activation_listener(lambda dist: dist.activate(replace=True), existing=False) working_set.entries = [] # match order |