pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/py-zmq

Module Name:    pkgsrc
Committed By:   obache
Date:           Thu Jan 24 12:38:00 UTC 2013

Modified Files:
        pkgsrc/net/py-zmq: Makefile PLIST distinfo
Removed Files:

Log Message:
Update py-zmq to

Changes in PyZMQ

This is a tech-preview release, to try out some new features.
It is expected to be short-lived, as there are likely to be issues to iron out,
particularly with the new pip-install support.

Experimental New Stuff

These features are marked 'experimental', which means that their APIs are not 
set in stone,
and may be removed or changed in incompatible ways in later releases.

Threadsafe ZMQStream

With the IOLoop inherited from tornado, there is exactly one method that is 
:meth:`.IOLoop.add_callback`.  With this release, we are trying an experimental 
to pass all IOLoop calls via this method, so that ZMQStreams can be used from 
one thread
while the IOLoop runs in another.  To try out a threadsafe stream:

.. sourcecode:: python

    stream = ZMQStream(socket, threadsafe=True)

pip install pyzmq

PyZMQ should now be pip installable, even on systems without libzmq.
In these cases, when pyzmq fails to find an appropriate libzmq to link against,
it will try to build libzmq as a Python extension.
This work is derived from `pyzmq_static 

To this end, PyZMQ source distributions include the sources for libzmq (2.2.0) 
and libuuid (2.21),
both used under the LGPL.

The excellent `gevent_zeromq <>`_ 
subclass which provides `gevent <>`_ compatibility has 
been merged as

.. seealso::


Bugs fixed

* TIMEO sockopts are properly included for libzmq-2.2.0
* avoid garbage collection of sockets after fork (would cause ``assert 


Some effort has gone into refining the pyzmq API in this release to make it a 
model for
other language bindings.  This is principally made in a few renames of objects 
and methods,
all of which leave the old name for backwards compatibility.

.. note::

    As of this release, all code outside ``zmq.core`` is BSD licensed (where
    possible), to allow more permissive use of less-critical code and utilities.

Name Changes

* The :class:`~.Message` class has been renamed to :class:`~.Frame`, to better 
match other
  zmq bindings. The old Message name remains for backwards-compatibility.  
Wherever pyzmq
  docs say "Message", they should refer to a complete zmq atom of communication 
(one or
  more Frames, connected by ZMQ_SNDMORE). Please report any remaining instances 
  Message==MessagePart with an Issue (or better yet a Pull Request).

* All ``foo_unicode`` methods are now called ``foo_string`` (``_unicode`` 
remains for
  backwards compatibility).  This is not only for cross-language consistency, 
but it makes
  more sense in Python 3, where native strings are unicode, and the 
``_unicode`` suffix
  was wedded too much to Python 2.

Other Changes and Removals

* ``prefix`` removed as an unused keyword argument from 

* ZMQStream :meth:`~.ZMQStream.send` default has been changed to `copy=True`, 
so it matches
  Socket :meth:`~.Socket.send`.

* ZMQStream :meth:`~.ZMQStream.on_err` is deprecated, because it never did 

* Python 2.5 compatibility has been dropped, and some code has been cleaned up 
to reflect
  no-longer-needed hacks.

* Some Cython files in :mod:`zmq.core` have been split, to reduce the amount of
  Cython-compiled code.  Much of the body of these files were pure Python, and 
thus did
  not benefit from the increased compile time.  This change also aims to ease 
  feature parity in other projects, such as
  `pyzmq-ctypes <>`_.

New Stuff

* :class:`~.Context` objects can now set default options when they create a 
socket. These
  are set and accessed as attributes to the context.  Socket options that do 
not apply to a
  socket (e.g. SUBSCRIBE on non-SUB sockets) will simply be ignored.

* :meth:`~.ZMQStream.on_recv_stream` has been added, which adds the stream 
itself as a
  second argument to the callback, making it easier to use a single callback on 

* A :attr:`~Frame.more` boolean attribute has been added to the 
:class:`~.Frame` (née
  Message) class, so that frames can be identified as terminal without extra 
queires of

Experimental New Stuff

These features are marked 'experimental', which means that their APIs are not
set in stone, and may be removed or changed in incompatible ways in later 

* :mod:`zmq.web` added for load-balancing requests in a tornado webapp with 

To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/net/py-zmq/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/py-zmq/PLIST
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/py-zmq/distinfo
cvs rdiff -u -r1.1 -r0 pkgsrc/net/py-zmq/patches/

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index