[Python-Dev] backporting string changes to 2.2.3