Compare commits
4 Commits
master
...
slix-1.7.2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
610923138f | ||
![]() |
c4cbb59a44 | ||
![]() |
24375f3c47 | ||
![]() |
8b90cdd73f |
2
slixmpp/thirdparty/orderedset.py
vendored
2
slixmpp/thirdparty/orderedset.py
vendored
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
class OrderedSet(collections.MutableSet):
|
class OrderedSet(collections.abc.MutableSet):
|
||||||
|
|
||||||
def __init__(self, iterable=None):
|
def __init__(self, iterable=None):
|
||||||
self.end = end = []
|
self.end = end = []
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
# We don't want to have to import the entire library
|
# We don't want to have to import the entire library
|
||||||
# just to get the version info for setup.py
|
# just to get the version info for setup.py
|
||||||
|
|
||||||
__version__ = '1.7.0'
|
__version__ = '1.7.2'
|
||||||
__version_info__ = (1, 7, 0)
|
__version_info__ = (1, 7, 2)
|
||||||
|
@ -1007,11 +1007,13 @@ class XMLStream(asyncio.BaseProtocol):
|
|||||||
"""
|
"""
|
||||||
data = await task
|
data = await task
|
||||||
self.__slow_tasks.remove(task)
|
self.__slow_tasks.remove(task)
|
||||||
for filter in self.__filters['out']:
|
if data is None:
|
||||||
|
return
|
||||||
|
for filter in self.__filters['out'][:]:
|
||||||
if filter in already_used:
|
if filter in already_used:
|
||||||
continue
|
continue
|
||||||
if iscoroutinefunction(filter):
|
if iscoroutinefunction(filter):
|
||||||
data = await task
|
data = await filter(data)
|
||||||
else:
|
else:
|
||||||
data = filter(data)
|
data = filter(data)
|
||||||
if data is None:
|
if data is None:
|
||||||
@ -1047,7 +1049,7 @@ class XMLStream(asyncio.BaseProtocol):
|
|||||||
timeout=1,
|
timeout=1,
|
||||||
)
|
)
|
||||||
if pending:
|
if pending:
|
||||||
self.slow_tasks.append(task)
|
self.__slow_tasks.append(task)
|
||||||
asyncio.ensure_future(
|
asyncio.ensure_future(
|
||||||
self._continue_slow_send(
|
self._continue_slow_send(
|
||||||
task,
|
task,
|
||||||
@ -1055,7 +1057,9 @@ class XMLStream(asyncio.BaseProtocol):
|
|||||||
),
|
),
|
||||||
loop=self.loop,
|
loop=self.loop,
|
||||||
)
|
)
|
||||||
raise Exception("Slow coro, rescheduling")
|
raise ContinueQueue(
|
||||||
|
"Slow coroutine, rescheduling filters"
|
||||||
|
)
|
||||||
data = task.result()
|
data = task.result()
|
||||||
else:
|
else:
|
||||||
data = filter(data)
|
data = filter(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user