diff --git a/docs/adr/0003-connect-both-worker-signal-pairs.md b/docs/adr/0003-connect-both-worker-signal-pairs.md index f4e8b0e..511acaa 100644 --- a/docs/adr/0003-connect-both-worker-signal-pairs.md +++ b/docs/adr/0003-connect-both-worker-signal-pairs.md @@ -5,9 +5,10 @@ alone covers every pool. The process pair fires only under prefork and solo, once per forked child, keeping cached resources and finalizers fork-safe; the worker pair fires once in the main process and is the only pair the gevent, eventlet and threads pools send, since those never fork. Connecting only -the process pair is the bug 3.0.1 fixed: under `modern-di` 3.x's mandatory-open lifecycle the root -container stayed closed under the non-forking pools and every `@inject` task raised. The overlap is -harmless: `open()` is a no-op on an open container, `close_sync()` when nothing was cached. +the process pair is the bug 3.0.1 fixed. `modern-di` 3.0 raised on a resolve from a closed container, +and 4.x does again, so under the non-forking pools the root container stayed closed and every +`@inject` task raised. The overlap is harmless: `open()` is a no-op on an open container, +`close_sync()` when nothing was cached. `weak=False` belongs to the same decision: Celery holds receivers weakly by default and these closures have no other strong reference, so a weak connection lets them be collected and the handlers never run. diff --git a/pyproject.toml b/pyproject.toml index 6d84352..1818e66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ dependencies = [ # celery caps billiard below 4 until 5.3, and billiard 3 cannot format a traceback on 3.11+. "celery>=5.3,<6", - "modern-di>=3,<4", + "modern-di>=4,<5", ] version = "0"