comparison env/lib/python3.7/site-packages/urllib3/util/queue.py @ 0:26e78fe6e8c4 draft

"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
author shellac
date Sat, 02 May 2020 07:14:21 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26e78fe6e8c4
1 import collections
2 from ..packages import six
3 from ..packages.six.moves import queue
4
5 if six.PY2:
6 # Queue is imported for side effects on MS Windows. See issue #229.
7 import Queue as _unused_module_Queue # noqa: F401
8
9
10 class LifoQueue(queue.Queue):
11 def _init(self, _):
12 self.queue = collections.deque()
13
14 def _qsize(self, len=len):
15 return len(self.queue)
16
17 def _put(self, item):
18 self.queue.append(item)
19
20 def _get(self):
21 return self.queue.pop()