Antoine Pitrou added the comment: The environ class could have its own lock and then the __iter__ method could be rewritten as follows:
def __iter__(self): with self._lock: keys = list(self._data) for key in keys: yield self.decodekey(key) ---------- nosy: +pitrou versions: +Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30441> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com