Repository: MongoEngine/mongoengine

Issue:
Remove "rednose" dependency?
The changeset 91ee85152 (first released as 0.10.0) added a hard dependency on "rednose".

The package "rednose" (0.4.3) appears to be an extension to nosetests that adds colors to the console output.  It depends on "python-termstyle" (0.1.7), which was not installable this morning.

These dependencies are not declared in the MongoEngine documentation, either as "Dependencies" or "Optional Dependencies".  They're not declared to "pip" (setuptools?), either, so it takes a bit of searching just to figure out where this dependency is coming from.  They are not required for any MongoEngine functionality.  Their presence is not even seen by most users.

The "gfxmonk.net" web server (which python-termstyle downloads from, even when using Pip) was down today, so this dependency killed our ability to deploy any new programs that use MongoEngine 0.10.0.  Maybe that means I need a more sophisticated deployment system (no argument there!), but it seems like this dependency has big risk, with minimal gain.

Of course, developers are always free to install their own developer tools (like "rednose") on their own.  It's just odd to require this particular one, in an undocumented and somewhat obscure way, for every mongoengine installation.



Discussion:
Looks like the build failed, though probably not because of removing the dependency. Not really sure how the ME guys would handle this.

Another option might be to use `tests_require=[...]` rather than `setup_requires=[...]`.

There were two days that we couldn't install mongoengine and this issue has been rather disruptive. The site was down from the mid to late morning on 7/22 until about 6pm US Eastern. Then again on the morning of 7/23 and back up around 6:30pm.

(Comment copied from the thread on the PR.  Sorry for the cross post, I thought I was posting to the issue thread.)


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -52,13 +52,13 @@ def get_version(version_tuple):
 extra_opts = {"packages": find_packages(exclude=["tests", "tests.*"])}
 if sys.version_info[0] == 3:
     extra_opts['use_2to3'] = True
-    extra_opts['tests_require'] = ['nose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0']
+    extra_opts['tests_require'] = ['nose', 'rednose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0']
     if "test" in sys.argv or "nosetests" in sys.argv:
         extra_opts['packages'] = find_packages()
         extra_opts['package_data'] = {"tests": ["fields/mongoengine.png", "fields/mongodb_leaf.png"]}
 else:
     # coverage 4 does not support Python 3.2 anymore
-    extra_opts['tests_require'] = ['nose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0', 'python-dateutil']
+    extra_opts['tests_require'] = ['nose', 'rednose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0', 'python-dateutil']
 
     if sys.version_info[0] == 2 and sys.version_info[1] == 6:
         extra_opts['tests_require'].append('unittest2')
@@ -79,6 +79,5 @@ def get_version(version_tuple):
       classifiers=CLASSIFIERS,
       install_requires=['pymongo>=2.7.1'],
       test_suite='nose.collector',
-      setup_requires=['nose', 'rednose'],  # Allow proper nose usage with setuptols and tox
       **extra_opts
 )


Test patch: