Pyro 3.7 is the current release
Find it on Pyro's SF project page if you don't pull the release from CVS The changes since 3.6 can be found in the 'changes' chapter in the manual.
Blocking issues for Pyro 3.8
AllInOne examples don't work on Mac OS ; the eventserver listener doesn't get the events
Fixes made in CVS since Pyro 3.8 beta
- fixed orig_import call in protocol.py for extra params that Python 2.6+ use
- replaced custom locking objects by imp.acquire_lock() to obtain global import lock in mobile code import logic
- autoreconnect example no longer stops after ten seconds
- benchmark example got its iterations heavily increased because of faster machines
- distributed-computing2 example generates easier numbers to avoid excessive computation times in factorization
- configuration.py, core.py, nsc.py explicitly import Pyro.errors to avoid import errors during runtime hopefully
- fixed monospace font in manual's print css
- ext/remote.py and remote_nons.py don't eat all break signals anymore (only ctrl-c), quickstart examples use timeout on loop to be able to break them
- added config item PYROSSL_POSTCONNCHECK that you can set to 0 (default=1) to circumvent connection/certificate validations when using SSL. Not advised to set it to 0 though.
cleanups in SSL code in protocol.py (receive loop, handleRequests, M2Crypto.threading.init() called if multithreading)
- added 2 convenience methods to the daemon: getLocalObject(guid) and getLocalObjectForProxy(proxy)
- Pyro now uses an internal mutex to control concurrent access to proxy objects. You can now freely use proxy objects in different threads. The thread ownership check has been removed, and the _transferThread() method is now a stub.
- removed PYRO_PROXYSHARING_ENABLED config item and examples
Pyro 3.8-beta contains the following fixes (compared to 3.7)
- Pyro 3.8 is a bug-fix release that is almost completely backwards compatible with Pyro 3.7, apart from the exception change explained next.
- removed the exception args fiddling because it caused problems and depended on a deprecated python feature. If your code depends on the format of the exception.args field of an exception returned from a remote method call, you may need to change your code. This is the only thing that may not be backward compatible with code written for Pyro 3.7
improved Jython and IronPython compatibility. See wiki pages for detailed info on this.
fixed bug that self.daemon wasn't always set in NameServerStarter, causing problems with the shutdown and getServerSockets methods
- fixed pickling/copying of proxies (they were forgetting attributes such as oneway methods)
- version banner printing is now default off
- improved errorhandling of some protocol errors in protocol.py
- added request data format sanity check in protocol.py
- fixed /bin/env to /usr/bin/env in a couple of files (following patches from Ubuntu package)
- removed spaces in hashbang line in a lot of shellscripts (following patches from Ubuntu package)
handle EINTR status (interrupted system call) during socket reads (no more ConnectionClosedError)
- fixed crash in initServer: storage dir checking issue with non-unique temporary files
- fixed crash in errormessage in naming.py
- changed relative imports to absolute imports
- few more changes to certain del methods to avoid crashes
- nameserver locator no longer searches other hosts if an explicit hostname parameter is given
- pyro-xnsc didn't correctly use the hostname from the name server location textfield
- pyro-ns has new '-r' option to not look for existing name servers when starting a new one
- prefers hashlib over md5 module because of deprecation in newer python versions
- improved performance of supports_multithreading() and supports_compression() tests in util2.py (don't let them test the importing over and over again)
- removed util.py's dependency on protocol.py to avoid possible import problem
- fixed attrproxy getattr loop when deleting the object
- implemented new PYRO_PROXYSHARING_ENABLED config item, added proxysharing examples
- user_passwd_auth example: passwords no longer stored as plaintext
- fixed server side connection exception when error occurs during oneway call
- The os can select a random port for your Pyro daemons if you set port=0 (and norange=1) when creating daemons. NS and ES also support this.
- You can now override the broadcast address for the name server and the name server locator. Added config items for this as well.
Changes in CVS for Pyro 4.0
- requires at least Python 2.4
- examples/benchmark show about 25% speed increase for Pyro 4.0 over Pyro 3.7.
- wire protocol change: no longer compatible with older Pyro versions (message header has been shrunk)
- removed all mobile code support
- added @Pyro.remote decorator to explicitly annotate methods accessible via Pyro (required)
- new 'expose' parameter for delegateTo, to allow you to specify a list of methods that need to be exposed from the delegated object.
- Jython doesn't support decorators so it can no longer directly be used to run Pyro code.
- all source files now use 4-space indentation instead of tabs
- cleaned up change history in manual, renamed chapter 3 file from 'install' to 'config'
- NS broadcast retry is now 1 (was 2) and timeout is now 0.75 (was 2)
- Removed failover-NS (primary/secondary NS) support, PYRO_NS2_XXX config items.
- Removed persistent Naming Server.
- Removed the shutdown command of the Naming Server and nsc tools.
- all boolean config items are now really True/False (was 1/0)
- updated all other code too to use booleans instead of 0/1, and a few other things polished up to newer Python syntax
added 2 shortcut functions: Pyro.proxy and Pyro.attrproxy to make it even easier to create proxies in client code. (They are aliases for the corresponding getProxy methods from Pyro.core)
Pyro.core.SynchronizedObjBase now correctly handles string exceptions (deprecated anyway) (needs backport to 3.6-maintenance)
- removed PYRO_MULTITHREADED config option, all Pyro servers are now multithreaded. Can no longer be configured.
- removed PYRO_NS_DEFAULTGROUP config option. You will have to make sure yourself that all your object names are absolute and contain the full hierarchical name.
- removed PYRO_CHECKSUM config option and message checksumming overhead.
removed the Pyro.naming.NameServerProxy. All proxies used for the NS are now just regular Pyro proxies.
- fullName() method on NS proxy is gone. It makes no sense anymore.
- when creating names and groups in the NS, the whole path sequence is created if it doesn't exist. No need anymore to create all sub groups yourself first.
- Pyro now requires that your Python has thread support. Removed Pyro.util.supports_multithreading() and all uses of it.
- Pyro now requires that your Python has zlib (for compression option).
- uses builtin uuid module if available for GUID creation (Python 2.5+)
removed UserLogger object and PYRO_USER_LOGFILE and PYRO_USER_TRACELEVEL config items
- removed support for my 'recvall' socket patch (it was flawed)
- timeouts now implemented using socket.settimeout instead of custom select thing (naming, protocol)
- recv loop can now handle EAGAIN errors when MSG_WAITALL is used
- removed PYRO_PICKLE_FORMAT config item. Pickling protocol is now always best available (binary).
- removed initClient() and initServer(). Pyro doesn't require any initialisation function to be called anymore.
- this also means that a Pyro server can now start in a read-only location (previously, it required a writable directory)
- new function: Pyro.util.dumpConfig() that you could use to dump the Pyro config in the log, much like the init functions used to do.
- removed the custom logging implementation, switched everything to Python's own logger.
- removed PYRO_TRACELEVEL, PYRO_LOGFILE, PYRO_STDLOGGING and PYRO_STDLOGGING_CFGFILE config items
- added PYRO_LOG_CONFIG config item that points to the logger config file (default pyrolog.cfg)
- Logger config done via log config file. If unconfigured, logging is disabled.
- Pyro.util.configureBasicLogging() method added to set up logging for people too lazy to write a logging config file.
- removed the following examples: logging, multithread, agent2, agent3, distributed-computing, testmobile, threadmobile
wxnsc updated to recent WxPython API, deprecation warning is gone
- removed the Pyro Implementation chapter from the manual, it was outdated and didn't contain much info anyway.
- removed Pyro.ext.daemonizer, Pyro.ext.remote, Pyro.ext.remote_nons and the 'quickstart' examples.
- esd and nsd (unix daemons) scripts have been removed, as well as the rns (restarting name server) script.
- xnsc and wxnsc gui tools have been removed. They're now folded into the nsc command: use a command line switch to launch the appropriate gui tool.
- renamed all batch files with 'pyro-' prefix to avoid name clashes (debian package already had this)
- proxy URI's that get resolved will replace the original URI in the proxy to avoid needless resolves later on
- util.getPyroTraceback can now be called without arguments, in that case it will determine the exception object itself
- setInitTLS() is gone
thread local storage is now implemented using threading.local() from Python 2.4+ standard library
- PyroURI does no longer do automagic name resolving, this also fixed the hash problem (PyroURI objects are now considered immutable)
- converted all classes to new-style classes (direved from object)
Pyro.ObjBase uses slots so you can now use slots in your own objects too, to control the set of allowed attributes
fixed bug that self.daemon wasn't always set in NameServerStarter, causing problems with the shutdown and getServerSockets methods
- internal getHostname method now uses getfqdn instead of regular gethostname. Hopefully this will avoid Pyro binding on 127.0.0.1 some more.
- don't allow use of setTimeout in Jython because it causes unreliable behavior
Pyro's TODO list
This is my TODO list. If you have a solution for an item on this list, or if you have a topic to add to this list, please add it and mark it clearly and/or drop me an email-- irmen (at) users.sourceforge.net
Considered for inclusion in next version:
- note; check all examples using Python 2.4 and Python 2.6
- use a mutex in proxies instead of the thread-id checking stuff. It is faster (so long as we don't use RLock), and avoids any possible mistakes with sharing proxies and simplifies matters (simple is good). May break API for V4. (removal of transferthread etc)
More stuff:
SSL/M2Crypto issues: (tested against M2Crypto 0.18.2 from http://chandlerproject.org/Projects/MeTooCrypto)
- ssl socket recv() doesn't support extra parameters such as MSG_WAITALL. So _recv_msg() in protocol.py has to specialcase this for ssl sockets
m2crypto ssl sockets return None on recv() when socket.setdefaulttimeout() has been set, this causes ConnectionClosedError
select doesn't work on M2Crypto's SSL sockets if there are still bytes pending. (it doesn't return the socket)
- fix server side connection exception when error occurs during oneway call (already in V3, core.py 2.104.2.12; protocol.py 2.94.2.9)
- Implement port=0 random port selection (core.py, naming/event services scripts, docs) (already in V3)
- broadcast address override possibility (instead of defaulting to 255.255.255.255) (already in V3; 2 config items, docs, nameserver, locator, nsc, xnsc, wxnsc)
- protocol.py receiveMsg() should not call returnException if the noReply argument is set (already fixed in V3)
- make thread-id check in proxies optional (default=on). Add docs on this. (already in V3)
- fix user_passwd_auth example: passwords no longer stored as plaintext (already done in V3)
- fix attrproxy getattr loop when deleting the object (already done in V3, getattr method in attrproxy)
- use the new logo for Pyro 4
- be able to use a client-to-server socket to make callbacks back to the client (so that client doesn't need a deamon for this) This may require more general socket/connection management (pools?)
- add some info to the docs about the use of new-style classes as arguments. (pickle issues, need for getnewargs etc (when subclassing int type) )
- fix examples/allinone, use same host param for all servers to avoid port issues (already done in V3)
More IronPython compatibility (also in v3):
- fix kwargs in Pyro_dyncall in core.py, unicode to str keys in case of ironpython client (already in V3)
check current state of affairs and document this (PyroAndIronpython)
- More Jython compatibility (already done in V3):
- pyro v4 currently no longer has PYRO_PICKLE_FORMAT setting. Problem is, the highest setting causes pickling errors when talking to Jython clients. need this back in to be able to talk to jython...
- Jython now does have select and errno modules, fix this in protocol.py and other places
- fix examples/name server/event server use of setTimeout when running jython
- find a way to patch Pyro for Jython (Pyro v4) (replace decorators by explicit func.pyroremote=True)
- add request data sanity check in protocol.py trunk that is already committed in v3 (rev 2.94.2.6 of protocol.py)
- use thread.get_ident() instead of threading.currentThread() to identify threads. Avoids certain obscure thread id problems. This requires an API change and code change as well because you can no longer pass threading.Thread objects to _transferThread() !
fix deprecation warnings (md5 -> hashlib) protocol.py + examples (already committed in V3)
- make pyro-ns new '-r' option to not look for existing name servers when starting a new one (already committed in V3)
- move import statements to the top of the module instead of inside functions.
- replace relative imports (import constants) by absolute ones (import Pyro.constants) for instance in core.py
- nameserver locator must no longer search other hosts if an explicit hostname parameter is given (naming.py)
- add an option to the name server to not open a broadcast responder at all
- improve manual: explain the way Pyro handles remote objects and proxies and threads better. ('how to do session management')
- write a paragraph in de docs about the 127.0.0.1 issue and what you could do to avoid the problem (set pyro config vars, edit /etc/hosts)
- oneway calls execute in their own temporary thread (protocol.handleInvocation). Make this configurable, and default=off (so they share the main connection's thread that runs all other calls as well).
- improve daemon's object implementation map, its getRegistered method, and !ResolvePYROLOC (this one loops through the map in O(N) complexity .... I want O(1)
investigate the 'devil number' on macos: [http://www.nabble.com/The-Devil%27s-Number-to9154129.html#a9154129]
what about AttrProxy? And the new decorator stuff should be used for attributes as well (instead of allowing every attribute to be set/get)
- add more support for new Gnosis xml pickler (1.3) and maybe even add a custom pickler (JSON? YAML?)
- ES: queueing of events when subscriber is too slow? Need max number of threads? (queue will block if its full, but threads keep on getting created)
- Add Jason Letbetter's NS security fixes
Callbacks: when registering a callback object *once*, deadlock may occur if the objects enter a 'conversation'. For instance: if A calls B, and B calls back to A trough a callback object, and then A tries to call B again --> deadlock because B is still waiting for A to answer the callback invocation, not invoking a method again! When A does not call B again but just answers the callback invocation, things work out fine. See bounce2 code in the examples. Solution???: Pyro must detect that the connection is still in use (waiting for reply) and it should open a new connection for the new method call.
- repository in Subversion instead of CVS
check pickle alternatives: [http://trustedpickle.sourceforge.net/ TrustedPickle], [http://home.gna.org/oomadness/en/cerealizer/index.html Cerealizer]
check out [http://pybuild.sf.net/pyinvoke.html PyInvoke].
- NS lookup using IP multicast
implement PYRONAMESSL protocol? (see PYROLOCSSL) NS needs to be able to run in SSL mode.
- implement multicall methods (see Python's xmlrpclib) to do batch-invocations.
- clean way to have server hooks for client connects and disconnects (latter can be used for cleanups!)
- transient object cleanups; only clean when client disconnects?
- rename 'object' names in core.py to 'obj' to avoid overwriting the builtin type name
- replace the argument passing code in the various script tools by a better one (getopt or even optparse), so that for instance the order of the arguments doesn't matter anymore.
add [http://trevp.net/tlslite/ TLS lite] SSL support instead of PyOpenSSL? The latter seems abandoned. M2Crypto is allright though, but it seems that you now have to pay for a windows build of it, and it contains a few bugs that
- Server to client authentication (Pyro does only client to server). My clients send some sensitive stuff to the server and I must be sure the reference I have for the remote object it's the one I'm supposed to talk to. (I didn't do it very nice, but simple, using python's hmac module - client makes a call to the object with token and compares the return value with it's own computation).
For Pyro 4.0: see if [http://peak.telecommunity.com/doc/index.html PEAK] can be of any use (naming service etc)
nested attribute access via new NestedAttrProxy See XML rpc lib (in Python <=2.4.0, it was patched in later versions). Pay attention to [http://www.python.org/security/PSF-2005-001/ this security issue] here!! "you can traverse into the internals of an exported function and thus access func_globals and thus see private data. That data can be changed and deleted" !
- register more than one URI with the same name in the NS? So that essentially you don't get the single, unique service but a list of service instances, of which you can select one. Or perhaps provide your own load balancing plugin.
- add some form of regression testing that can run all (ideally) examples / tests. Perhaps a real test set is necessary. (the examples are just that-- examples, not test cases)
- document Pyro.ext packages better.
- Investigate possible protection of NS against overwriting existing object registrations. Describe in NS and Security chapters.
- ES topic lister + stats? Can only show topics for which there are listeners, ofcourse (including patterns). Stats might be accumulated over all topics ever used...
- NS: multiple object locations registered for a single object name (replication of pyro objects)
Reaping transient objects doesn't close any socket connections that may still be active to these objects. They'll fail with ProtocolError 'unknown object ID' if they're accessed again. This is because sockets and threads on the server are not necessarily associated with a unique object, so they have to remain active. (Once the client closes the connection due to some error, the server side socket and thread will be released).
- Socket Connection pool on client side... max number of sockets to a specific host. Proxies to that host can pool the sockets. Multiplex calls from the same thread to the same pyro daemon over a single socket?
- Look into the multiple-protocol issue. Pyro depends too much on sockets. It should be possible to change that to Unix domain sockets, or other IPCs.
- Code cleanup; PYROAdapter/TCPServer/Daemon look like spaghetti. (still )
- Bridge to XMLRPC, SOAP. Store XMLRPC: or SOAP: uri's in Pyro's NS??? Do NOT attempt to process/store WSDL or act as UDDI server! Bridge must also accept incoming XMLRPC/SOAP requests and translate them to Pyro calls. For best results, a protocol mapping def. is needed
