diff --git a/docs/api.rst b/docs/api.rst index 53ff60ac..50c5bdab 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1027,7 +1027,7 @@ Sender Class Send :py:data:`_DEAD` to the remote end, causing :py:meth:`ChannelError` to be raised in any waiting thread. - .. py:method:: put (data) + .. py:method:: send (data) Send `data` to the remote end. diff --git a/mitogen/core.py b/mitogen/core.py index 8218280d..1e3b891a 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -384,9 +384,9 @@ class Sender(object): ) ) - def put(self, data): + def send(self, data): """Send `data` to the remote.""" - _vv and IOLOG.debug('%r.put(%r..)', self, data[:100]) + _vv and IOLOG.debug('%r.send(%r..)', self, data[:100]) self.context.send( Message.pickled( data, diff --git a/tests/call_function_test.py b/tests/call_function_test.py index 301b7798..d66864b4 100644 --- a/tests/call_function_test.py +++ b/tests/call_function_test.py @@ -34,7 +34,7 @@ def func_accepts_returns_context(context): def func_accepts_returns_sender(sender): - sender.put(123) + sender.send(123) sender.close() return sender diff --git a/tests/receiver_test.py b/tests/receiver_test.py index 1d8c0c7b..3d67cf80 100644 --- a/tests/receiver_test.py +++ b/tests/receiver_test.py @@ -7,7 +7,7 @@ import testlib def yield_stuff_then_die(sender): for x in xrange(5): - sender.put(x) + sender.send(x) sender.close() return 10