python3: Introduce py33 to tox.ini

Introduce py33 to tox.ini to make testing with
python3 easier.

Change-Id: Ibffa28107fdf1d1ae88223d84de4a7282c7882e0
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Remove explicit distribute depend.

Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.

Change-Id: If1a97a574dbc0370a0a2de5d99a92610b048907d
Merge "python3: Introduce py33 to tox.ini"
Fixes re-auth flow with expired tokens.

The re-authentication of expired tokens assumed that the 401 would
always occur on the first HTTP at tempt. This fix changes that so that
re-auth is still only attempted once, but no longer has to be on the
first attempt.

Change-Id: I93a1187da3637287a803a59c146256d4f543c9d5
Fixes: bug #1131142
Merge "Fixes re-auth flow with expired tokens."
add optional 'response_dict' parameters to many calls into which they'll
return a dictionary of the response status, reason and headers

Change-Id: I35f8824537f0484362dd6646c91789fac02fa075
Merge "Remove explicit distribute depend."
add -t for totals to list command and --lh to stat

Change-Id: Ieaba5e7762032bf9a2652ead39870d55e85b4672
Add -p option to download command.

Allow the ability to download a subset of containers (--all with -p) or
a subset of objects within a container (container name with -p).

This patch also includes a drive-by fix for "download --all" which would
not actually download any objects (for me, at least) because the object
queue got filled with "stop" messages before the container workers had
run long enough to put work in the object queue.  Doh!

I also closed up a few holes where an (unexpected, obviously) Exception
could cause the process to hang because non-daemon threads still
existed.

Change-Id: I71c6935c60282b5353badc2dfce8a935d47e3bb7
Add *.swp into .gitignore

Change-Id: I76c92d82647ac9d042f6c117918feb5820a47678
Merge "Add *.swp into .gitignore"
Merge "Add -p option to download command."
Allow storage url override for both auth vers.

When --os-storage-url is specified on the command-line to bin/swift, it
will override the used storage URL regardless of authentication for both
authentication version 1 and version 2.  This can be used to bypass a
load-balancer to hit a specific proxy server for testing/debugging
purposes.

Within the client library, this feature is accessed by passing the
desired storage URL into swiftclient.client.Conection.__init__() via the
os_options keyword argument.  For example:

  conn = Connection(auth_url, user, key, os_options={
    'object_storage_url': 'http://overridden.storage.url/AUTH_foo'})

This patch also adds a dependency on mock>=0.8.0, which is the same as
openstack/swift.

Change-Id: Id2a36ed6abffd65e7762b6beea5bbfc6c036e848
Note '-V 2' is necessary for auth 2.0

Here are some questions in Launchpad, just because they miss '-V 2' for
auth 2.0.
https://answers.launchpad.net/swift/+question/231938
https://answers.launchpad.net/swift/+question/231279
So I add somethins for noteing people add the '-V 2'

Change-Id: I2e0fef969be4eca316975de03fdbc516a1069acf
Allow setting # of retries in the binary

Change-Id: I7ef4f1f86cc6ea4937043ea7bf7d9526e23bd2c7
Merge "Allow storage url override for both auth vers."
Merge "Allow setting # of retries in the binary"
Adds max-backoff for retries in Connection.

The max-backoff concept prevents the backoff used in _retry to double infinitely (which in turn causes wait times of an hour or more between retries).

As per review, changed code to use min instead.

Fixes: bug #1183542

Change-Id: Ic084f54069b7fa7a33604741487045c5e697ff06
Refuse carriage return in header value

See bug #1188896.
Comparing with Curl and Django, they both refuse carriage returns in
header values, so the request() method on the HTTP(S)Connection instance
returned by swiftclient.client.http_connection() will raise an
InvalidHeadersException if any of the headers to be sent contain a
newline.

Drive-by fix for a couple of header values which were integers instead
of strings (Content-Length getting set to zero).

Fixes bug #1188896

Change-Id: Ic6afdb92882284f843aacb06d20f682ddcb47151
Merge "Adds max-backoff for retries in Connection."