-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from lucianopaz/refactor
Refactor code base
- Loading branch information
Showing
50 changed files
with
2,516 additions
and
1,055 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Changelog | ||
|
||
## Version 2.0.0 - 2021-03-09 | ||
### Added | ||
- `BaseCompresser` class and subclasses to handle compression streams. | ||
- `BasePicklerIO` class and subclasses to handle dump and load of python objects. | ||
- Registry of `BaseCompresser` classes with the mappings that relate them to compression names, file extensions and default read and write modes. | ||
- Registry of `BasePicklerIO` classes with the mappings that relate them to pickler names. | ||
- Singledispatch functions `compress_pickle.io.base.compress_and_serialize` and `compress_pickle.io.base.uncompress_and_unserialize` that implement the core input/output functionality. | ||
- `pickler_method` and `pickler_kwargs` arguments for all `dump`, `dumps`, `load` and `loads`. This now enables users to choose the pickler backend. | ||
- Added support for several pickler backends such as `marshal`, `dill` and `cloudpickle`. | ||
- Added the ability for compression methods to support more than one file extension. Now `bz2` and `lzma` also are applied for the `.bz2` and `.xz` extensions respectively. | ||
|
||
### Removed | ||
- The `optimize` argument of the `dump` and `dumps` function was removed. To use the same functionality, you should pass the argument `pickler_method="optimized_pickle"` to `dump` and `dumps`. | ||
- The argument `unhandled_extensions` has been removed from `dump`, `dumps`, `load` and `loads`. The current behavior is to always raise an exception when the compression protocol is unknown. | ||
- All functions from the `compress_pickle.utils` module with the exception of `_stringify_path`. All of the logic implemented by the old functions has been refactored into the registries, compressers and picklerIO classes. |
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 |
---|---|---|
@@ -1,14 +1,7 @@ | ||
from .compress_pickle import dump, load, dumps, loads | ||
from .utils import ( | ||
get_known_compressions, | ||
validate_compression, | ||
get_default_compression_mapping, | ||
get_compression_write_mode, | ||
get_compression_read_mode, | ||
set_default_extensions, | ||
infer_compression_from_filename, | ||
preprocess_path, | ||
open_compression_stream, | ||
) | ||
from . import utils | ||
from . import compressers | ||
from . import picklers | ||
from . import io | ||
|
||
__version__ = "1.2.0" | ||
__version__ = "2.0.0" |
Oops, something went wrong.