8000 Memory.__reduce__ is broken since cachedir deprecation · Issue #741 · joblib/joblib · GitHub
[go: up one dir, main page]

Skip to content
Memory.__reduce__ is broken since cachedir deprecation #741
@jnothman

Description

@jnothman

Memory can't be pickled/unpickled.

It defines __reduce__ to exclude a timestamp from the pickle.

But __reduce__ includes:

        return (self.__class__, (location, self.backend, self.mmap_mode,
                                 compress, self._verbose))

where __init__ is:

    def __init__(self, location=None, backend='local', cachedir=None,
                 mmap_mode=None, compress=False, verbose=1, bytes_limit=None,
                 backend_options={})

cachedir, not mmap_mode is now the third positional argument. Perhaps it should be the last, and then __reduce__ need not be changed. Or __reduce__ can be fixed and changed again when the deprecation is completed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0