test__locale is not resetting the locale after running the tests. This patch saves and then restores the old locale. It is mostly similar to http://python.org/sf/1007539: : I just wrapped the block from 'saw_locale' to 'raise ImportError' in a try: finally: block and used LC_NUMERIC instead of LC_ALL.