[issue15373] copy.copy() does not properly copy os.environment

Andrei Kulakov report at bugs.python.org
Sat Jul 3 16:25:16 EDT 2021


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

I think it may be good to deprecate and discourage use of `os.environ.copy()`, and add a new method `os.environ.asdict()`. And possibly have `__copy__` raise an error pointing users to `os.environ.asdict()`.

I'm not sure what to do about pickling.

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15373>
_______________________________________


More information about the Python-bugs-list mailing list