diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-06-29 20:49:26 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-07-10 12:58:24 -0400 |
| commit | 04bc6f11ae0289aae57d63d4cd32f4ef305d1a7a (patch) | |
| tree | 46f06280b13fb80f2aebf0eea9b52f884e698d0c /python/filemetadata.py | |
| parent | 7598688466960427890036590239565364310171 (diff) | |
Move binary view loading in to the core; deprecate open_view in favor of load; update examples
Diffstat (limited to 'python/filemetadata.py')
| -rw-r--r-- | python/filemetadata.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/filemetadata.py b/python/filemetadata.py index f0d9391f..873c36d1 100644 --- a/python/filemetadata.py +++ b/python/filemetadata.py @@ -30,6 +30,7 @@ from . import associateddatastore #required for _FileMetadataAssociatedDataStor from .log import log_error from . import binaryview from . import database +from . import deprecation ProgressFuncType = Callable[[int, int], bool] ViewName = str @@ -525,6 +526,8 @@ class FileMetadata: ctypes.c_ulonglong)(lambda ctxt, cur, total: _progress_func(cur, total)), _settings ) + # TODO : When this is removed, you can probably remove `BNOpenExistingDatabase` and `BNOpenExistingDatabaseWithProgress` too + @deprecation.deprecated(deprecated_in="3.5.4378") def open_existing_database(self, filename: str, progress_func: Optional[Callable[[int, int], bool]] = None): if progress_func is None: view = core.BNOpenExistingDatabase(self.handle, str(filename)) @@ -538,6 +541,8 @@ class FileMetadata: return None return binaryview.BinaryView(file_metadata=self, handle=view) + # TODO : When this is removed, you can probably remove `BNOpenDatabaseForConfiguration` too + @deprecation.deprecated(deprecated_in="3.5.4378") def open_database_for_configuration(self, filename: str) -> Optional['binaryview.BinaryView']: view = core.BNOpenDatabaseForConfiguration(self.handle, str(filename)) if view is None: |
