``has_key`` has been deprecated in Python3, use simple ``in`` instead.

Found by 2to3 and python -3.
I don't think so. We use os.environ a lot, and it's fine with strings.

Python 3 overall is much more consistent with strings, I might expect such weirdness for Python 2 :-)