From b301b1f3f0a6d4a8fec9ed9fed5bab44292f4d30 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 10 Jan 2025 11:51:19 +0800 Subject: [PATCH] Revert "remove custom encoding warning after python 3.10+" This reverts commit cb6b56040dfc0fcbdacc41d886037868924f80ec. --- src/monty/io.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/monty/io.py b/src/monty/io.py index 1f3981d9..1b454899 100644 --- a/src/monty/io.py +++ b/src/monty/io.py @@ -22,6 +22,9 @@ from typing import IO, Any, Iterator, Union +class EncodingWarning(Warning): ... # Added in Python 3.10 + + def zopen( filename: Union[str, Path], /,