From ad40cfb89e65f7148320c208509b022b58a932e4 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 14 Feb 2024 12:26:10 +0100 Subject: [PATCH 1/2] gh-100414: Make dbm.sqlite3 the preferred dbm backend --- Lib/dbm/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/dbm/__init__.py b/Lib/dbm/__init__.py index 97c0bb1c9ca946..4fdbc54e74cfb6 100644 --- a/Lib/dbm/__init__.py +++ b/Lib/dbm/__init__.py @@ -38,7 +38,7 @@ class error(Exception): pass -_names = ['dbm.gnu', 'dbm.ndbm', 'dbm.sqlite3', 'dbm.dumb'] +_names = ['dbm.sqlite3', 'dbm.gnu', 'dbm.ndbm', 'dbm.dumb'] _defaultmod = None _modules = {} From fb9dd2196f4cf8db4a4d1bd4bbda85598851ffbb Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 14 Feb 2024 13:59:00 +0100 Subject: [PATCH 2/2] Amend gh-114481 NEWS and What's New entries --- Doc/whatsnew/3.13.rst | 2 +- .../next/Library/2024-01-23-13-03-22.gh-issue-100414.5kTdU5.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index a265bf1734c1d3..b14fb4e5392a2c 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -238,7 +238,7 @@ dbm from the database. (Contributed by Donghee Na in :gh:`107122`.) -* Add new :mod:`dbm.sqlite3` backend. +* Add new :mod:`dbm.sqlite3` backend, and make it the default :mod:`!dbm` backend. (Contributed by Raymond Hettinger and Erlend E. Aasland in :gh:`100414`.) doctest diff --git a/Misc/NEWS.d/next/Library/2024-01-23-13-03-22.gh-issue-100414.5kTdU5.rst b/Misc/NEWS.d/next/Library/2024-01-23-13-03-22.gh-issue-100414.5kTdU5.rst index ffcb926a8d546c..0f3b3bdd7c6d26 100644 --- a/Misc/NEWS.d/next/Library/2024-01-23-13-03-22.gh-issue-100414.5kTdU5.rst +++ b/Misc/NEWS.d/next/Library/2024-01-23-13-03-22.gh-issue-100414.5kTdU5.rst @@ -1,2 +1,2 @@ -Add :mod:`dbm.sqlite3` as a backend to :mod:`dbm`. +Add :mod:`dbm.sqlite3` as a backend to :mod:`dbm`, and make it the new default :mod:`!dbm` backend. Patch by Raymond Hettinger and Erlend E. Aasland.