[Python-modules-commits] [rpyc] 04/12: New upstream version 3.4.4

Carl Suster arcresu-guest at moszumanska.debian.org
Fri Dec 1 07:25:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

arcresu-guest pushed a commit to branch debian/master
in repository rpyc.

commit 598f763a7d4117f268c3f1b0373d802c51aa8044
Author: Carl Suster <carl at contraflo.ws>
Date:   Fri Dec 1 17:17:04 2017 +1100

    New upstream version 3.4.4
---
 .gitignore                      |   2 +
 .travis.yml                     |  10 ++-
 CHANGELOG.rst                   |  45 +++++++++++
 README.rst                      |  49 ++++++++----
 bin/rpyc_classic.py             |  38 ++++-----
 bin/rpyc_registry.py            |  16 ++--
 bin/rpycd.py                    |  10 +--
 build.py                        |  35 --------
 demos/splits/splits.py          |   4 +-
 demos/time/readme.txt           |   2 +-
 demos/time/server.py            |   2 +-
 docs/api.rst                    |  26 +++---
 docs/api/core_protocol.rst      |   2 +-
 docs/api/utils_splitbrain.rst   |   2 +-
 docs/docs.rst                   |  16 ++--
 docs/docs/about.rst             |   8 +-
 docs/docs/async.rst             |  45 ++++++-----
 docs/docs/classic.rst           |  10 +--
 docs/docs/howto.rst             |  50 ++++++------
 docs/docs/secure-connection.rst |  36 ++++-----
 docs/docs/security.rst          |  34 ++++----
 docs/docs/servers.rst           |  50 ++++++------
 docs/docs/services.rst          |  38 ++++-----
 docs/docs/theory.rst            |  92 ++++++++++-----------
 docs/docs/usecases.rst          |  54 ++++++-------
 docs/docs/zerodeploy.rst        |  32 ++++----
 docs/index.rst                  |  53 ++++++-------
 docs/install.rst                |  64 +++++++--------
 docs/screencasts.rst            |   2 +-
 docs/tutorial.rst               |  12 +--
 docs/tutorial/tut1.rst          |  52 ++++++------
 docs/tutorial/tut2.rst          |  34 ++++----
 docs/tutorial/tut3.rst          | 109 +++++++++++++------------
 docs/tutorial/tut4.rst          |  36 ++++-----
 docs/tutorial/tut5.rst          | 111 +++++++++++++-------------
 rpyc/__init__.py                |   6 +-
 rpyc/core/async.py              |  16 ++--
 rpyc/core/brine.py              |  18 ++---
 rpyc/core/channel.py            |  12 +--
 rpyc/core/netref.py             |  57 +++++++-------
 rpyc/core/protocol.py           | 171 ++++++++++++++++++++++++++++++----------
 rpyc/core/reactor.py            |   2 +-
 rpyc/core/service.py            |  47 ++++++-----
 rpyc/core/stream.py             | 127 ++++++++++++++++++-----------
 rpyc/core/vinegar.py            |  40 +++++-----
 rpyc/experimental/retunnel.py   |   2 +-
 rpyc/experimental/splitbrain.py |  14 ++--
 rpyc/lib/__init__.py            |   2 +-
 rpyc/lib/colls.py               |   6 +-
 rpyc/lib/compat.py              |   9 ++-
 rpyc/utils/authenticators.py    |  35 ++++----
 rpyc/utils/classic.py           | 102 +++++++++++++-----------
 rpyc/utils/factory.py           |  85 ++++++++++++--------
 rpyc/utils/helpers.py           |  95 ++++++++++++----------
 rpyc/utils/registry.py          |  72 ++++++++---------
 rpyc/utils/server.py            | 152 ++++++++++++++++++++---------------
 rpyc/utils/teleportation.py     |  55 ++++++++-----
 rpyc/utils/zerodeploy.py        |  44 +++++------
 rpyc/version.py                 |   7 +-
 setup.py                        |   7 +-
 tests/test_ipv6.py              |   5 +-
 tests/test_registry.py          |   2 +-
 tests/test_remoting.py          |   4 +-
 tests/test_threaded_server.py   |  29 ++++++-
 64 files changed, 1342 insertions(+), 1062 deletions(-)

diff --git a/.gitignore b/.gitignore
index c6e6956..f2b0ec7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ MANIFEST
 __pycache__
 rpyc.egg-info
 *.egg
+*.class
+build/
diff --git a/.travis.yml b/.travis.yml
index 0410248..e948e93 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,17 @@
 language: python
+
+dist: trusty
+
+# See: https://docs.travis-ci.com/user/languages/python/
 python:
     - "2.6"
     - "2.7"
-    - "3.2"
     - "3.3"
+    - "3.4"
+    - "3.5"
+    - "3.6"
+    - "3.7-dev"
+    - "nightly"
 
 install:
     - pip install -e git+git://github.com/tomerfiliba/plumbum.git#egg=plumbum
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index ae15c1d..54e90f7 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,3 +1,48 @@
+3.4.4
+-----
+Date: 07.08.2017
+
+* Fix refcount leakage when unboxing from cache (#196)
+* Fix TypeError when dispatching exceptions on py2 (unicode)
+* Respect ``rpyc_protocol_config`` for default Service getattr (#202)
+* Support unix domain sockets (#100,#208)
+* Use first accessible server in ``connect_by_service`` (#220)
+* Fix deadlock problem with logging (#207,#212)
+
+
+3.4.3
+-----
+Date: 26.07.2017
+
+* Add missing endpoints config in ThreadPoolServer (#222)
+* Fix jython support (#156,#171)
+* Improve documentation (#158,#185,#189,#198 and more)
+
+3.4.2
+-----
+Date: 14.06.2017
+
+* Fix ``export_function`` on python 3.6
+
+3.4.1
+-----
+Date: 09.06.2017
+
+* Fix issue high-cpu polling (#191,#218)
+* Fix filename argument in logging (#197)
+* Improved log messages (#191,#204)
+* Drop support for python 3.2 and py 2.5
+
+3.4.0
+-----
+Date: 29.05.2017
+
+Please excuse the briefity for this versions changelist.
+
+* Add keepalive interface [#151]
+
+* Various fixes: #136, #140, #143, #147, #149, #151, #159, #160, #166, #173, #176, #179, #174, #182, #183 and others.
+
 3.3.0
 -----
 * RPyC integrates with `plumbum <http://pypi.python.org/pypi/plumbum>`_; plumbum is required
diff --git a/README.rst b/README.rst
index 4333f28..d48da84 100644
--- a/README.rst
+++ b/README.rst
@@ -1,22 +1,43 @@
-`RPyC <http://rpyc.sourceforge.net>`_ (pronounced like *are-pie-see*), or *Remote Python Call*, 
-is a **transparent** library for **symmetrical** `remote procedure calls 
-<http://en.wikipedia.org/wiki/Remote_procedure_calls>`_, 
-`clustering <http://en.wikipedia.org/wiki/Clustering>`_, and 
-`distributed-computing <http://en.wikipedia.org/wiki/Distributed_computing>`_.
-RPyC makes use of `object-proxying <http://en.wikipedia.org/wiki/Proxy_pattern>`_,
-a technique that employs python's dynamic nature, to overcome the physical boundaries
-between processes and computers, so that remote objects can be manipulated as if they were local.
+|Version| |Python| |Tests| |License|
+
+RPyC_ (pronounced like *are-pie-see*), or *Remote Python Call*, is a
+**transparent** library for **symmetrical** `remote procedure calls`_,
+clustering_, and distributed-computing_.  RPyC makes use of object-proxying_,
+a technique that employs python's dynamic nature, to overcome the physical
+boundaries between processes and computers, so that remote objects can be
+manipulated as if they were local.
 
 .. figure:: http://rpyc.readthedocs.org/en/latest/_images/screenshot.png
    :align: center
-   
+
    A screenshot of a Windows client connecting to a Linux server.
-   
-   Note that text written to the server's ``stdout`` is actually printed on 
+
+   Note that text written to the server's ``stdout`` is actually printed on
    the server's console.
 
 
-.. image:: https://d2weczhvl823v0.cloudfront.net/tomerfiliba/rpyc/trend.png
-   :alt: Bitdeli badge
-   :target: https://bitdeli.com/free
+.. References:
+
+.. _RPyC:                   https://github.com/tomerfiliba/rpyc
+.. _remote procedure calls: http://en.wikipedia.org/wiki/Remote_procedure_calls
+.. _clustering:             http://en.wikipedia.org/wiki/Clustering
+.. _distributed-computing:  http://en.wikipedia.org/wiki/Distributed_computing
+.. _object-proxying:        http://en.wikipedia.org/wiki/Proxy_pattern
+
+.. Badges:
+
+.. |Version| image::   https://img.shields.io/pypi/v/rpyc.svg?style=flat
+   :target:            https://pypi.python.org/pypi/rpyc
+   :alt:               Version
+
+.. |Python| image::    https://img.shields.io/pypi/pyversions/rpyc.svg?style=flat
+   :target:            https://pypi.python.org/pypi/rpyc#downloads
+   :alt:               Python Versions
+
+.. |Tests| image::     https://img.shields.io/travis/tomerfiliba/rpyc/master.svg?style=flat
+   :target:            https://travis-ci.org/tomerfiliba/rpyc
+   :alt:               Build Status
 
+.. |License| image::   https://img.shields.io/pypi/l/rpyc.svg?style=flat
+   :target:            https://github.com/tomerfiliba/rpyc/blob/master/LICENSE
+   :alt:               License: MIT
diff --git a/bin/rpyc_classic.py b/bin/rpyc_classic.py
index cf53b1b..da73ad9 100755
--- a/bin/rpyc_classic.py
+++ b/bin/rpyc_classic.py
@@ -25,35 +25,35 @@ class ClassicServer(cli.Application):
     mode = cli.SwitchAttr(["-m", "--mode"], cli.Set("threaded", "forking", "stdio", "oneshot"),
         default = "threaded", help = "The serving mode (threaded, forking, or 'stdio' for "
         "inetd, etc.)")
-    
-    port = cli.SwitchAttr(["-p", "--port"], cli.Range(0, 65535), default = None, 
-        help="The TCP listener port (default = %s, default for SSL = %s)" % 
+
+    port = cli.SwitchAttr(["-p", "--port"], cli.Range(0, 65535), default = None,
+        help="The TCP listener port (default = %s, default for SSL = %s)" %
             (DEFAULT_SERVER_PORT, DEFAULT_SERVER_SSL_PORT), group = "Socket Options")
     host = cli.SwitchAttr(["--host"], str, default = "", help = "The host to bind to. "
         "The default is INADDR_ANY", group = "Socket Options")
     ipv6 = cli.Flag(["--ipv6"], help = "Enable IPv6", group = "Socket Options")
-    
+
     logfile = cli.SwitchAttr("--logfile", str, default = None, help="Specify the log file to use; "
         "the default is stderr", group = "Logging")
-    quiet = cli.Flag(["-q", "--quiet"], help = "Quiet mode (only errors will be logged)", 
+    quiet = cli.Flag(["-q", "--quiet"], help = "Quiet mode (only errors will be logged)",
         group = "Logging")
-    
+
     ssl_keyfile = cli.SwitchAttr("--ssl-keyfile", cli.ExistingFile,
-        help = "The keyfile to use for SSL. Required for SSL", group = "SSL", 
+        help = "The keyfile to use for SSL. Required for SSL", group = "SSL",
         requires = ["--ssl-certfile"])
     ssl_certfile = cli.SwitchAttr("--ssl-certfile", cli.ExistingFile,
         help = "The certificate file to use for SSL. Required for SSL", group = "SSL",
         requires = ["--ssl-keyfile"])
     ssl_cafile = cli.SwitchAttr("--ssl-cafile", cli.ExistingFile,
-        help = "The certificate authority chain file to use for SSL. Optional; enables client-side " 
+        help = "The certificate authority chain file to use for SSL. Optional; enables client-side "
         "authentication", group = "SSL", requires = ["--ssl-keyfile"])
-    
+
     auto_register = cli.Flag("--register", help = "Asks the server to attempt registering with "
-        "a registry server. By default, the server will not attempt to register", 
+        "a registry server. By default, the server will not attempt to register",
         group = "Registry")
-    registry_type = cli.SwitchAttr("--registry-type", cli.Set("UDP", "TCP"), 
+    registry_type = cli.SwitchAttr("--registry-type", cli.Set("UDP", "TCP"),
         default = "UDP", help="Specify a UDP or TCP registry", group = "Registry")
-    registry_port = cli.SwitchAttr("--registry-port", cli.Range(0, 65535), default=REGISTRY_PORT, 
+    registry_port = cli.SwitchAttr("--registry-port", cli.Range(0, 65535), default=REGISTRY_PORT,
         help = "The registry's UDP/TCP port", group = "Registry")
     registry_host = cli.SwitchAttr("--registry-host", str, default = None,
         help = "The registry host machine. For UDP, the default is 255.255.255.255; "
@@ -70,7 +70,7 @@ class ClassicServer(cli.Application):
             self.registrar = TCPRegistryClient(ip = self.registry_host, port = self.registry_port)
 
         if self.ssl_keyfile:
-            self.authenticator = SSLAuthenticator(self.ssl_keyfile, self.ssl_certfile, 
+            self.authenticator = SSLAuthenticator(self.ssl_keyfile, self.ssl_certfile,
                 self.ssl_cafile)
             default_port = DEFAULT_SERVER_SSL_PORT
         else:
@@ -80,7 +80,7 @@ class ClassicServer(cli.Application):
             self.port = default_port
 
         setup_logger(self.quiet, self.logfile)
-    
+
         if self.mode == "threaded":
             self._serve_mode(ThreadedServer)
         elif self.mode == "forking":
@@ -89,16 +89,16 @@ class ClassicServer(cli.Application):
             self._serve_oneshot()
         elif self.mode == "stdio":
             self._serve_stdio()
-    
+
     def _serve_mode(self, factory):
-        t = factory(SlaveService, hostname = self.host, port = self.port, 
-            reuse_addr = True, ipv6 = self.ipv6, authenticator = self.authenticator, 
+        t = factory(SlaveService, hostname = self.host, port = self.port,
+            reuse_addr = True, ipv6 = self.ipv6, authenticator = self.authenticator,
             registrar = self.registrar, auto_register = self.auto_register)
         t.start()
 
     def _serve_oneshot(self):
-        t = OneShotServer(SlaveService, hostname = self.host, port = self.port, 
-            reuse_addr = True, ipv6 = self.ipv6, authenticator = self.authenticator, 
+        t = OneShotServer(SlaveService, hostname = self.host, port = self.port,
+            reuse_addr = True, ipv6 = self.ipv6, authenticator = self.authenticator,
             registrar = self.registrar, auto_register = self.auto_register)
         sys.stdout.write("rpyc-oneshot\n")
         sys.stdout.write("%s\t%s\n" % (t.host, t.port))
diff --git a/bin/rpyc_registry.py b/bin/rpyc_registry.py
index f4a4c57..a65fa4c 100755
--- a/bin/rpyc_registry.py
+++ b/bin/rpyc_registry.py
@@ -14,23 +14,23 @@ from rpyc.lib import setup_logger
 class RegistryServer(cli.Application):
     mode = cli.SwitchAttr(["-m", "--mode"], cli.Set("UDP", "TCP"), default = "UDP",
         help = "Serving mode")
-    
+
     ipv6 = cli.Flag(["-6", "--ipv6"], help="use ipv6 instead of ipv4")
 
-    port = cli.SwitchAttr(["-p", "--port"], cli.Range(0, 65535), default = REGISTRY_PORT, 
+    port = cli.SwitchAttr(["-p", "--port"], cli.Range(0, 65535), default = REGISTRY_PORT,
         help = "The UDP/TCP listener port")
-    
-    logfile = cli.SwitchAttr(["--logfile"], str, default = None, 
+
+    logfile = cli.SwitchAttr(["--logfile"], str, default = None,
         help = "The log file to use; the default is stderr")
-    
+
     quiet = cli.SwitchAttr(["-q", "--quiet"], help = "Quiet mode (only errors are logged)")
-    
-    pruning_timeout = cli.SwitchAttr(["-t", "--timeout"], int, 
+
+    pruning_timeout = cli.SwitchAttr(["-t", "--timeout"], int,
         default = DEFAULT_PRUNING_TIMEOUT, help = "Set a custom pruning timeout (in seconds)")
 
     def main(self):
         if self.mode == "UDP":
-            server = UDPRegistryServer(host = '::' if self.ipv6 else '0.0.0.0', port = self.port, 
+            server = UDPRegistryServer(host = '::' if self.ipv6 else '0.0.0.0', port = self.port,
                 pruning_timeout = self.pruning_timeout)
         elif self.mode == "TCP":
             server = TCPRegistryServer(port = self.port, pruning_timeout = self.pruning_timeout)
diff --git a/bin/rpycd.py b/bin/rpycd.py
index 9ca0d48..cad6f9e 100755
--- a/bin/rpycd.py
+++ b/bin/rpycd.py
@@ -16,10 +16,10 @@ server = None
 
 def start():
     global server
-    
+
     conf = ConfigParser()
     conf.read('rpycd.conf')
-    
+
     mode = conf.get("rpycd", "mode").lower()
     if mode == "threaded":
         factory = ThreadedServer
@@ -27,10 +27,10 @@ def start():
         factory = ForkingServer
     else:
         raise ValueError("Invalid mode %r" % (mode,))
-    
+
     setup_logger(conf.getboolean("rpycd", "quiet"), conf.get("rpycd", "logfile"))
-    
-    server = factory(SlaveService, hostname = conf.get("rpycd", "host"), 
+
+    server = factory(SlaveService, hostname = conf.get("rpycd", "host"),
         port = conf.getint("rpycd", "port"), reuse_addr = True)
     server.start()
 
diff --git a/build.py b/build.py
deleted file mode 100755
index 61613eb..0000000
--- a/build.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python
-from __future__ import print_function
-from plumbum import local, cli
-from plumbum.path.utils import delete
-from rpyc.version import version_string
-
-class Build(cli.Application):
-    publish = cli.Flag("--publish")
-    
-    def main(self):
-        delete("build", "dist", "MANIFEST", local.cwd // "*.egg-info")
-
-        # generate zip, tar.gz, and win32 installer
-        if self.publish:
-            print("registering...")
-            local.python("setup.py", "register")
-            print("uploading zip and tar.gz")
-            local.python("setup.py", "sdist", "--formats=zip,gztar", "upload")
-            print("uploading win installer")
-            local.python("setup.py", "bdist_wininst", "--plat-name=win32", "upload")
-    
-            # upload to sourceforge
-            print("uploading to sourceforge")
-            dst = "gangesmaster,rpyc at frs.sourceforge.net:/home/frs/project/r/rp/rpyc/main/%s/" % (version_string,)
-            local["rsync"]("-rv", "dist/", dst)
-        else:
-            local.python("setup.py", "sdist", "--formats=zip,gztar")
-            local.python("setup.py", "bdist_wininst", "--plat-name=win32")
-    
-        delete("build", local.cwd // "*.egg-info")
-        print("Built", [f.basename for f in local.cwd / "dist"])
-
-if __name__ == "__main__":
-    Build.run()
-
diff --git a/demos/splits/splits.py b/demos/splits/splits.py
index f5ae830..bfca705 100644
--- a/demos/splits/splits.py
+++ b/demos/splits/splits.py
@@ -11,12 +11,12 @@ print sys.platform
 with DeployedServer(mach) as dep:
     conn = dep.classic_connect()
     print conn.modules.sys.platform
-    
+
     try:
         import posix
     except ImportError as ex:
         print ex
-    
+
     with splitbrain(conn):
         import posix
         print posix.stat("/boot")
diff --git a/demos/time/readme.txt b/demos/time/readme.txt
index 127b293..61150c7 100644
--- a/demos/time/readme.txt
+++ b/demos/time/readme.txt
@@ -2,4 +2,4 @@ A canonical example of a basic service:
  * time_service.py defines the service
  * server.py exposes the service
  * client.py utilizes the service
-
+    - NOTE requires registry_server.py to be running
diff --git a/demos/time/server.py b/demos/time/server.py
index d174899..8a99b17 100644
--- a/demos/time/server.py
+++ b/demos/time/server.py
@@ -3,6 +3,6 @@ from time_service import TimeService
 
 
 if __name__ == "__main__":
-    s = ThreadedServer(TimeService)
+    s = ThreadedServer(TimeService, auto_register=True)
     s.start()
 
diff --git a/docs/api.rst b/docs/api.rst
index ba4580e..7049118 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -5,13 +5,13 @@ API Reference
 
 Serialization
 -------------
-.. toctree::   
+.. toctree::
    :maxdepth: 1
    :hidden:
-   
+
    api/core_brine
 
-* :ref:`api-brine` - A simple and fast serialization format for immutable data (numbers, string, 
+* :ref:`api-brine` - A simple and fast serialization format for immutable data (numbers, string,
   tuples, etc.). Brine is the "over-the-wire" encoding format of RPyC.
 
 * :ref:`api-vinegar` - A configurable serializer for exceptions. Vinegar extracts the exception's
@@ -22,7 +22,7 @@ IO Layer
 .. toctree::
    :maxdepth: 1
    :hidden:
-   
+
    api/core_stream
 
 * :ref:`api-stream` - The stream layer (byte-oriented, platform-agnostic streams)
@@ -34,7 +34,7 @@ Protocol
 .. toctree::
    :maxdepth: 1
    :hidden:
-   
+
    api/core_netref
    api/core_protocol
    api/core_service
@@ -44,7 +44,7 @@ Protocol
 
 * :ref:`api-service` - The RPyC service model
 
-* :ref:`api-netref` - Implementation of transparent object proxies (netrefs) 
+* :ref:`api-netref` - Implementation of transparent object proxies (netrefs)
 
 * :ref:`api-async` - Asynchronous object proxies (netrefs)
 
@@ -53,16 +53,16 @@ Server-Side
 .. toctree::
    :maxdepth: 1
    :hidden:
-   
+
    api/utils_server
    api/utils_authenticators
    api/utils_registry
 
-* :ref:`api-server` - The core implementation of RPyC servers; includes the implementation of 
+* :ref:`api-server` - The core implementation of RPyC servers; includes the implementation of
   the forking and threaded servers.
 
 * :ref:`api-registry` - Implementation of the Service Registry; the registry is a bonjour-like
-  discovery agent, with which RPyC servers register themselves, and allows clients to locate 
+  discovery agent, with which RPyC servers register themselves, and allows clients to locate
   different servers by name.
 
 * :ref:`api-authenticators` - Implementation of two common authenticators, for SSL and TLSlite.
@@ -76,12 +76,12 @@ Client-Side
    api/utils_factory
    api/utils_classic
 
-* :ref:`api-factory` - general-purpose connection factories (over pipes, sockets, SSL, SSH, 
+* :ref:`api-factory` - general-purpose connection factories (over pipes, sockets, SSL, SSH,
   TLSlite, etc.)
 
 * :ref:`api-classic` - *Classic-mode* factories and utilities
 
-* :ref:`api-helpers` - Various helpers (``timed``, ``async``, ``buffiter``, ``BgServingThread``, 
+* :ref:`api-helpers` - Various helpers (``timed``, ``async``, ``buffiter``, ``BgServingThread``,
   etc.)
 
 Misc
@@ -89,11 +89,11 @@ Misc
 .. toctree::
    :maxdepth: 1
    :hidden:
-   
+
    api/utils_splitbrain
    api/utils_zerodeploy
 
-* :ref:`api-zerodeploy` - Deploy short-living RPyC servers on remote machines with ease - all you'll 
+* :ref:`api-zerodeploy` - Deploy short-living RPyC servers on remote machines with ease - all you'll
   need is SSH access and a Python interpreter installed on the host
 
 * :ref:`api-splitbrain` - Run code on the local machine, but have it operating on a remote one! The splitbrain
diff --git a/docs/api/core_protocol.rst b/docs/api/core_protocol.rst
index bbd5eeb..d77dac7 100644
--- a/docs/api/core_protocol.rst
+++ b/docs/api/core_protocol.rst
@@ -1,6 +1,6 @@
 .. _api-protocol:
 
-Protocol 
+Protocol
 ========
 
 .. automodule:: rpyc.core.protocol
diff --git a/docs/api/utils_splitbrain.rst b/docs/api/utils_splitbrain.rst
index 9c504bb..b743358 100644
--- a/docs/api/utils_splitbrain.rst
+++ b/docs/api/utils_splitbrain.rst
@@ -3,5 +3,5 @@
 Splitbrain Python
 =================
 
-.. automodule:: rpyc.utils.splitbrain
+.. automodule:: rpyc.experimental.splitbrain
    :members:
diff --git a/docs/docs.rst b/docs/docs.rst
index a385528..81a5ff4 100644
--- a/docs/docs.rst
+++ b/docs/docs.rst
@@ -9,7 +9,7 @@ Introduction
 .. toctree::
    :maxdepth: 1
    :hidden:
-   
+
    docs/about
    docs/theory
    docs/howto
@@ -18,13 +18,13 @@ Introduction
    docs/capabilities
 
 
-* :ref:`A little about RPyC <about>` - related projects, contributors, and 
+* :ref:`A little about RPyC <about>` - related projects, contributors, and
   logo issues
 
-* :ref:`Theory of Operation <theory>` - background on the inner workings of 
-  RPyC and the terminology 
+* :ref:`Theory of Operation <theory>` - background on the inner workings of
+  RPyC and the terminology
 
-* :ref:`Use cases <use-cases>` - some common use-cases, demonstrating the power 
+* :ref:`Use cases <use-cases>` - some common use-cases, demonstrating the power
   and ease of RPyC
 
 * :ref:`How to's <howto>` - solutions to specific problems
@@ -48,9 +48,9 @@ Reference
    docs/splitbrain
 
 
-* :ref:`Servers <servers>` - using the built-in servers and writing custom ones 
+* :ref:`Servers <servers>` - using the built-in servers and writing custom ones
 
-* :ref:`Classic RPyC <classic>` - using RPyC in *slave mode* (AKA *classic 
+* :ref:`Classic RPyC <classic>` - using RPyC in *slave mode* (AKA *classic
   mode*), where the client has unrestricted control over the server.
 
 * :ref:`RPyC Services <services>` - writing well-defined services which restrict
@@ -62,7 +62,7 @@ Reference
 * :ref:`Security Concerns <security>` - keeping security in mind when using
   RPyC
 
-* :ref:`Secure Connections <ssl>` - create an encrypted and authenticated 
+* :ref:`Secure Connections <ssl>` - create an encrypted and authenticated
   connection over SSL or SSH
 
 * :ref:`Zero-Deploy <zerodeploy>` - spawn temporary, short-lived RPyC server on remote
diff --git a/docs/docs/about.rst b/docs/docs/about.rst
index 07aaa9c..002668c 100644
--- a/docs/docs/about.rst
+++ b/docs/docs/about.rst
@@ -2,10 +2,10 @@
 
 About RPyC
 ==========
-RPyC was inspired by the work of **Eyal Lotem** on 
-`pyinvoke <http://pybuild.sourceforge.net/pyinvoke.html>`_, which pioneered in 
-the field of "dynamic RPC" (where there's no predefined contract between the 
-two sides). The two projects, however, are completely unrelated in any other 
+RPyC was inspired by the work of **Eyal Lotem** on
+`pyinvoke <http://pybuild.sourceforge.net/pyinvoke.html>`_, which pioneered in
+the field of "dynamic RPC" (where there's no predefined contract between the
+two sides). The two projects, however, are completely unrelated in any other
 way. RPyC is developed and maintained by `Tomer Filiba <http://tomerfiliba.com>`_
 (tomerfiliba at gmail.com).
 
diff --git a/docs/docs/async.rst b/docs/docs/async.rst
index 84b08ce..0066e2d 100644
--- a/docs/docs/async.rst
+++ b/docs/docs/async.rst
@@ -4,7 +4,7 @@ Asynchronous Operation
 ======================
 Many times, especially when working in a client-server model, you may want to perform
 operations "in the background", i.e., send a batch of work to the server and continue
-with your local operation. At some later point, you may want to poll for the completion 
+with your local operation. At some later point, you may want to poll for the completion
 of the work, or perhaps be notified of its completion using a callback function.
 
 RPyC is very well-suited for asynchronous work. In fact, the protocol itself is asynchronous,
@@ -15,9 +15,9 @@ asynchronous behavior.
 
 async()
 -------
-The wrapper :func:`async <rpyc.utils.helpers.async>` takes any *callable* 
-:ref:`netref <api-netref>` and returns an asynchronous-wrapper around that netref. 
-When invoked, this wrapper object dispatches the request and immediately returns an 
+The wrapper :func:`async <rpyc.utils.helpers.async>` takes any *callable*
+:ref:`netref <api-netref>` and returns an asynchronous-wrapper around that netref.
+When invoked, this wrapper object dispatches the request and immediately returns an
 :class:`AsyncResult <rpyc.core.async.AsyncResult>`, instead of waiting for the response.
 
 Usage
@@ -28,14 +28,13 @@ Create an async wrapper around the server's ``time.sleep`` function ::
 
 And invoke it like any other function, but instead of blocking, it will immediately
 return an ``AsyncResult`` ::
-  
+
     res = async_sleep(5)
-    
+
 Which means your client can continue working normally, while the server
-performs the request. Do note, however, that the server is "busy" sleeping,
-and will not respond to new requests until the operation completes (unless you
-started your request on a separate thread)
-    
+performs the request. There are several pitfalls using :func:`async
+<pyc.utils.helpers.async>`, be sure to read the Notes_ section!
+
 You can test for completion using ``res.ready``, wait for completion using ``res.wait()``,
 and get the result using ``res.value``. You may set a timeout for the result using
 ``res.set_expiry()``, or even register a callback function to be invoked when the
@@ -48,19 +47,23 @@ Therefore, you must hold a strong reference to the returned proxy. Particularly,
 that instead of doing ::
 
     res = async(conn.root.myfunc)(1,2,3)
-   
+
 Use ::
 
     myfunc_async = async(conn.root.myfunc)
     res = myfunc_async(1,2,3)
 
+Furthermore, async requests provide **no guarantee on execution order**. In
+particular, multiple subsequent async requests may be executed in reverse
+order.
+
 
 timed()
 -------
 :class:`timed <rpyc.utils.helpers.timed>` allows you to set a timeout for a synchronous invocation.
 When a ``timed`` function is invoked, you'll synchronously wait for the result, but no longer
-than the specified timeout. Should the invocation take longer, a 
-:class:`AsyncResultTimeout <rpyc.core.async.AsyncResultTimeout>` will be raised. 
+than the specified timeout. Should the invocation take longer, a
+:class:`AsyncResultTimeout <rpyc.core.async.AsyncResultTimeout>` will be raised.
 
 Under the hood, ``timed`` is actually implemented with ``async``: it begins dispatches the
 operation, sets a timeout on the ``AsyncResult``, and waits for the response.
@@ -71,12 +74,14 @@ Example
 
     # allow this function to take up to 6 seconds
     timed_sleep = rpyc.timed(conn.modules.time.sleep, 6)
-    
-    # wait for 3 seconds -- works fine
-    timed_sleep(3)  
-    
-    # wait for 10 seconds -- after 6 seconds, an AsyncResultTimeout will be raised
-    timed_sleep(10)
+
+    # wait for 3 seconds -- works
+    async_res = timed_sleep(3)  # returns immediately
+    async_res.value             # returns after 3 seconds
+
+    # wait for 10 seconds -- fails
+    async_res = timed_sleep(10) # returns immediately
+    async_res.value             # raises AsyncResultTimeout
 
 
 Background Serving Thread
@@ -95,7 +100,7 @@ calls, while still being able to process incoming request (normally from the ser
 the server to send "events" (i.e., invoke callbacks on the client side) while the client is busy
 doing other things.
 
-For a detailed example show-casing the ``BgServingThread``, see :ref:`tut5-events` in the 
+For a detailed example show-casing the ``BgServingThread``, see :ref:`tut5-events` in the
 tutorial.
 
 
diff --git a/docs/docs/classic.rst b/docs/docs/classic.rst
index 42fc7f4..e25333d 100644
--- a/docs/docs/classic.rst
+++ b/docs/docs/classic.rst
@@ -2,7 +2,7 @@
 
 Classic
 =======
-Prior to version 3, RPyC employed a modus-operandi that's now referred to as 
+Prior to version 3, RPyC employed a modus-operandi that's now referred to as
 "classic mode". In this mode, the server was completely under the control of its
 client -- there was no way to restrict what the client could do, and there was
 no notion of :ref:`services <services>`. A client simply connected to a server
@@ -18,19 +18,19 @@ See also the :ref:`API reference <api-classic>`
 
 Usage
 -----
-RPyC installs ``rpyc_classic.py`` to your Python scripts directory (e.g., ``C:\PythonXX\Scripts``, 
+RPyC installs ``rpyc_classic.py`` to your Python scripts directory (e.g., ``C:\PythonXX\Scripts``,
 ``/usr/local/bin``, etc.), which is a ready-to-run classic-mode server. It can be configured
 with :ref:`command-line parameters <classic-server>`. Once you have it running, you can connect
 to it like so ::
 
     conn = rpyc.classic.connect("hostname")    # use default TCP port (18812)
-    
+
     proc = conn.modules.subprocess.Popen("ls", stdout = -1, stderr = -1)
     stdout, stderr = proc.communicate()
     print stdout.split()
-    
+
     remote_list = conn.builtin.range(7)
-    
+
     conn.execute("print 'foo'")
 
 
diff --git a/docs/docs/howto.rst b/docs/docs/howto.rst
index ebd500d..65d5e7c 100644
--- a/docs/docs/howto.rst
+++ b/docs/docs/howto.rst
@@ -7,8 +7,8 @@ This page contains a collection of useful concepts and examples for developing w
 
 Redirecting Standard Input/Output
 ---------------------------------
-You can "rewire" ``stdin``, ``stdout`` and ``stderr`` between RPyC hosts. For example, 
-if you want to "forward" the ``stdout`` of a remote process to your local ``tty``, 
+You can "rewire" ``stdin``, ``stdout`` and ``stderr`` between RPyC hosts. For example,
+if you want to "forward" the ``stdout`` of a remote process to your local ``tty``,
 you can use the following receipt::
 
     >>> import rpyc
@@ -19,28 +19,28 @@ you can use the following receipt::
     >>> c.execute("print 'hi here'")   # now this will be redirected here
     hi here
 
-Also note that if you are using classic mode RPyC, you can use the 
+Also note that if you are using classic mode RPyC, you can use the
 `context manager <http://www.python.org/doc/2.5.2/lib/typecontextmanager.html>`_
 ``rpyc.classic.redirected_stdio``::
 
     >>> c.execute("print 'hi there'")                   # printed on the server
-    >>> 
-    >>> with rpyc.classic.redirected_stdio(c):          
+    >>>
+    >>> with rpyc.classic.redirected_stdio(c):
     ...     c.execute("print 'hi here'")                # printed on the client
-    ... 
+    ...
     hi here
     >>> c.execute("print 'hi there again'")             # printed on the server
-    >>> 
+    >>>
 
 .. figure:: _static/howto-redirected.png
    :align: center
-   
+
    A screenshot of an RPyC client redirecting standard output from the server to
-   its own console. 
+   its own console.
 
 Debugging
 ---------
-If you are using the classic mode, you will be glad to know that you can debug remote 
+If you are using the classic mode, you will be glad to know that you can debug remote
 exceptions with ``pdb``:
 
     >>> c = rpyc.classic.connect("localhost")
@@ -74,7 +74,7 @@ exceptions with ``pdb``:
     228             self.reset()
     229             self._parser = None
     230             return doc
-    231     
+    231
     (Pdb) w
     ...
       /home/tomer/workspace/rpyc/core/protocol.py(381)_handle_call()
@@ -85,15 +85,15 @@ exceptions with ``pdb``:
     -> return builder.parseString(string)
     > /usr/lib/python2.5/xml/dom/expatbuilder.py(226)parseString()
     -> pass
-    (Pdb) 
+    (Pdb)
 
 Tunneling
 ---------
-Many times, especially in testing environments, you have subnets, VLANs, VPNs, firewalls 
-etc., which may prevent you from establishing a direct TCP connection between two 
-machines, crossing network  in two different networks. This may be done for security reasons or to simulate 
-the environment where your product will be running, but it also hinders your ability to 
-conduct tests. However, with RPyC you can overcome this limitation very easily: 
+Many times, especially in testing environments, you have subnets, VLANs, VPNs, firewalls
+etc., which may prevent you from establishing a direct TCP connection between two
+machines, crossing network  in two different networks. This may be done for security reasons or to simulate
+the environment where your product will be running, but it also hinders your ability to
+conduct tests. However, with RPyC you can overcome this limitation very easily:
 simply use the remote machine's ``socket`` module!
 
 Consider the following diagram:
@@ -102,32 +102,32 @@ Consider the following diagram:
    :align: center
 
 Machine ``A`` belongs to network ``A``, and it wants to connect to machine ``B``, which
-belongs to network ``B``. Assuming there's a third machine, ``C`` that has access to both 
-networks (for instance, it has multiple network cards or it belongs to multiple VLANs), 
+belongs to network ``B``. Assuming there's a third machine, ``C`` that has access to both
+networks (for instance, it has multiple network cards or it belongs to multiple VLANs),
 you can use it as a transparent bridge between machines ``A`` and ``B`` very easily: simply
 run an RPyC server on machine ``C``, to which machine ``A`` would connect, and use its
 ``socket`` module to connect to machine ``B``. It's really simple::
 
     # this runs on machine `A`
     import rpyc
-    
+
     machine_c = rpyc.classic.connect("machine-c")
     sock = machine_c.modules.socket.socket()
     sock.connect(("machine-b", 12345))
-    
+
     sock.send(...)
     sock.recv(...)
 
 Monkey-Patching
 ---------------
-If you have python modules that make use of the ``socket`` module (say, ``telnetlib`` 
-or ``asyncore``), and you want them to be able to cross networks over such a bridge, 
+If you have python modules that make use of the ``socket`` module (say, ``telnetlib``
+or ``asyncore``), and you want them to be able to cross networks over such a bridge,
 you can use the recipe above to "inject" ``C``'s socket module into your third-party module,
 like so::
 
     import rpyc
     import telnetlib
-    
+
     machine_c = rpyc.classic.connect("machine-c")
     telnetlib.socket = rpyc.modules.socket
 
@@ -142,7 +142,7 @@ and entire modules. For instance ::
     mymodule.open = conn.builtins.open
     mymodule.Telnet = conn.modules.telnetlib.Telnet
 
-That way, when ``mymodule`` makes use of supposedly local modules, these modules 
+That way, when ``mymodule`` makes use of supposedly local modules, these modules
 actually perform operations on the remote machine, transparently.
 
 
diff --git a/docs/docs/secure-connection.rst b/docs/docs/secure-connection.rst
index 99e04c8..6216a88 100644
--- a/docs/docs/secure-connection.rst
+++ b/docs/docs/secure-connection.rst
@@ -2,11 +2,11 @@
 
 SSL
 ===
-Python 2.6 introduced the ``ssl`` module, and RPyC can now integrate with it. 
-If you wish to use ``ssl`` on versions earlier than Python 2.6, see the 
+Python 2.6 introduced the ``ssl`` module, and RPyC can now integrate with it.
+If you wish to use ``ssl`` on versions earlier than Python 2.6, see the
 :ref:`ssl-wrapper <dependencies>`.
 
-Using external tools, you can generate client and server certificates, and a certificate 
+Using external tools, you can generate client and server certificates, and a certificate
 authority. After going through this setup stage, you can easily establish an SSL-enabled
 connection.
 
@@ -14,7 +14,7 @@ Server side::
 
     from rpyc.utils.authenticators import SSLAuthenticator
     from rpyc.utils.server import ThreadedServer
-    
+
     # ...
 
     authenticator = SSLAuthenticator("myserver.key", "myserver.cert")
@@ -24,8 +24,8 @@ Server side::
 Client side::
 
     import rpyc
-    
-    conn = rpyc.ssl_connect("hostname", port = 12345, keyfile="client.key", 
+
+    conn = rpyc.ssl_connect("hostname", port = 12345, keyfile="client.key",
                             certfile="client.cert")
 
 For more info, see the documentation of `ssl module <http://docs.python.org/library/ssl.html>`_.
@@ -35,17 +35,17 @@ For more info, see the documentation of `ssl module <http://docs.python.org/libr
 
 SSH Tunneling
 =============
-SSL is a bit too complicated: you must generate certificates for each client and server, 
-sign them, manage the CA chains, etc. It's usually an overkill for the normal use-case of RPyC. 
-Instead, SSH offers a much easier approach. Conceptually, SSH is similar to SSL, but requires 
+SSL is a bit too complicated: you must generate certificates for each client and server,
+sign them, manage the CA chains, etc. It's usually an overkill for the normal use-case of RPyC.
+Instead, SSH offers a much easier approach. Conceptually, SSH is similar to SSL, but requires
 considerably less setup: once two machines are acquainted, you can easily set the trust-relations
 between them using the ``authorized_keys`` and ``known_hosts`` configuration files. You can
 also use interactive password authentication, in case it's desired.
 
-SSH is first-and-foremost a shell-protocol, but it includes **tunneling** support. This means 
+SSH is first-and-foremost a shell-protocol, but it includes **tunneling** support. This means
 you can route "unaware" connections over a tunnel, and get encryption and authentication for
-free. Setting up tunnels is not at all complicated, but in order to make life even easier, 
-RPyC comes bundled with SSH-tunneling support (of course you'll need an SSH client installed 
+free. Setting up tunnels is not at all complicated, but in order to make life even easier,
+RPyC comes bundled with SSH-tunneling support (of course you'll need an SSH client installed
 and configured, in order to use it).
 
 Usage
@@ -63,26 +63,26 @@ can be pretty much empty, as all the required information already exists. If not
 to include this information programmatically, like so::
 
     from rpyc.utils.ssh import SshContext
-    
+
     sshctx = SshContext("myserver", user = "foo", keyfile = r"/path/to/my/keyfile")
 
-And then, establishing a connection over SSH is a one-liner: 
+And then, establishing a connection over SSH is a one-liner:
 
     conn = rpyc.ssh_connect(sshctx, 12345)
 
... 4865 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/rpyc.git



More information about the Python-modules-commits mailing list