Improve Python 3.x compatibility
Improve Python 3.x compatibility

Mechanical translation of deprecated constructs
to 3.x compatible variants.

Change-Id: I4988d0ac656903e0d0320aaa8361d4eeb774a0f9

varunarya10/oslo.db,JioCloud/oslo.db,malor/oslo.db,magic0704/oslo.db,openstack/oslo.db,openstack/oslo.db,akash1808/oslo.db,vikt0rs/oslo.db