Commit ee43cd3
Faster message serialization (#1064)
* Add orjson_packer and orjson_unpacker to speed up serialization of session messages.
* Refactor orjson packer to use functools.partial.
* Add msgpack support for message serialization in Session
* Refactor packer/unpacker change handling for improved readability
* Fix test_serialize_objects datetime checks on ci to compare using datetime format.
* Fix datetime deserialization in test_serialize_objects to use dateutil.parser.isoparse
* Add PicklingError to exception handling in test_cannot_serialize
* Update api docs
* Replace dateutil.parser.isoparse with jsonutil.parse_date in test_serialize_objects for datetime validation
* Use rep in fstring
Co-authored-by: M Bussonnier <[email protected]>
* Add msgpack as a test dependency.
* Fallback to json_packer and json_unpacker for orjson to handle for better resilience.
* Fix: test_args checking for removed _default_pack_unpack and _default_pack_unpack.
* Add type annotation to orjson_packer.
* Add the other missing type annoatation.
* Change orjson from a dependency to an optional dependency. Test against the minimum version in CI.
* Double timeout for test_minimum_verisons
* Fix invalid argument name.
* Add orjson and msgpack as additional_dependencies for mypy in .pre-commit-config.yaml.
* Remove # type:ignore[import-not-found].
* Should return result of orjson.loads.
* fix: get mypy working with orjson/msgpack
Signed-off-by: Henry Schreiner <[email protected]>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix for previous refactor.
---------
Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: M Bussonnier <[email protected]>
Co-authored-by: Alan <>
Co-authored-by: Henry Schreiner <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 0bce36f commit ee43cd3
File tree
5 files changed
+136
-80
lines changed- .github/workflows
- jupyter_client
- tests
5 files changed
+136
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
128 | 165 | | |
129 | 166 | | |
130 | 167 | | |
131 | 168 | | |
132 | 169 | | |
133 | 170 | | |
134 | 171 | | |
135 | | - | |
136 | | - | |
137 | 172 | | |
138 | 173 | | |
139 | 174 | | |
| |||
316 | 351 | | |
317 | 352 | | |
318 | 353 | | |
319 | | - | |
| 354 | + | |
320 | 355 | | |
321 | 356 | | |
322 | 357 | | |
| |||
351 | 386 | | |
352 | 387 | | |
353 | 388 | | |
| 389 | + | |
354 | 390 | | |
355 | | - | |
| 391 | + | |
356 | 392 | | |
357 | 393 | | |
358 | 394 | | |
359 | 395 | | |
360 | 396 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | 397 | | |
377 | | - | |
| 398 | + | |
378 | 399 | | |
379 | 400 | | |
380 | 401 | | |
381 | 402 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
394 | 419 | | |
395 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
396 | 425 | | |
397 | 426 | | |
398 | 427 | | |
| |||
417 | 446 | | |
418 | 447 | | |
419 | 448 | | |
420 | | - | |
421 | | - | |
| 449 | + | |
422 | 450 | | |
423 | 451 | | |
424 | 452 | | |
| |||
487 | 515 | | |
488 | 516 | | |
489 | 517 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | 518 | | |
510 | 519 | | |
511 | 520 | | |
| |||
515 | 524 | | |
516 | 525 | | |
517 | 526 | | |
518 | | - | |
519 | | - | |
| 527 | + | |
520 | 528 | | |
521 | 529 | | |
522 | 530 | | |
| |||
534 | 542 | | |
535 | 543 | | |
536 | 544 | | |
537 | | - | |
| 545 | + | |
538 | 546 | | |
539 | 547 | | |
540 | 548 | | |
| |||
626 | 634 | | |
627 | 635 | | |
628 | 636 | | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
| 637 | + | |
633 | 638 | | |
634 | 639 | | |
635 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
0 commit comments