Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using dbm.sqlite3 (#242) #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamWill
Copy link

Python 3.13 added a new dbm backend, dbm.sqlite3, as the most- preferred choice when you do import dbm. This backend causes our test suite to fail with sqlite3 threading violations. This tweaks our dbm loading to just skip sqlite3 and try the other possible backends in the same order as Python < 3.13 did.

Python 3.13 added a new dbm backend, dbm.sqlite3, as the most-
preferred choice when you do `import dbm`. This backend causes
our test suite to fail with sqlite3 threading violations. This
tweaks our dbm loading to just skip sqlite3 and try the other
possible backends in the same order as Python < 3.13 did.

Signed-off-by: Adam Williamson <[email protected]>
@AdamWill
Copy link
Author

This at least makes the test failures go away. It makes Beaker behave the same on Python 3.13 as it did before.

But...I'm not sure it's the right thing to do. It's possible that there are underlying issues with thread safety in beaker which actually mean it doesn't work right with the other dbm backends either, but those backends aren't smart enough to notice, and the beaker tests aren't sophisticated enough to catch it. In which case the correct fix would be to fix that, and accept the new dbm backend. But I'm really not sure whether that's the case, or this is an issue specific to the sqlite3 backend (in which case this makes more sense).

@AdamWill
Copy link
Author

Oh, note on the change from dumbdbm to dbm.dumb - there is no dumbdbm in current Python 3. dbm.dumb has been its correct name for the whole Python 3 series. Maybe early Python 3's accepted dumbdbm as a compat thing, I don't know, but dbm.dumb is the right name. It was redundant in any case since just doing import dbm would have tried dbm.gnu, then dbm.ndbm, then fallen back on dbm.dumb...but with the new logic of course it's not redundant any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant