Skip to content

Commit

Permalink
remove loop argument; version 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Smith committed Jun 17, 2019
1 parent cb8681f commit f8fe0e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion asyncio_multisubscriber_queue/__init__.py
@@ -1,6 +1,6 @@
import sys

__version__ = '0.2.2'
__version__ = '0.2.3'
__MIN_PYTHON__ = (3, 7)


Expand Down
8 changes: 2 additions & 6 deletions asyncio_multisubscriber_queue/queue.py
Expand Up @@ -4,15 +4,11 @@


class MultisubscriberQueue(object):
def __init__(self, loop=None):
def __init__(self):
"""
The constructor for MultisubscriberQueue class
Parameters:
loop (asyncio.AbstractEventLoop): explicitly define an event loop
"""
self.loop = loop if loop else asyncio.get_running_loop()
self.subscribers = list()

def __len__(self):
Expand Down Expand Up @@ -46,7 +42,7 @@ def queue(self):
Get a new async Queue
"""
q = Queue(loop=self.loop)
q = Queue()
self.subscribers.append(q)
return q

Expand Down
4 changes: 2 additions & 2 deletions test/conftest.py
Expand Up @@ -4,5 +4,5 @@


@pytest.fixture
async def multisubscriber_queue(event_loop):
return MultisubscriberQueue(loop=event_loop)
async def multisubscriber_queue():
return MultisubscriberQueue()

0 comments on commit f8fe0e7

Please sign in to comment.