Skip to content

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
masterfrom
fix/database-prefix-warning
Open

dimitri-yatsenko wants to merge 1 commit into
masterfrom
fix/database-prefix-warning

Conversation

@dimitri-yatsenko

@dimitri-yatsenko dimitri-yatsenko commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

When database.database_prefix is 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 of database_prefix says 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, takes DJ_DATABASE_PREFIX out of the production examples (environment, container, verification script and summary table), and updates the database.database_prefix row in reference/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: runs Schema.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.
  • The unit suite and tests/integration/test_schema.py pass.

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.

This branch has not been deployed

No deployments
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.

database_prefix deprecation warning says "will be removed in DataJoint 2.3", but the setting is still present in 2.3.x

1 participant