Add versionutils to API documentation
Add an automodule directive for the new module. Clean up the existing docstring so it renders a bit more nicely. Update the usage page to refer to the new location of versionutils. Change-Id: Ib732509186e56ed2b39638129e2ec4272da1aa9d
This commit is contained in:
parent
e5af5882ef
commit
3a4dc52c21
6
doc/source/api/versionutils.rst
Normal file
6
doc/source/api/versionutils.rst
Normal file
@ -0,0 +1,6 @@
|
||||
=======================
|
||||
oslo_log.versionutils
|
||||
=======================
|
||||
|
||||
.. automodule:: oslo_log.versionutils
|
||||
:members:
|
@ -20,12 +20,9 @@ API Documentation
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:glob:
|
||||
|
||||
api/fixtures
|
||||
api/formatters
|
||||
api/handlers
|
||||
api/helpers
|
||||
api/log
|
||||
api/*
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
@ -71,15 +71,10 @@ Deprecation tools moved to ``versionutils``
|
||||
-------------------------------------------
|
||||
|
||||
The :meth:`deprecated` decorator and :class:`DeprecatedConfig` have
|
||||
moved to the :mod:`versionutils` module, which is still in the
|
||||
oslo-incubator repository. Updating to use oslo.log may require
|
||||
syncing a new version of :mod:`versionutils` at the same time, and
|
||||
updating existing uses of those symbols.
|
||||
|
||||
Replace ``LOG.deprecated()`` with
|
||||
``versionutils.report_deprecated_feature()``, passing a local logger
|
||||
object as the first argument so the log message includes the location
|
||||
information.
|
||||
moved to :mod:`oslo_log.versionutils`. Replace ``LOG.deprecated()``
|
||||
with :mod:`oslo_log.versionutils.report_deprecated_feature`, passing a
|
||||
local logger object as the first argument so the log message includes
|
||||
the location information.
|
||||
|
||||
No more implicit conversion to unicode/str
|
||||
------------------------------------------
|
||||
|
@ -75,10 +75,12 @@ class deprecated(object):
|
||||
... def c(): pass
|
||||
|
||||
4. Specifying the deprecated functionality will not be removed:
|
||||
|
||||
>>> @deprecated(as_of=deprecated.ICEHOUSE, remove_in=0)
|
||||
... def d(): pass
|
||||
|
||||
5. Specifying a replacement, deprecated functionality will not be removed:
|
||||
|
||||
>>> @deprecated(as_of=deprecated.ICEHOUSE, in_favor_of='f()', remove_in=0)
|
||||
... def e(): pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user