Warning:
Fauna is decommissioning FQL v4 on June 30, 2025.

This driver is not compatible with FQL v10, the latest version. Fauna accounts created after August 21, 2024 must use FQL v10.
Ensure you migrate existing projects to the official v10 driver by the v4 EOL date: https://github.com/fauna/fauna-python.

For more information, see the v4 end of life (EOL) announcement and related FAQ.

Module faunadb.deprecated

Expand source code
import warnings
import functools

def deprecated(reason):
  def decorator(old_func):

    @functools.wraps(old_func)
    def new_func(*args, **kvargs):
      fmt = "{name}: {reason}"
      warnings.warn(
        fmt.format(name=old_func.__name__, reason=reason),
        category=DeprecationWarning,
        stacklevel=2
      )
      return old_func(*args, **kvargs)

    return new_func

  return decorator

Functions

def deprecated(reason)
Expand source code
def deprecated(reason):
  def decorator(old_func):

    @functools.wraps(old_func)
    def new_func(*args, **kvargs):
      fmt = "{name}: {reason}"
      warnings.warn(
        fmt.format(name=old_func.__name__, reason=reason),
        category=DeprecationWarning,
        stacklevel=2
      )
      return old_func(*args, **kvargs)

    return new_func

  return decorator