Avoid "LookupError: unknown encoding: ascii" when open() called in a destructor (#1012)
The existing code often causes "LookupError: unknown encoding: ascii" when open() called in a destructor. Saving open in self.open is not enough to avoid this. Instead, we can avoid reopening /dev/null every time by doing it once when the module is loaded.
Y
yieldthought committed
7eff42c2397e0d084544a39870cf07266c371970
Parent: 1eaace8
Committed by GitHub <noreply@github.com>
on 1/15/2024, 3:52:10 PM