Message414134
> 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. |
|
Date |
User |
Action |
Args |
2022-02-27 02:35:42 | methane | set | recipients:
+ methane, serhiy.storchaka |
2022-02-27 02:35:42 | methane | set | messageid: <1645929342.02.0.669268178347.issue46864@roundup.psfhosted.org> |
2022-02-27 02:35:42 | methane | link | issue46864 messages |
2022-02-27 02:35:41 | methane | create | |
|