module documentation

Helpers related to deprecation of functions, methods, classes, other functionality.
Constant SQLALCHEMY​_WARN​_20 Undocumented
Function ​_decorate​_cls​_with​_warning Undocumented
Function ​_decorate​_with​_warning Wrap a function with a warnings.warn and augmented docstring.
Function ​_sanitize​_restructured​_text Undocumented
Function ​_warn​_with​_version Undocumented
Function deprecated Decorates a function and issues a deprecation warning on use.
Function deprecated​_20 Undocumented
Function deprecated​_20​_cls Undocumented
Function deprecated​_cls Undocumented
Function deprecated​_params Decorates a function to warn on use of certain parameters.
Function moved​_20 Undocumented
Function warn​_deprecated Undocumented
Function warn​_deprecated​_20 Undocumented
Function warn​_deprecated​_limited Issue a deprecation warning with a parameterized string, limiting the number of registrations.
SQLALCHEMY_WARN_20: bool =

Undocumented

Value
True
def _decorate_cls_with_warning(cls, constructor, wtype, message, version, docstring_header=None):

Undocumented

def _decorate_with_warning(func, wtype, message, version, docstring_header=None, enable_warnings=True):
Wrap a function with a warnings.warn and augmented docstring.
def _sanitize_restructured_text(text):

Undocumented

def _warn_with_version(msg, version, type_, stacklevel, code=None):

Undocumented

def deprecated(version, message=None, add_deprecation_to_docstring=True, warning=None, enable_warnings=True):
Decorates a function and issues a deprecation warning on use.
Parameters
versionIssue version in the warning.
messageIf provided, issue message in the warning. A sensible default is used if not provided.
add​_deprecation​_to​_docstringDefault True. If False, the wrapped function's __doc__ is left as-is. If True, the 'message' is prepended to the docs if provided, or sensible default if message is omitted.
warningUndocumented
enable​_warningsUndocumented
def deprecated_20(api_name, alternative=None, becomes_legacy=False, **kw):

Undocumented

def deprecated_20_cls(clsname, alternative=None, constructor='__init__', becomes_legacy=False):

Undocumented

def deprecated_cls(version, message, constructor='__init__'):

Undocumented

def deprecated_params(**specs):

Decorates a function to warn on use of certain parameters.

e.g.

@deprecated_params(
    weak_identity_map=(
        "0.7",
        "the :paramref:`.Session.weak_identity_map parameter "
        "is deprecated."
    )

)
def moved_20(message, **kw):

Undocumented

def warn_deprecated(msg, version, stacklevel=3, code=None):

Undocumented

def warn_deprecated_20(msg, stacklevel=3, code=None):

Undocumented

def warn_deprecated_limited(msg, args, version, stacklevel=3, code=None):
Issue a deprecation warning with a parameterized string, limiting the number of registrations.