ormsgpack 1.7.0__tar.gz → 1.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ormsgpack might be problematic. Click here for more details.
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/CHANGELOG.md +19 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/Cargo.lock +47 -65
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/Cargo.toml +7 -7
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/PKG-INFO +35 -31
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/README.md +34 -30
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/pyproject.toml +22 -1
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/python/ormsgpack/__init__.py +4 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/python/ormsgpack/__init__.pyi +2 -0
- ormsgpack-1.9.0/python/ormsgpack/_pyinstaller/__init__.py +7 -0
- ormsgpack-1.9.0/python/ormsgpack/_pyinstaller/hook-ormsgpack.py +7 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/deserialize/deserializer.rs +4 -4
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/exc.rs +0 -1
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/ext.rs +5 -5
- ormsgpack-1.9.0/src/lib.rs +283 -0
- ormsgpack-1.9.0/src/msgpack/array.rs +21 -0
- ormsgpack-1.9.0/src/msgpack/bin.rs +24 -0
- ormsgpack-1.9.0/src/msgpack/bool.rs +13 -0
- ormsgpack-1.9.0/src/msgpack/ext.rs +35 -0
- ormsgpack-1.9.0/src/msgpack/float.rs +22 -0
- ormsgpack-1.9.0/src/msgpack/int.rs +50 -0
- ormsgpack-1.9.0/src/msgpack/map.rs +21 -0
- ormsgpack-1.9.0/src/msgpack/marker.rs +165 -0
- ormsgpack-1.9.0/src/msgpack/mod.rs +23 -0
- ormsgpack-1.9.0/src/msgpack/nil.rs +12 -0
- ormsgpack-1.9.0/src/msgpack/str.rs +26 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/opt.rs +10 -4
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/dataclass.rs +1 -88
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/datetime.rs +4 -4
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/dict.rs +4 -23
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/mod.rs +1 -0
- ormsgpack-1.9.0/src/serialize/numpy.rs +591 -0
- ormsgpack-1.9.0/src/serialize/pydantic.rs +108 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/serializer.rs +362 -207
- ormsgpack-1.9.0/src/typeref.rs +202 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/util.rs +3 -36
- ormsgpack-1.7.0/src/lib.rs +0 -298
- ormsgpack-1.7.0/src/serialize/numpy.rs +0 -932
- ormsgpack-1.7.0/src/typeref.rs +0 -275
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/LICENSE-APACHE +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/LICENSE-MIT +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/build.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/python/ormsgpack/py.typed +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/deserialize/cache.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/deserialize/error.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/deserialize/mod.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/ffi.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/bytes.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/datetimelike.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/default.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/ext.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/int.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/list.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/str.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/tuple.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/uuid.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/serialize/writer.rs +0 -0
- {ormsgpack-1.7.0 → ormsgpack-1.9.0}/src/unicode.rs +0 -0
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.0 23/03/2025
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Add `packb` option `OPT_PASSTHROUGH_ENUM` to enable passthrough of Enum objects by [hinthornw](https://github.com/hinthornw) in [#361](/../../pull/361)
|
|
8
|
+
- Add PyInstaller hook [#354](/../../issues/354)
|
|
9
|
+
- Update dependencies
|
|
10
|
+
|
|
11
|
+
## 1.8.0 22/02/2025
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `packb` now rejects dictionary keys with nested dataclasses or pydantic models
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Add `packb` option `OPT_PASSTHROUGH_UUID` to enable passthrough of UUID objects [#338](/../../issues/338)
|
|
20
|
+
- Update dependencies
|
|
21
|
+
|
|
3
22
|
## 1.7.0 29/11/2024
|
|
4
23
|
|
|
5
24
|
### Fixed
|
|
@@ -16,9 +16,9 @@ dependencies = [
|
|
|
16
16
|
|
|
17
17
|
[[package]]
|
|
18
18
|
name = "autocfg"
|
|
19
|
-
version = "1.
|
|
19
|
+
version = "1.4.0"
|
|
20
20
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
-
checksum = "
|
|
21
|
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
22
22
|
|
|
23
23
|
[[package]]
|
|
24
24
|
name = "bytecount"
|
|
@@ -40,24 +40,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
|
40
40
|
|
|
41
41
|
[[package]]
|
|
42
42
|
name = "chrono"
|
|
43
|
-
version = "0.4.
|
|
43
|
+
version = "0.4.40"
|
|
44
44
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
-
checksum = "
|
|
45
|
+
checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c"
|
|
46
46
|
dependencies = [
|
|
47
47
|
"num-traits",
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
[[package]]
|
|
51
51
|
name = "crunchy"
|
|
52
|
-
version = "0.2.
|
|
52
|
+
version = "0.2.3"
|
|
53
53
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
-
checksum = "
|
|
54
|
+
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
57
|
name = "half"
|
|
58
|
-
version = "2.
|
|
58
|
+
version = "2.5.0"
|
|
59
59
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
-
checksum = "
|
|
60
|
+
checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1"
|
|
61
61
|
dependencies = [
|
|
62
62
|
"cfg-if",
|
|
63
63
|
"crunchy",
|
|
@@ -65,15 +65,15 @@ dependencies = [
|
|
|
65
65
|
|
|
66
66
|
[[package]]
|
|
67
67
|
name = "itoa"
|
|
68
|
-
version = "1.0.
|
|
68
|
+
version = "1.0.15"
|
|
69
69
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
70
|
-
checksum = "
|
|
70
|
+
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
|
71
71
|
|
|
72
72
|
[[package]]
|
|
73
73
|
name = "libc"
|
|
74
|
-
version = "0.2.
|
|
74
|
+
version = "0.2.171"
|
|
75
75
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
-
checksum = "
|
|
76
|
+
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
|
|
77
77
|
|
|
78
78
|
[[package]]
|
|
79
79
|
name = "memoffset"
|
|
@@ -95,13 +95,13 @@ dependencies = [
|
|
|
95
95
|
|
|
96
96
|
[[package]]
|
|
97
97
|
name = "once_cell"
|
|
98
|
-
version = "1.
|
|
98
|
+
version = "1.21.1"
|
|
99
99
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
100
|
-
checksum = "
|
|
100
|
+
checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
|
|
101
101
|
|
|
102
102
|
[[package]]
|
|
103
103
|
name = "ormsgpack"
|
|
104
|
-
version = "1.
|
|
104
|
+
version = "1.9.0"
|
|
105
105
|
dependencies = [
|
|
106
106
|
"ahash",
|
|
107
107
|
"bytecount",
|
|
@@ -112,39 +112,32 @@ dependencies = [
|
|
|
112
112
|
"once_cell",
|
|
113
113
|
"pyo3",
|
|
114
114
|
"pyo3-build-config",
|
|
115
|
-
"rmp",
|
|
116
115
|
"serde",
|
|
117
116
|
"serde_bytes",
|
|
118
117
|
"simdutf8",
|
|
119
118
|
"smallvec",
|
|
120
119
|
]
|
|
121
120
|
|
|
122
|
-
[[package]]
|
|
123
|
-
name = "paste"
|
|
124
|
-
version = "1.0.15"
|
|
125
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
-
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
|
127
|
-
|
|
128
121
|
[[package]]
|
|
129
122
|
name = "portable-atomic"
|
|
130
|
-
version = "1.
|
|
123
|
+
version = "1.11.0"
|
|
131
124
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
132
|
-
checksum = "
|
|
125
|
+
checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
|
|
133
126
|
|
|
134
127
|
[[package]]
|
|
135
128
|
name = "proc-macro2"
|
|
136
|
-
version = "1.0.
|
|
129
|
+
version = "1.0.94"
|
|
137
130
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
138
|
-
checksum = "
|
|
131
|
+
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
|
139
132
|
dependencies = [
|
|
140
133
|
"unicode-ident",
|
|
141
134
|
]
|
|
142
135
|
|
|
143
136
|
[[package]]
|
|
144
137
|
name = "pyo3"
|
|
145
|
-
version = "0.
|
|
138
|
+
version = "0.24.0"
|
|
146
139
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
-
checksum = "
|
|
140
|
+
checksum = "7f1c6c3591120564d64db2261bec5f910ae454f01def849b9c22835a84695e86"
|
|
148
141
|
dependencies = [
|
|
149
142
|
"cfg-if",
|
|
150
143
|
"libc",
|
|
@@ -157,9 +150,9 @@ dependencies = [
|
|
|
157
150
|
|
|
158
151
|
[[package]]
|
|
159
152
|
name = "pyo3-build-config"
|
|
160
|
-
version = "0.
|
|
153
|
+
version = "0.24.0"
|
|
161
154
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
162
|
-
checksum = "
|
|
155
|
+
checksum = "e9b6c2b34cf71427ea37c7001aefbaeb85886a074795e35f161f5aecc7620a7a"
|
|
163
156
|
dependencies = [
|
|
164
157
|
"once_cell",
|
|
165
158
|
"target-lexicon",
|
|
@@ -167,9 +160,9 @@ dependencies = [
|
|
|
167
160
|
|
|
168
161
|
[[package]]
|
|
169
162
|
name = "pyo3-ffi"
|
|
170
|
-
version = "0.
|
|
163
|
+
version = "0.24.0"
|
|
171
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
172
|
-
checksum = "
|
|
165
|
+
checksum = "5507651906a46432cdda02cd02dd0319f6064f1374c9147c45b978621d2c3a9c"
|
|
173
166
|
dependencies = [
|
|
174
167
|
"libc",
|
|
175
168
|
"pyo3-build-config",
|
|
@@ -177,47 +170,36 @@ dependencies = [
|
|
|
177
170
|
|
|
178
171
|
[[package]]
|
|
179
172
|
name = "quote"
|
|
180
|
-
version = "1.0.
|
|
173
|
+
version = "1.0.40"
|
|
181
174
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
-
checksum = "
|
|
175
|
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
|
183
176
|
dependencies = [
|
|
184
177
|
"proc-macro2",
|
|
185
178
|
]
|
|
186
179
|
|
|
187
|
-
[[package]]
|
|
188
|
-
name = "rmp"
|
|
189
|
-
version = "0.8.14"
|
|
190
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
191
|
-
checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4"
|
|
192
|
-
dependencies = [
|
|
193
|
-
"byteorder",
|
|
194
|
-
"num-traits",
|
|
195
|
-
"paste",
|
|
196
|
-
]
|
|
197
|
-
|
|
198
180
|
[[package]]
|
|
199
181
|
name = "serde"
|
|
200
|
-
version = "1.0.
|
|
182
|
+
version = "1.0.219"
|
|
201
183
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
202
|
-
checksum = "
|
|
184
|
+
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
|
|
203
185
|
dependencies = [
|
|
204
186
|
"serde_derive",
|
|
205
187
|
]
|
|
206
188
|
|
|
207
189
|
[[package]]
|
|
208
190
|
name = "serde_bytes"
|
|
209
|
-
version = "0.11.
|
|
191
|
+
version = "0.11.17"
|
|
210
192
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
211
|
-
checksum = "
|
|
193
|
+
checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96"
|
|
212
194
|
dependencies = [
|
|
213
195
|
"serde",
|
|
214
196
|
]
|
|
215
197
|
|
|
216
198
|
[[package]]
|
|
217
199
|
name = "serde_derive"
|
|
218
|
-
version = "1.0.
|
|
200
|
+
version = "1.0.219"
|
|
219
201
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
220
|
-
checksum = "
|
|
202
|
+
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
|
|
221
203
|
dependencies = [
|
|
222
204
|
"proc-macro2",
|
|
223
205
|
"quote",
|
|
@@ -232,15 +214,15 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
|
|
232
214
|
|
|
233
215
|
[[package]]
|
|
234
216
|
name = "smallvec"
|
|
235
|
-
version = "1.
|
|
217
|
+
version = "1.14.0"
|
|
236
218
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
-
checksum = "
|
|
219
|
+
checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
|
|
238
220
|
|
|
239
221
|
[[package]]
|
|
240
222
|
name = "syn"
|
|
241
|
-
version = "2.0.
|
|
223
|
+
version = "2.0.100"
|
|
242
224
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
243
|
-
checksum = "
|
|
225
|
+
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
|
|
244
226
|
dependencies = [
|
|
245
227
|
"proc-macro2",
|
|
246
228
|
"quote",
|
|
@@ -249,36 +231,36 @@ dependencies = [
|
|
|
249
231
|
|
|
250
232
|
[[package]]
|
|
251
233
|
name = "target-lexicon"
|
|
252
|
-
version = "0.
|
|
234
|
+
version = "0.13.2"
|
|
253
235
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
254
|
-
checksum = "
|
|
236
|
+
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
|
|
255
237
|
|
|
256
238
|
[[package]]
|
|
257
239
|
name = "unicode-ident"
|
|
258
|
-
version = "1.0.
|
|
240
|
+
version = "1.0.18"
|
|
259
241
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
260
|
-
checksum = "
|
|
242
|
+
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
|
261
243
|
|
|
262
244
|
[[package]]
|
|
263
245
|
name = "version_check"
|
|
264
|
-
version = "0.9.
|
|
246
|
+
version = "0.9.5"
|
|
265
247
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
266
|
-
checksum = "
|
|
248
|
+
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|
267
249
|
|
|
268
250
|
[[package]]
|
|
269
251
|
name = "zerocopy"
|
|
270
|
-
version = "0.7.
|
|
252
|
+
version = "0.7.35"
|
|
271
253
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
272
|
-
checksum = "
|
|
254
|
+
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
|
|
273
255
|
dependencies = [
|
|
274
256
|
"zerocopy-derive",
|
|
275
257
|
]
|
|
276
258
|
|
|
277
259
|
[[package]]
|
|
278
260
|
name = "zerocopy-derive"
|
|
279
|
-
version = "0.7.
|
|
261
|
+
version = "0.7.35"
|
|
280
262
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
281
|
-
checksum = "
|
|
263
|
+
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
|
282
264
|
dependencies = [
|
|
283
265
|
"proc-macro2",
|
|
284
266
|
"quote",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "ormsgpack"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.9.0"
|
|
4
4
|
authors = [
|
|
5
5
|
"Aviram Hassan <aviramyhassan@gmail.com>",
|
|
6
6
|
"Emanuele Giaquinta <emanuele.giaquinta@gmail.com>",
|
|
7
7
|
]
|
|
8
8
|
description = "Fast, correct Python msgpack library supporting dataclasses, datetimes, and numpy"
|
|
9
9
|
edition = "2021"
|
|
10
|
-
rust-version = "1.
|
|
10
|
+
rust-version = "1.81"
|
|
11
11
|
license = "Apache-2.0 OR MIT"
|
|
12
12
|
repository = "https://github.com/aviramha/ormsgpack"
|
|
13
13
|
homepage = "https://github.com/aviramha/ormsgpack"
|
|
@@ -40,19 +40,18 @@ unstable-simd = [
|
|
|
40
40
|
ahash = { version = "0.8", default-features = false }
|
|
41
41
|
bytecount = { version = "^0.6.7", default-features = false, features = ["runtime-dispatch-simd"] }
|
|
42
42
|
byteorder = { version = "1.5.0", default-features = false, features = ["std"] }
|
|
43
|
-
chrono = { version = "0.4.
|
|
43
|
+
chrono = { version = "0.4.40", default-features = false }
|
|
44
44
|
half = { version = "2.4.1", default-features = false }
|
|
45
45
|
itoa = { version = "1", default-features = false }
|
|
46
46
|
once_cell = { version = "1", default-features = false, features = ["race"] }
|
|
47
|
-
pyo3 = { version = "^0.
|
|
48
|
-
rmp = { version = "^0.8.14", default-features = false, features = ["std"] }
|
|
47
|
+
pyo3 = { version = "^0.24.0", default-features = false, features = ["extension-module"] }
|
|
49
48
|
serde = { version = "1", default-features = false }
|
|
50
|
-
serde_bytes = { version = "0.11.
|
|
49
|
+
serde_bytes = { version = "0.11.16", default-features = false, features = ["std"] }
|
|
51
50
|
simdutf8 = { version = "0.1.5", default-features = false, features = ["std"] }
|
|
52
51
|
smallvec = { version = "^1.13", default-features = false, features = ["union", "write"] }
|
|
53
52
|
|
|
54
53
|
[build-dependencies]
|
|
55
|
-
pyo3-build-config = { version = "^0.
|
|
54
|
+
pyo3-build-config = { version = "^0.24.0" }
|
|
56
55
|
|
|
57
56
|
[profile.release]
|
|
58
57
|
codegen-units = 1
|
|
@@ -61,3 +60,4 @@ incremental = false
|
|
|
61
60
|
lto = "thin"
|
|
62
61
|
opt-level = 3
|
|
63
62
|
panic = "abort"
|
|
63
|
+
strip = "symbols"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ormsgpack
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -120,8 +120,7 @@ It natively serializes
|
|
|
120
120
|
`None` instances. It supports arbitrary types through `default`. It
|
|
121
121
|
serializes subclasses of `str`, `int`, `dict`, `list`,
|
|
122
122
|
`dataclasses.dataclass`, and `enum.Enum`. It does not serialize subclasses
|
|
123
|
-
of `tuple` to avoid serializing `namedtuple` objects as arrays.
|
|
124
|
-
serializing subclasses, specify the option `ormsgpack.OPT_PASSTHROUGH_SUBCLASS`.
|
|
123
|
+
of `tuple` to avoid serializing `namedtuple` objects as arrays.
|
|
125
124
|
|
|
126
125
|
The output is a `bytes` object.
|
|
127
126
|
|
|
@@ -205,13 +204,16 @@ value, respectively.
|
|
|
205
204
|
b'\xc7\x18\x000.0842389659712649442845'
|
|
206
205
|
```
|
|
207
206
|
|
|
207
|
+
`default` can also be used to serialize some supported types to a custom
|
|
208
|
+
format by enabling the corresponding passthrough options.
|
|
209
|
+
|
|
208
210
|
#### option
|
|
209
211
|
|
|
210
212
|
To modify how data is serialized, specify `option`. Each `option` is an integer
|
|
211
213
|
constant in `ormsgpack`. To specify multiple options, mask them together, e.g.,
|
|
212
214
|
`option=ormsgpack.OPT_NON_STR_KEYS | ormsgpack.OPT_NAIVE_UTC`.
|
|
213
215
|
|
|
214
|
-
##### OPT_NAIVE_UTC
|
|
216
|
+
##### `OPT_NAIVE_UTC`
|
|
215
217
|
|
|
216
218
|
Serialize `datetime.datetime` objects without a `tzinfo` and `numpy.datetime64`
|
|
217
219
|
objects as UTC. This has no effect on `datetime.datetime` objects that have
|
|
@@ -234,11 +236,13 @@ b'\xb91970-01-01T00:00:00+00:00'
|
|
|
234
236
|
'1970-01-01T00:00:00+00:00'
|
|
235
237
|
```
|
|
236
238
|
|
|
237
|
-
##### OPT_NON_STR_KEYS
|
|
239
|
+
##### `OPT_NON_STR_KEYS`
|
|
238
240
|
|
|
239
241
|
Serialize `dict` keys of type other than `str`. This allows `dict` keys
|
|
240
242
|
to be one of `str`, `int`, `float`, `bool`, `None`, `datetime.datetime`,
|
|
241
243
|
`datetime.date`, `datetime.time`, `enum.Enum`, and `uuid.UUID`.
|
|
244
|
+
`dict` keys of unsupported types are not handled using `default` and
|
|
245
|
+
result in `MsgpackEncodeError` being raised.
|
|
242
246
|
|
|
243
247
|
```python
|
|
244
248
|
>>> import ormsgpack, datetime, uuid
|
|
@@ -270,7 +274,7 @@ occurrence of a key (in the above, `false`). The first value will be lost.
|
|
|
270
274
|
|
|
271
275
|
This option is not compatible with `ormsgpack.OPT_SORT_KEYS`.
|
|
272
276
|
|
|
273
|
-
##### OPT_OMIT_MICROSECONDS
|
|
277
|
+
##### `OPT_OMIT_MICROSECONDS`
|
|
274
278
|
|
|
275
279
|
Do not serialize the microsecond component of `datetime.datetime`,
|
|
276
280
|
`datetime.time` and `numpy.datetime64` instances.
|
|
@@ -292,9 +296,10 @@ b'\xb31970-01-01T00:00:00'
|
|
|
292
296
|
'1970-01-01T00:00:00'
|
|
293
297
|
```
|
|
294
298
|
|
|
295
|
-
##### OPT_PASSTHROUGH_BIG_INT
|
|
299
|
+
##### `OPT_PASSTHROUGH_BIG_INT`
|
|
296
300
|
|
|
297
|
-
|
|
301
|
+
Enable passthrough of `int` instances smaller than -9223372036854775807 or
|
|
302
|
+
larger than 18446744073709551615 to `default`.
|
|
298
303
|
|
|
299
304
|
```python
|
|
300
305
|
>>> import ormsgpack
|
|
@@ -312,10 +317,9 @@ b'\x82\xa4type\xa6bigint\xa5value\xb436893488147419103232'
|
|
|
312
317
|
{'type': 'bigint', 'value': '36893488147419103232'}
|
|
313
318
|
```
|
|
314
319
|
|
|
315
|
-
##### OPT_PASSTHROUGH_DATACLASS
|
|
320
|
+
##### `OPT_PASSTHROUGH_DATACLASS`
|
|
316
321
|
|
|
317
|
-
|
|
318
|
-
customizing their output but is much slower.
|
|
322
|
+
Enable passthrough of `dataclasses.dataclass` instances to `default`.
|
|
319
323
|
|
|
320
324
|
|
|
321
325
|
```python
|
|
@@ -343,11 +347,10 @@ TypeError: Type is not msgpack serializable: User
|
|
|
343
347
|
b'\x82\xa2id\xa33b1\xa4name\xa3asd'
|
|
344
348
|
```
|
|
345
349
|
|
|
346
|
-
##### OPT_PASSTHROUGH_DATETIME
|
|
350
|
+
##### `OPT_PASSTHROUGH_DATETIME`
|
|
347
351
|
|
|
348
|
-
|
|
349
|
-
to `default`.
|
|
350
|
-
HTTP dates:
|
|
352
|
+
Enable passthrough of `datetime.datetime`, `datetime.date`, and
|
|
353
|
+
`datetime.time` instances to `default`.
|
|
351
354
|
|
|
352
355
|
```python
|
|
353
356
|
>>> import ormsgpack, datetime
|
|
@@ -368,11 +371,14 @@ TypeError: Type is not msgpack serializable: datetime.datetime
|
|
|
368
371
|
b'\x81\xaacreated_at\xbdThu, 01 Jan 1970 00:00:00 GMT'
|
|
369
372
|
```
|
|
370
373
|
|
|
371
|
-
|
|
374
|
+
##### `OPT_PASSTHROUGH_ENUM`
|
|
375
|
+
|
|
376
|
+
Enable passthrough of `enum.Enum` instances to `default`.
|
|
372
377
|
|
|
373
|
-
##### OPT_PASSTHROUGH_SUBCLASS
|
|
378
|
+
##### `OPT_PASSTHROUGH_SUBCLASS`
|
|
374
379
|
|
|
375
|
-
|
|
380
|
+
Enable passthrough of subclasses of `str`, `int`, `dict` and `list` to
|
|
381
|
+
`default`.
|
|
376
382
|
|
|
377
383
|
```python
|
|
378
384
|
>>> import ormsgpack
|
|
@@ -392,12 +398,9 @@ TypeError: Type is not msgpack serializable: Secret
|
|
|
392
398
|
b'\xa6******'
|
|
393
399
|
```
|
|
394
400
|
|
|
395
|
-
|
|
396
|
-
OPT_NON_STR_KEYS.
|
|
397
|
-
|
|
398
|
-
##### OPT_PASSTHROUGH_TUPLE
|
|
401
|
+
##### `OPT_PASSTHROUGH_TUPLE`
|
|
399
402
|
|
|
400
|
-
|
|
403
|
+
Enable passthrough of `tuple` instances to `default`.
|
|
401
404
|
|
|
402
405
|
```python
|
|
403
406
|
>>> import ormsgpack
|
|
@@ -417,15 +420,19 @@ b'\x82\xa4type\xa5tuple\xa5value\x93\xcd#\xe9\xa4test*'
|
|
|
417
420
|
{'type': 'tuple', 'value': [9193, 'test', 42]}
|
|
418
421
|
```
|
|
419
422
|
|
|
420
|
-
#####
|
|
423
|
+
##### `OPT_PASSTHROUGH_UUID`
|
|
424
|
+
|
|
425
|
+
Enable passthrough of `uuid.UUID` instances to `default`.
|
|
426
|
+
|
|
427
|
+
##### `OPT_SERIALIZE_NUMPY`
|
|
421
428
|
|
|
422
429
|
Serialize `numpy.ndarray` instances. For more, see
|
|
423
430
|
[numpy](#numpy).
|
|
424
431
|
|
|
425
|
-
##### OPT_SERIALIZE_PYDANTIC
|
|
432
|
+
##### `OPT_SERIALIZE_PYDANTIC`
|
|
426
433
|
Serialize `pydantic.BaseModel` instances.
|
|
427
434
|
|
|
428
|
-
##### OPT_SORT_KEYS
|
|
435
|
+
##### `OPT_SORT_KEYS`
|
|
429
436
|
|
|
430
437
|
Serialize `dict` keys and pydantic model fields in sorted order. The default
|
|
431
438
|
is to serialize in an unspecified order.
|
|
@@ -451,7 +458,7 @@ b'\x83\xa1A\x03\xa1a\x01\xa2\xc3\xa4\x02'
|
|
|
451
458
|
|
|
452
459
|
`dataclass` also serialize as maps but this has no effect on them.
|
|
453
460
|
|
|
454
|
-
##### OPT_UTC_Z
|
|
461
|
+
##### `OPT_UTC_Z`
|
|
455
462
|
|
|
456
463
|
Serialize a UTC timezone on `datetime.datetime` and `numpy.datetime64` instances
|
|
457
464
|
as `Z` instead of `+00:00`.
|
|
@@ -620,9 +627,6 @@ b'\xaa1900-01-02'
|
|
|
620
627
|
|
|
621
628
|
Errors with `tzinfo` result in `MsgpackEncodeError` being raised.
|
|
622
629
|
|
|
623
|
-
To disable serialization of `datetime` objects specify the option
|
|
624
|
-
`ormsgpack.OPT_PASSTHROUGH_DATETIME`.
|
|
625
|
-
|
|
626
630
|
To use "Z" suffix instead of "+00:00" to indicate UTC ("Zulu") time, use the option
|
|
627
631
|
`ormsgpack.OPT_UTC_Z`.
|
|
628
632
|
|
|
@@ -894,7 +898,7 @@ level above this.
|
|
|
894
898
|
|
|
895
899
|
## Packaging
|
|
896
900
|
|
|
897
|
-
To package ormsgpack requires [Rust](https://www.rust-lang.org/) 1.
|
|
901
|
+
To package ormsgpack requires [Rust](https://www.rust-lang.org/) 1.81
|
|
898
902
|
or newer and the [maturin](https://github.com/PyO3/maturin) build
|
|
899
903
|
tool. The default feature `unstable-simd` enables the usage of SIMD
|
|
900
904
|
operations and requires nightly Rust. The recommended build command
|