Commit 26263ee1 authored by Julian Taylor's avatar Julian Taylor

Import pyzmq_16.0.0.orig.tar.gz

parent 4fe5bec6
......@@ -2,6 +2,7 @@
zmq/backend/cython/*.c
zmq/devices/*.c
zmq/utils/*.json
zmq/include/*.h
__pycache__
build
dist
......
......@@ -13,19 +13,36 @@ env:
before_install:
- sudo add-apt-repository -y ppa:anton+/dnscrypt
- sudo apt-get update
- 'if [[ $ZMQ != bundled ]]; then sudo apt-get install -y -qq libzmq3-dev libsodium-dev; fi'
- 'if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then wget https://github.com/minrk/travis-wheels/archive/master.zip -O wheels.zip && unzip wheels.zip; fi'
- 'if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install -q -f travis-wheels-master/wheelhouse cython; fi'
- 'if [[ ! -z "$ZMQ" && $ZMQ != bundled ]]; then wget https://github.com/zeromq/$ZMQ/archive/master.zip -O libzmq.zip && unzip libzmq.zip; fi'
- 'if [[ ! -z "$ZMQ" && $ZMQ != bundled ]]; then sh -c "set -x; cd $ZMQ-master; sh autogen.sh; ./configure; make -j; sudo make install; sudo ldconfig"; fi'
- pip install -f file://travis-wheels-master/wheelhouse -r test-requirements.txt
- |
if [[ $ZMQ != bundled ]]; then
sudo apt-get install -y -qq libzmq3-dev libsodium-dev
fi
- |
if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then
pip install -q cython --install-option="--no-cython-compile"
fi
- |
if [[ ! -z "$ZMQ" && $ZMQ != bundled ]]; then
wget https://github.com/zeromq/$ZMQ/archive/master.zip -O libzmq.zip
unzip libzmq.zip
pushd "$ZMQ-master"
./autogen.sh
./configure
make -j
sudo make install
sudo ldconfig
popd
export ZMQ=/usr/local
fi
- pip install -r test-requirements.txt
install:
- 'if [[ ! -z "$ZMQ" && $ZMQ != bundled ]]; then export ZMQ=/usr/local; fi'
- python setup.py build_ext --inplace --zmq=$ZMQ
matrix:
include:
- python: 3.6-dev
env: ZMQ=bundled
- python: 3.5
env: ZMQ=libzmq
- python: 3.4
......@@ -34,14 +51,11 @@ matrix:
env: ZMQ=zeromq4-1
- python: 3.4
env: ZMQ=zeromq3-x
- python: 2.6
env: ZMQ=
- python: 3.2
env: ZMQ=
- python: 3.3
env: ZMQ=
- python: pypy3
env: ZMQ=
# FIXME: pypy3 is still on unsupported Python 3.2
# - python: pypy3
# env: ZMQ=
- python: nightly
env: ZMQ=
- python: nightly
......
......@@ -8,7 +8,7 @@ This package contains Python bindings for [ØMQ](http://www.zeromq.org).
ØMQ is a lightweight and fast messaging implementation.
PyZMQ should work with any reasonable version of Python (≥ 3.4),
as well as Python ≥ 2.6 and ≥ 3.2, as well as PyPy.
as well as Python 2.7 and 3.3, as well as PyPy.
The Cython backend used by CPython supports libzmq ≥ 2.1.4 (including 3.2.x and 4.x),
but the CFFI backend used by PyPy only supports libzmq ≥ 3.2.2 (including 4.x).
......@@ -42,8 +42,7 @@ the PyZMQ source code or wheels from
or install with conda.
You can also get the latest source code from our GitHub repository, but
building from the repository will require that you install Cython
version 0.16 or later.
building from the repository will require that you install recent Cython.
## Building and installation
......@@ -79,7 +78,13 @@ Building pyzmq from the git repo (including release tags on GitHub) requires Cyt
## Old versions
For libzmq 2.0.x, use pyzmq release 2.0.10.1.
pyzmq 16 drops support Python 2.6 and 3.2.
If you need to use one of those Python versions, you can pin your pyzmq version to before 16:
pip install 'pyzmq<16'
For libzmq 2.0.x, use 'pyzmq<2.1'
pyzmq-2.1.11 was the last version of pyzmq to support Python 2.5,
and pyzmq ≥ 2.2.0 requires Python ≥ 2.6.
......
......@@ -137,4 +137,6 @@ Functions
.. autofunction:: zmq.curve_keypair
.. autofunction:: zmq.get_includes
\ No newline at end of file
.. autofunction:: zmq.get_includes
.. autofunction:: zmq.get_library_dirs
......@@ -9,6 +9,23 @@ Changes in PyZMQ
This is a coarse summary of changes in pyzmq versions.
For a full changelog, consult the `git log <https://github.com/zeromq/pyzmq/commits>`_.
16.0
====
- Support for Python 2.6 and Python 3.2 is dropped. For old Pythons, use :command:`pip install "pyzmq<16"` to get the last version of pyzmq that supports these versions.
- Include zmq.h
- Deprecate ``zmq.Stopwatch``. Native Python timing tools can be used instead.
- Better support for using pyzmq as a Cython library
- bundle zmq.h when pyzmq bundles libzmq as an extension
- add :func:`zmq.get_library_dirs` to find bundled libzmq
- Updates to setup.py for Cython 0.25 compatibility
- Various asyncio/future fixes:
- support raw sockets in pollers
- allow cancelling async sends
- Fix :meth:`IOLoop.current` in :mod:`zmq.green`
15.4
====
......
......@@ -16,11 +16,11 @@ an overview of what the ØMQ API looks like in Python. For information on how to
ØMQ in general, see the many examples in the excellent `ØMQ Guide`_, all of which
have a version in Python.
PyZMQ works with Python 3 (≥ 3.2), and Python 2 (≥ 2.6), with no transformations or 2to3,
PyZMQ works with Python 3 (≥ 3.3), and Python 2.7, with no transformations or 2to3,
as well as PyPy (at least 2.0 beta), via CFFI.
Please don't hesitate to report pyzmq-specific issues to our tracker_ on GitHub.
General questions about ØMQ are better sent to the ØMQ `mailing list`_ or `IRC Channel`_.
General questions about ØMQ are better sent to the `ØMQ tracker`_ or `mailing list`_.
:doc:`changelog`
......@@ -87,6 +87,7 @@ Links
.. _ØMQ: http://www.zeromq.org
.. _ØMQ Guide: http://zguide.zeromq.org
.. _ØMQ Tracker: https://github.com/zeromq/libzmq/issues
.. _mailing list: http://www.zeromq.org/docs:mailing-lists
.. _IRC Channel: http://www.zeromq.org/chatroom
.. _Cython: http://cython.org/
......
......@@ -87,4 +87,4 @@ the array.
.. [msgpack] Message Pack serialization library http://msgpack.org
.. [protobuf] Google Protocol Buffers http://code.google.com/p/protobuf
.. [zlib] Python stdlib module for zip compression: :py:mod:`zlib`
.. [blosc] Blosc: A blocking, shuffling and loss-less (and crazy-fast) compression library http://blosc.pytables.org/trac
.. [blosc] Blosc: A blocking, shuffling and loss-less (and crazy-fast) compression library http://www.blosc.org
......@@ -57,7 +57,7 @@ def main():
rep.bind('inproc://a')
req.connect('inproc://a')
A = numpy.ones((1024,1024))
print ("Array is %i bytes" % (A.size * A.itemsize))
print ("Array is %i bytes" % (A.nbytes))
# send/recv with pickle+zip
req.send_zipped_pickle(A)
......
......@@ -8,9 +8,13 @@
# Used under LGPLv3
import argparse
from multiprocessing import Process
import time
from multiprocessing import Process
try:
now = time.monotonic
except AttributeError:
now = time.time
import zmq
......@@ -74,11 +78,9 @@ def latency(url, count, size, poll, copy):
msg = b' ' * size
watch = zmq.Stopwatch()
block = zmq.NOBLOCK if poll else 0
time.sleep(1)
watch.start()
start = now()
for i in range (0, count):
if poll:
......@@ -93,16 +95,16 @@ def latency(url, count, size, poll, copy):
assert len(msg) == size
elapsed = watch.stop()
elapsed = now() - start
s.send(b'done')
latency = elapsed / (count * 2.)
latency = 1e6 * elapsed / (count * 2.)
print ("message size : %8i [B]" % (size, ))
print ("roundtrip count: %8i [msgs]" % (count, ))
print ("mean latency : %12.3f [µs]" % (latency, ))
print ("test time : %12.3f [s]" % (elapsed * 1e-6, ))
print ("test time : %12.3f [s]" % (elapsed, ))
def pusher(url, count, size, poll, copy):
"""send a bunch of messages on a PUSH socket"""
......@@ -147,30 +149,27 @@ def throughput(url, count, size, poll, copy):
s.bind(url)
watch = zmq.Stopwatch()
block = zmq.NOBLOCK if poll else 0
# Wait for the other side to connect.
msg = s.recv()
assert len (msg) == size
watch.start()
start = now()
for i in range (count-1):
if poll:
res = p.poll()
msg = s.recv(block, copy=copy)
elapsed = watch.stop()
if elapsed == 0:
elapsed = 1
elapsed = now() - start
throughput = (1e6 * float(count)) / float(elapsed)
throughput = (float(count)) / float(elapsed)
megabits = float(throughput * size * 8) / 1e6
print ("message size : %8i [B]" % (size, ))
print ("message count : %8i [msgs]" % (count, ))
print ("mean throughput: %8.0f [msg/s]" % (throughput, ))
print ("mean throughput: %12.3f [Mb/s]" % (megabits, ))
print ("test time : %12.3f [s]" % (elapsed * 1e-6, ))
print ("test time : %12.3f [s]" % (elapsed, ))
def main():
......
......@@ -488,25 +488,36 @@ class Configure(build_ext):
fetch_libzmq(bundledir)
stage_platform_hpp(pjoin(bundledir, 'zeromq'))
tweetnacl = pjoin(bundledir, 'zeromq', 'tweetnacl')
tweetnacl_sources = glob(pjoin(tweetnacl, 'src', '*.c'))
randombytes = pjoin(tweetnacl, 'contrib', 'randombytes')
if sys.platform.startswith('win'):
tweetnacl_sources.append(pjoin(randombytes, 'winrandom.c'))
sources = [pjoin('buildutils', 'initlibzmq.c')]
sources += glob(pjoin(bundledir, 'zeromq', 'src', '*.cpp'))
includes = [
pjoin(bundledir, 'zeromq', 'include')
]
if bundled_version < (4, 2, 0):
tweetnacl = pjoin(bundledir, 'zeromq', 'tweetnacl')
tweetnacl_sources = glob(pjoin(tweetnacl, 'src', '*.c'))
randombytes = pjoin(tweetnacl, 'contrib', 'randombytes')
if sys.platform.startswith('win'):
tweetnacl_sources.append(pjoin(randombytes, 'winrandom.c'))
else:
tweetnacl_sources.append(pjoin(randombytes, 'devurandom.c'))
sources += tweetnacl_sources
includes.append(pjoin(tweetnacl, 'src'))
includes.append(randombytes)
else:
tweetnacl_sources.append(pjoin(randombytes, 'devurandom.c'))
# >= 4.2
sources += glob(pjoin(bundledir, 'zeromq', 'src', 'tweetnacl.c'))
# construct the Extensions:
libzmq = Extension(
'zmq.libzmq',
sources = [pjoin('buildutils', 'initlibzmq.c')] + \
glob(pjoin(bundledir, 'zeromq', 'src', '*.cpp')) + \
tweetnacl_sources,
include_dirs = [
pjoin(bundledir, 'zeromq', 'include'),
pjoin(tweetnacl, 'src'),
randombytes,
],
sources=sources,
include_dirs=includes,
)
# register the extension:
......@@ -529,7 +540,7 @@ class Configure(build_ext):
if sys.platform.startswith('win'):
# include defines from zeromq msvc project:
libzmq.define_macros.append(('FD_SETSIZE', 1024))
libzmq.define_macros.append(('FD_SETSIZE', 16384))
libzmq.define_macros.append(('DLL_EXPORT', 1))
libzmq.define_macros.append(('_CRT_SECURE_NO_WARNINGS', 1))
......@@ -587,6 +598,17 @@ class Configure(build_ext):
# not sure why
libzmq.libraries.append("stdc++")
# copy the header files to the source tree.
bundledincludedir = pjoin('zmq', 'include')
if not os.path.exists(bundledincludedir):
os.makedirs(bundledincludedir)
if not os.path.exists(pjoin(self.build_lib, bundledincludedir)):
os.makedirs(pjoin(self.build_lib, bundledincludedir))
for header in glob(pjoin(bundledir, 'zeromq', 'include', '*.h')):
shutil.copyfile(header, pjoin(bundledincludedir, basename(header)))
shutil.copyfile(header, pjoin(self.build_lib, bundledincludedir, basename(header)))
# update other extensions, with bundled settings
self.config['libzmq_extension'] = True
self.init_settings_from_config()
......@@ -888,6 +910,9 @@ class CleanCommand(Command):
bundled = glob(pjoin('zmq', 'libzmq*'))
_clean_me.extend([ b for b in bundled if b not in _clean_me ])
bundled_headers = glob(pjoin('zmq', 'include', '*.h'))
_clean_me.extend([ h for h in bundled_headers if h not in _clean_me])
for clean_me in _clean_me:
print("removing %s" % clean_me)
try:
......@@ -932,9 +957,9 @@ class CheckingBuildExt(build_ext):
for src in ext.sources:
if not os.path.exists(src):
fatal("""Cython-generated file '%s' not found.
Cython >= 0.16 is required to compile pyzmq from a development branch.
Cython >= %s is required to compile pyzmq from a development branch.
Please install Cython or download a release package of pyzmq.
"""%src)
""" % (src, min_cython_version))
def build_extensions(self):
self.check_cython_extensions(self.extensions)
......@@ -996,7 +1021,6 @@ buffers = pxd('utils', 'buffers')
message = pxd('backend', 'cython', 'message')
context = pxd('backend', 'cython', 'context')
socket = pxd('backend', 'cython', 'socket')
utils = pxd('backend', 'cython', 'utils')
checkrc = pxd('backend', 'cython', 'checkrc')
monqueue = pxd('devices', 'monitoredqueue')
......@@ -1004,7 +1028,7 @@ submodules = {
'backend.cython' : {'constants': [libzmq, pxi('backend', 'cython', 'constants')],
'error':[libzmq, checkrc],
'_poll':[libzmq, socket, context, checkrc],
'utils':[libzmq, utils, checkrc],
'utils':[libzmq, checkrc],
'context':[context, libzmq, checkrc],
'message':[libzmq, buffers, message, checkrc],
'socket':[context, message, socket, libzmq, buffers, checkrc],
......@@ -1016,14 +1040,17 @@ submodules = {
},
}
min_cython_version = '0.20'
try:
import Cython
if V(Cython.__version__) < V('0.16'):
raise ImportError("Cython >= 0.16 required, found %s" % Cython.__version__)
if V(Cython.__version__) < V(min_cython_version):
raise ImportError("Cython >= %s required for cython build, found %s" % (
min_cython_version, Cython.__version__))
from Cython.Distutils import build_ext as build_ext_c
cython=True
from Cython.Distutils import Extension
cython = True
except Exception:
cython=False
cython = False
suffix = '.c'
cmdclass['build_ext'] = CheckingBuildExt
......@@ -1044,12 +1071,13 @@ except Exception:
warn("Cython is missing")
else:
cv = getattr(Cython, "__version__", None)
if cv is None or V(cv) < V('0.16'):
if cv is None or V(cv) < V(min_cython_version):
warn(
"Cython >= 0.16 is required for compiling Cython sources, "
"found: %s" % (cv or "super old")
"Cython >= %s is required for compiling Cython sources, "
"found: %s" % (min_cython_version, cv or Cython)
)
cmdclass['cython'] = MissingCython
else:
suffix = '.pyx'
......@@ -1063,14 +1091,9 @@ else:
def build_extension(self, ext):
pass
class zbuild_ext(build_ext_c):
def finalize_options(self):
build_ext_c.finalize_options(self)
# set binding so that compiled methods can be inspected
self.cython_directives['binding'] = True
def build_extensions(self):
if self.compiler.compiler_type == 'mingw32':
customize_mingw(self.compiler)
......@@ -1090,26 +1113,29 @@ else:
cmdclass['build_ext'] = zbuild_ext
extensions = []
ext_include_dirs = [pjoin('zmq', sub) for sub in ('utils',)]
ext_kwargs = {
'include_dirs': ext_include_dirs,
}
if cython:
# set binding so that compiled methods can be inspected
ext_kwargs['cython_directives'] = {'binding': True}
for submod, packages in submodules.items():
for pkg in sorted(packages):
sources = [pjoin('zmq', submod.replace('.', os.path.sep), pkg+suffix)]
if suffix == '.pyx':
sources.extend(packages[pkg])
ext = Extension(
'zmq.%s.%s'%(submod, pkg),
sources = sources,
include_dirs=[pjoin('zmq', sub) for sub in ('utils',pjoin('backend', 'cython'),'devices')],
**ext_kwargs
)
if suffix == '.pyx' and ext.sources[0].endswith('.c'):
# undo setuptools stupidly clobbering cython sources:
ext.sources = sources
extensions.append(ext)
if pypy:
# add dummy extension, to ensure build_ext runs
dummy_ext = Extension('dummy', sources=[])
extensions = [dummy_ext]
bld_ext = cmdclass['build_ext']
class pypy_build_ext(bld_ext):
"""hack to build pypy extension only after building bundled libzmq
......@@ -1217,10 +1243,8 @@ setup_args = dict(
'Operating System :: POSIX',
'Topic :: System :: Networking',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
......
gevent; python_version == '2.7' and platform_python_implementation != "PyPy"
pytest
pytest; python_version != '3.2'
pytest < 3; python_version == '3.2'
unittest2; python_version < '3'
tornado; python_version != '3.2'
tornado < 4.4 ; python_version == '3.2'
......
......@@ -38,10 +38,20 @@ from zmq.sugar import *
def get_includes():
"""Return a list of directories to include for linking against pyzmq with cython."""
from os.path import join, dirname, abspath, pardir, exists
base = dirname(__file__)
parent = abspath(join(base, pardir))
includes = [ parent ] + [ join(parent, base, subdir) for subdir in ('utils',) ]
if exists(join(parent, base, 'include')):
includes.append(join(parent, base, 'include'))
return includes
def get_library_dirs():
"""Return a list of directories used to link against pyzmq's bundled libzmq."""
from os.path import join, dirname, abspath, pardir
base = dirname(__file__)
parent = abspath(join(base, pardir))
return [ parent ] + [ join(parent, base, subdir) for subdir in ('utils',) ]
return [ join(parent, base) ]
__all__ = ['get_includes'] + sugar.__all__ + backend.__all__
......@@ -267,7 +267,18 @@ class ZMQSelector(selectors.BaseSelector):
class Poller(_AsyncIO, _future._AsyncPoller):
"""Poller returning asyncio.Future for poll results."""
pass
def _watch_raw_socket(self, loop, socket, evt, f):
"""Schedule callback for a raw socket"""
if evt & self._READ:
loop.add_reader(socket, lambda *args: f())
if evt & self._WRITE:
loop.add_writer(socket, lambda *args: f())
def _unwatch_raw_sockets(self, loop, *sockets):
"""Unschedule callback for a raw socket"""
for socket in sockets:
loop.remove_reader(socket)
loop.remove_writer(socket)
class Socket(_AsyncIO, _future._AsyncSocket):
......@@ -297,6 +308,13 @@ class Socket(_AsyncIO, _future._AsyncSocket):
"""initialize the ioloop event handler"""
pass
def _clear_io_state(self):
"""clear any ioloop event handler
called once at close
"""
self._drop_io_state(self._state)
class Context(_zmq.Context):
"""Context for creating asyncio-compatible Sockets"""
_socket_class = Socket
......
......@@ -9,9 +9,6 @@ int zmq_connect(void *socket, const char *endpoint);
int zmq_errno(void);
const char * zmq_strerror(int errnum);
void* zmq_stopwatch_start(void);
unsigned long zmq_stopwatch_stop(void *watch);
void zmq_sleep(int seconds_);
int zmq_device(int device, void *frontend, void *backend);
int zmq_unbind(void *socket, const char *endpoint);
......
......@@ -28,13 +28,17 @@ def _make_zmq_pollitem_fromfd(socket_fd, flags):
def zmq_poll(sockets, timeout):
cffi_pollitem_list = []
low_level_to_socket_obj = {}
from zmq import Socket
for item in sockets:
if isinstance(item[0], int):
low_level_to_socket_obj[item[0]] = item
cffi_pollitem_list.append(_make_zmq_pollitem_fromfd(item[0], item[1]))
else:
if isinstance(item[0], Socket):
low_level_to_socket_obj[item[0]._zmq_socket] = item
cffi_pollitem_list.append(_make_zmq_pollitem(item[0], item[1]))
else:
if not isinstance(item[0], int):
# not an FD, get it from fileno()
item = (item[0].fileno(), item[1])
low_level_to_socket_obj[item[0]] = item
cffi_pollitem_list.append(_make_zmq_pollitem_fromfd(item[0], item[1]))
items = ffi.new('zmq_pollitem_t[]', cffi_pollitem_list)
list_length = ffi.cast('int', len(cffi_pollitem_list))
c_timeout = ffi.cast('long', timeout)
......
......@@ -3,7 +3,6 @@
#include <string.h>
#include <zmq.h>
#include <zmq_utils.h>
#include "zmq_compat.h"
int get_ipc_path_max_len(void) {
......
......@@ -11,6 +11,7 @@ from ._cffi import ffi, C
from zmq.error import ZMQError, InterruptedSystemCall, _check_rc, _check_version
from zmq.utils.strtypes import unicode
def has(capability):
"""Check for zmq capability by name (e.g. 'ipc', 'curve')
......@@ -21,7 +22,8 @@ def has(capability):
if isinstance(capability, unicode):
capability = capability.encode('utf8')
return bool(C.zmq_has(capability))
def curve_keypair():
"""generate a Z85 keypair for use with zmq.CURVE security
......@@ -40,27 +42,6 @@ def curve_keypair():
return ffi.buffer(public)[:40], ffi.buffer(private)[:40]
class Stopwatch(object):
def __init__(self):
self.watch = ffi.NULL
def start(self):
if self.watch == ffi.NULL:
self.watch = C.zmq_stopwatch_start()
else:
raise ZMQError('Stopwatch is already running.')
def stop(self):
if self.watch == ffi.NULL:
raise ZMQError('Must start the Stopwatch before calling stop.')
else:
time = C.zmq_stopwatch_stop(self.watch)
self.watch = ffi.NULL
return time
def sleep(self, seconds):
C.zmq_sleep(seconds)
def _retry_sys_call(f, *args, **kwargs):
"""make a call, retrying if interrupted with EINTR"""
while True:
......@@ -72,4 +53,5 @@ def _retry_sys_call(f, *args, **kwargs):
else:
break
__all__ = ['has', 'curve_keypair', 'Stopwatch']
__all__ = ['has', 'curve_keypair']
......@@ -23,9 +23,9 @@
# Imports
#-----------------------------------------------------------------------------
from libzmq cimport zmq_device, zmq_proxy, ZMQ_VERSION_MAJOR
from zmq.backend.cython.socket cimport Socket as cSocket
from zmq.backend.cython.checkrc cimport _check_rc
from .libzmq cimport zmq_device, zmq_proxy, ZMQ_VERSION_MAJOR
from .socket cimport Socket as cSocket
from .checkrc cimport _check_rc
from zmq.error import InterruptedSystemCall
......
......@@ -25,13 +25,13 @@
from libc.stdlib cimport free, malloc
from libzmq cimport zmq_pollitem_t, ZMQ_VERSION_MAJOR
from libzmq cimport zmq_poll as zmq_poll_c
from .libzmq cimport zmq_pollitem_t, ZMQ_VERSION_MAJOR
from .libzmq cimport zmq_poll as zmq_poll_c
from socket cimport Socket
import sys
from zmq.backend.cython.checkrc cimport _check_rc
from .checkrc cimport _check_rc
from zmq.error import InterruptedSystemCall
#-----------------------------------------------------------------------------
......
......@@ -23,7 +23,7 @@
# Imports
#-----------------------------------------------------------------------------
from libzmq cimport _zmq_version
from .libzmq cimport _zmq_version
#-----------------------------------------------------------------------------
# Code
......
from libc.errno cimport EINTR, EAGAIN
from cpython cimport PyErr_CheckSignals
from libzmq cimport zmq_errno, ZMQ_ETERM
from zmq.backend.cython.libzmq cimport zmq_errno, ZMQ_ETERM
cdef inline int _check_rc(int rc) except -1:
......
......@@ -23,7 +23,7 @@
# Imports
#-----------------------------------------------------------------------------
from libzmq cimport *
from .libzmq cimport *
#-----------------------------------------------------------------------------
# Python module level constants
......
......@@ -6,13 +6,13 @@
from libc.stdlib cimport free, malloc, realloc
from libzmq cimport *
from .libzmq cimport *
cdef extern from "getpid_compat.h":
int getpid()
from zmq.error import ZMQError, InterruptedSystemCall
from zmq.backend.cython.checkrc cimport _check_rc
from .checkrc cimport _check_rc
_instance = None
......
......@@ -27,7 +27,7 @@
cdef extern from *:
ctypedef char* const_char_ptr "const char*"
from libzmq cimport zmq_strerror, zmq_errno as zmq_errno_c
from .libzmq cimport zmq_strerror, zmq_errno as zmq_errno_c
from zmq.utils.strtypes import bytes
......
......@@ -101,10 +101,5 @@ cdef extern from "zmq.h" nogil:
int zmq_device (int device_, void *insocket_, void *outsocket_)
int zmq_proxy (void *frontend, void *backend, void *capture)
cdef extern from "zmq_utils.h" nogil:
void *zmq_stopwatch_start ()
unsigned long zmq_stopwatch_stop (void *watch_)
void zmq_sleep (int seconds_)
int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key)