Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #711 from glasserc/deprecation
Browse files Browse the repository at this point in the history
Indicate that Cliquet is now deprecated
  • Loading branch information
Natim committed May 18, 2016
2 parents 0d2ca84 + 90163fe commit 7051d29
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.rst
@@ -1,3 +1,15 @@
Deprecation Notice
==================

Cliquet has been folded into the `Kinto
<https://github.com/Kinto/kinto/>`_ package under the new name
``kinto.core``. You should update your code to import ``kinto.core``
instead of ``cliquet``, and all ``cliquet.*`` settings are now
prefixed with ``kinto`` instead. See
https://mail.mozilla.org/pipermail/kinto/2016-May/000119.html for more
about the background for this decision.


Cliquet
=======

Expand Down
15 changes: 15 additions & 0 deletions cliquet/__init__.py
Expand Up @@ -16,6 +16,18 @@
from cliquet.logs import logger


import warnings

DEPRECATION_MESSAGE = ''.join([
"Cliquet is now deprecated. Please update to kinto.core at ",
"https://github.com/Kinto/kinto. See ",
"https://github.com/mozilla-services/cliquet/issues/687 ",
"for more information.",
])

warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)


# Module version, as defined in PEP-0396.
__version__ = pkg_resources.get_distribution(__package__).version

Expand Down Expand Up @@ -115,6 +127,7 @@ def init_from_settings(cls, settings):


def includeme(config):

settings = config.get_settings()

# Heartbeat registry.
Expand Down Expand Up @@ -156,6 +169,8 @@ def add_api_capability(config, identifier, description="", url="", **kw):
step_func = config.maybe_dotted(step)
step_func(config)

logger.warn(DEPRECATION_MESSAGE)

# Custom helpers.
config.add_request_method(follow_subrequest)
config.add_request_method(authentication.prefixed_userid, property=True)
Expand Down

0 comments on commit 7051d29

Please sign in to comment.