Merge "Back out some version bumps"

This commit is contained in:
Zuul
2018-07-24 23:12:51 +00:00
committed by Gerrit Code Review
6 changed files with 44 additions and 31 deletions

View File

@@ -28,14 +28,14 @@ pep8==1.5.7
PrettyTable==0.7 PrettyTable==0.7
pyflakes==0.8.1 pyflakes==0.8.1
Pygments==2.2.0 Pygments==2.2.0
python-keystoneclient==3.8.0 python-keystoneclient==0.7.0
python-mimeparse==1.6.0 python-mimeparse==1.6.0
python-subunit==1.0.0 python-subunit==1.0.0
pytz==2013.6 pytz==2013.6
PyYAML==3.12 PyYAML==3.12
reno==2.5.0 reno==2.5.0
requests==2.14.2 requests==1.1.0
six==1.10.0 six==1.9.0
snowballstemmer==1.2.1 snowballstemmer==1.2.1
sphinx==1.6.2 sphinx==1.6.2
sphinxcontrib-websupport==1.0.1 sphinxcontrib-websupport==1.0.1

View File

@@ -1,6 +1,3 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
requests>=2.14.2 # Apache-2.0 requests>=1.1.0
six>=1.10.0 # MIT six>=1.9.0

View File

@@ -33,7 +33,7 @@ data_files =
[extras] [extras]
keystone = keystone =
python-keystoneclient>=3.8.0 # Apache-2.0 python-keystoneclient>=0.7.0
[entry_points] [entry_points]
console_scripts = console_scripts =

View File

@@ -17,16 +17,10 @@
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT # THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools, sys import setuptools, sys
import setuptools if sys.version_info < (2, 7):
sys.exit('Sorry, Python < 2.7 is not supported for'
# In python < 2.7.4, a lazy loading of package `pbr` will break ' python-swiftclient>=3.0')
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
setuptools.setup( setuptools.setup(
setup_requires=['pbr>=2.0.0'], setup_requires=['pbr'],
pbr=True) pbr=True)

View File

@@ -1942,9 +1942,14 @@ Examples:
parser.usage = globals()['st_%s_help' % args[0]] parser.usage = globals()['st_%s_help' % args[0]]
if options['insecure']: if options['insecure']:
import requests import requests
from requests.packages.urllib3.exceptions import \ try:
InsecureRequestWarning from requests.packages.urllib3.exceptions import \
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) InsecureRequestWarning
except ImportError:
pass
else:
requests.packages.urllib3.disable_warnings(
InsecureRequestWarning)
try: try:
globals()['st_%s' % args[0]](parser, argv[1:], output) globals()['st_%s' % args[0]](parser, argv[1:], output)
except ClientException as err: except ClientException as err:

View File

@@ -14,8 +14,8 @@
# limitations under the License. # limitations under the License.
from __future__ import unicode_literals from __future__ import unicode_literals
import contextlib
from genericpath import getmtime from genericpath import getmtime
import getpass import getpass
import hashlib import hashlib
import json import json
@@ -27,7 +27,6 @@ import unittest
import textwrap import textwrap
from time import localtime, mktime, strftime, strptime from time import localtime, mktime, strftime, strptime
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import six import six
import sys import sys
@@ -44,6 +43,10 @@ from swiftclient.utils import (
EMPTY_ETAG, EXPIRES_ISO8601_FORMAT, EMPTY_ETAG, EXPIRES_ISO8601_FORMAT,
SHORT_EXPIRES_ISO8601_FORMAT, TIME_ERRMSG) SHORT_EXPIRES_ISO8601_FORMAT, TIME_ERRMSG)
try:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
except ImportError:
InsecureRequestWarning = None
if six.PY2: if six.PY2:
BUILTIN_OPEN = '__builtin__.open' BUILTIN_OPEN = '__builtin__.open'
@@ -114,6 +117,20 @@ def _make_cmd(cmd, opts, os_opts, use_env=False, flags=None, cmd_args=None):
return args, env return args, env
@contextlib.contextmanager
def patch_disable_warnings():
if InsecureRequestWarning is None:
# If InsecureRequestWarning isn't available, disbale_warnings won't
# be either; they both came in with
# https://github.com/requests/requests/commit/811ee4e and left again
# in https://github.com/requests/requests/commit/8e17600
yield None
else:
with mock.patch('requests.packages.urllib3.disable_warnings') \
as patched:
yield patched
@mock.patch.dict(os.environ, mocked_os_environ) @mock.patch.dict(os.environ, mocked_os_environ)
class TestShell(unittest.TestCase): class TestShell(unittest.TestCase):
def setUp(self): def setUp(self):
@@ -2529,8 +2546,7 @@ class TestKeystoneOptions(MockHttpTest):
_make_fake_import_keystone_client(fake_ks)), \ _make_fake_import_keystone_client(fake_ks)), \
mock.patch('swiftclient.client.http_connection', fake_conn), \ mock.patch('swiftclient.client.http_connection', fake_conn), \
mock.patch.dict(os.environ, env, clear=True), \ mock.patch.dict(os.environ, env, clear=True), \
mock.patch('requests.packages.urllib3.disable_warnings') as \ patch_disable_warnings() as mock_disable_warnings:
mock_disable_warnings:
try: try:
swiftclient.shell.main(args) swiftclient.shell.main(args)
except SystemExit as e: except SystemExit as e:
@@ -2538,11 +2554,12 @@ class TestKeystoneOptions(MockHttpTest):
except SwiftError as err: except SwiftError as err:
self.fail('Unexpected SwiftError: %s' % err) self.fail('Unexpected SwiftError: %s' % err)
if 'insecure' in flags: if InsecureRequestWarning is not None:
self.assertEqual([mock.call(InsecureRequestWarning)], if 'insecure' in flags:
mock_disable_warnings.mock_calls) self.assertEqual([mock.call(InsecureRequestWarning)],
else: mock_disable_warnings.mock_calls)
self.assertEqual([], mock_disable_warnings.mock_calls) else:
self.assertEqual([], mock_disable_warnings.mock_calls)
if no_auth: if no_auth:
# check that keystone client was not used and terminate tests # check that keystone client was not used and terminate tests