From 1f2eef510f61ef90be4868c0e67c1e0861613b7d Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 5 Aug 2013 18:03:37 -0300 Subject: [PATCH] Updated from global requirements Change-Id: I2e2bd3a38458e1307bcc0410da74dc76c0a5987a --- glanceclient/common/utils.py | 2 +- glanceclient/v2/images.py | 2 +- requirements.txt | 9 ++++----- setup.py | 5 +++-- test-requirements.txt | 15 +++++---------- tox.ini | 4 +++- 6 files changed, 17 insertions(+), 20 deletions(-) diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py index 82360dfb..88f76219 100644 --- a/glanceclient/common/utils.py +++ b/glanceclient/common/utils.py @@ -212,7 +212,7 @@ def get_file_size(file_obj): size = file_obj.tell() file_obj.seek(curr) return size - except IOError, e: + except IOError as e: if e.errno == errno.ESPIPE: # Illegal seek. This means the file object # is a pipe (e.g the user is trying diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py index 7d698d08..9143f26f 100644 --- a/glanceclient/v2/images.py +++ b/glanceclient/v2/images.py @@ -112,7 +112,7 @@ class Controller(object): for (key, value) in kwargs.items(): try: setattr(image, key, value) - except warlock.InvalidOperation, e: + except warlock.InvalidOperation as e: raise TypeError(utils.exception_to_str(e)) resp, body = self.http_client.json_request('POST', url, body=image) diff --git a/requirements.txt b/requirements.txt index d8b87df4..7e4cd772 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,7 @@ -d2to1>=0.2.10,<0.3 -pbr>=0.5,<0.6 +pbr>=0.5.21,<1.0 argparse -prettytable>=0.6,<0.8 -python-keystoneclient>=0.2.1 +PrettyTable>=0.6,<0.8 +python-keystoneclient>=0.3.0 pyOpenSSL -warlock>=0.7.0,<2 +warlock>=1.0.1,<2 diff --git a/setup.py b/setup.py index 1e9882df..2a0786a8 100644 --- a/setup.py +++ b/setup.py @@ -14,8 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools setuptools.setup( - setup_requires=['d2to1>=0.2.10,<0.3', 'pbr>=0.5,<0.6'], - d2to1=True) + setup_requires=['pbr>=0.5.21,<1.0'], + pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index 90e35bbb..ca74f126 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,14 +1,9 @@ -# Install bounded pep8/pyflakes first, then let flake8 install -pep8==1.4.5 -pyflakes==0.7.2 -flake8==2.0 -hacking>=0.5.3,<0.6 +hacking>=0.5.6,<0.7 -coverage +coverage>=3.6 discover -mox +mox>=0.5.3 mock>=0.8.0 -setuptools-git>=0.4 sphinx>=1.1.2 -testrepository>=0.0.13 -testtools>=0.9.22 +testrepository>=0.0.17 +testtools>=0.9.32 diff --git a/tox.ini b/tox.ini index 386aea04..8980adae 100644 --- a/tox.ini +++ b/tox.ini @@ -26,10 +26,12 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' downloadcache = ~/cache/pip [flake8] +# H233 Python 3.x incompatible use of print operator # H302 import only modules # H303 no wildcard import # H306 imports not in alphabetical orde # H404 multi line docstring should start with a summary -ignore = F403,F841,F812,F821,H302,H303,H306,H404 +# H501 Do not use locals() for string formatting +ignore = F403,F841,F812,F821,H233,H302,H303,H306,H404,H501 show-source = True exclude = .venv,.tox,dist,doc,*egg,build