gh-134004: Added the reorganize() methods to dbm.sqlite, dbm.dumb and shelve (GH-134028)

They are similar to the same named method in dbm.gnu.
This commit is contained in:
Andrea-Oliveri 2025-06-01 14:30:04 +02:00 committed by GitHub
parent b595237166
commit f806463e16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 172 additions and 6 deletions

View file

@ -171,6 +171,11 @@ class Shelf(collections.abc.MutableMapping):
if hasattr(self.dict, 'sync'):
self.dict.sync()
def reorganize(self):
self.sync()
if hasattr(self.dict, 'reorganize'):
self.dict.reorganize()
class BsdDbShelf(Shelf):
"""Shelf implementation using the "BSD" db interface.