Merge rev 40737 from 3.6 branch.
Tim Peters authored
Note that nailing the type of oid to str may allow some
thread simplifications in Connection._invalidated handling.
Thanks to Florent Guillaume for noticing!
95a3a6a6