Skip to content

Commit 27cd474

Browse files
authored
Python 3.6 support (#30)
Co-authored-by: Alessandro Di Federico <ale@rev.ng>
1 parent 322e9e2 commit 27cd474

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [3.7, 3.8]
18+
python-version: [3.6, 3.7, 3.8]
1919

2020
steps:
2121
- uses: actions/checkout@v2

grandiso/queues.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
from enum import Enum
44

55

6-
SimpleQueue = queue.SimpleQueue
6+
try:
7+
SimpleQueue = queue.SimpleQueue
8+
except:
9+
SimpleQueue = queue.Queue
710

811

912
class QueuePolicy(Enum):
@@ -20,7 +23,7 @@ class QueuePolicy(Enum):
2023
BREADTHFIRST = 2
2124

2225

23-
class ProfilingQueue(queue.SimpleQueue):
26+
class ProfilingQueue(SimpleQueue):
2427
"""
2528
A simple queue to enable profiling. This queue keeps track of its size over
2629
time so that you can more easily debug performance.
@@ -42,7 +45,7 @@ def __init__(self):
4245
4346
"""
4447
super(ProfilingQueue, self).__init__()
45-
self._size_history = queue.SimpleQueue()
48+
self._size_history = SimpleQueue()
4649
self._size = 0
4750

4851
def put(self, *args, **kwargs):

0 commit comments

Comments
 (0)