Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make _DictManager private. #858

Merged
merged 3 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Removed
- The public API of the ``synced_collection`` subpackage (#807, #790).
- The warnings module (#815).
- The signac.common.validate module (#853).
- The ``DictManager`` class (#858).

Version 1
=========
Expand Down
7 changes: 3 additions & 4 deletions signac/core/dict_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
from .utility import _safe_relpath


# TODO: Make this private. This shouldn't be part of our API.
class DictManager:
class _DictManager:
"""Helper class to manage multiple instances of dict-like classes.

This class is designed to manage multiple dict-like interface classes to files
Expand All @@ -32,10 +31,10 @@ class DictManager:
def __init__(self, prefix):
assert (
self.cls is not None
), "Subclasses of DictManager must define the cls variable."
), "Subclasses of _DictManager must define the cls variable."
assert (
self.suffix is not None
), "Subclasses of DictManager must define the suffix variable."
), "Subclasses of _DictManager must define the suffix variable."
self._prefix = os.path.abspath(prefix)
self._dict_registry = {}

Expand Down
4 changes: 2 additions & 2 deletions signac/core/h5store.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from threading import RLock

from ..errors import H5StoreAlreadyOpenError, H5StoreClosedError, InvalidKeyError
from .dict_manager import DictManager
from .dict_manager import _DictManager
from .utility import _safe_relpath

__all__ = [
Expand Down Expand Up @@ -523,7 +523,7 @@ def clear(self):
self._file.clear()


class H5StoreManager(DictManager):
class H5StoreManager(_DictManager):
"""Helper class to manage multiple instances of :class:`~.H5Store` within a directory.

Parameters
Expand Down