pycos version 4.9.0 has been released. Major changes from previous release are:

  • Value of tasks now is the value with 'return(value)' (in Python 3.7+) or with 'raise
    StopIteration(value)' in versions of Python prior to 3.7. It is no longer last value used with
    'yield value', as done in Pycos versions up to 4.8. Thus, now tasks must use 'return' or 'raise
    StopIteration' to finish with value; otherwise, it is treated as 'return None' or 'raise
    StopIteration(None)'.

  • Renamed 'Computation' in dispycos to 'Client'. For now 'Computation' is an alias to 'Client' for
    backward compatability, but 'Computation' will be removed in a future release.

  • Added 'dispycos_close_server(terminate=False, restart=False)' function for dispycos computations
    (tasks) to quit the server the computation is executing at. Optional parameters 'terminate' and
    'restart' can be used to control if all running tasks must be terminated right away and if the
    server must be restarted after quitting current instance.

  • Added 'restart_servers' optional parameter to 'Client'. This option can be used to always restart
    servers that are closed (by client either with 'dispycos_close_server' or 'close_server' method
    of 'Client').

  • Added 'restart_node' and 'restart_server' methods to 'Client'.

  • dispycos computations can now discover other servers with 'discover_peers' method.

  • Added 'dispycos_client_restart_servers.py' and 'dispycos_mas.py' to examples to illustrate new
    features.

  • Added 'rti_node_server.py' and 'rti_node_client.py' to examples. These can be used to
    administer (e.g., to periodically run tasks on all servers) using authentication for safety.

  • Fixed AsyncPipe under Windows and latest version of pywin32.

  • dispycosnode program under Windows now doesn't force daemon mode; with latest version of pywin32
    multiprocessing works as expected while reading input.

  • 'peer_status' method of pycos can now be used more than once to install multiple tasks to be
    notified of peer status. In addition, 'None' can also be passed as task to remove all status
    tasks.

  • Added 'PickleProtocolVersion' parameter to config.py. This can be used work with different
    versions of Python that may use different versions of default pickle protocol versions. Setting
    this option also works with dispy, e.g., node using Python 3.7 and client using Python 3.8.

  • Fixed 'is_alive' method of Task.