Change8

Migrating to Alembic rel_1_16_0

Version rel_1_16_0 introduces 1 breaking change. This guide details how to update your code.

Released: 5/21/2025

1
Breaking Changes
4
Migration Steps
8
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

CommandLine.register_commandConfig.path_separatorOperations.add_column.if_not_existsOperations.drop_column.if_existsOperations.drop_constraint.if_existsScriptDirectory.dirConfig.config_file_nameprivate path helper functions (e.g., _some_path_func)

Breaking Changes

Issue #1

Public API functions that previously returned directory paths as strings (e.g., private helpers) may now return pathlib.Path objects, which can break code that assumes a string.

Migration Steps

  1. 1
    If your code relies on private API functions returning string paths, update it to accept `os.PathLike` objects or convert the returned `Path` to `str`.
  2. 2
    Replace any usage of the deprecated `utcnow()` function with `now(UTC)`.
  3. 3
    Update configuration files to use `path_separator` instead of `version_path_separator`; remove the old option to avoid deprecation warnings.
  4. 4
    Ensure your build environment uses setuptools version 77.0.3 or newer due to the updated `pyproject.toml`.

Release Summary

Alembic 1.16.0 adds PEP 621 configuration, a new CLI registration API, enhanced path handling, and several operation flags, while fixing autogenerate and deprecation issues.

Need More Details?

View the full release notes and all changes for Alembic rel_1_16_0.

View Full Changelog