forked from telegraphic/hickle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements hickle compact-expand protocol (HEP003 issue telegraphic#145)
In current release custom objects are simply converted into binary pickle string. This commit implements HEP003 issue telegraphic#145. Objects which support compact expand protocol have to be registered with 'compact_expand' filter using hickle.register_comact_expand' method the filter itself is activated by setting 'compact_expand' key in options dict passed to hickle.dump to True. It is also activated when 'OPTIONS_COMPACT_EXPAND' attribute is encountered from 'h_root_group' attributes. The LoaderManager based approach allows to add further optional loader sets. For example when loading a hickle 4.0.X file imlicitly the corresponding loader set is added to ensure 'DictItem' and other helper types specific to hickle 4.0.X are properly recognized and the correpsonding data is properly restored. Only optional loaders exempt those provided by hickle core ('compact_expand', 'hickle-4.0') are considered valid which are listed by the 'optional_loaders' exported by hickle.loaders.__init__.py. A class_register table entry can be assigned to a specific optional loader by specifying the loader name as its 7th item. Any other entry which has less than 7 items or its 7th item reads None is included in the set of global loaders.
- Loading branch information
Showing
6 changed files
with
1,253 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# names all optional loaders defined by any load_*.py file | ||
# will be extended by any optional loader managed by hickle | ||
# core engine. Names of optional_loaders must be all lower case. | ||
# Correponding option attributes in hickle file will be all | ||
# upper case. | ||
optional_loaders = set( | ||
) | ||
|
||
# prefix for optional_loaders attribute names which are all | ||
# uppercase | ||
attribute_prefix = "OPTION_" |
Oops, something went wrong.