Skip to content

Commit af58fe9

Browse files
committed
gevent support seems to be WIP - add pants: no-infer-dep comments
1 parent 985beda commit af58fe9

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

st2common/st2common/util/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
python_sources()
2+
3+
# st2common.utils.concurrency allows using gevent instead of eventlet.
4+
# This gevent support is WIP.
5+
# python_requirement(
6+
# name="gevent",
7+
# requirements=["gevent"],
8+
# )

st2common/st2common/util/concurrency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
eventlet = None
2727

2828
try:
29-
import gevent # pylint: disable=import-error
29+
import gevent # pylint: disable=import-error # pants: no-infer-dep
3030
import gevent.pool
3131
except ImportError:
3232
gevent = None

st2common/st2common/util/monkey_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def monkey_patch(patch_thread=None):
5656
if patch_thread is None:
5757
patch_thread = not is_use_debugger_flag_provided()
5858

59+
# TODO: support gevent.patch_all if .concurrency.CONCURRENCY_LIBRARY = "gevent"
5960
eventlet.monkey_patch(
6061
os=True, select=True, socket=True, thread=patch_thread, time=True
6162
)

0 commit comments

Comments
 (0)