HubobelsPython/venv/lib/python3.9/site-packages/service_identity/_compat.py
2022-01-02 21:50:48 +01:00

16 lines
308 B
Python

"""
Avoid depending on any particular Python 3 compatibility approach.
"""
import sys
PY3 = sys.version_info[0] == 3
if PY3: # pragma: nocover
maketrans = bytes.maketrans
text_type = str
else: # pragma: nocover
import string
maketrans = string.maketrans
text_type = unicode # noqa