summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--announce.rst7
-rw-r--r--cliff/help.py7
-rw-r--r--demoapp/setup.py2
-rw-r--r--docs/source/history.rst12
-rw-r--r--setup.py16
-rw-r--r--tox.ini2
7 files changed, 29 insertions, 19 deletions
diff --git a/.travis.yml b/.travis.yml
index eb4857e..ea35c0e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,5 +2,7 @@ language: python
python:
- 2.7
- 3.2
+ - 3.3
+ - pypy
install: pip install -r test-requirements.txt
script: nosetests -d \ No newline at end of file
diff --git a/announce.rst b/announce.rst
index 253ba6e..09e57f8 100644
--- a/announce.rst
+++ b/announce.rst
@@ -1,5 +1,5 @@
========================================================================
- cliff -- Command Line Interface Formulation Framework -- version 1.4.4
+ cliff -- Command Line Interface Formulation Framework -- version 1.4.5
========================================================================
.. tags:: python cliff release DreamHost
@@ -11,8 +11,9 @@ other extensions.
What's New In This Release?
===========================
-- Provide better error handling for unknown commands run from the
- command line. (Contributed by Christophe Chauvet.)
+- Update the pyparsing dependency to a version that supports both
+ Python 2 and Python 3.
+- Add PyPy testing.
Documentation
=============
diff --git a/cliff/help.py b/cliff/help.py
index 67571b3..9d96111 100644
--- a/cliff/help.py
+++ b/cliff/help.py
@@ -1,5 +1,6 @@
import argparse
import sys
+import traceback
from .command import Command
@@ -21,11 +22,15 @@ class HelpAction(argparse.Action):
factory = ep.load()
except Exception as err:
app.stdout.write('Could not load %r\n' % ep)
+ if namespace.debug:
+ traceback.print_exc(file=app.stdout)
continue
try:
- cmd = factory(self, None)
+ cmd = factory(app, None)
except Exception as err:
app.stdout.write('Could not instantiate %r: %s\n' % (ep, err))
+ if namespace.debug:
+ traceback.print_exc(file=app.stdout)
continue
one_liner = cmd.get_description().split('\n')[0]
app.stdout.write(' %-13s %s\n' % (name, one_liner))
diff --git a/demoapp/setup.py b/demoapp/setup.py
index f507497..4bef32e 100644
--- a/demoapp/setup.py
+++ b/demoapp/setup.py
@@ -41,7 +41,7 @@ setup(
scripts=[],
provides=[],
- install_requires=['distribute', 'cliff'],
+ install_requires=['cliff'],
namespace_packages=[],
packages=find_packages(),
diff --git a/docs/source/history.rst b/docs/source/history.rst
index 86c76f8..3c78ccb 100644
--- a/docs/source/history.rst
+++ b/docs/source/history.rst
@@ -2,6 +2,18 @@
Release History
=================
+dev
+
+- Fix the arguments passed to commands when they are instantiated to
+ pull out help. See https://github.com/dreamhost/cliff/issues/52 for
+ details.
+
+1.4.5
+
+- Update the pyparsing dependency to a version that supports both
+ Python 2 and Python 3.
+- Add PyPy testing.
+
1.4.4
- Provide better error handling for unknown commands run from the
diff --git a/setup.py b/setup.py
index 1ccb7b0..672d00c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
PROJECT = 'cliff'
-VERSION = '1.4.4'
+VERSION = '1.4.5'
from setuptools import setup, find_packages
@@ -17,20 +17,10 @@ except IOError:
install_requires = [
'PrettyTable>=0.6,<0.8',
- # Restrict cliff from bringing in cmd2 0.6.6 until the problem
- # with the Python 3-only code is resolved.
- 'cmd2>=0.6.4,<0.6.6',
+ 'pyparsing>=2.0.1',
+ 'cmd2>=0.6.7',
]
-# We need a different version of PyParsing, depending on which version
-# of Python we're using. cmd2 should have this set properly, but until
-# there is a release declare the dependency ourselves.
-# http://trac-hg.assembla.com/python-cmd2/rev/a5f3d5a89d6c
-if sys.version_info[0] < 3:
- install_requires.append('pyparsing==1.5.7')
-else:
- install_requires.append('pyparsing>=2.0.0')
-
try:
import argparse # noqa
except ImportError:
diff --git a/tox.ini b/tox.ini
index bffdf13..3c07077 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py26,py27,py32,py33,style
+envlist = py26,py27,py32,py33,pypy,style
[testenv]
distribute = False