Skip to content

Releases (changelog)

docs.jcea.es • November 27, 2026

Make these types visible: DBTxn , DBCursor , DBLogCursor , DBLock . Even being visible, be sure DBTxn , DBCursor , DBLogCursor , DBLock and DBSite can not be directly instanciated. Solve memory leak of the types when destroying instances: DBEnv , DB , DBTxn , DBSite , DBSequence , DBCursor , DBLogCursor , DBLock . DBEnv , DB , DBCursor , DBSequence , DBTxn , DBLogCursor , DBSite allow collecting cyclic garbage. Increase the use of Py_CLEAR() macros to simplify some code. Also avoid some race conditions if the callback to be deleted has a destructor that mess with Berkeley DB. If DBEnv.set_rep_transport() fails to set a new callback because the inner working of Oracle Berkeley DB, keep the old callback.

Make these types visible: DBTxn , DBCursor , DBLogCursor , DBLock .

Make these types visible: DBTxn , DBCursor , DBLogCursor , DBLock .

Even being visible, be sure DBTxn , DBCursor , DBLogCursor , DBLock and DBSite can not be directly instanciated.

Even being visible, be sure DBTxn , DBCursor , DBLogCursor , DBLock and DBSite can not be directly instanciated.

Solve memory leak of the types when destroying instances: DBEnv , DB , DBTxn , DBSite , DBSequence , DBCursor , DBLogCursor , DBLock .

Solve memory leak of the types when destroying instances: DBEnv , DB , DBTxn , DBSite , DBSequence , DBCursor , DBLogCursor , DBLock .

DBEnv , DB , DBCursor , DBSequence , DBTxn , DBLogCursor , DBSite allow collecting cyclic garbage.

DBEnv , DB , DBCursor , DBSequence , DBTxn , DBLogCursor , DBSite allow collecting cyclic garbage.

Increase the use of Py_CLEAR() macros to simplify some code. Also avoid some race conditions if the callback to be deleted has a destructor that mess with Berkeley DB.

Increase the use of Py_CLEAR() macros to simplify some code. Also avoid some race conditions if the callback to be deleted has a destructor that mess with Berkeley DB.

If DBEnv.set_rep_transport() fails to set a new callback because the inner working of Oracle Berkeley DB, keep the old callback.

If DBEnv.set_rep_transport() fails to set a new callback because the inner working of Oracle Berkeley DB, keep the old callback.

18.1.19 - 2026-11-18 ¶

Warning SECURITY: Security workaround deployed in version 18.1.17 was inefective. For the cases where this security risk is a problem, we now provide berkeleydb.db.sanitize_memory() . Read the documentation carefully. This change increases the bindings C API version. Thread State caching for asynchronous callbacks (Berkeley DB replication) crashes in Python 3.11-3.14 compiled with assertions enabled. This is a bug in Python, solved in Python 3.15. We disable Thread State caching under Python 3.11-3.14. This change decreases performance, we could try to be more clever in a future release. Being under Python 3.11-3.14 or >=3.15 is detected at runtime when importing the module, so your performance is better when running under Python 3.15 although this extension was compiled under 3.11. References: Deletion of autoTSSkey during runtime finalization is not safe #131185 Use a proper thread-local for cached thread states Bug reported by Michał Górny . Change declarations of most functions implementing Python methods as a first step to avoid compilation warnings in pedantic mode. Converting the parameter to the types we need is done now with an explicit cast in the body of the function. Create a new macro MYDB_KW_METH that does function parameter conversion so compilation doesn’t complain in pedantic mode. That macro does type checking if compiling with a compiler C11 compatible, using a C11 generic. So we can make compiler and myself both happy. We drop PyCFunction castings that we don’t need anymore. Use more of PyType_GetModuleState() . Solve some corner cases in DB.join() . Anyway, there are many ways to crash the program if you provide evil objects. Avoid memory leak if you call B.join() with incorrect parameter. Solve quite a few issues with record numbers under RECNO and QUEUE databases: Limited range when compiled in 32 bits mode, wraparound wih negative values, silent truncation of big values when compiled in 64 bits mode. Also, when reading a record number over 1 1 1 =3.15 is detected at runtime when importing the module, so your performance is better when running under Python 3.15 although this extension was compiled under 3.11. References: Deletion of autoTSSkey during runtime finalization is not safe #131185 Use a proper thread-local for cached thread states Bug reported by Michał Górny .

Thread State caching for asynchronous callbacks (Berkeley DB replication) crashes in Python 3.11-3.14 compiled with assertions enabled. This is a bug in Python, solved in Python 3.15.

We disable Thread State caching under Python 3.11-3.14. This change decreases performance, we could try to be more clever in a future release. Being under Python 3.11-3.14 or >=3.15 is detected at runtime when importing the module, so your performance is better when running under Python 3.15 although this extension was compiled under 3.11.

Deletion of autoTSSkey during runtime finalization is not safe #131185

Use a proper thread-local for cached thread states

Bug reported by Michał Górny .

Change declarations of most functions implementing Python methods as a first step to avoid compilation warnings in pedantic mode. Converting the parameter to the types we need is done now with an explicit cast in the body of the function.

Change declarations of most functions implementing Python methods as a first step to avoid compilation warnings in pedantic mode.

Converting the parameter to the types we need is done now with an explicit cast in the body of the function.

Create a new macro MYDB_KW_METH that does function parameter conversion so compilation doesn’t complain in pedantic mode. That macro does type checking if compiling with a compiler C11 compatible, using a C11 generic. So we can make compiler and myself both happy.

Create a new macro MYDB_KW_METH that does function parameter conversion so compilation doesn’t complain in pedantic mode. That macro does type checking if compiling with a compiler C11 compatible, using a C11 generic. So we can make compiler and myself both happy.

We drop PyCFunction castings that we don’t need anymore.

We drop PyCFunction castings that we don’t need anymore.

Use more of PyType_GetModuleState() .

Use more of PyType_GetModuleState() .

Solve some corner cases in DB.join() . Anyway, there are many ways to crash the program if you provide evil objects.

Solve some corner cases in DB.join() . Anyway, there are many ways to crash the program if you provide evil objects.

Avoid memory leak if you call B.join() with incorrect parameter.

Avoid memory leak if you call B.join() with incorrect parameter.

Solve quite a few issues with record numbers under RECNO and QUEUE databases: Limited range when compiled in 32 bits mode, wraparound wih negative values, silent truncation of big values when compiled in 64 bits mode.

Solve quite a few issues with record numbers under RECNO and QUEUE databases: Limited range when compiled in 32 bits mode, wraparound wih negative values, silent truncation of big values when compiled in 64 bits mode.

Also, when reading a record number over 1 1 1 1 1 =3.12 support subinterpreters and use Py_LIMITED_API = 3.12 . You don’t need the experimental subinterpreters environment variable anymore. Since we always compile the module with Py_LIMITED_API , C code compiled condicionally depends now of Py_LIMITED_API value and not of PY_VERSION_HEX value. Document restriction when using DB.join() .

Your C compiler must be C11 compliant.

Your C compiler must be C11 compliant.

Since we test the code under Python 3.16 prereleases, declare support explicitly in PyPI.

Since we test the code under Python 3.16 prereleases, declare support explicitly in PyPI.

Improve support of Oracle Berkeley DB synchronous callbacks when using subinterpreters.

Improve support of Oracle Berkeley DB synchronous callbacks when using subinterpreters.

GIL adquire/release macros massively improved, with huge effort, because callback from replication and event notifications are called asynchronously from threads managed internally by Oracle Berkeley DB. Would be nice if Oracle Berkeley DB had mechanisms to notify thread creation and destruction. That would simplify the code massively.

GIL adquire/release macros massively improved, with huge effort, because callback from replication and event notifications are called asynchronously from threads managed internally by Oracle Berkeley DB. Would be nice if Oracle Berkeley DB had mechanisms to notify thread creation and destruction. That would simplify the code massively.

Lets cache GIL details for the asynchronous callbacks when running under an Unix like Operating System. Under MS Windows we don’t cache the state so performance is worse in that case. This can be improved if you provide feedback. Let me know.

Lets cache GIL details for the asynchronous callbacks when running under an Unix like Operating System. Under MS Windows we don’t cache the state so performance is worse in that case. This can be improved if you provide feedback. Let me know.

change increases the bindings C API version.

change increases the bindings C API version.

Separate GIL acquire/release in callbacks for the cases of synchronous and asynchronous cases, using different macros. I think it is more easy to reason .

Separate GIL acquire/release in callbacks for the cases of synchronous and asynchronous cases, using different macros. I think it is more easy to reason .

Provide m_traverse and m_clear in order to avoid memory leaks when destroying subinterpreters that import berkeleydb module. The source change is quite massive because we refactor how types and exceptions are created in order to avoid repetitions between types/exceptions creation, traversal and clearing. We use X-macros to avoid repetition and missing cases when adding new objects.

Provide m_traverse and m_clear in order to avoid memory leaks when destroying subinterpreters that import berkeleydb module.

The source change is quite massive because we refactor how types and exceptions are created in order to avoid repetitions between types/exceptions creation, traversal and clearing. We use X-macros to avoid repetition and missing cases when adding new objects.

With changes, subinterpreters are declared production ready.

With changes, subinterpreters are declared production ready.

Don’t be heroic GIL imposible situations. Just surrender and abort the program with a nice core dump.

Don’t be heroic GIL imposible situations. Just surrender and abort the program with a nice core dump.

Bindings compiled under Python 3.11 doesn’t support subinterpreters and use Py_LIMITED_API = 3.11 . Bindings compiled under Python >=3.12 support subinterpreters and use Py_LIMITED_API = 3.12 . You don’t need the experimental subinterpreters environment variable anymore.

Bindings compiled under Python 3.11 doesn’t support subinterpreters and use Py_LIMITED_API = 3.11 .

Bindings compiled under Python >=3.12 support subinterpreters and use Py_LIMITED_API = 3.12 .

You don’t need the experimental subinterpreters environment variable anymore.

Since we always compile the module with Py_LIMITED_API , C code compiled condicionally depends now of Py_LIMITED_API value and not of PY_VERSION_HEX value.

Since we always compile the module with Py_LIMITED_API , C code compiled condicionally depends now of Py_LIMITED_API value and not of PY_VERSION_HEX value.

Document restriction when using DB.join() .

Document restriction when using DB.join() .

18.1.17 - 2026-10-24 ¶

To compile with experimental support for subinterpreters, install the bindings with BERKELEYDB_EXPERIMENTAL_SUBINTERPRETERS environment variable defined. This is ignored if compiled with Python 3.11, since it doesn’t support subinterpreters. You can check if the bindings support subinterpreters or not checking berkeleydb.db.py_support_subinterpreters() . Warning SECURITY: Oracle Berkeley DB malloc() big blocks of memory, use part of them and then store the blocks on disk. The stored blocks can leak sensitive memory content of the application. Now my bindings intercept Oracle Berkeley DB malloc() usage and clear the memory first before giving it to Oracle Berkeley DB. Given that, the leaked content will be not a security/privacy hazard anymore. This is only done if the requested block size is a power-of-two, to reduce performance impact. We need to verify if this change is enough because: We don’t override Oracle Berkeley DB realloc() on the premise that that call is not used to request new database pages. We suppose that Oracle Berkeley DB page size is a power-of-two and request a power-of-two number of pages. The second guess could be wrong. This problem has been comunicated to Oracle in 2025, but they don’t care and I am sick of waiting. BEWARE: Current implementation is tested in Unix-like Operating Systems. An attempt is done to get it working on MS Windows, but I can not personally check it. Your feedback is appreciated. We support subinterpreters after Python 3.12, but we can only actually use and test them after Python 3.14. Add some tests in that case. Warning This support is still incomplete and highly experimental. Since we now always compile using Py_LIMITED_API , we can simplify some code. Python 3.16 added to the full test matrix. Experimental Python 3.16 support. Tested under 3.16.0a1. Since assertIsNone() and assertIsNotNone() are available since Python 3.1, refactor some test code. If there is an error while building an exception, don’t free the wrong object anymore. Each subinterpreter has its own Capsule. A C module using a BerkeleyDB Capsule should use the Capsule provided in the subinterpreter calling the C module using that Capsule. Now, module name and module C capsule name are static constants instead of rebuilding them in every import to the same value always. The result is the same, but subinterpreter linters are happier. We use Oracle Berkeley DB set_errcall() function to get extra information when a DB function call fails. Unfortunately Oracle Berkeley DB doesn’t provide enough information to correlate notifications with errors when multiple threads fails simultaneously (we know the DB Environment but not the DB handle). In this release, the buffer that gets the extra error information is declared as _Thread_local , so we can link errors and extra error information if the notification is synchronous with the database call. Let’s see how portable this is, including MS Windows. Warning An undesirable side effect is that now EVERY thread in your program, using Oracle Berkeley DB or not, requires extra 1024 bytes of RAM and thread creation is slightly more costly. I think the effect is negligible, but you can provide feedback.

To compile with experimental support for subinterpreters, install the bindings with BERKELEYDB_EXPERIMENTAL_SUBINTERPRETERS environment variable defined. This is ignored if compiled with Python 3.11, since it doesn’t support subinterpreters. You can check if the bindings support subinterpreters or not checking berkeleydb.db.py_support_subinterpreters() .

To compile with experimental support for subinterpreters, install the bindings with BERKELEYDB_EXPERIMENTAL_SUBINTERPRETERS environment variable defined. This is ignored if compiled with Python 3.11, since it doesn’t support subinterpreters.

You can check if the bindings support subinterpreters or not checking berkeleydb.db.py_support_subinterpreters() .

Warning SECURITY: Oracle Berkeley DB malloc() big blocks of memory, use part of them and then store the blocks on disk. The stored blocks can leak sensitive memory content of the application. Now my bindings intercept Oracle Berkeley DB malloc() usage and clear the memory first before giving it to Oracle Berkeley DB. Given that, the leaked content will be not a security/privacy hazard anymore. This is only done if the requested block size is a power-of-two, to reduce performance impact. We need to verify if this change is enough because: We don’t override Oracle Berkeley DB realloc() on the premise that that call is not used to request new database pages. We suppose that Oracle Berkeley DB page size is a power-of-two and request a power-of-two number of pages. The second guess could be wrong. This problem has been comunicated to Oracle in 2025, but they don’t care and I am sick of waiting. BEWARE: Current implementation is tested in Unix-like Operating Systems. An attempt is done to get it working on MS Windows, but I can not personally check it. Your feedback is appreciated.

SECURITY: Oracle Berkeley DB malloc() big blocks of memory, use part of them and then store the blocks on disk. The stored blocks can leak sensitive memory content of the application.

Now my bindings intercept Oracle Berkeley DB malloc() usage and clear the memory first before giving it to Oracle Berkeley DB. Given that, the leaked content will be not a security/privacy hazard anymore.

This is only done if the requested block size is a power-of-two, to reduce performance impact. We need to verify if this change is enough because:

We don’t override Oracle Berkeley DB realloc() on the premise that that call is not used to request new database pages. We suppose that Oracle Berkeley DB page size is a power-of-two and request a power-of-two number of pages. The second guess could be wrong.

We don’t override Oracle Berkeley DB realloc() on the premise that that call is not used to request new database pages.

We don’t override Oracle Berkeley DB realloc() on the premise that that call is not used to request new database pages.

We suppose that Oracle Berkeley DB page size is a power-of-two and request a power-of-two number of pages. The second guess could be wrong.

We suppose that Oracle Berkeley DB page size is a power-of-two and request a power-of-two number of pages. The second guess could be wrong.

This problem has been comunicated to Oracle in 2025, but they don’t care and I am sick of waiting.

BEWARE: Current implementation is tested in Unix-like Operating Systems. An attempt is done to get it working on MS Windows, but I can not personally check it. Your feedback is appreciated.

We support subinterpreters after Python 3.12, but we can only actually use and test them after Python 3.14. Add some tests in that case. Warning This support is still incomplete and highly experimental.

We support subinterpreters after Python 3.12, but we can only actually use and test them after Python 3.14. Add some tests in that case.

This support is still incomplete and highly experimental.

Since we now always compile using Py_LIMITED_API , we can simplify some code.

Since we now always compile using Py_LIMITED_API , we can simplify some code.

Python 3.16 added to the full test matrix.

Python 3.16 added to the full test matrix.

Experimental Python 3.16 support. Tested under 3.16.0a1.

Experimental Python 3.16 support. Tested under 3.16.0a1.

Since assertIsNone() and assertIsNotNone() are available since Python 3.1, refactor some test code.

Since assertIsNone() and assertIsNotNone() are available since Python 3.1, refactor some test code.

If there is an error while building an exception, don’t free the wrong object anymore.

If there is an error while building an exception, don’t free the wrong object anymore.

Each subinterpreter has its own Capsule. A C module using a BerkeleyDB Capsule should use the Capsule provided in the subinterpreter calling the C module using that Capsule.

Each subinterpreter has its own Capsule. A C module using a BerkeleyDB Capsule should use the Capsule provided in the subinterpreter calling the C module using that Capsule.

Now, module name and module C capsule name are static constants instead of rebuilding them in every import to the same value always. The result is the same, but subinterpreter linters are happier.

Now, module name and module C capsule name are static constants instead of rebuilding them in every import to the same value always. The result is the same, but subinterpreter linters are happier.

We use Oracle Berkeley DB set_errcall() function to get extra information when a DB function call fails. Unfortunately Oracle Berkeley DB doesn’t provide enough information to correlate notifications with errors when multiple threads fails simultaneously (we know the DB Environment but not the DB handle). In this release, the buffer that gets the extra error information is declared as _Thread_local , so we can link errors and extra error information if the notification is synchronous with the database call. Let’s see how portable this is, including MS Windows. Warning An undesirable side effect is that now EVERY thread in your program, using Oracle Berkeley DB or not, requires extra 1024 bytes of RAM and thread creation is slightly more costly. I think the effect is negligible, but you can provide feedback.

We use Oracle Berkeley DB set_errcall() function to get extra information when a DB function call fails. Unfortunately Oracle Berkeley DB doesn’t provide enough information to correlate notifications with errors when multiple threads fails simultaneously (we know the DB Environment but not the DB handle).

In this release, the buffer that gets the extra error information is declared as _Thread_local , so we can link errors and extra error information if the notification is synchronous with the database call.

Let’s see how portable this is, including MS Windows.

An undesirable side effect is that now EVERY thread in your program, using Oracle Berkeley DB or not, requires extra 1024 bytes of RAM and thread creation is slightly more costly. I think the effect is negligible, but you can provide feedback.

18.1.16 - 2026-10-16 ¶

Warning WARNING - BREAKING CHANGE: Drop support for Python 3.10. This breaking change should usually require a major and/or minor number update. Since berkeleydb traditional numbering is related to the highest Oracle Berkeley DB supported, I would usually wait until Oracle releases a new version to upgrade my own version and deprecate old Python support at the same time. Given that Oracle has not released a new Oracle Berkeley DB since 2020, I must break this practice for now. I am sorry if this update breaks your Python 3.10 environment. In that case, please pin your berkeleydb installation to version 18.1.15, the last Python 3.10 compatible release. Send me constructive feedback if appropriate. Python 3.15 is officially supported. Since current minimum Python supported is 3.11: We can simplify code for database password management. We can use PyType_GetName() instead of PyObject_GetAttrString() . Remove setup.cfg and move its configuration to setup3.py . That change modifies what is included in the source distribution. Update MANIFEST.in accordingly. Still not needed, but when minimal supported Python is 3.11 we need to do extra include in order to compile correctly. I update the code now to forget it when we drop Python 3.10 support. Still not needed, but when minimal supported Python is 3.11, we must conform with PEP 670. Get ready for that. Fix usage of PyType_GetName() . Now types DBCursor , DBLogCursor , DBSite , DBTxn and DBLock are inmutable. If this change break your code, please let me know. Highly experimental support for Python SubInterpreters under Python >= 3.12. In order to enable this experimental feature you must install the bindings defining the BERKELEYDB_EXPERIMENTAL_SUBINTERPRETERS environment variable. The environment variable is ignored if compiling the bindings under Python 3.10 or 3.11. For now this feature is experimental and unsupported, but let me know any issue you find in order to improve support. The new function berkeleydb.py_support_subinterpreters() returns a boolean signaling if the bindings are compiled with support of Python subinterpreters or not. The return value is always False under Python 3.10 and Python 3.11. You can override the directory where the tests are run with TMPDIR environment variable. If that environment variable is not defined, test will run in ~/ram/ if exists and in /tmp/ if ~/ram/ doesn’t exists or it is not a directory. The idea is that ~/ram/ is a ramdisk and the test will run faster. Previously, the ramdisk directory was expected in /tmp/ram/ . Python 3.15 added to the full test matrix. Update copyright to 2026.

Warning WARNING - BREAKING CHANGE: Drop support for Python 3.10. This breaking change should usually require a major and/or minor number update. Since berkeleydb traditional numbering is related to the highest Oracle Berkeley DB supported, I would usually wait until Oracle releases a new version to upgrade my own version and deprecate old Python support at the same time. Given that Oracle has not released a new Oracle Berkeley DB since 2020, I must break this practice for now. I am sorry if this update breaks your Python 3.10 environment. In that case, please pin your berkeleydb installation to version 18.1.15, the last Python 3.10 compatible release. Send me constructive feedback if appropriate.

WARNING - BREAKING CHANGE: Drop support for Python 3.10.

This breaking change should usually require a major and/or minor number update. Since berkeleydb traditional numbering is related to the highest Oracle Berkeley DB supported, I would usually wait until Oracle releases a new version to upgrade my own version and deprecate old Python support at the same time. Given that Oracle has not released a new Oracle Berkeley DB since 2020, I must break this practice for now.

I am sorry if this update breaks your Python 3.10 environment. In that case, please pin your berkeleydb installation to version 18.1.15, the last Python 3.10 compatible release.

Send me constructive feedback if appropriate.

Python 3.15 is officially supported.

Python 3.15 is officially supported.

Since current minimum Python supported is 3.11: We can simplify code for database password management. We can use PyType_GetName() instead of PyObject_GetAttrString() .

Since current minimum Python supported is 3.11:

We can simplify code for database password management.

We can simplify code for database password management.

We can use PyType_GetName() instead of PyObject_GetAttrString() .

We can use PyType_GetName() instead of PyObject_GetAttrString() .

Remove setup.cfg and move its configuration to setup3.py .

Remove setup.cfg and move its configuration to setup3.py .

That change modifies what is included in the source distribution. Update MANIFEST.in accordingly.

That change modifies what is included in the source distribution. Update MANIFEST.in accordingly.

Still not needed, but when minimal supported Python is 3.11 we need to do extra include in order to compile correctly. I update the code now to forget it when we drop Python 3.10 support.

Still not needed, but when minimal supported Python is 3.11 we need to do extra include in order to compile correctly. I update the code now to forget it when we drop Python 3.10 support.

Still not needed, but when minimal supported Python is 3.11, we must conform with PEP 670. Get ready for that.

Still not needed, but when minimal supported Python is 3.11, we must conform with PEP 670. Get ready for that.

Fix usage of PyType_GetName() .

Fix usage of PyType_GetName() .

Now types DBCursor , DBLogCursor , DBSite , DBTxn and DBLock are inmutable. If this change break your code, please let me know.

Now types DBCursor , DBLogCursor , DBSite , DBTxn and DBLock are inmutable. If this change break your code, please let me know.

Highly experimental support for Python SubInterpreters under Python >= 3.12. In order to enable this experimental feature you must install the bindings defining the BERKELEYDB_EXPERIMENTAL_SUBINTERPRETERS environment variable. The environment variable is ignored if compiling the bindings under Python 3.10 or 3.11. For now this feature is experimental and unsupported, but let me know any issue you find in order to improve support.

Highly experimental support for Python SubInterpreters under Python >= 3.12. In order to enable this experimental feature you must install the bindings defining the BERKELEYDB_EXPERIMENTAL_SUBINTERPRETERS environment variable. The environment variable is ignored if compiling the bindings under Python 3.10 or 3.11.

For now this feature is experimental and unsupported, but let me know any issue you find in order to improve support.

The new function berkeleydb.py_support_subinterpreters() returns a boolean signaling if the bindings are compiled with support of Python subinterpreters or not. The return value is always False under Python 3.10 and Python 3.11.

The new function berkeleydb.py_support_subinterpreters() returns a boolean signaling if the bindings are compiled with support of Python subinterpreters or not. The return value is always False under Python 3.10 and Python 3.11.

You can override the directory where the tests are run with TMPDIR environment variable. If that environment variable is not defined, test will run in ~/ram/ if exists and in /tmp/ if ~/ram/ doesn’t exists or it is not a directory. The idea is that ~/ram/ is a ramdisk and the test will run faster. Previously, the ramdisk directory was expected in /tmp/ram/ .

You can override the directory where the tests are run with TMPDIR environment variable. If that environment variable is not defined, test will run in ~/ram/ if exists and in /tmp/ if ~/ram/ doesn’t exists or it is not a directory. The idea is that ~/ram/ is a ramdisk and the test will run faster.

Previously, the ramdisk directory was expected in /tmp/ram/ .

Python 3.15 added to the full test matrix.

Python 3.15 added to the full test matrix.

Update copyright to 2026.

Update copyright to 2026.

18.1.15 - 2025-10-13 ¶

Warning WARNING - BREAKING CHANGE: Drop support for Python 3.9. This breaking change should usually require a major and/or minor number update. Since berkeleydb traditional numbering is related to the highest Oracle Berkeley DB supported, I would usually wait until Oracle releases a new version to upgrade my own version and deprecate old Python support at the same time. Given that Oracle has not released a new Oracle Berkeley DB since 2020, I must break this practice for now. I am sorry if this update breaks your Python 3.9 environment. In that case, please pin your berkeleydb installation to version 18.1.14, the last Python 3.9 compatible release. Send me constructive feedback if appropriate. Python 3.14 is officially supported. Since we have drop Python 3.9: We can simplify the code: We can now freely use PyType_GetModuleState() , PyModule_GetState() and PyType_GetModule() . We don’t need Py_tp_new anymore in PyType_Slot types. We can use PyType_FromModuleAndSpec() . Ease use of rmtree and unlink in tests. We can use Py_TPFLAGS_DISALLOW_INSTANTIATION in all supported Python versions. Now we require setuptools >= 80.9.0, so now the license must be reencoded from License :: OSI Approved :: BSD License to BSD-3-Clause . They are the same license, no worries, but expressed in the syntax required by modern setuptools . Ugly workaround to be able to compile the bindings with GCC in pedantic mode. Berkeley DB Exceptions are now compatible with Python subinterpreters. This is a big change, let me know if you find any problem, incompatibility or crash. This change increases the bindings C API version. If we compile the bindings with mismatched header file and shared object, a descriptive exception is raised at import time. In some funcions, booleans are now booleans, not integers. Do CLOSED checks before argument parsing, to avoid memory leaks when there are problems.

Warning WARNING - BREAKING CHANGE: Drop support for Python 3.9. This breaking change should usually require a major and/or minor number update. Since berkeleydb traditional numbering is related to the highest Oracle Berkeley DB supported, I would usually wait until Oracle releases a new version to upgrade my own version and deprecate old Python support at the same time. Given that Oracle has not released a new Oracle Berkeley DB since 2020, I must break this practice for now. I am sorry if this update breaks your Python 3.9 environment. In that case, please pin your berkeleydb installation to version 18.1.14, the last Python 3.9 compatible release. Send me constructive feedback if appropriate.

WARNING - BREAKING CHANGE: Drop support for Python 3.9.

This breaking change should usually require a major and/or minor number update. Since berkeleydb traditional numbering is related to the highest Oracle Berkeley DB supported, I would usually wait until Oracle releases a new version to upgrade my own version and deprecate old Python support at the same time. Given that Oracle has not released a new Oracle Berkeley DB since 2020, I must break this practice for now.

I am sorry if this update breaks your Python 3.9 environment. In that case, please pin your berkeleydb installation to version 18.1.14, the last Python 3.9 compatible release.

Send me constructive feedback if appropriate.

Python 3.14 is officially supported.

Python 3.14 is officially supported.

Since we have drop Python 3.9: We can simplify the code: We can now freely use PyType_GetModuleState() , PyModule_GetState() and PyType_GetModule() . We don’t need Py_tp_new anymore in PyType_Slot types. We can use PyType_FromModuleAndSpec() . Ease use of rmtree and unlink in tests. We can use Py_TPFLAGS_DISALLOW_INSTANTIATION in all supported Python versions.

Since we have drop Python 3.9:

We can simplify the code: We can now freely use PyType_GetModuleState() , PyModule_GetState() and PyType_GetModule() . We don’t need Py_tp_new anymore in PyType_Slot types. We can use PyType_FromModuleAndSpec() . Ease use of rmtree and unlink in tests.

We can simplify the code:

We can now freely use PyType_GetModuleState() , PyModule_GetState() and PyType_GetModule() .

We can now freely use PyType_GetModuleState() , PyModule_GetState() and PyType_GetModule() .

We don’t need Py_tp_new anymore in PyType_Slot types.

We don’t need Py_tp_new anymore in PyType_Slot types.

We can use PyType_FromModuleAndSpec() .

We can use PyType_FromModuleAndSpec() .

Ease use of rmtree and unlink in tests.

Ease use of rmtree and unlink in tests.

We can use Py_TPFLAGS_DISALLOW_INSTANTIATION in all supported Python versions.

We can use Py_TPFLAGS_DISALLOW_INSTANTIATION in all supported Python versions.

Now we require setuptools >= 80.9.0, so now the license must be reencoded from License :: OSI Approved :: BSD License to BSD-3-Clause . They are the same license, no worries, but expressed in the syntax required by modern setuptools .

Now we require setuptools >= 80.9.0, so now the license must be reencoded from License :: OSI Approved :: BSD License to BSD-3-Clause . They are the same license, no worries, but expressed in the syntax required by modern setuptools .

Ugly workaround to be able to compile the bindings with GCC in pedantic mode.

Ugly workaround to be able to compile the bindings with GCC in pedantic mode.

Berkeley DB Exceptions are now compatible with Python subinterpreters. This is a big change, let me know if you find any problem, incompatibility or crash. This change increases the bindings C API version.

Berkeley DB Exceptions are now compatible with Python subinterpreters. This is a big change, let me know if you find any problem, incompatibility or crash.

This change increases the bindings C API version.

If we compile the bindings with mismatched header file and shared object, a descriptive exception is raised at import time.

If we compile the bindings with mismatched header file and shared object, a descriptive exception is raised at import time.

In some funcions, booleans are now booleans, not integers.

In some funcions, booleans are now booleans, not integers.

Do CLOSED checks before argument parsing, to avoid memory leaks when there are problems.

Do CLOSED checks before argument parsing, to avoid memory leaks when there are problems.

18.1.14 - 2025-03-23 ¶

Warning WARNING - BREAKING CHANGE: We eliminate dbobj.py . It was very outdated and it was only barely useful if you wanted to create subclasses of berkeleydb classes. My recommended approach would be to use delegation instead of subclassing. It is quite trivial. Instead of subclassing DBEnv , you can do something like: class My_DBEnv : def __init__ ( self , * args , ** kwargs ): self . _cobj = db . DBEnv ( * args , ** kwargs ) def __getattr__ ( self , name ): return getattr ( self . _cobj , name ) You can do something similar for other berkeleydb objects, for example, DB , even implementing a mapping interface: class DB ( MutableMapping ): def __init__ ( self , dbenv , * args , ** kwargs ): # give it the proper DBEnv C object that its expecting self . _cobj = db . DB ( * (( dbenv . _cobj ,) + args ), ** kwargs ) def __getattr__ ( self , name ): return getattr ( self . _cobj , name ) # We need the following overrides because we are "MutableMapping". def __len__ ( self ): return len ( self . _cobj ) def __getitem__ ( self , arg ): return self . _cobj [ arg ] def __setitem__ ( self , key , value ): self . _cobj [ key ] = value def __delitem__ ( self , arg ): del self . _cobj [ arg ] def __iter__ ( self ) : return self . _cobj . __iter__ () Microsoft Windows support is back! Thanks to Brian Matthews for pursuing this and for investing time and resources making it possible. I update the PyPI Classifiers for this project to from: Operating System :: Unix to: Operating System :: Unix Operating System :: POSIX Operating System :: Microsoft :: Windows Allow unicode and binary keys when using encryption. Previously, only unicode keys were allowed. In both cases, null bytes ( '\0' or '\x00' ) will raise an exception. Correctly display (in the raised exception) the type of the parameter when it is not accepted, beside the required type. This solves a regression introduced in 18.1.9. Delete stale and outdated entries in the TO DO file. Solve some redefinitions in the dictionary returned by DBEnv.lock_stat() and add more entries: Berkeley DB >= 4.8: locksteals , maxhlocks , maxhobjects , maxlsteals , maxosteals , objectsteals , part_max_nowait , part_max_wait , part_nowait , part_wait , partitions . Berkeley DB >= 5.3: initlocks , initlockers , initobjects , lockers , locks , objects , tablesize . Berkeley DB >= 6.2: nlockers_hit , nlockers_reused . Add more entries to DBEnv.log_stat() if we are using Berkeley DB >= 5.3: fileid_init , maxnfileid , nfileid . nelem value in DB.stat() for hash databases was dropped some time ago. Update stale documentation. That value is actually available via DB.get_h_nelem() . Improve docs explaining the end value in the dictionary returned by DB.compact() and documenting that empty_buckets is not available when using Berkeley DB 4.8. In several stats dictionaries, document that ext_files value is only available from Berkeley DB 6.2. Add more entries to DBEnv.memp_stat() : pagesize . Add more entries to DBEnv.memp_stat() if we are using Berkeley DB >= 5.3: regmax , hash_mutexes , backup_spins . Add more entries to DBEnv.memp_stat() if we are using Berkeley DB >= 6.2: mvcc_reused . Add more entries to DBEnv.txn_stat() if we are using Berkeley DB >= 5.3: inittxns . Add more entries to DBEnv.mutex_stat() if we are using Berkeley DB >= 5.3: mutex_init , mutex_max , regmax . Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 5.3: elect_threads , max_elect_threads . Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 6.2: incoming_msgs_dropped , incoming_queue_bytes , incoming_queue_gbytes , site_participants , site_total , site_views , takeovers , write_ops_forwarded , write_ops_received . Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 18.1: group_stable_log_file , polling_method . Add more entries to DBEnv.rep_stat() if we are using Berkeley DB >= 5.3: election_datagen , lease_chk , lease_chk_misses , lease_chk_refresh , lease_sends . Add more entries to DBEnv.rep_stat() if we are using Berkeley DB >= 6.2: ext_duplicated , ext_records , ext_rereq , ext_update_rereq , view . In the different stats documentation, add notes what versions of Berkeley DB provide the different values. Complete documentation berkeleydb exceptions and what Berkeley DB releases provide each one. Document what functions are available when compiled against each Berkeley DB release.

Warning WARNING - BREAKING CHANGE: We eliminate dbobj.py . It was very outdated and it was only barely useful if you wanted to create subclasses of berkeleydb classes. My recommended approach would be to use delegation instead of subclassing. It is quite trivial. Instead of subclassing DBEnv , you can do something like: class My_DBEnv : def __init__ ( self , * args , ** kwargs ): self . _cobj = db . DBEnv ( * args , ** kwargs ) def __getattr__ ( self , name ): return getattr ( self . _cobj , name ) You can do something similar for other berkeleydb objects, for example, DB , even implementing a mapping interface: class DB ( MutableMapping ): def __init__ ( self , dbenv , * args , ** kwargs ): # give it the proper DBEnv C object that its expecting self . _cobj = db . DB ( * (( dbenv . _cobj ,) + args ), ** kwargs ) def __getattr__ ( self , name ): return getattr ( self . _cobj , name ) # We need the following overrides because we are "MutableMapping". def __len__ ( self ): return len ( self . _cobj ) def __getitem__ ( self , arg ): return self . _cobj [ arg ] def __setitem__ ( self , key , value ): self . _cobj [ key ] = value def __delitem__ ( self , arg ): del self . _cobj [ arg ] def __iter__ ( self ) : return self . _cobj . __iter__ ()

WARNING - BREAKING CHANGE: We eliminate dbobj.py . It was very outdated and it was only barely useful if you wanted to create subclasses of berkeleydb classes.

My recommended approach would be to use delegation instead of subclassing. It is quite trivial. Instead of subclassing DBEnv , you can do something like:

You can do something similar for other berkeleydb objects, for example, DB , even implementing a mapping interface:

Microsoft Windows support is back! Thanks to Brian Matthews for pursuing this and for investing time and resources making it possible. I update the PyPI Classifiers for this project to from: Operating System :: Unix to: Operating System :: Unix Operating System :: POSIX Operating System :: Microsoft :: Windows

Microsoft Windows support is back! Thanks to Brian Matthews for pursuing this and for investing time and resources making it possible.

I update the PyPI Classifiers for this project to from:

Allow unicode and binary keys when using encryption. Previously, only unicode keys were allowed. In both cases, null bytes ( '\0' or '\x00' ) will raise an exception.

Allow unicode and binary keys when using encryption. Previously, only unicode keys were allowed. In both cases, null bytes ( '\0' or '\x00' ) will raise an exception.

Correctly display (in the raised exception) the type of the parameter when it is not accepted, beside the required type. This solves a regression introduced in 18.1.9.

Correctly display (in the raised exception) the type of the parameter when it is not accepted, beside the required type. This solves a regression introduced in 18.1.9.

Delete stale and outdated entries in the TO DO file.

Delete stale and outdated entries in the TO DO file.

Solve some redefinitions in the dictionary returned by DBEnv.lock_stat() and add more entries: Berkeley DB >= 4.8: locksteals , maxhlocks , maxhobjects , maxlsteals , maxosteals , objectsteals , part_max_nowait , part_max_wait , part_nowait , part_wait , partitions . Berkeley DB >= 5.3: initlocks , initlockers , initobjects , lockers , locks , objects , tablesize . Berkeley DB >= 6.2: nlockers_hit , nlockers_reused .

Solve some redefinitions in the dictionary returned by DBEnv.lock_stat() and add more entries:

Berkeley DB >= 4.8: locksteals , maxhlocks , maxhobjects , maxlsteals , maxosteals , objectsteals , part_max_nowait , part_max_wait , part_nowait , part_wait , partitions .

Berkeley DB >= 4.8: locksteals , maxhlocks , maxhobjects , maxlsteals , maxosteals , objectsteals , part_max_nowait , part_max_wait , part_nowait , part_wait , partitions .

Berkeley DB >= 5.3: initlocks , initlockers , initobjects , lockers , locks , objects , tablesize .

Berkeley DB >= 5.3: initlocks , initlockers , initobjects , lockers , locks , objects , tablesize .

Berkeley DB >= 6.2: nlockers_hit , nlockers_reused .

Berkeley DB >= 6.2: nlockers_hit , nlockers_reused .

Add more entries to DBEnv.log_stat() if we are using Berkeley DB >= 5.3: fileid_init , maxnfileid , nfileid .

Add more entries to DBEnv.log_stat() if we are using Berkeley DB >= 5.3: fileid_init , maxnfileid , nfileid .

nelem value in DB.stat() for hash databases was dropped some time ago. Update stale documentation. That value is actually available via DB.get_h_nelem() .

nelem value in DB.stat() for hash databases was dropped some time ago. Update stale documentation.

That value is actually available via DB.get_h_nelem() .

Improve docs explaining the end value in the dictionary returned by DB.compact() and documenting that empty_buckets is not available when using Berkeley DB 4.8.

Improve docs explaining the end value in the dictionary returned by DB.compact() and documenting that empty_buckets is not available when using Berkeley DB 4.8.

In several stats dictionaries, document that ext_files value is only available from Berkeley DB 6.2.

In several stats dictionaries, document that ext_files value is only available from Berkeley DB 6.2.

Add more entries to DBEnv.memp_stat() : pagesize .

Add more entries to DBEnv.memp_stat() : pagesize .

Add more entries to DBEnv.memp_stat() if we are using Berkeley DB >= 5.3: regmax , hash_mutexes , backup_spins .

Add more entries to DBEnv.memp_stat() if we are using Berkeley DB >= 5.3: regmax , hash_mutexes , backup_spins .

Add more entries to DBEnv.memp_stat() if we are using Berkeley DB >= 6.2: mvcc_reused .

Add more entries to DBEnv.memp_stat() if we are using Berkeley DB >= 6.2: mvcc_reused .

Add more entries to DBEnv.txn_stat() if we are using Berkeley DB >= 5.3: inittxns .

Add more entries to DBEnv.txn_stat() if we are using Berkeley DB >= 5.3: inittxns .

Add more entries to DBEnv.mutex_stat() if we are using Berkeley DB >= 5.3: mutex_init , mutex_max , regmax .

Add more entries to DBEnv.mutex_stat() if we are using Berkeley DB >= 5.3: mutex_init , mutex_max , regmax .

Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 5.3: elect_threads , max_elect_threads .

Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 5.3: elect_threads , max_elect_threads .

Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 6.2: incoming_msgs_dropped , incoming_queue_bytes , incoming_queue_gbytes , site_participants , site_total , site_views , takeovers , write_ops_forwarded , write_ops_received .

Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 6.2: incoming_msgs_dropped , incoming_queue_bytes , incoming_queue_gbytes , site_participants , site_total , site_views , takeovers , write_ops_forwarded , write_ops_received .

Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 18.1: group_stable_log_file , polling_method .

Add more entries to DBEnv.repmgr_stat() if we are using Berkeley DB >= 18.1: group_stable_log_file , polling_method .

Add more entries to DBEnv.rep_stat() if we are using Berkeley DB >= 5.3: election_datagen , lease_chk , lease_chk_misses , lease_chk_refresh , lease_sends .

Add more entries to DBEnv.rep_stat() if we are using Berkeley DB >= 5.3: election_datagen , lease_chk , lease_chk_misses , lease_chk_refresh , lease_sends .

Add more entries to DBEnv.rep_stat() if we are using Berkeley DB >= 6.2: ext_duplicated , ext_records , ext_rereq , ext_update_rereq , view .

Add more entries to DBEnv.rep_stat() if we are using Berkeley DB >= 6.2: ext_duplicated , ext_records , ext_rereq , ext_update_rereq , view .

In the different stats documentation, add notes what versions of Berkeley DB provide the different values.

In the different stats documentation, add notes what versions of Berkeley DB provide the different values.

Complete documentation berkeleydb exceptions and what Berkeley DB releases provide each one.

Complete documentation berkeleydb exceptions and what Berkeley DB releases provide each one.

Document what functions are available when compiled against each Berkeley DB release.

Document what functions are available when compiled against each Berkeley DB release.

18.1.13 - 2025-01-22 ¶

Note Being able to compile the bindings on non x86/x86_64 Linux systems (ARM, RISC-V, etc). This improvement required to change the way compilation on Linux worked. If you find any issue with this, please report. Compile the C module with extra static analysis and be more strict. Some functions have unused parameters that we would like to preserve. Different types in different python subinterpreters are tricky under Py_LIMITED_API =5.3: Beside db.DB_VERSION_STRING we now have db.DB_VERSION_FULL_STRING . Oracle Berkeley DB>=6.2: Beside db.DB_DBT_BLOB we now have db.DB_DBT_EXT_FILE . Being able to test against an especific Oracle Berkeley DB release. Code cleanup: Remove unnecessary semicolons in Python code. Remove unused imports. Split multiple imports in a single line. Split multiple statements in multiple lines. Delete dead assignments. Delete ancient code for verbose and silent in test code. I never used it, and it is maintenance load. Simplify some assertTrue() and assertFalse() . Imports directly from berkeleydb instead of test_all . Copyright and license texts should be in , not d...

Extracted Entities

Companies (1)

Domains (1)

Tools (1)