The main new feature is improved tornado 3 compatibility.
PyZMQ ships a ‘minitornado’ submodule, which contains a small subset of tornado 3.0.1,
in order to get the IOLoop base class. zmq.eventloop.ioloop.IOLoop is now a simple subclass,
and if the system tornado is ≥ 3.0, then the zmq IOLoop is a proper registered subclass
of the tornado one itself, and minitornado is entirely unused.

PyZMQ now officially targets libzmq-3 (3.2.2),
0MQ ≥ 2.1.4 is still supported for the indefinite future, but 3.x is recommended.
PyZMQ has detached from libzmq versioning,
and will just follow its own regular versioning scheme from now on.
PyZMQ bdists will include whatever is the latest stable libzmq release (3.2.2 for pyzmq-13.0).

Note

set/get methods are exposed via get/setattr on all Context, Socket, and Frame classes.
This means that subclasses of these classes that require extra attributes
must declare these attributes at the class level.

With the IOLoop inherited from tornado, there is exactly one method that is threadsafe:
IOLoop.add_callback(). With this release, we are trying an experimental option
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:

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.

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.

The Message class has been renamed to 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 of
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.

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

Some Cython files in 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 maintaining
feature parity in other projects, such as
pyzmq-ctypes.

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.

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 multiple
streams.

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

remove support for LABEL prefixes. A major feature of libzmq-3.0, the LABEL
prefix, has been removed from libzmq, prior to the first stable libzmq 3.x release.

The prefix argument to send_multipart() remains, but it continue to behave in
exactly the same way as it always has on 2.1.x, simply prepending message parts.

recv_multipart() will always return a list, because prefixes are once
again indistinguishable from regular message parts.

add Socket.poll() method, for simple polling of events on a single socket.

no longer require monkeypatching tornado IOLoop. The ioloop.ZMQPoller class
is a poller implementation that matches tornado’s expectations, and pyzmq sockets can
be used with any tornado application just by specifying the use of this poller. The
pyzmq IOLoop implementation now only trivially differs from tornado’s.

It is still recommended to use ioloop.install(), which sets both the zmq and
tornado global IOLoop instances to the same object, but it is no longer necessary.

Warning

The most important part of this change is that the IOLoop.READ/WRITE/ERROR
constants now match tornado’s, rather than being mapped directly to the zmq
POLLIN/OUT/ERR. So applications that used the low-level IOLoop.add_handler()
code with POLLIN/OUT/ERR directly (used to work, but was incorrect), rather than
using the IOLoop class constants will no longer work. Fixing these to use the IOLoop
constants should be insensitive to the actual value of the constants.

add zmq_version_info() and
pyzmq_version_info() for getting libzmq and pyzmq versions as
tuples of numbers. This helps with the fact that version string comparison breaks down
once versions get into double-digits.