diff options
author | obache <obache@pkgsrc.org> | 2013-01-24 12:37:58 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-01-24 12:37:58 +0000 |
commit | 6cf9b258b3d57980cba01e72209c0cfa06647555 (patch) | |
tree | ab7f917200466b7c1f3f813a7c2ca6d35baf85b0 /net/py-zmq | |
parent | 548fab8c7a7dcfb10e0f1d7efcce35770eff8cac (diff) | |
download | pkgsrc-6cf9b258b3d57980cba01e72209c0cfa06647555.tar.gz |
Update py-zmq to 2.2.0.1.
================
Changes in PyZMQ
================
2.2.0.1
=======
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 threadsafe:
:meth:`.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:
.. 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 <https://github.com/brandon-rhodes/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.
zmq.green
*********
The excellent `gevent_zeromq <https://github.com/traviscline/gevent_zeromq>`_ socket
subclass which provides `gevent <http://www.gevent.org/>`_ compatibility has been merged as
:mod:`zmq.green`.
.. seealso::
:ref:`zmq_green`
Bugs fixed
----------
* TIMEO sockopts are properly included for libzmq-2.2.0
* avoid garbage collection of sockets after fork (would cause ``assert (mailbox.cpp:79)``).
2.2.0
=====
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 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.
Other Changes and Removals
--------------------------
* ``prefix`` removed as an unused keyword argument from :meth:`~.Socket.send_multipart`.
* 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 anything.
* 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 maintaining
feature parity in other projects, such as
`pyzmq-ctypes <https://github.com/svpcom/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 multiple
streams.
* 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
:attr:`~.Socket.rcvmore`.
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.
* :mod:`zmq.web` added for load-balancing requests in a tornado webapp with zeromq.
Diffstat (limited to 'net/py-zmq')
-rw-r--r-- | net/py-zmq/Makefile | 11 | ||||
-rw-r--r-- | net/py-zmq/PLIST | 37 | ||||
-rw-r--r-- | net/py-zmq/distinfo | 9 | ||||
-rw-r--r-- | net/py-zmq/patches/patch-setup.py | 17 |
4 files changed, 45 insertions, 29 deletions
diff --git a/net/py-zmq/Makefile b/net/py-zmq/Makefile index eae648b842c..6f850862abd 100644 --- a/net/py-zmq/Makefile +++ b/net/py-zmq/Makefile @@ -1,15 +1,18 @@ -# $NetBSD: Makefile,v 1.7 2013/01/24 11:18:14 obache Exp $ +# $NetBSD: Makefile,v 1.8 2013/01/24 12:37:58 obache Exp $ # -DISTNAME= pyzmq-2.1.11 +DISTNAME= pyzmq-2.2.0.1 PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//} CATEGORIES= net -MASTER_SITES= http://cloud.github.com/downloads/zeromq/pyzmq/ +MASTER_SITES= http://cloud.github.com/downloads/zeromq/pyzmq/ \ + http://pypi.python.org/packages/source/p/pyzmq/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= https://github.com/zeromq/pyzmq/ COMMENT= Python bindings for zeromq -LICENSE= gnu-lgpl-v3 +LICENSE= gnu-lgpl-v3 AND modified-bsd + +PYSETUPBUILDARGS+= --zmq=${BUILDLINK_PREFIX.zeromq:Q} .include "../../lang/python/distutils.mk" .include "../../net/zeromq/buildlink3.mk" diff --git a/net/py-zmq/PLIST b/net/py-zmq/PLIST index 5ab6c97dd05..81e8e7286ae 100644 --- a/net/py-zmq/PLIST +++ b/net/py-zmq/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2012/04/08 20:21:54 wiz Exp $ +@comment $NetBSD: PLIST,v 1.3 2013/01/24 12:37:58 obache Exp $ ${PYSITELIB}/${EGG_FILE} ${PYSITELIB}/zmq/__init__.py ${PYSITELIB}/zmq/__init__.pyc @@ -6,6 +6,8 @@ ${PYSITELIB}/zmq/__init__.pyo ${PYSITELIB}/zmq/core/__init__.py ${PYSITELIB}/zmq/core/__init__.pyc ${PYSITELIB}/zmq/core/__init__.pyo +${PYSITELIB}/zmq/core/_poll.so +${PYSITELIB}/zmq/core/_version.so ${PYSITELIB}/zmq/core/constants.so ${PYSITELIB}/zmq/core/context.pxd ${PYSITELIB}/zmq/core/context.so @@ -14,12 +16,19 @@ ${PYSITELIB}/zmq/core/error.so ${PYSITELIB}/zmq/core/libzmq.pxd ${PYSITELIB}/zmq/core/message.pxd ${PYSITELIB}/zmq/core/message.so -${PYSITELIB}/zmq/core/poll.so +${PYSITELIB}/zmq/core/poll.py +${PYSITELIB}/zmq/core/poll.pyc +${PYSITELIB}/zmq/core/poll.pyo +${PYSITELIB}/zmq/core/pysocket.py +${PYSITELIB}/zmq/core/pysocket.pyc +${PYSITELIB}/zmq/core/pysocket.pyo ${PYSITELIB}/zmq/core/socket.pxd ${PYSITELIB}/zmq/core/socket.so ${PYSITELIB}/zmq/core/stopwatch.pxd ${PYSITELIB}/zmq/core/stopwatch.so -${PYSITELIB}/zmq/core/version.so +${PYSITELIB}/zmq/core/version.py +${PYSITELIB}/zmq/core/version.pyc +${PYSITELIB}/zmq/core/version.pyo ${PYSITELIB}/zmq/devices/__init__.py ${PYSITELIB}/zmq/devices/__init__.pyc ${PYSITELIB}/zmq/devices/__init__.pyo @@ -55,6 +64,15 @@ ${PYSITELIB}/zmq/eventloop/stack_context.pyo ${PYSITELIB}/zmq/eventloop/zmqstream.py ${PYSITELIB}/zmq/eventloop/zmqstream.pyc ${PYSITELIB}/zmq/eventloop/zmqstream.pyo +${PYSITELIB}/zmq/green/__init__.py +${PYSITELIB}/zmq/green/__init__.pyc +${PYSITELIB}/zmq/green/__init__.pyo +${PYSITELIB}/zmq/green/core.py +${PYSITELIB}/zmq/green/core.pyc +${PYSITELIB}/zmq/green/core.pyo +${PYSITELIB}/zmq/green/poll.py +${PYSITELIB}/zmq/green/poll.pyc +${PYSITELIB}/zmq/green/poll.pyo ${PYSITELIB}/zmq/log/__init__.py ${PYSITELIB}/zmq/log/__init__.pyc ${PYSITELIB}/zmq/log/__init__.pyo @@ -121,6 +139,9 @@ ${PYSITELIB}/zmq/tests/test_stopwatch.pyo ${PYSITELIB}/zmq/tests/test_version.py ${PYSITELIB}/zmq/tests/test_version.pyc ${PYSITELIB}/zmq/tests/test_version.pyo +${PYSITELIB}/zmq/tests/test_web.py +${PYSITELIB}/zmq/tests/test_web.pyc +${PYSITELIB}/zmq/tests/test_web.pyo ${PYSITELIB}/zmq/tests/test_zmqstream.py ${PYSITELIB}/zmq/tests/test_zmqstream.pyc ${PYSITELIB}/zmq/tests/test_zmqstream.pyo @@ -130,6 +151,7 @@ ${PYSITELIB}/zmq/utils/__init__.pyo ${PYSITELIB}/zmq/utils/allocate.h ${PYSITELIB}/zmq/utils/buffers.pxd ${PYSITELIB}/zmq/utils/initthreads.so +${PYSITELIB}/zmq/utils/ipcmaxlen.h ${PYSITELIB}/zmq/utils/jsonapi.py ${PYSITELIB}/zmq/utils/jsonapi.pyc ${PYSITELIB}/zmq/utils/jsonapi.pyo @@ -139,3 +161,12 @@ ${PYSITELIB}/zmq/utils/strtypes.py ${PYSITELIB}/zmq/utils/strtypes.pyc ${PYSITELIB}/zmq/utils/strtypes.pyo ${PYSITELIB}/zmq/utils/zmq_compat.h +${PYSITELIB}/zmq/web/__init__.py +${PYSITELIB}/zmq/web/__init__.pyc +${PYSITELIB}/zmq/web/__init__.pyo +${PYSITELIB}/zmq/web/proxy.py +${PYSITELIB}/zmq/web/proxy.pyc +${PYSITELIB}/zmq/web/proxy.pyo +${PYSITELIB}/zmq/web/zmqweb.py +${PYSITELIB}/zmq/web/zmqweb.pyc +${PYSITELIB}/zmq/web/zmqweb.pyo diff --git a/net/py-zmq/distinfo b/net/py-zmq/distinfo index 04a5b6c2d1d..639c650c412 100644 --- a/net/py-zmq/distinfo +++ b/net/py-zmq/distinfo @@ -1,6 +1,5 @@ -$NetBSD: distinfo,v 1.3 2012/04/17 17:33:09 drochner Exp $ +$NetBSD: distinfo,v 1.4 2013/01/24 12:37:58 obache Exp $ -SHA1 (pyzmq-2.1.11.tar.gz) = 5f94cf8431fc8197b3e42a944cafa19c88bec309 -RMD160 (pyzmq-2.1.11.tar.gz) = ac5ca7c600a65b6abc728e972ddafb5e97bd077d -Size (pyzmq-2.1.11.tar.gz) = 611281 bytes -SHA1 (patch-setup.py) = d3c9527a27bce998cd4eb65f5bd00a09b82ec97e +SHA1 (pyzmq-2.2.0.1.tar.gz) = 54e261cc42e85920f9453a90a2c336c38c73fe40 +RMD160 (pyzmq-2.2.0.1.tar.gz) = bc22c053d532124b569b59fb9a35914865b9ecc8 +Size (pyzmq-2.2.0.1.tar.gz) = 789996 bytes diff --git a/net/py-zmq/patches/patch-setup.py b/net/py-zmq/patches/patch-setup.py deleted file mode 100644 index 3deb7704f01..00000000000 --- a/net/py-zmq/patches/patch-setup.py +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-setup.py,v 1.1 2012/03/02 18:44:45 apb Exp $ - -Use PREFIX/include and PREFIX/lib for pkgsrc build. - ---- setup.py.orig 2011-10-12 22:38:44.000000000 +0000 -+++ setup.py -@@ -126,6 +126,10 @@ else: - if ZMQ is not None: - COMPILER_SETTINGS['include_dirs'] += [pjoin(ZMQ, 'include')] - COMPILER_SETTINGS['library_dirs'] += [pjoin(ZMQ, 'lib')] -+ elif os.environ['PREFIX']: -+ PREFIX = os.environ['PREFIX'] -+ COMPILER_SETTINGS['include_dirs'] += [pjoin(PREFIX, 'include')] -+ COMPILER_SETTINGS['library_dirs'] += [pjoin(PREFIX, 'lib')] - elif sys.platform == 'darwin' and os.path.isdir('/opt/local/lib'): - # allow macports default - COMPILER_SETTINGS['include_dirs'] += ['/opt/local/include'] |