summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.mailmap3
-rw-r--r--AUTHORS10
-rw-r--r--ChangeLog33
-rw-r--r--lower-constraints.txt6
-rw-r--r--releasenotes/notes/360_notes-1ec385df13a3a735.yaml40
-rw-r--r--requirements.txt7
-rw-r--r--setup.cfg2
-rw-r--r--setup.py14
-rwxr-xr-xswiftclient/shell.py11
-rw-r--r--tests/unit/test_shell.py35
10 files changed, 128 insertions, 33 deletions
diff --git a/.mailmap b/.mailmap
index 9e53d38..ecbcad1 100644
--- a/.mailmap
+++ b/.mailmap
@@ -58,7 +58,8 @@ Madhuri Kumari <madhuri.rai07@gmail.com> madhuri <madhuri@madhuri-VirtualBox.(no
Morgan Fainberg <morgan.fainberg@gmail.com> <m@metacloud.com>
Hua Zhang <zhuadl@cn.ibm.com> <zhuadl@cn.ibm.com>
Yummy Bian <yummy.bian@gmail.com> <yummy.bian@gmail.com>
-Alistair Coles <alistair.coles@hpe.com> <alistair.coles@hp.com>
+Alistair Coles <alistairncoles@gmail.com> <alistair.coles@hp.com>
+Alistair Coles <alistairncoles@gmail.com> <alistair.coles@hpe.com>
Tong Li <litong01@us.ibm.com> <litong01@us.ibm.com>
Paul Luse <paul.e.luse@intel.com> <paul.e.luse@intel.com>
Yuan Zhou <yuan.zhou@intel.com> <yuan.zhou@intel.com>
diff --git a/AUTHORS b/AUTHORS
index 388d870..abc21e9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,7 +2,7 @@ Alessandro Pilotti (ap@pilotti.it)
Alex Gaynor (alex.gaynor@gmail.com)
Alexandra Settle (alexandra.settle@rackspace.com)
Alexis Lee (lxsli@hpe.com)
-Alistair Coles (alistair.coles@hpe.com)
+Alistair Coles (alistairncoles@gmail.com)
Andreas Jaeger (aj@suse.de)
Andrew Welleck (awellec@us.ibm.com)
Andy McCrae (andy.mccrae@gmail.com)
@@ -12,6 +12,7 @@ Ben McCann (ben@benmccann.com)
Cedric Brandily (zzelle@gmail.com)
Chaozhe.Chen (chaozhe.chen@easystack.cn)
Charles Hsu (charles0126@gmail.com)
+Chen (dstbtgagt@foxmail.com)
Cheng Li (shcli@cn.ibm.com)
Chmouel Boudjnah (chmouel@enovance.com)
Chris Buccella (chris.buccella@antallagon.com)
@@ -35,6 +36,7 @@ Dirk Mueller (dirk@dmllr.de)
Donagh McCabe (donagh.mccabe@hpe.com)
Doug Hellmann (doug@doughellmann.com)
EdLeafe (ed@leafe.com)
+Erik Olof Gunnar Andersson (eandersson@blizzard.com)
Fabien Boucher (fabien.boucher@enovance.com)
Feng Liu (mefengliu23@gmail.com)
Flavio Percoco (flaper87@gmail.com)
@@ -71,6 +73,7 @@ Kota Tsuyuzaki (tsuyuzaki.kota@lab.ntt.co.jp)
Kun Huang (gareth@unitedstack.com)
Leah Klearman (lklrmn@gmail.com)
Li Riqiang (lrqrun@gmail.com)
+lingyongxu (lyxu@fiberhome.com)
liuyamin (liuyamin@fiberhome.com)
Luis de Bethencourt (luis@debethencourt.com)
M V P Nitesh (m.nitesh@nectechnologies.in)
@@ -83,10 +86,12 @@ Matthew Oliver (matt@oliver.net.au)
Matthieu Huin (mhu@enovance.com)
Mike Widman (mwidman@endurancewindpower.com)
Min Min Ren (rminmin@cn.ibm.com)
+mmcardle (mark.mcardle@sohonet.com)
Mohit Motiani (mohit.motiani@intel.com)
Monty Taylor (mordred@inaugust.com)
Nandini Tata (nandini.tata@intel.com)
Nelson Marcos (nelsonmarcos@gmail.com)
+Nguyen Hai (nguyentrihai93@gmail.com)
Nguyen Hung Phuong (phuongnh@vn.fujitsu.com)
Nick Craig-Wood (nick@craig-wood.com)
Ondrej Novy (ondrej.novy@firma.seznam.cz)
@@ -110,6 +115,7 @@ Sean Dague (sean@dague.net)
Sergey Gotliv (sgotliv@redhat.com)
Sergio Cazzolato (sergio.j.cazzolato@intel.com)
Shane Wang (shane.wang@intel.com)
+shangxiaobj (shangxiaobj@inspur.com)
Shashi Kant (shashi.kant@nectechnologies.in)
Shashirekha Gundur (shashirekha.j.gundur@intel.com)
shu-mutou (shu-mutou@rf.jp.nec.com)
@@ -129,11 +135,13 @@ Tim Burke (tim.burke@gmail.com)
Timur Alperovich (timuralp@swiftstack.com)
Tong Li (litong01@us.ibm.com)
Tony Breeds (tony@bakeyournoodle.com)
+Tovin Seven (vinhnt@vn.fujitsu.com)
Tristan Cacqueray (tristan.cacqueray@enovance.com)
Vasyl Khomenko (vasiliyk@yahoo-inc.com)
venkatamahesh (venkatamaheshkotha@gmail.com)
Victor Stinner (victor.stinner@enovance.com)
Vitaly Gridnev (vgridnev@mirantis.com)
+wangqi (wang.qi@99cloud.net)
wangxiyuan (wangxiyuan@huawei.com)
Wu Wenxiang (wu.wenxiang@99cloud.net)
YangLei (yanglyy@cn.ibm.com)
diff --git a/ChangeLog b/ChangeLog
index efa7e8a..a37a6db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+3.6.0
+-----
+
+* Add the `--prompt` option for the CLI which will cause the user to be
+ prompted to enter a password. Any password otherwise specified by
+ `--key`, `--os-password` or an environment variable will be ignored.
+
+* Added bash completion support to the `swift` CLI. Enable this by sourcing
+ the included `tools/swift.bash_completion` file. Make it permanent by
+ including this file in the system's `/etc/bash_completion.d` directory.
+
+* Add ability to generate a temporary URL with an IP range restriction.
+ TempURLs with IP restrictions are supported in Swift 2.19.0 or later.
+
+* The client.py SDK now supports a `query_string` option on the
+ `head_object()` method. This is useful for finding information on
+ SLO/DLO manifests without fetching the entire manifest.
+
+* The client.py SDK now respects `region_name` when using sessions.
+
+* Added a `.close()` method to an object response, allowing clients to give
+ up on reading the rest of the response body, if they so choose.
+
+* Fixed a bug where using `--debug` in the CLI with unicode account names
+ would cause a client crash.
+
+* Make OS_AUTH_URL work in DevStack (for testing) by default.
+
+* Dropped Python 3.4 testing.
+
+* Various other minor bug fixes and improvements.
+
+
3.5.0
-----
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 6488b28..9aae792 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -28,14 +28,14 @@ pep8==1.5.7
PrettyTable==0.7
pyflakes==0.8.1
Pygments==2.2.0
-python-keystoneclient==3.8.0
+python-keystoneclient==0.7.0
python-mimeparse==1.6.0
python-subunit==1.0.0
pytz==2013.6
PyYAML==3.12
reno==2.5.0
-requests==2.14.2
-six==1.10.0
+requests==1.1.0
+six==1.9.0
snowballstemmer==1.2.1
sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
diff --git a/releasenotes/notes/360_notes-1ec385df13a3a735.yaml b/releasenotes/notes/360_notes-1ec385df13a3a735.yaml
new file mode 100644
index 0000000..8d82b06
--- /dev/null
+++ b/releasenotes/notes/360_notes-1ec385df13a3a735.yaml
@@ -0,0 +1,40 @@
+---
+features:
+ - |
+ Add the ``--prompt`` option for the CLI which will cause the user to be
+ prompted to enter a password. Any password otherwise specified by
+ ``--key`` , ``--os-password`` or an environment variable will be ignored.
+
+ - |
+ Added bash completion support to the ``swift`` CLI. Enable this by sourcing
+ the included ``tools/swift.bash_completion`` file. Make it permanent by
+ including this file in the system's ``/etc/bash_completion.d`` directory.
+
+ - |
+ Add ability to generate a temporary URL with an IP range restriction.
+ TempURLs with IP restrictions are supported are Swift 2.19.0 or later.
+
+ - |
+ The client.py SDK now supports a ``query_string`` option on the
+ ``head_object()`` method. This is useful for finding information on
+ SLO/DLO manifests without fetching the entire manifest.
+
+ - |
+ The client.py SDK now respects ``region_name`` when using sessions.
+
+ - |
+ Added a ``.close()`` method to an object response, allowing clients to give
+ up on reading the rest of the response body, if they so choose.
+
+ - |
+ Fixed a bug where using ``--debug`` in the CLI with unicode account names
+ would cause a client crash.
+
+ - |
+ Make OS_AUTH_URL work in DevStack (for testing) by default.
+
+ - |
+ Dropped Python 3.4 testing.
+
+ - |
+ Various other minor bug fixes and improvements.
diff --git a/requirements.txt b/requirements.txt
index 6b52791..1c2ce33 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -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
-requests>=2.14.2 # Apache-2.0
-six>=1.10.0 # MIT
+requests>=1.1.0
+six>=1.9.0
diff --git a/setup.cfg b/setup.cfg
index 2ac5f9c..ddb64a0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -33,7 +33,7 @@ data_files =
[extras]
keystone =
- python-keystoneclient>=3.8.0 # Apache-2.0
+ python-keystoneclient>=0.7.0
[entry_points]
console_scripts =
diff --git a/setup.py b/setup.py
index 518f1d3..16a18f6 100644
--- a/setup.py
+++ b/setup.py
@@ -17,16 +17,10 @@
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools, sys
-import setuptools
-
-# In python < 2.7.4, a lazy loading of package `pbr` will break
-# setuptools if some other modules registered functions in `atexit`.
-# solution from: http://bugs.python.org/issue15881#msg170215
-try:
- import multiprocessing # noqa
-except ImportError:
- pass
+if sys.version_info < (2, 7):
+ sys.exit('Sorry, Python < 2.7 is not supported for'
+ ' python-swiftclient>=3.0')
setuptools.setup(
- setup_requires=['pbr>=2.0.0'],
+ setup_requires=['pbr'],
pbr=True)
diff --git a/swiftclient/shell.py b/swiftclient/shell.py
index ff5b2be..9ca28b1 100755
--- a/swiftclient/shell.py
+++ b/swiftclient/shell.py
@@ -1942,9 +1942,14 @@ Examples:
parser.usage = globals()['st_%s_help' % args[0]]
if options['insecure']:
import requests
- from requests.packages.urllib3.exceptions import \
- InsecureRequestWarning
- requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
+ try:
+ from requests.packages.urllib3.exceptions import \
+ InsecureRequestWarning
+ except ImportError:
+ pass
+ else:
+ requests.packages.urllib3.disable_warnings(
+ InsecureRequestWarning)
try:
globals()['st_%s' % args[0]](parser, argv[1:], output)
except ClientException as err:
diff --git a/tests/unit/test_shell.py b/tests/unit/test_shell.py
index 8c995e5..91496b8 100644
--- a/tests/unit/test_shell.py
+++ b/tests/unit/test_shell.py
@@ -14,8 +14,8 @@
# limitations under the License.
from __future__ import unicode_literals
+import contextlib
from genericpath import getmtime
-
import getpass
import hashlib
import json
@@ -27,7 +27,6 @@ import unittest
import textwrap
from time import localtime, mktime, strftime, strptime
-from requests.packages.urllib3.exceptions import InsecureRequestWarning
import six
import sys
@@ -44,6 +43,10 @@ from swiftclient.utils import (
EMPTY_ETAG, EXPIRES_ISO8601_FORMAT,
SHORT_EXPIRES_ISO8601_FORMAT, TIME_ERRMSG)
+try:
+ from requests.packages.urllib3.exceptions import InsecureRequestWarning
+except ImportError:
+ InsecureRequestWarning = None
if six.PY2:
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
+@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)
class TestShell(unittest.TestCase):
def setUp(self):
@@ -2529,8 +2546,7 @@ class TestKeystoneOptions(MockHttpTest):
_make_fake_import_keystone_client(fake_ks)), \
mock.patch('swiftclient.client.http_connection', fake_conn), \
mock.patch.dict(os.environ, env, clear=True), \
- mock.patch('requests.packages.urllib3.disable_warnings') as \
- mock_disable_warnings:
+ patch_disable_warnings() as mock_disable_warnings:
try:
swiftclient.shell.main(args)
except SystemExit as e:
@@ -2538,11 +2554,12 @@ class TestKeystoneOptions(MockHttpTest):
except SwiftError as err:
self.fail('Unexpected SwiftError: %s' % err)
- if 'insecure' in flags:
- self.assertEqual([mock.call(InsecureRequestWarning)],
- mock_disable_warnings.mock_calls)
- else:
- self.assertEqual([], mock_disable_warnings.mock_calls)
+ if InsecureRequestWarning is not None:
+ if 'insecure' in flags:
+ self.assertEqual([mock.call(InsecureRequestWarning)],
+ mock_disable_warnings.mock_calls)
+ else:
+ self.assertEqual([], mock_disable_warnings.mock_calls)
if no_auth:
# check that keystone client was not used and terminate tests