Make it possible to skip cbor2 tests#748
Conversation
Now that `cbor2` has been rewritten in Rust and the fallback Python implementation was removed, it is no longer possible to use it on all architectures where cattrs are used. Move the `cbor2` imports into specific tests, so that the test suite can be run again, while skipping the handful of tests that actually need it. Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
I've aimed at a minimal change here. If you prefer something more elaborate, please let me know. |
|
Which platforms are giving you trouble? If we do this, we should follow how we handle missing msgspec and orjson, with appropriate skipifs. |
Alpha, ARM < v6, HPPA, some of RISC-v and SPRC configurations, i486.
Sure, but what's "appropriate" here? msgspec and orjson are skipped on PyPy right now. |
|
Maybe we can try importing cbor2 and set the flag if it fails? |
|
Sure. Do you want me to adjust the other tests to match? I can also cover the remaining optional dependencies, if you want. |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
Let's leave the other tests. Please add a very short changelog entry (although I don't think this is super relevant for end users). Why the |
So that import checks don't complain that we're importing |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
Thanks! |
|
Thanks! |
Now that
cbor2has been rewritten in Rust and the fallback Python implementation was removed, it is no longer possible to use it on all architectures where cattrs are used. Move thecbor2imports into specific tests, so that the test suite can be run again, while skipping the handful of tests that actually need it.