Skip to content

Commit

Permalink
Asyncio hub support for Python 3.7 to 3.9 (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarst committed Jan 16, 2024
1 parent 7fa158c commit 7a80427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
- { py: "3.10", toxenv: ipv6, ignore-error: false, os: ubuntu-latest }
- { py: "3.11", toxenv: py311-epolls, ignore-error: false, os: ubuntu-latest }
- { py: "3.12", toxenv: py312-epolls, ignore-error: false, os: ubuntu-latest }
- { py: "3.7", toxenv: py37-asyncio, ignore-error: false, os: ubuntu-latest }
- { py: "3.8", toxenv: py38-asyncio, ignore-error: false, os: ubuntu-latest }
- { py: "3.9", toxenv: py39-asyncio, ignore-error: false, os: ubuntu-latest }
- { py: "3.10", toxenv: py310-asyncio, ignore-error: false, os: ubuntu-latest }
- { py: "3.11", toxenv: py311-asyncio, ignore-error: false, os: ubuntu-latest }
- { py: "3.12", toxenv: py312-asyncio, ignore-error: false, os: ubuntu-latest }
Expand Down
2 changes: 1 addition & 1 deletion eventlet/hubs/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class Hub(hub.BaseHub):

def __init__(self):
super().__init__()
self.sleep_event = asyncio.Event()
# The presumption is that eventlet is driving the event loop, so we
# want a new one we control.
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(self.loop)
self.sleep_event = asyncio.Event()

def add_timer(self, timer):
"""
Expand Down

0 comments on commit 7a80427

Please sign in to comment.