diff --git a/cloudpathlib/cloudpath.py b/cloudpathlib/cloudpath.py index 72348bc2..b2241b61 100644 --- a/cloudpathlib/cloudpath.py +++ b/cloudpathlib/cloudpath.py @@ -2,7 +2,6 @@ from collections import defaultdict import collections.abc from contextlib import contextmanager -import io import os from pathlib import ( # type: ignore Path, @@ -637,8 +636,6 @@ def write_text( if not isinstance(data, str): raise TypeError("data must be str, not %s" % data.__class__.__name__) - encoding = io.text_encoding(encoding) - with self.open(mode="w", encoding=encoding, errors=errors, newline=newline) as f: return f.write(data)