Setup localization properly

To start translation of swift, we need to initially import the
translation file - and place it at the proper place so that
the usual CI scripts can handle it.

The proper place is for all python projects
$PROJECT/locale/$PROJECT.pot, so move locale/$PROJECT.pot to the new
location and regenerate the file.

Update setup.cfg with the new paths.

Further imports will be done by the OpenStack Proposal bot.

Change-Id: Ide4da91f2af71db529f4a06d6b1e30ba79883506
Partial-Bug: #608725
Closes-Bug: #1082805
Avoid usage of insecure mktemp() function

This patch eliminates the use of the deprecated and insecure
tempfile.mktemp() function.  It has been replaced with secure
alternatives where temporary files are actually required.

Change-Id: I0a13d6d44cd1abc4b66fa33f39eea407617a01d5
SecurityImpact
Closes-bug: #1348869
code shuffle post expired headers refactor

Change-Id: I62248d7d3d7e0a3696a30e3d567ac6c2bea3c8eb
fix my name in AUTHORS

My author name is my gmail account name, change it to my real name.

Change-Id: Iafd94f694f7d007c54de086941309b119683f6cb
Small Fix for FakeServerConnection

Current FakeServerConnection might cause 499 error
in some unit tests because sent (put) data will be
overridden by new one every time.
e.g. When calling conn.queue.put() twice and more in
an object PUT sequence, we can use only a last chunk as
the body. This fixes it to merge all chunks as a body.

Change-Id: I463e9e2b454e3f3eb26950b3af4c8b8167a9a971
Combine acc/cont put_* methods and fix their lock problem.

The container backend is supposed to build a pending file and,
when it gets to a certain size, flush it all at once into the
sqlite db. Before this fix, many concurrent threads would ask
what the pending file size is to see if they should flush
instead of just appending to the pending file. The problem is
that many would ask, find it's too big, and try to get a lock.
The first one wins, flushes, but all the other waiting threads
still think they have to flush- which is a much slower opertaion
than just the append. This change gets the lock first and makes
sure that merge_items is only called when the pending file is full.

Change-Id: I29cfa13a48c8f7d16dd414b2288d50461adbafd2
Fix last_modified_date_to_timestamp on non-UTC systems

Before, we were calling datetime.datetime.strftime('%s.%f') to convert
a datetime to epoch seconds + microseconds. However, the '%s' format
isn't actually part of Python's library. Rather, Python passes that on
to the system C library, which is typically glibc. Now, glibc takes
the '%s' format and helpfully* applies the current timezone as an
offset. This gives bogus results on machines where UTC is not the
system timezone. (Yes, some people really do that.)

For example:

    >>> import os
    >>> from swift.common import utils
    >>> os.environ['TZ'] = 'PST8PDT,M3.2.0,M11.1.0'
    >>> float(utils.last_modified_date_to_timestamp('1970-01-01T00:00:00.000000'))
    28800.0
    >>>

That timestamp should obviously be 0.

This patch replaces the strftime() call with datetime arithmetic,
which is entirely in Python so the system timezone doesn't mess it up.

* unhelpfully

Change-Id: I56855acd79a5d8f2c98a771fa9fd2729e4f490b1
Check for change before container replicator updates db

As described in the related bug report, unnecessary updates
to the container db during replication can impact object
object GET performance in certain circumstances.

This patch changes swift/container/replicator.py so that
calls to merge_timestamps and update_reconciler_sync
are conditional on values having actually changed.

Related-Bug: 1332025
Change-Id: If498251656500ed7a3d7ca4b109ea1079b8513c2
warn against sorting requirements

Change-Id: I64ae9191863564e278a35d42ec9cd743a233028e
Closes-Bug: 1365061
Spelling mistakes corrected in comments.

Change-Id: Ibbd7511c3a2b08519feb4db18eca6e000603ea32
Merge "code shuffle post expired headers refactor"
Merge "fix my name in AUTHORS"
Merge "warn against sorting requirements"
Merge "Avoid usage of insecure mktemp() function"
Merge "Spelling mistakes corrected in comments."
Merge "Small Fix for FakeServerConnection"
Error limit the right node on object PUT

If any node had an error on object PUT, the proxy would count the
error against the last-connected-to node instead of the one with the
error. Now it counts the error against the right node.

Change-Id: I884eb73cebe0c723473a6d5e390a148fcad0d3ed
Merge "Fix last_modified_date_to_timestamp on non-UTC systems"
Merge "Combine acc/cont put_* methods and fix their lock problem."
Merge "Error limit the right node on object PUT"