Skip to content

Commit 13b34fc

Browse files
committed
Py2.7 tweaks and fix ACK_FAILURE bug
1 parent 8d1a8d2 commit 13b34fc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

neo4j/util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ def discard(self, element):
136136
except KeyError:
137137
pass
138138

139+
def next(self):
140+
return self.__next__()
141+
139142
def remove(self, element):
140143
try:
141144
del self._elements[element]

neo4j/v1/session.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
from collections import deque
3131
import re
3232
from threading import Lock
33-
from time import monotonic
33+
try:
34+
from time import monotonic as clock
35+
except ImportError:
36+
from time import clock
3437
from warnings import warn
3538

3639
from neo4j.util import RoundRobinSet
@@ -204,7 +207,7 @@ class ConnectionRouter(object):
204207
cluster that supports routing.
205208
"""
206209

207-
timer = monotonic
210+
timer = clock
208211

209212
def __init__(self, pool, *routers):
210213
self.pool = pool

0 commit comments

Comments
 (0)