pypi / celery
celery
What changed in celery 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
10 breaking4 security1 deprecations22 new APIs and options3 performance9 behavior and defaults68 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcelery 5117 changes
Breaking changes 10
Acknowledgment behavior on task failure is decoupled from acknowledgment behavior on timeout; review settings if relying on their previous combined behavior.
Acknowledgment behavior on timeout is decoupled from acknowledgment behavior on task failure; review settings if relying on their previous combined behavior.
The Brotli optional dependency extra now uses brotlicffi instead of brotlipy.
A chord fails when a preceding chord's header failed.
The chord fails when the broker refuses chord_unlock's retry publish.
Eager chain execution now stops when a task raises Ignore or Reject.
Python 3.10 is now the minimum supported version; Python 3.9 support has been removed.
Access to private attributes and dunders through registered() is denied.
Applying @shared_task twice now raises a clear error.
Python 3.8 support is dropped; Python 3.9 is now required to use Celery 5.6.0.
Security 4
AzureBlockBlobBackend.as_uri redacts SAS tokens and lowercases account keys.
broker_read_url is now masked by filter_hidden_settings.
broker_write_url is now masked by filter_hidden_settings.
Broker URLs containing passwords are now sanitized in all log output, preventing credentials from being logged in plaintext by delayed delivery.
Deprecations 1
Celery warns when routing options are set as task attributes.
New APIs and options 22
Timeout acknowledgments can now be configured independently of failure acknowledgments.
Checks whether a result exists.
Celery beat gains opt-in remote control support, including inspect ping.
Adds the celery_beat_task header to task options.
ColorFormatter gains datefmt support for formatting log timestamps.
The auto concurrency option makes worker concurrency cgroup-aware.
Adds datefmt support to ColorFormatter and TaskFormatter.
Adds an engine_callback to the database backend SessionManager.
Celery Beat now supports opt-in remote-control inspect ping.
Adds support for using pymemcache as a result backend.
Redis backend SSL configuration can now be specified using Redis URLs.
Controls the expiration of chord-related Redis keys.
Configures expiration for failure results.
The asynchronous prefork pool now supports the spawn start method.
Controls the depth of task argument and keyword-argument representations.
Controls whether tasks are requeued after a worker process is lost.
Adds an option to limit task requeues after worker loss, allowing developers to control repeated requeueing.
TaskFormatter gains datefmt support for formatting log timestamps.
worker_concurrency can be cgroup-aware through --concurrency=auto.
Sets the exchange type for auto-created missing queues.
Sets the queue type for auto-created missing queues, such as quorum or classic.
Adds a configuration option to limit ETA or countdown tasks fetched by workers, helping prevent out-of-memory crashes when brokers contain many scheduled tasks.
Performance 3
Extension entry-point discovery is cached to reduce apply_async CPU overhead.
Reduces O(K²) message bloat in a chain of chords.
Adds a missing database index on date_done.
Behavior and default changes 9
Failure acknowledgments can now be configured independently of timeout acknowledgments.
Automatic worker concurrency detection now accounts for cgroups.
The backend retry policy is now applied to all DatabaseBackend database operations.
Tasks configured with pydantic=True can now accept Pydantic model instances when called.
Tasks configured with pydantic=True now accept Pydantic models when called.
Queues.deselect() supports queue aliases.
ResultSet.add() can now be called after the set's results are ready.
Task publishing signals are no longer gated on cached receiver lists.
The worker hostname is now provided as the signal sender.
Fixes and other changes 68
backends.by_url() accepts backend classes.
Beat no longer sleeps too long or returns a delayed value when is_due changes the heap.
Celery waits between retries when the broker refuses a callback publish.
Beat keeps running when a schedule entry fails, and impossible crontab dates are rejected.
Corrects relative schedule rounding across daylight saving time transitions.
celery multi no longer crashes when a single node name contains a dash.
Fixed failures with node names containing dashes.
Representations no longer mangle task names and arguments.
Failures in chained tasks are now propagated to the chord body.
Chord error handling is fixed when the body is a chain.
A chord's link and link_error options are now passed to its body only.
silent=True is honored during lazy configuration loading.
Countdown, expiration, and Beat intervals are corrected across daylight saving time transitions.
The database backend keeps the first SUCCESS rather than replacing it with a later result.
The database backend stores task children and stamping metadata with extended results.
The database result backend now honors the configured result_serializer.
A chain link fires once on the last task in eager chains.
Arguments are forwarded correctly through nested chains during eager execution.
EagerResult.get() raises TaskRevokedError after revoke().
Fixes task execution after ETA conversion fails.
A timeout of 0 is honored instead of causing get_many to poll forever.
ignore_result overrides are preserved across retries, and Task.apply respects the task's ignore_result default.
A nested group no longer takes its parent group's id.
Tasks scheduled with an ETA or countdown can now be found by query_task.
Queues.__setitem__() applies default max priority and the default routing key when a queue lacks them.
Redis result compression works when decode_responses is enabled.
Rejected tasks are marked as failed when they are not requeued.
Stored results are now actually compressed when result_compression is configured.
Zero timeouts are honored by the result drainer.
Chords remain alive past result_expires, preventing expiration from prematurely ending chord processing.
The RPC result backend now respects result_extended.
send_task now honors per-task serializer and execution options.
Corrected handling of ignore_result defaults when sending tasks.
send_task ETA and expiration calculations work correctly across daylight saving time transitions.
send_task() no longer overrides ignore_result defaults.
Corrects solar schedule timing across daylight saving time changes.
Fixes revocation of tasks using stamped headers.
A replaced task's callbacks run once when it is replaced with a chain.
A task is no longer marked REVOKED while another worker is running it.
map and starmap apply_async now merge signature options.
Corrected handling of ignore_result defaults when applying tasks.
Fixes retry argument conflicts when switching calling conventions.
A timeout of 0 is now respected rather than treated as an indefinite wait across result-waiting APIs.
The work directory path now expands ~ for spawned workers.
Corrects worker expiration checks during the fall-back daylight saving transition.
Avoids an AttributeError when a process lacks _sentinel_poll.
Provides friendlier status errors in the CLI.
Fixes database backend connection health.
Fixes a worker recursion bug and adds defensive checks for pool_cls.__module__.
A request's ignore_result setting now takes precedence over the task definition.
Avoids cycle detection in native delayed delivery.
The database backend filters unsupported SQL engine arguments when using NullPool.
Fixes NameError with TYPE_CHECKING annotations on Python 3.14 and later.
Dispatches chains and callbacks on the deduplication fast path for redelivered tasks.
Fixes workers failing to reconnect after Redis failover.
Fixes a reconnection error in the RPC backend.
Clears the timer while catching an exception.
Fixes a RuntimeError during warm shutdown with eventlet 0.37.0 and later.
Fixes recursive WorkController instantiation and an AttributeError when pool_cls is a string.
Revoked tasks now immediately update backend status to REVOKED.
Broker heartbeats are sent during graceful shutdown.
Database pools are closed only in prefork mode.
Avoids unnecessary Django database connection creation during cleanup.
Fixes ACL authentication when using Redis Sentinel as the broker.
Subscriptions are cleaned up when results are forgotten, fixing a memory leak.
Celery 5.6.0 adds initial support for Python 3.14.
The SQS transport switches back from urllib3 to pycurl due to critical issues affecting SQS users.
Traceback reference cycles are broken during task exception handling so they can be garbage-collected, fixing a memory leak particularly severe on Python 3.11+.