Closed appleby closed 1 year ago
tangentially-related pyquil issue:
Note that in the specific case above, it's probably possible to restructure the RewriteArithmeticResponse
sent by quilc's rewrite-arithmetic-handler
to use strings rather than ParameterAref
s as dict keys and to make the corresponding change to pyquil as well.
In general, care must be taken, since rpcq has multiple downstream consumers that will all need to be tested to make sure they are compatible with msgpack 1.0. Even in the case of RewriteArithmeticResponse
, above, quilc's rewrite-arithmetic-handler
is a public interface, so changing it would technically be a breaking change (even if pyquil is likely the only consumer). From that perspective, the backwards-compatible option is to pass strict_map_key=False
without changing the RewriteArithmeticResponse
message format.
Hey! @appleby, any plans for supporting for msgpack 1+? Please note that this issue prevents some projects from using pyquil:
Here's an illustration of my situation:
┌─────────┐ ┌────────────┐
┌─►│3rd-party├───►│msgpack>=1.0├──────┐
┌───────┐ │ │library │ └────────────┘ ▼
│my │─┘ └─────────┘ conflict
│project├─┐ ▲
└───────┘ │ ┌──────┐ ┌───────────┐ │
└──►│pyquil├─────►│msgpack<1.0├───────┘
└──────┘ └───────────┘
The errors I'm getting from pip
:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
[3rd party project] requires msgpack<2.0.0,>=1.0.0, but you have msgpack 0.6.2 which is incompatible.
OS: macOS 11.6.1 Python: 3.7.12 Pip: 21.3.1
Ping @notmgsk @kalzoo
This is now a huge issue for anyone using conda-forge and wanting to run a Python version newer than 3.8 since msgpack-python 0.6.2 (the most recent pre-1.0 version) has not been built against any Python version greater than 3.8.
Solved by https://github.com/rigetti/rpcq/pull/156 in v3.11.0
Upgrading to msgpack v1.0.0+ breaks deserialization (and possibly other stuff). At some point we'd like to upgrade to 1.0.0, so investigate why and fix anything that needs fixing.
The msgpack 1.0.0 release includes the following under the Major breaking changes in msgpack 1.0 > Unpacker heading, which seems like a likely culprit:
First reported in https://github.com/rigetti/pyquil/issues/1178
Here is a repro case distilled from the one in https://github.com/rigetti/pyquil/issues/1178:
Running the above in an environment with msgpack 1.0 installed produces the following traceback: