Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions python/arcticdb/version_store/_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,12 @@ def update(
},
kwargs,
)
if "dynamic_schema" in kwargs:
log.warning(
"update() received 'dynamic_schema' parameter which overrides the library setting "
"and may cause data corruption. Please remove it from the call site. "
"Support for this parameter override is scheduled to be removed in June 2026."
)

Comment on lines +1148 to 1153
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a scheduled removal, the standard Python convention is warnings.warn() with DeprecationWarning (or FutureWarning for user-facing removals) rather than log.warning(). The latter goes to the logging system, so:

  • Test suites using pytest.warns(DeprecationWarning) or warnings.filterwarnings("error", ...) won't catch it
  • The traceback points into this function rather than the caller, making it hard for users to locate the offending call site (stacklevel=2 fixes this)
Suggested change
log.warning(
"update() received 'dynamic_schema' parameter which overrides the library setting "
"and may cause data corruption. Please remove it from the call site. "
"Support for this parameter override is scheduled to be removed in June 2026."
)
if "dynamic_schema" in kwargs:
import warnings
warnings.warn(
"Passing 'dynamic_schema' directly to update() overrides the library setting "
"and may cause data corruption. Please use LibraryOptions(dynamic_schema=...) "
"when creating the library instead. "
"Support for this parameter override is scheduled to be removed in June 2026.",
FutureWarning,
stacklevel=2,
)

update_query = _PythonVersionStoreUpdateQuery()
dynamic_strings = self._resolve_dynamic_strings(kwargs)
Expand Down
Loading