Skip to content

Commit 809689d

Browse files
Merge pull request #332 from martin-neotech/4.0-remove-last-bookmark-function
Removed bookmark function
2 parents 85a3d3f + 51d312c commit 809689d

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

neo4j/io/__init__.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -878,35 +878,6 @@ def on_write_failure(self, address):
878878
log.debug("[#0000] C: <ROUTING> table=%r", self.routing_table)
879879

880880

881-
# TODO: remove in 2.0
882-
def _last_bookmark(b0, b1):
883-
""" Return the latest of two bookmarks by looking for the maximum
884-
integer value following the last colon in the bookmark string.
885-
"""
886-
n = [None, None]
887-
_, _, n[0] = b0.rpartition(":")
888-
_, _, n[1] = b1.rpartition(":")
889-
for i in range(2):
890-
try:
891-
n[i] = int(n[i])
892-
except ValueError:
893-
raise ValueError("Invalid bookmark: {}".format(b0))
894-
return b0 if n[0] > n[1] else b1
895-
896-
897-
# TODO: remove in 2.0
898-
def last_bookmark(bookmarks):
899-
""" The bookmark returned by the last :class:`.Transaction`.
900-
"""
901-
last = None
902-
for bookmark in bookmarks:
903-
if last is None:
904-
last = bookmark
905-
else:
906-
last = _last_bookmark(last, bookmark)
907-
return last
908-
909-
910881
def _connect(resolved_address, timeout=None, **config):
911882
"""
912883

0 commit comments

Comments
 (0)