summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.rst6
-rw-r--r--pkg_resources/__init__.py14
-rwxr-xr-xsetup.cfg2
-rwxr-xr-xsetup.py2
-rw-r--r--setuptools/command/test.py2
-rw-r--r--setuptools/version.py2
6 files changed, 19 insertions, 9 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index d100bdcf..e442e286 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,9 @@
+v30.2.1
+-------
+
+* #850: In test command, invoke unittest.main with
+ indication not to exit the process.
+
v30.2.0
-------
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index dd561d2b..92503288 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -3005,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
@@ -3036,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
diff --git a/setup.cfg b/setup.cfg
index b234d0bd..f101a990 100755
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 30.2.0
+current_version = 30.2.1
commit = True
tag = True
diff --git a/setup.py b/setup.py
index e088928c..a12d8984 100755
--- a/setup.py
+++ b/setup.py
@@ -85,7 +85,7 @@ def pypi_link(pkg_filename):
setup_params = dict(
name="setuptools",
- version="30.2.0",
+ version="30.2.1",
description="Easily download, build, install, upgrade, and uninstall "
"Python packages",
author="Python Packaging Authority",
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 270674e2..9a5117be 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -225,10 +225,12 @@ class test(Command):
del_modules.append(name)
list(map(sys.modules.__delitem__, del_modules))
+ exit_kwarg = {} if sys.version_info < (2, 7) else {"exit": False}
unittest_main(
None, None, self._argv,
testLoader=self._resolve_as_ep(self.test_loader),
testRunner=self._resolve_as_ep(self.test_runner),
+ **exit_kwarg
)
@property
diff --git a/setuptools/version.py b/setuptools/version.py
index f2b40722..95e18696 100644
--- a/setuptools/version.py
+++ b/setuptools/version.py
@@ -1,6 +1,6 @@
import pkg_resources
try:
- __version__ = pkg_resources.require('setuptools')[0].version
+ __version__ = pkg_resources.get_distribution('setuptools').version
except Exception:
__version__ = 'unknown'