summaryrefslogtreecommitdiff
path: root/lib/extras.py
diff options
context:
space:
mode:
authorOleksandr Shulgin <oleksandr.shulgin@zalando.de>2015-10-19 20:00:39 +0200
committerOleksandr Shulgin <oleksandr.shulgin@zalando.de>2015-10-19 20:00:39 +0200
commit0bb81fc84811134bca70b59daa4661bd0697f2ff (patch)
tree4b66a805179645ffd6fbad36a8cc442e6b384602 /lib/extras.py
parent7aea2cef6e42c961fadac61f19b570bdf8c61401 (diff)
downloadpsycopg2-0bb81fc84811134bca70b59daa4661bd0697f2ff.tar.gz
Properly subclass ReplicationCursor on C level.
Diffstat (limited to 'lib/extras.py')
-rw-r--r--lib/extras.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/extras.py b/lib/extras.py
index 8854ec2..7c71357 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -39,7 +39,8 @@ import psycopg2
from psycopg2 import extensions as _ext
from psycopg2.extensions import cursor as _cursor
from psycopg2.extensions import connection as _connection
-from psycopg2.extensions import replicationMessage as ReplicationMessage
+from psycopg2.extensions import ReplicationCursor as _replicationCursor
+from psycopg2.extensions import ReplicationMessage
from psycopg2.extensions import adapt as _A, quote_ident
from psycopg2.extensions import b
@@ -503,7 +504,7 @@ class PhysicalReplicationConnection(ReplicationConnectionBase):
class StopReplication(Exception):
"""
Exception used to break out of the endless loop in
- `~ReplicationCursor.consume_replication_stream()`.
+ `~ReplicationCursor.consume_stream()`.
Subclass of `~exceptions.Exception`. Intentionally *not* inherited from
`~psycopg2.Error` as occurrence of this exception does not indicate an
@@ -512,7 +513,7 @@ class StopReplication(Exception):
pass
-class ReplicationCursor(_cursor):
+class ReplicationCursor(_replicationCursor):
"""A cursor used for communication on the replication protocol."""
def create_replication_slot(self, slot_name, slot_type=None, output_plugin=None):
@@ -598,9 +599,6 @@ class ReplicationCursor(_cursor):
self.start_replication_expert(command)
- def send_feedback_message(self, written_lsn=0, sync_lsn=0, apply_lsn=0, reply_requested=False):
- return self.send_replication_feedback(written_lsn, sync_lsn, apply_lsn, reply_requested)
-
# allows replication cursors to be used in select.select() directly
def fileno(self):
return self.connection.fileno()