From 454350ff6d4351c573addb93377f9794d26c7c79 Mon Sep 17 00:00:00 2001 From: Jens Rosenboom Date: Tue, 19 Jul 2016 12:10:26 +0200 Subject: [PATCH] Fix python35 job failures - Installation of the cryptography module fails on Ubuntu Xenial because the libssl-dev package needs to be installed first, so we add this to other-requirements.txt - inspect.getargspec()` was deprecated in Python 3.0 and will be removed in 3.6 (ETA late 2016). From Python 3.5 it started throwing a deprecation warning which leds some tests failures. Co-Authored-By: Andrey Kurilin Change-Id: Ic094ca5c636af9ac1e212914df910a020d92702d --- novaclient/base.py | 10 +++++----- other-requirements.txt | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/novaclient/base.py b/novaclient/base.py index 6ef271684..14485e5e1 100644 --- a/novaclient/base.py +++ b/novaclient/base.py @@ -23,10 +23,10 @@ import abc import contextlib import copy import hashlib -import inspect import os import threading +from oslo_utils import reflection from oslo_utils import strutils from requests import Response import six @@ -407,14 +407,14 @@ class ManagerWithFind(Manager): detailed = True list_kwargs = {} - list_argspec = inspect.getargspec(self.list) - if 'detailed' in list_argspec.args: + list_argspec = reflection.get_callable_args(self.list) + if 'detailed' in list_argspec: detailed = ("human_id" not in kwargs and "name" not in kwargs and "display_name" not in kwargs) list_kwargs['detailed'] = detailed - if 'is_public' in list_argspec.args and 'is_public' in kwargs: + if 'is_public' in list_argspec and 'is_public' in kwargs: is_public = kwargs['is_public'] list_kwargs['is_public'] = is_public if is_public is None: @@ -422,7 +422,7 @@ class ManagerWithFind(Manager): del tmp_kwargs['is_public'] searches = tmp_kwargs.items() - if 'search_opts' in list_argspec.args: + if 'search_opts' in list_argspec: # pass search_opts in to do server side based filtering. # TODO(jogo) not all search_opts support regex, find way to # identify when to use regex and when to use string matching. diff --git a/other-requirements.txt b/other-requirements.txt index da3ab7f54..5c2a93afa 100644 --- a/other-requirements.txt +++ b/other-requirements.txt @@ -10,6 +10,7 @@ libdbus-1-dev [platform:dpkg] libdbus-glib-1-dev [platform:dpkg] libffi-dev [platform:dpkg] libffi-devel [platform:rpm] +libssl-dev [platform:ubuntu-xenial] libuuid-devel [platform:rpm] locales [platform:debian] python-dev [platform:dpkg]