codekingpro/portable-devtools
114k
1import sys2 3# Explicitly use the ``"locale"`` encoding in versions that support it,4# otherwise just rely on the implicit handling of ``encoding=None``.5# Since all platforms that support ``EncodingWarning`` also support6# ``encoding="locale"``, this can be used to suppress the warning.7# However, please try to use UTF-8 when possible8# (.pth files are the notorious exception: python/cpython#77102, pypa/setuptools#3937).9LOCALE_ENCODING = "locale" if sys.version_info >= (3, 10) else None10 