Skip to content

Commit

Permalink
remove six dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
a-detiste committed Jun 15, 2024
1 parent b4f0450 commit 33f4941
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion ci/environment-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies:
- tornado
- toolz
- zict
- six
- librdkafka=1.5.3
- dask
- distributed
Expand Down
1 change: 0 additions & 1 deletion ci/environment-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies:
- tornado
- toolz
- zict
- six
- librdkafka=1.5.3
- dask
- distributed
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
tornado
toolz
zict
six
setuptools
setuptools
9 changes: 4 additions & 5 deletions streamz/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from itertools import chain
import functools
import logging
import six
import sys
import threading
from time import time
from typing import Any, Callable, Hashable, Union
Expand Down Expand Up @@ -1947,8 +1945,8 @@ def f():
if timeout is not None:
future = gen.with_timeout(timedelta(seconds=timeout), future)
result[0] = yield future
except Exception:
error[0] = sys.exc_info()
except Exception as exc:
error[0] = exc
finally:
thread_state.asynchronous = False
e.set()
Expand All @@ -1960,7 +1958,8 @@ def f():
else:
while not e.is_set():
e.wait(10)

if error[0]:
six.reraise(*error[0])
raise error[0]
else:
return result[0]
4 changes: 2 additions & 2 deletions streamz/utils_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import asyncio
from contextlib import contextmanager
import io
import logging
import os
import six
import shutil
import tempfile
from time import time, sleep
Expand Down Expand Up @@ -85,7 +85,7 @@ def captured_logger(logger, level=logging.INFO, propagate=None):
if propagate is not None:
orig_propagate = logger.propagate
logger.propagate = propagate
sio = six.StringIO()
sio = io.StringIO()
logger.handlers[:] = [logging.StreamHandler(sio)]
logger.setLevel(level)
try:
Expand Down

0 comments on commit 33f4941

Please sign in to comment.