remove definitions of Python Source Code Encoding

I think PEP 0263 (http://legacy.python.org/dev/peps/pep-0263/) is
not used anywhere else and so it should be removed.

Change-Id: Ic2c2b284cc80e3db4380fda6f81d45f6d57f2d02
Bump hacking to version 0.9.2

Change-Id: I646d9393beca6e2da430a6e051b587311b5cb61e
Add disconnect modification support to exception handling

This patch backports an additional feature from the
SQLAlchemy 0.9.7 handle_error() event, the ability to alter the
"is disconnect" status of an exception.  In this case, the
supported case is only to take an exception that's not a disconnect,
and to graduate it to a disconnect.  Going in the other direction
isn't possible with the approach here because the connection invalidation
would already have taken place, as we are wrapping the _handle_dbapi_error()
method.

We may want to be able to promote an exception to "is disconnect" in
cases where special database configurations or backends such as that of
Percona have complex detection scenarios not covered by SQLAlchemy's
provided backends.

partially implement bp: use-events-for-error-wrapping

Change-Id: I23a4da2dc39af015a01d6d587c57c5e1c4b95f31
Integrate the ping listener into the filter system.

Replace the use of the connection pool "checkout" event
for "pinging" a connection with the use of the Connection.begin()
event.  This event corresponds to the start of a transaction, so
will "ping" the connection for every transaction rather than just
on checkout, and by running at the level of Connection rather
than the pool, we have access to the whole range of services we
need, including that we can emit a core "select([1])" that will
work on all backends, we get the use of the handle_error() event,
and we get the built in checking for "is disconnect" as well
as the engine/pool being invalidated or disposed as is appropriate
for the SQLAlchemy version in use.  The begin() event is a safe
place to recycle the connection from an invalid state back to
a ready state.

partially implement bp: use-events-for-error-wrapping

Change-Id: Ic29e12f1288f084a5e727101686dd71b12a5787b
Port _is_db_connection_error check to exception filters

The last part where we are handling DB exceptions is the
_is_db_connection_error() function, which is called within a retry
loop inside of session.create_engine() to perform an initial
connection test.  SQLAlchemy currently does not run "connect"
errors through the exception handling system.  In order to have
these exceptions participate in the filtering system, add
a new function handle_connect_error(engine) which runs
engine.connect() and feeds the exception into the
handler(context) system directly, producing a compatible context
that the filters can use.   Refactor the looping mechanism within
session.create_engine() into a separate function _test_connection()
so that the logic is encapsulated and can be tested.

partially implement bp: use-events-for-error-wrapping

Change-Id: Iad1bac9d0f9202b21e4c9c170aa84494b770728d
Raise DBReferenceError on foreign key violation

SQLAlchemy session code now parses foreign key violations and returns a
new custom exception so we can track them.

Change-Id: If5610b5743203a5c34ac7df240e5332c39911c4a
Allow tox tests with complex OS_TEST_DBAPI_CONNECTION URLs

In particular, this allows OS_TEST_DBAPI_ADMIN_CONNECTION URLs with
alternate drivers like mysql+mysqlconnector://... to survive through
into OS_TEST_DBAPI_CONNECTION for the actual unittest.

Change-Id: I712d9366e616a551f4b2bd225de42469a35b363f
Specify raise_on_warnings=False for mysqlconnector

mysqlconnector driver in sqlalchemy <1.0 uses the wrong default value
for raise_on_warnings.  With raise_on_warnings=True, many things we
expect to be warnings become fatal (like DROP DATABASE IF EXISTS
non_existent_db).

See https://bitbucket.org/zzzeek/sqlalchemy/issue/2515 for upstream bug.

Change-Id: Ic29c9bb6c692952640e3948f5ce31290e158068f
Updated from global requirements

Change-Id: I4eed49a24f716b51093dbf52a3706cd0409ca6d9
Remove sqla_07 from tox.ini

Remove support of sqla_07 test according to global requirements

Change-Id: I1c4817c28b779bdb6467e346a38147b193f58a38
Use SQLAlchemy cursor execute events for tracing

This change provides a consistent
system of intercepting statement executions, gaining information
about the current stack trace, and then injecting that information
either into the statement and/or logging it.   The system
works for any backend without the need to code to DBAPI
details or monkeypatching of the cursor.

Change-Id: If80db9a0a898d2cb94837ff059fc054590050506
Merge "Add disconnect modification support to exception handling"
Merge "Updated from global requirements"
Merge "Integrate the ping listener into the filter system."
Merge "Port _is_db_connection_error check to exception filters"
Merge "Use SQLAlchemy cursor execute events for tracing"
Merge "Raise DBReferenceError on foreign key violation"
Merge "Bump hacking to version 0.9.2"
Imported Translations from Transifex

Change-Id: I4f7fa49a954d773b2f8784511cc9017ed9226e7c
oslo.db.api module documentation

Change-Id: Ibd94d9d8e7f2930f55401cf556a41e41198d4be1