diff --git a/rhodecode/lib/_vendor/jsonlogger/__init__.py b/rhodecode/lib/_vendor/jsonlogger/__init__.py --- a/rhodecode/lib/_vendor/jsonlogger/__init__.py +++ b/rhodecode/lib/_vendor/jsonlogger/__init__.py @@ -125,7 +125,7 @@ class JsonFormatter(ExceptionAwareFormat self.json_ensure_ascii = kwargs.pop("json_ensure_ascii", True) self.prefix = kwargs.pop("prefix", "") reserved_attrs = kwargs.pop("reserved_attrs", RESERVED_ATTRS) - self.reserved_attrs = dict(zip(reserved_attrs, reserved_attrs)) + self.reserved_attrs = dict(list(zip(reserved_attrs, reserved_attrs))) self.timestamp = kwargs.pop("timestamp", True) # super(JsonFormatter, self).__init__(*args, **kwargs) @@ -134,8 +134,8 @@ class JsonFormatter(ExceptionAwareFormat self.json_encoder = JsonEncoder self._required_fields = self.parse() - self._skip_fields = dict(zip(self._required_fields, - self._required_fields)) + self._skip_fields = dict(list(zip(self._required_fields, + self._required_fields))) self._skip_fields.update(self.reserved_attrs) def _str_to_fn(self, fn_as_str): diff --git a/rhodecode/lib/_vendor/redis_lock/__init__.py b/rhodecode/lib/_vendor/redis_lock/__init__.py --- a/rhodecode/lib/_vendor/redis_lock/__init__.py +++ b/rhodecode/lib/_vendor/redis_lock/__init__.py @@ -23,14 +23,8 @@ loggers = { ] } -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str - binary_type = bytes -else: - text_type = unicode # noqa - binary_type = str +text_type = str +binary_type = bytes # Check if the id match. If not, return an error code. diff --git a/rhodecode/lib/_vendor/statsd/__init__.py b/rhodecode/lib/_vendor/statsd/__init__.py --- a/rhodecode/lib/_vendor/statsd/__init__.py +++ b/rhodecode/lib/_vendor/statsd/__init__.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, division, unicode_literals + import logging diff --git a/rhodecode/lib/_vendor/statsd/base.py b/rhodecode/lib/_vendor/statsd/base.py --- a/rhodecode/lib/_vendor/statsd/base.py +++ b/rhodecode/lib/_vendor/statsd/base.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, division, unicode_literals + import re import random diff --git a/rhodecode/lib/_vendor/statsd/stream.py b/rhodecode/lib/_vendor/statsd/stream.py --- a/rhodecode/lib/_vendor/statsd/stream.py +++ b/rhodecode/lib/_vendor/statsd/stream.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, division, unicode_literals + import socket diff --git a/rhodecode/lib/_vendor/statsd/timer.py b/rhodecode/lib/_vendor/statsd/timer.py --- a/rhodecode/lib/_vendor/statsd/timer.py +++ b/rhodecode/lib/_vendor/statsd/timer.py @@ -1,14 +1,7 @@ from __future__ import absolute_import, division, unicode_literals import functools - -# Use timer that's not susceptible to time of day adjustments. -try: - # perf_counter is only present on Py3.3+ - from time import perf_counter as time_now -except ImportError: - # fall back to using time - from time import time as time_now +from time import perf_counter as time_now def safe_wraps(wrapper, *args, **kwargs): diff --git a/rhodecode/lib/_vendor/statsd/udp.py b/rhodecode/lib/_vendor/statsd/udp.py --- a/rhodecode/lib/_vendor/statsd/udp.py +++ b/rhodecode/lib/_vendor/statsd/udp.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, division, unicode_literals + import socket