Disable database/opensearch
[oi-userland.git] / components / python / cattrs / patches / 02-optional-deps.patch
blob650a7e22c62d65e4b7c0545ec6f4531707a87e09
1 We have no ujson, orjson, and cbor2 optional dependencies packaged yet.
3 --- cattrs-24.1.2/tests/test_preconf.py.orig
4 +++ cattrs-24.1.2/tests/test_preconf.py
5 @@ -44,11 +44,9 @@
6 TupleSubscriptable,
8 from cattrs.preconf.bson import make_converter as bson_make_converter
9 -from cattrs.preconf.cbor2 import make_converter as cbor2_make_converter
10 from cattrs.preconf.json import make_converter as json_make_converter
11 from cattrs.preconf.msgpack import make_converter as msgpack_make_converter
12 from cattrs.preconf.tomlkit import make_converter as tomlkit_make_converter
13 -from cattrs.preconf.ujson import make_converter as ujson_make_converter
16 @define
17 @@ -338,6 +336,7 @@
18 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
21 +@pytest.mark.skip(reason="no ujson available")
22 def test_ujson(everything: Everything):
23 from ujson import dumps as ujson_dumps
24 from ujson import loads as ujson_loads
25 @@ -352,6 +351,7 @@
26 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
29 +@pytest.mark.skip(reason="no ujson available")
30 def test_ujson_converter(everything: Everything):
31 converter = ujson_make_converter()
32 raw = converter.dumps(everything)
33 @@ -363,6 +363,7 @@
34 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
37 +@pytest.mark.skip(reason="no ujson available")
38 def test_ujson_converter_unstruct_collection_overrides(everything: Everything):
39 converter = ujson_make_converter(
40 unstruct_collection_overrides={AbstractSet: sorted}
41 @@ -381,6 +382,7 @@
43 detailed_validation=...,
45 +@pytest.mark.skip(reason="no ujson available")
46 def test_ujson_unions(union_and_val: tuple, detailed_validation: bool):
47 """Native union passthrough works."""
48 converter = ujson_make_converter(detailed_validation=detailed_validation)
49 @@ -396,6 +398,7 @@
51 booleans(),
53 +@pytest.mark.skip(reason="no orjson available")
54 def test_orjson(everything: Everything, detailed_validation: bool):
55 from orjson import dumps as orjson_dumps
56 from orjson import loads as orjson_loads
57 @@ -414,6 +417,7 @@
59 booleans(),
61 +@pytest.mark.skip(reason="no orjson available")
62 def test_orjson_converter(everything: Everything, detailed_validation: bool):
63 from cattrs.preconf.orjson import make_converter as orjson_make_converter
65 @@ -428,6 +432,7 @@
66 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
69 +@pytest.mark.skip(reason="no orjson available")
70 def test_orjson_converter_unstruct_collection_overrides(everything: Everything):
71 from cattrs.preconf.orjson import make_converter as orjson_make_converter
73 @@ -449,6 +454,7 @@
75 detailed_validation=...,
77 +@pytest.mark.skip(reason="no orjson available")
78 def test_orjson_unions(union_and_val: tuple, detailed_validation: bool):
79 """Native union passthrough works."""
80 from cattrs.preconf.orjson import make_converter as orjson_make_converter
81 @@ -657,6 +663,7 @@
84 @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615))
85 +@pytest.mark.skip(reason="no cbor2 available")
86 def test_cbor2(everything: Everything):
87 from cbor2 import dumps as cbor2_dumps
88 from cbor2 import loads as cbor2_loads
89 @@ -667,6 +674,7 @@
92 @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615))
93 +@pytest.mark.skip(reason="no cbor2 available")
94 def test_cbor2_converter(everything: Everything):
95 converter = cbor2_make_converter()
96 raw = converter.dumps(everything)
97 @@ -674,6 +682,7 @@
100 @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615))
101 +@pytest.mark.skip(reason="no cbor2 available")
102 def test_cbor2_converter_unstruct_collection_overrides(everything: Everything):
103 converter = cbor2_make_converter(
104 unstruct_collection_overrides={AbstractSet: sorted}
105 @@ -691,6 +700,7 @@
107 detailed_validation=...,
109 +@pytest.mark.skip(reason="no cbor2 available")
110 def test_cbor2_unions(union_and_val: tuple, detailed_validation: bool):
111 """Native union passthrough works."""
112 converter = cbor2_make_converter(detailed_validation=detailed_validation)