Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
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
8 changes: 6 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
X.XX.X (YYYY MM DD)
===================
1.13.4 (2018 August 9)
=====================

Bugfixes
--------
* Enforce ``shelve`` to use ``dbm.dumb``/``dumbdbm`` modules for Python 3.x/2.7 respectively to prevent hiccups on a big amount of generated checkpoint. Was caught on macos X (``ndbm`` backend).

Enhancements
------------
Expand Down
8 changes: 7 additions & 1 deletion datarobot_batch_scoring/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
WriterQueueMsg, ProgressQueueMsg, REPORT_INTERVAL
from datarobot_batch_scoring.utils import get_rusage

if six.PY3:
import dbm.dumb as dumb_dbm
else:
import dumbdbm as dumb_dbm


class ShelveError(Exception):
pass
Expand Down Expand Up @@ -83,7 +88,8 @@ def __enter__(self):
assert(not self.is_open)
self.is_open = True
self._ui.debug('ENTER CALLED ON RUNCONTEXT')
self.db = shelve.open(self.file_context.file_name, writeback=True)
raw_db = dumb_dbm.open(self.file_context.file_name)
self.db = shelve.Shelf(raw_db, writeback=True)
if not hasattr(self, 'partitions'):
self.partitions = []
return self
Expand Down