Skip to content

python@3.14: move _dbm to python-gdbm@3.14 on Linux#278336

Merged
BrewTestBot merged 4 commits intomainfrom
python-gdbm-as-ndbm
Apr 24, 2026
Merged

python@3.14: move _dbm to python-gdbm@3.14 on Linux#278336
BrewTestBot merged 4 commits intomainfrom
python-gdbm-as-ndbm

Conversation

@cho-m
Copy link
Copy Markdown
Member

@cho-m cho-m commented Apr 19, 2026

Seeing if we can reduce Berkeley DB usage.

For Python, most Linux distros just use gdbm rather than BDB, but Homebrew has a harder time directly linking to GPL dependencies as we cannot rely on GNU's "system library" exception.

Approach here would be making dependents that need dbm.ndbm support add:

on_linux do
  depends_on "python-gdbm@3.14"
end

Also, since Python 3.13, dbm provides dbm.sqlite3 so there is at least some functionality available without python-gdbm installed. So I expect lifespan of berkeley-db@5 to be aligned to deprecation date of either Python 3.12 (2028-10) or 3.13 (2029-10) depending on whether we backport to Python 3.13.


python-gdbm@3.14 is revision bumped to avoid missing _dbm in case python@3.14 is reinstalled but not python-gdbm@3.14.

python@3.14 does not need a revision bump as modules are installed in non-conflicting directories. If both _dbm exist, original would be loaded first and should work as expected.

@cho-m cho-m added CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. long dependent tests Set a long timeout for dependent testing labels Apr 19, 2026
@github-actions github-actions Bot added the CI-linux-self-hosted-deps Test dependents on Linux self-hosted runner label Apr 19, 2026
@cho-m cho-m force-pushed the python-gdbm-as-ndbm branch from aadb08d to ae39dec Compare April 19, 2026 14:47
@cho-m
Copy link
Copy Markdown
Member Author

cho-m commented Apr 19, 2026

I wonder if we should do this on macOS too given https://docs.python.org/3/library/dbm.html#module-dbm.ndbm

Warning

The NDBM library shipped as part of macOS has an undocumented limitation on the size of values, which can result in corrupted database files when storing values larger than this limit. Reading such corrupted files can result in a hard crash (segmentation fault).

EDIT: Though not a blocker for this PR. Just something we may want to consider to avoid problematic NDBM given we used to ship with functional GDBM compatibility layer in Python 3.10 and older.

@cho-m cho-m marked this pull request as ready for review April 19, 2026 17:25
@cho-m cho-m added the ready to merge PR can be merged once CI is green label Apr 20, 2026
@cho-m
Copy link
Copy Markdown
Member Author

cho-m commented Apr 20, 2026

macOS failures are unrelated as changed only impact Linux.

  • llvm@17 and llvm@18 are likely from Xcode 26.4
  • glances, arjun and airshare may be CI environment?

@github-actions
Copy link
Copy Markdown
Contributor

:shipit: @botantony has requested bottles to be published to this PR.

Caution

Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch.

@github-actions github-actions Bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Apr 24, 2026
@BrewTestBot BrewTestBot enabled auto-merge April 24, 2026 13:20
@BrewTestBot BrewTestBot added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit 9b4408b Apr 24, 2026
22 checks passed
@BrewTestBot BrewTestBot deleted the python-gdbm-as-ndbm branch April 24, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-linux-self-hosted-deps Test dependents on Linux self-hosted runner CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. long dependent tests Set a long timeout for dependent testing ready to merge PR can be merged once CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants