jaegertracing/jaeger-client-python

Remove use of `six` module

yurishkuro opened this issue · 1 comments

Since py2 support was removed in #307, we don't need to be using py2-py3 compatible syntax, which is achieved via module six.

This issue is to track removal of the use of this module from the code.

Note that some dependent libraries may still use it, e.g. we do not need to touch the code in jaeger_client/thrift_gen/*, but at least in the main code of the client we should stop using six.

cc @cedy if you're interested

$ grx six jaeger_client crossdock | grep -v thrift_gen
jaeger_client/metrics/metrics.py:18:import six
jaeger_client/metrics/metrics.py:93:        for k in sorted(six.iterkeys(tags)):
jaeger_client/codecs.py:32:import six
jaeger_client/codecs.py:33:from six.moves import urllib_parse
jaeger_client/codecs.py:68:            for key, value in six.iteritems(baggage):
jaeger_client/codecs.py:70:                if isinstance(key, six.binary_type):
jaeger_client/codecs.py:75:                    if isinstance(value, six.binary_type):
jaeger_client/codecs.py:90:        for key, value in six.iteritems(carrier):
jaeger_client/codecs.py:238:    if not isinstance(value, six.string_types):
jaeger_client/codecs.py:310:    if not isinstance(header, (str, six.text_type)):
jaeger_client/codecs.py:355:        for header_key, header_value in six.iteritems(carrier):
jaeger_client/constants.py:19:import six
jaeger_client/constants.py:37:TRACE_ID_HEADER = 'uber-trace-id' if six.PY3 else b'uber-trace-id'
jaeger_client/constants.py:40:BAGGAGE_HEADER_PREFIX = 'uberctx-' if six.PY3 else b'uberctx-'
jaeger_client/thrift.py:16:import six
jaeger_client/thrift.py:28:if six.PY3:
jaeger_client/thrift.py:163:        for k, v in six.iteritems(tags or {})
jaeger_client/utils.py:19:from six.moves import range
jaeger_client/sampler.py:20:import six
jaeger_client/sampler.py:319:        for _, sampler in six.iteritems(self.samplers):
jaeger_client/span.py:17:import six
jaeger_client/span.py:50:            for k, v in six.iteritems(tags):
jaeger_client/tracer.py:24:import six
jaeger_client/tracer.py:186:                    for k, v in six.iteritems(sampler_tags):
cedy commented

Yeap, I'll clean it