oauth2_provider/forms.py

django-oauth-toolkit · oauth2_provider/forms.py · python · BSD-2-Clause
auth, Auth / Identity

Shim that forwards oauth2_provider.forms to the new location, emitting deprecation warning.

# Source: https://github.com/django-oauth/django-oauth-toolkit | License: BSD-2-Clause | Copyright 2013, Massimiliano Pippi, Federico Frenguelli and contributors
# Provided via justclaw.it.com; keep this notice with the code.
"""Backward-compatible import shim.

``oauth2_provider.forms`` has moved to
``oauth2_provider.authorization_server.forms``.

Importing from this old path still works but is deprecated and will be removed
in django-oauth-toolkit 4.0.
"""

import sys
import warnings

from oauth2_provider.authorization_server import forms as _moved


warnings.warn(
    "oauth2_provider.forms has moved to oauth2_provider.authorization_server.forms. "
    "The old import path is deprecated and will be removed in "
    "django-oauth-toolkit 4.0.",
    DeprecationWarning,
    stacklevel=2,
)

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key