Repository navigation
fix(schema): database_prefix deprecation warning no longer names 2.3 as the removal release - #1727
Open
dimitri-yatsenko wants to merge 1 commit into
Open
dimitri-yatsenko wants to merge 1 commit into
dimitri-yatsenko wants to merge 1 commit into
Conversation
The deprecation warning named 2.3 as the removal release, but the 2.3 releases still accept the setting. Name no release, and say that the prefix is not applied to schema names. Fixes #1675.
dimitri-yatsenko
requested review from
MilagrosMarin,
lum-agilyti and
ttngu207
November 21, 2026 01:15
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
database.database_prefixis set,Schema.activate()warns that the setting is deprecated. The warning said it "will be removed in DataJoint 2.3". The 2.3 releases still accept the setting, so the message was wrong. No removal release has been agreed yet.The warning now says the setting will be removed in a future release. It also says that the prefix is not applied to schema names, which is how the library behaves today. The setting itself is unchanged.
Fixes #1675.
Changes
src/datajoint/schemas.py: the warning names no release and says the prefix is not applied to schema names.src/datajoint/settings.py: the field description ofdatabase_prefixsays the same.Documentation
datajoint/datajoint-docs#317 makes the matching documentation change and merges after this PR. It removes the "will be removed in 2.3" note from
how-to/deploy-production.md, says the setting will be removed in a future release and is not applied to schema names, takesDJ_DATABASE_PREFIXout of the production examples (environment, container, verification script and summary table), and updates thedatabase.database_prefixrow inreference/configuration.md. With both merged, the documentation part of #1675 is done.Behavior change
Only the text of the warning and of the field description changes. The setting is read and ignored as before.
Tests
tests/unit/test_database_prefix_warning.py: runsSchema.activate()against a stub connection. It checks that the warning says "a future release", does not name 2.3, and is not issued when the prefix is empty. It fails before the change.tests/integration/test_database_prefix.py: the same checks against MySQL and PostgreSQL, and a check that the schema name is used as given. It fails before the change on both backends.tests/integration/test_schema.pypass.