Skip to content

Public rename orm_bind -> bind_database has no deprecation alias (breaks boot on upgrade) #56

@justin-k-bruce

Description

@justin-k-bruce

Summary: tina4_python.orm.orm_bind was renamed to bind_database (same signature) somewhere across the 3.13.x line with no deprecation alias, so upgrading silently breaks any app that imports orm_bind (the module fails to load at boot). Severity: low — an API-stability / process ask, not a runtime bug.

Version: observed upgrading into tina4-python 3.13.37.

Impact

from tina4_python.orm import orm_bindImportError: cannot import name 'orm_bind' at startup. Nothing in release notes flagged the rename, so it surfaced only as a boot failure after a routine bump.

Suggested fix

Keep a deprecated alias for a few releases in tina4_python/orm/__init__.py:

def orm_bind(*args, **kwargs):
    import warnings
    warnings.warn("orm_bind is deprecated; use bind_database", DeprecationWarning, stacklevel=2)
    return bind_database(*args, **kwargs)

Test

import warnings
with warnings.catch_warnings(record=True) as w:
    warnings.simplefilter("always")
    from tina4_python.orm import orm_bind
    assert orm_bind is not None
    assert any(issubclass(x.category, DeprecationWarning) for x in w)

More generally: a note in the release notes whenever a public symbol is renamed would prevent this class of upgrade break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions