Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Replace concurrent.futures.Future with tornado.concurrent.Future #155

Merged
merged 3 commits into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jaeger_client/ioloop_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from __future__ import absolute_import

import sys
from concurrent.futures import Future
from tornado import gen
from tornado.concurrent import Future


def submit(fn, io_loop, *args, **kwargs):
Expand All @@ -26,7 +26,7 @@ def submit(fn, io_loop, *args, **kwargs):
:param io_loop: Tornado IOLoop where to schedule the coroutine
:param args: Args to pass to coroutine
:param kwargs: Kwargs to pass to coroutine
:returns concurrent.futures.Future: future result of coroutine
:returns tornado.concurrent.Future: future result of coroutine
"""
future = Future()

Expand Down
2 changes: 1 addition & 1 deletion jaeger_client/local_agent_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
from threadloop import ThreadLoop
import tornado
import tornado.httpclient
from tornado.concurrent import Future
from tornado.httputil import url_concat
from .TUDPTransport import TUDPTransport
from concurrent.futures import Future
from thrift.transport.TTransport import TBufferedTransport


Expand Down
2 changes: 1 addition & 1 deletion jaeger_client/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import tornado.ioloop
import tornado.queues
import socket
from concurrent.futures import Future
from tornado.concurrent import Future
from .constants import DEFAULT_FLUSH_INTERVAL
from . import thrift
from . import ioloop_util
Expand Down
2 changes: 1 addition & 1 deletion jaeger_client/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def close(self):
Perform a clean shutdown of the tracer, flushing any traces that
may be buffered in memory.

:return: Returns a concurrent.futures.Future that indicates if the
:return: Returns a tornado.concurrent.Future that indicates if the
flush has been completed.
"""
self.sampler.close()
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@
setup(
name='jaeger-client',
version=version,
url='https://github.com/uber/jaeger-client-python',
url='https://github.com/jaegertracing/jaeger-client-python',
description='Jaeger Python OpenTracing Tracer implementation',
author='Yuri Shkuro',
author_email='ys@uber.com',
packages=find_packages(exclude=['crossdock', 'tests', 'example', 'tests.*']),
include_package_data=True,
license="MIT",
license='Apache License 2.0',
zip_safe=False,
keywords='jaeger, tracing, opentracing',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
],
install_requires=[
'futures;python_version<"3"',
'threadloop>=1,<2',
'thrift',
'tornado>=4.3,<5',
'opentracing>=1.2.2,<1.4',
'opentracing>=1.2.2,<2',
],
# Uncomment below if need to test with unreleased version of opentracing
# dependency_links=[
Expand Down
3 changes: 1 addition & 2 deletions tests/test_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import tornado.gen
import jaeger_client.reporter

from concurrent.futures import Future
from tornado.concurrent import Future
from jaeger_client import Span, SpanContext
from jaeger_client.metrics import LegacyMetricsFactory, Metrics
from jaeger_client.utils import ErrorReporter
Expand Down Expand Up @@ -80,7 +80,6 @@ def test_composite_reporter():
as null_mock:
with mock.patch('jaeger_client.reporter.LoggingReporter.close') \
as log_mock:
from concurrent.futures import Future

f1 = Future()
f2 = Future()
Expand Down