remove miscellaneous PY2 code

This commit is contained in:
Richard van der Hoff 2020-05-15 19:17:06 +01:00
parent e6027562e2
commit d4676910c9
6 changed files with 24 additions and 67 deletions

View file

@ -15,11 +15,9 @@
# limitations under the License.
import logging
from sys import intern
from typing import Callable, Dict, Optional
import six
from six.moves import intern
import attr
from prometheus_client.core import Gauge
@ -154,9 +152,6 @@ def intern_string(string):
return None
try:
if six.PY2:
string = string.encode("ascii")
return intern(string)
except UnicodeEncodeError:
return string