> But some programs can still work with encoded bytes instead of strings. In particular os.environ and os.environb are implemented as dict of bytes on non-Windows.
This change doesn't affect to os.environ.
os.environ[key] does `key.encode(sys.getfilesystemencoding(), "surrogateescape")` internally. So the encoded key doesn't have cached hash.
On the other hand, dict (`self._data`) has own hash cache. So it don't use hash cached in the bytes objects.
On the other hand, this change will affect `os.environb[key]` if key is used repeatedly. |