Skip to content

Commit 24c329c

Browse files
deprecate: Add deprecation warning to migrate module
The datajoint.migrate module will be removed in DataJoint 2.2. Users will see a DeprecationWarning when importing the module, giving them time to complete their schema migrations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a6dd989 commit 24c329c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/datajoint/migrate.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
Codec system, particularly for upgrading blob columns to use
66
explicit `<blob>` type declarations.
77
8+
.. deprecated:: 2.0.0
9+
This module is deprecated and will be removed in DataJoint 2.2.
10+
Complete your migrations before upgrading to 2.2.
11+
812
Note on Terminology
913
-------------------
1014
This module uses "external storage" because that was the term in DataJoint 0.14.6.
@@ -16,10 +20,18 @@
1620

1721
import logging
1822
import re
23+
import warnings
1924
from typing import TYPE_CHECKING
2025

2126
from .errors import DataJointError
2227

28+
warnings.warn(
29+
"datajoint.migrate is deprecated and will be removed in DataJoint 2.2. "
30+
"Complete your schema migrations before upgrading to 2.2.",
31+
DeprecationWarning,
32+
stacklevel=2,
33+
)
34+
2335
if TYPE_CHECKING:
2436
from .schemas import Schema
2537

0 commit comments

Comments
 (0)