New submission from Florian Weimer:
This code:
def _openDBEnv(cachesize):
e = db.DBEnv()
if cachesize is not None:
if cachesize >= 20480:
e.set_cachesize(0, cachesize)
else:
raise error, "cachesize must be >= 20480"
e.set_lk_detect(db.DB_LOCK_DEFAULT)
e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD | db.DB_INIT_LOCK |
db.DB_INIT_MPOOL)
return e
causes Berkeley DB to read the DB_CONFIG file from the current directory, which
may have unexpected side effects. Unfortunately, Berkeley DB still reads
./DB_CONFIG even if the first argument to DBEnv.open() is None/NULL, so the
only way to suppress this behavior seems a non-existing or known-to-by-empty
directory (such as "/var/empty").
----------
components: Extension Modules
messages: 183430
nosy: fweimer
priority: normal
severity: normal
status: open
title: bsddb._openDBEnv() should not touch current directory
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17347>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com