Fix unpickle_global when register_unpickle_override appears in a module not loaded at startup
mkoeppe opened this issue · 9 comments
mkoeppe commented
Calls of register_unpickle_override appear in various parts of the Sage library.
As we are modularizing the library -- and delaying the import of some modules -- we need to make sure that register_unpickle_override calls that appear in late-imported modules are respected.
This change allows us to remove some eager imports.
Depends on #32508
CC: @tscrim
Component: pickling
Author: Matthias Koeppe
Branch/Commit: 0496bda
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/32840
mkoeppe commented
mkoeppe commented
Author: Matthias Koeppe
mkoeppe commented
New commits:
d7085db | Move package docstrings out of __init__.py |
b7d2be9 | More refactoring of `__init__` files |
ee4367d | Fixes for doctest failures |
11e778a | Merge #32508 |
10f0aae | src/sage/combinat/root_system/__init__.py: Remove imports that ensured register_unpickle_override calls are run on startup |
0496bda | sage.misc.persist.unpickle_global: Check unpickle_override again after importing |
mkoeppe commented
Description changed:
---
+++
@@ -2,3 +2,5 @@
As we are modularizing the library -- and delaying the import of some modules -- we need to make sure that `register_unpickle_override` calls that appear in late-imported modules are respected.
+This change allows us to remove some eager imports.
+tscrim commented
comment:3
Green bot => positive review.
tscrim commented
Reviewer: Travis Scrimshaw
mkoeppe commented
comment:4
Thank you! (The pyflakes warnings are not from this ticket.)
vbraun commented