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

Commit b5d37d7

Browse files
authored
Replace concurrent.futures.Future with tornado.concurrent.Future (#155)
* Replace concurrent.futures.Future with tornado.concurrent.Future * Restrict opentracing<2 and tornado<5 Signed-off-by: Yuri Shkuro <[email protected]>
1 parent 4200bdb commit b5d37d7

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

jaeger_client/ioloop_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
from __future__ import absolute_import
1616

1717
import sys
18-
from concurrent.futures import Future
1918
from tornado import gen
19+
from tornado.concurrent import Future
2020

2121

2222
def submit(fn, io_loop, *args, **kwargs):
@@ -26,7 +26,7 @@ def submit(fn, io_loop, *args, **kwargs):
2626
:param io_loop: Tornado IOLoop where to schedule the coroutine
2727
:param args: Args to pass to coroutine
2828
:param kwargs: Kwargs to pass to coroutine
29-
:returns concurrent.futures.Future: future result of coroutine
29+
:returns tornado.concurrent.Future: future result of coroutine
3030
"""
3131
future = Future()
3232

jaeger_client/local_agent_net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
from threadloop import ThreadLoop
1818
import tornado
1919
import tornado.httpclient
20+
from tornado.concurrent import Future
2021
from tornado.httputil import url_concat
2122
from .TUDPTransport import TUDPTransport
22-
from concurrent.futures import Future
2323
from thrift.transport.TTransport import TBufferedTransport
2424

2525

jaeger_client/reporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import tornado.ioloop
2222
import tornado.queues
2323
import socket
24-
from concurrent.futures import Future
24+
from tornado.concurrent import Future
2525
from .constants import DEFAULT_FLUSH_INTERVAL
2626
from . import thrift
2727
from . import ioloop_util

jaeger_client/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def close(self):
197197
Perform a clean shutdown of the tracer, flushing any traces that
198198
may be buffered in memory.
199199
200-
:return: Returns a concurrent.futures.Future that indicates if the
200+
:return: Returns a tornado.concurrent.Future that indicates if the
201201
flush has been completed.
202202
"""
203203
self.sampler.close()

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@
1818
setup(
1919
name='jaeger-client',
2020
version=version,
21-
url='https://github.com/uber/jaeger-client-python',
21+
url='https://github.com/jaegertracing/jaeger-client-python',
2222
description='Jaeger Python OpenTracing Tracer implementation',
2323
author='Yuri Shkuro',
2424
author_email='[email protected]',
2525
packages=find_packages(exclude=['crossdock', 'tests', 'example', 'tests.*']),
2626
include_package_data=True,
27-
license="MIT",
27+
license='Apache License 2.0',
2828
zip_safe=False,
2929
keywords='jaeger, tracing, opentracing',
3030
classifiers=[
3131
'Development Status :: 5 - Production/Stable',
3232
'Intended Audience :: Developers',
33-
'License :: OSI Approved :: MIT License',
33+
'License :: OSI Approved :: Apache Software License',
3434
'Natural Language :: English',
3535
'Programming Language :: Python :: 2.7',
36+
'Programming Language :: Python :: 3.6',
3637
],
3738
install_requires=[
38-
'futures;python_version<"3"',
3939
'threadloop>=1,<2',
4040
'thrift',
4141
'tornado>=4.3,<5',
42-
'opentracing>=1.2.2,<1.4',
42+
'opentracing>=1.2.2,<2',
4343
],
4444
# Uncomment below if need to test with unreleased version of opentracing
4545
# dependency_links=[

tests/test_reporter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import tornado.gen
2525
import jaeger_client.reporter
2626

27-
from concurrent.futures import Future
27+
from tornado.concurrent import Future
2828
from jaeger_client import Span, SpanContext
2929
from jaeger_client.metrics import LegacyMetricsFactory, Metrics
3030
from jaeger_client.utils import ErrorReporter
@@ -80,7 +80,6 @@ def test_composite_reporter():
8080
as null_mock:
8181
with mock.patch('jaeger_client.reporter.LoggingReporter.close') \
8282
as log_mock:
83-
from concurrent.futures import Future
8483

8584
f1 = Future()
8685
f2 = Future()

0 commit comments

Comments
 (0)