Fix some typos
Change-Id: Iaf7f30a7ae0c2ac76fc5cdcee31ea74c08ce601e
This commit is contained in:
@@ -156,7 +156,7 @@
|
|||||||
* Add context sensitive help
|
* Add context sensitive help
|
||||||
* Relax requirement for tenant_name in get_auth()
|
* Relax requirement for tenant_name in get_auth()
|
||||||
* replace string format arguments with function parameters
|
* replace string format arguments with function parameters
|
||||||
* Removed now unnecesary workaround for PyPy
|
* Removed now unnecessary workaround for PyPy
|
||||||
* Use Emacs-friendly coding line
|
* Use Emacs-friendly coding line
|
||||||
* Remove extra double quote from docstring
|
* Remove extra double quote from docstring
|
||||||
* Fix wrong assertions in unit tests
|
* Fix wrong assertions in unit tests
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
* Make the function tests Python3-import friendly
|
* Make the function tests Python3-import friendly
|
||||||
* Only encode metadata for user customed headers
|
* Only encode metadata for user customed headers
|
||||||
* Add functional tests for python-swiftclient
|
* Add functional tests for python-swiftclient
|
||||||
* Removed a duplicate word in a dostring
|
* Removed a duplicate word in a docstring
|
||||||
* Mock auth_end_time in test_shell.test_download
|
* Mock auth_end_time in test_shell.test_download
|
||||||
* Don't utf8 encode urls
|
* Don't utf8 encode urls
|
||||||
* Fixed several shell tests on Python3
|
* Fixed several shell tests on Python3
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
* Make pbr only a build-time dependency
|
* Make pbr only a build-time dependency
|
||||||
* Add verbose output to all stat commands
|
* Add verbose output to all stat commands
|
||||||
* assertEquals is deprecated, use assertEqual (H602)
|
* assertEquals is deprecated, use assertEqual (H602)
|
||||||
* Skip sniffing and reseting if retry is disabled
|
* Skip sniffing and resetting if retry is disabled
|
||||||
* user defined headers added to swift post queries
|
* user defined headers added to swift post queries
|
||||||
|
|
||||||
1.7.0
|
1.7.0
|
||||||
|
@@ -34,7 +34,7 @@ from swiftclient.exceptions import ClientException
|
|||||||
from swiftclient.utils import (
|
from swiftclient.utils import (
|
||||||
LengthWrapper, ReadableToIterable, parse_api_response)
|
LengthWrapper, ReadableToIterable, parse_api_response)
|
||||||
|
|
||||||
# Defautl is 100, increase to 256
|
# Default is 100, increase to 256
|
||||||
http_client._MAXHEADERS = 256
|
http_client._MAXHEADERS = 256
|
||||||
|
|
||||||
AUTH_VERSIONS_V1 = ('1.0', '1', 1)
|
AUTH_VERSIONS_V1 = ('1.0', '1', 1)
|
||||||
@@ -109,7 +109,7 @@ def parse_header_string(data):
|
|||||||
if isinstance(data, six.text_type):
|
if isinstance(data, six.text_type):
|
||||||
# Under Python2 requests only returns binary_type, but if we get
|
# Under Python2 requests only returns binary_type, but if we get
|
||||||
# some stray text_type input, this should prevent unquote from
|
# some stray text_type input, this should prevent unquote from
|
||||||
# interpretting %-encoded data as raw code-points.
|
# interpreting %-encoded data as raw code-points.
|
||||||
data = data.encode('utf8')
|
data = data.encode('utf8')
|
||||||
try:
|
try:
|
||||||
unquoted = unquote(data).decode('utf8')
|
unquoted = unquote(data).decode('utf8')
|
||||||
@@ -438,11 +438,11 @@ def get_auth(auth_url, user, key, **kwargs):
|
|||||||
Get authentication/authorization credentials.
|
Get authentication/authorization credentials.
|
||||||
|
|
||||||
:kwarg auth_version: the api version of the supplied auth params
|
:kwarg auth_version: the api version of the supplied auth params
|
||||||
:kwarg os_options: a dict, the openstack idenity service options
|
:kwarg os_options: a dict, the openstack identity service options
|
||||||
|
|
||||||
:returns: a tuple, (storage_url, token)
|
:returns: a tuple, (storage_url, token)
|
||||||
|
|
||||||
N.B. if the optional os_options paramater includes a non-empty
|
N.B. if the optional os_options parameter includes a non-empty
|
||||||
'object_storage_url' key it will override the the default storage url
|
'object_storage_url' key it will override the the default storage url
|
||||||
returned by the auth service.
|
returned by the auth service.
|
||||||
|
|
||||||
|
@@ -1028,7 +1028,7 @@ Positional arguments:
|
|||||||
"Temp-URL-Key:b3968d0207b54ece87cccc06515a89d4"\'
|
"Temp-URL-Key:b3968d0207b54ece87cccc06515a89d4"\'
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
--absolute Interpet the <seconds> positional argument as a Unix
|
--absolute Interpret the <seconds> positional argument as a Unix
|
||||||
timestamp rather than a number of seconds in the
|
timestamp rather than a number of seconds in the
|
||||||
future.
|
future.
|
||||||
'''.strip('\n')
|
'''.strip('\n')
|
||||||
|
@@ -16,7 +16,7 @@ import pkg_resources
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# First, try to get our version out of PKG-INFO. If we're installed,
|
# First, try to get our version out of PKG-INFO. If we're installed,
|
||||||
# this'll let us find our version without pulling in pbr. After all, if
|
# this will let us find our version without pulling in pbr. After all, if
|
||||||
# we're installed on a system, we're not in a Git-managed source tree, so
|
# we're installed on a system, we're not in a Git-managed source tree, so
|
||||||
# pbr doesn't really buy us anything.
|
# pbr doesn't really buy us anything.
|
||||||
version_string = pkg_resources.get_provider(
|
version_string = pkg_resources.get_provider(
|
||||||
|
@@ -124,7 +124,7 @@ class TestSwiftReader(testtools.TestCase):
|
|||||||
sr = self.sr('path', BytesIO(b'body'), {})
|
sr = self.sr('path', BytesIO(b'body'), {})
|
||||||
_consume(sr)
|
_consume(sr)
|
||||||
|
|
||||||
# Check error is raised if expected etag doesnt match calculated md5.
|
# Check error is raised if expected etag doesn't match calculated md5.
|
||||||
# md5 for a SwiftReader that has done nothing is
|
# md5 for a SwiftReader that has done nothing is
|
||||||
# d41d8cd98f00b204e9800998ecf8427e i.e md5 of nothing
|
# d41d8cd98f00b204e9800998ecf8427e i.e md5 of nothing
|
||||||
sr = self.sr('path', BytesIO(b'body'), {'etag': 'doesntmatch'})
|
sr = self.sr('path', BytesIO(b'body'), {'etag': 'doesntmatch'})
|
||||||
@@ -134,7 +134,7 @@ class TestSwiftReader(testtools.TestCase):
|
|||||||
{'etag': '841a2d689ad86bd1611447453c22c6fc'})
|
{'etag': '841a2d689ad86bd1611447453c22c6fc'})
|
||||||
_consume(sr)
|
_consume(sr)
|
||||||
|
|
||||||
# Check error is raised if SwiftReader doesnt read the same length
|
# Check error is raised if SwiftReader doesn't read the same length
|
||||||
# as the content length it is created with
|
# as the content length it is created with
|
||||||
sr = self.sr('path', BytesIO(b'body'), {'content-length': 5})
|
sr = self.sr('path', BytesIO(b'body'), {'content-length': 5})
|
||||||
self.assertRaises(SwiftError, _consume, sr)
|
self.assertRaises(SwiftError, _consume, sr)
|
||||||
@@ -279,7 +279,7 @@ class TestServiceDelete(_TestServiceBase):
|
|||||||
'traceback': mock.ANY,
|
'traceback': mock.ANY,
|
||||||
'error_timestamp': mock.ANY
|
'error_timestamp': mock.ANY
|
||||||
})
|
})
|
||||||
# _delete_object doesnt populate attempts or response dict if it hits
|
# _delete_object doesn't populate attempts or response dict if it hits
|
||||||
# an error. This may not be the correct behaviour.
|
# an error. This may not be the correct behaviour.
|
||||||
del expected_r['response_dict'], expected_r['attempts']
|
del expected_r['response_dict'], expected_r['attempts']
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@ class TestServiceUtils(testtools.TestCase):
|
|||||||
def test_process_options_auth_version(self):
|
def test_process_options_auth_version(self):
|
||||||
# auth_version should be set to 2.0
|
# auth_version should be set to 2.0
|
||||||
# if it isnt already set to 3.0
|
# if it isnt already set to 3.0
|
||||||
# and the v1 command line arguments arent present
|
# and the v1 command line arguments aren't present
|
||||||
opt_c = self.opts.copy()
|
opt_c = self.opts.copy()
|
||||||
|
|
||||||
# Check v3 isnt changed
|
# Check v3 isnt changed
|
||||||
@@ -473,7 +473,7 @@ class TestServiceUtils(testtools.TestCase):
|
|||||||
|
|
||||||
def test_process_options_new_style_args(self):
|
def test_process_options_new_style_args(self):
|
||||||
# checks new style args are copied to old style
|
# checks new style args are copied to old style
|
||||||
# when old style dont exist
|
# when old style don't exist
|
||||||
opt_c = self.opts.copy()
|
opt_c = self.opts.copy()
|
||||||
|
|
||||||
opt_c['auth'] = ''
|
opt_c['auth'] = ''
|
||||||
|
@@ -1501,7 +1501,7 @@ class TestConnection(MockHttpTest):
|
|||||||
|
|
||||||
def get_auth(*args, **kwargs):
|
def get_auth(*args, **kwargs):
|
||||||
# this mock, and by extension this test are not
|
# this mock, and by extension this test are not
|
||||||
# represenative of the unit under test. The real get_auth
|
# representative of the unit under test. The real get_auth
|
||||||
# method will always return the os_option dict's
|
# method will always return the os_option dict's
|
||||||
# object_storage_url which will be overridden by the
|
# object_storage_url which will be overridden by the
|
||||||
# preauthurl parameter to Connection if it is provided.
|
# preauthurl parameter to Connection if it is provided.
|
||||||
@@ -2075,7 +2075,7 @@ class TestServiceToken(MockHttpTest):
|
|||||||
def get_auth(self):
|
def get_auth(self):
|
||||||
# The real get_auth function will always return the os_option
|
# The real get_auth function will always return the os_option
|
||||||
# dict's object_storage_url which will be overridden by the
|
# dict's object_storage_url which will be overridden by the
|
||||||
# preauthurl paramater to Connection if it is provided.
|
# preauthurl parameter to Connection if it is provided.
|
||||||
return self.os_options.get('object_storage_url'), 'token'
|
return self.os_options.get('object_storage_url'), 'token'
|
||||||
|
|
||||||
def get_service_auth(self):
|
def get_service_auth(self):
|
||||||
|
@@ -213,7 +213,7 @@ class MockHttpTest(testtools.TestCase):
|
|||||||
self.fake_connect = None
|
self.fake_connect = None
|
||||||
self.request_log = []
|
self.request_log = []
|
||||||
|
|
||||||
# Capture output, since the test-runner stdout/stderr moneky-patching
|
# Capture output, since the test-runner stdout/stderr monkey-patching
|
||||||
# won't cover the references to sys.stdout/sys.stderr in
|
# won't cover the references to sys.stdout/sys.stderr in
|
||||||
# swiftclient.multithreading
|
# swiftclient.multithreading
|
||||||
self.capture_output = CaptureOutput()
|
self.capture_output = CaptureOutput()
|
||||||
|
Reference in New Issue
Block a user