diff options
author | Victor Stinner <vstinner@redhat.com> | 2015-10-15 16:57:42 +0200 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2015-11-05 13:31:40 +0100 |
commit | e01418018fbba2d47fdd1b921d27566037e547f4 (patch) | |
tree | baa267733cde553ffba7328c7f87a55ae3fc4400 /oslo_concurrency/lockutils.py | |
parent | e55aee88691fa96783d275c953329e1aa6d3ac0b (diff) | |
download | oslo-concurrency-e01418018fbba2d47fdd1b921d27566037e547f4.tar.gz |
Use versionadded and versionchanged in doc
Document in which version new types and functions were added using
".. versionadded:: x.y". Document changes using
".. versionchanged:: x.y."
For watchdog module, add the versionadded tag in the module top
docstring, not on each type/function.
Add docstring to ssh_execute().
I used "git blame" + "git tag --contains=SHA1" to find these version,
and then I checked manually each version.
Change-Id: I56a7d8a4335833e9b49eedab026d20adfeedf942
Diffstat (limited to 'oslo_concurrency/lockutils.py')
-rw-r--r-- | oslo_concurrency/lockutils.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/oslo_concurrency/lockutils.py b/oslo_concurrency/lockutils.py index fc0665e..6eb8eb4 100644 --- a/oslo_concurrency/lockutils.py +++ b/oslo_concurrency/lockutils.py @@ -72,6 +72,8 @@ def get_lock_path(conf): :param conf: Configuration object :type conf: oslo_config.cfg.ConfigOpts + + .. versionadded:: 1.8 """ _register_opts(conf) return conf.oslo_concurrency.lock_path @@ -79,6 +81,10 @@ def get_lock_path(conf): InterProcessLock = fasteners.InterProcessLock ReaderWriterLock = fasteners.ReaderWriterLock +"""A reader/writer lock. + +.. versionadded:: 0.4 +""" class Semaphores(object): @@ -87,6 +93,8 @@ class Semaphores(object): This collection internally uses a weak value dictionary so that when a semaphore is no longer in use (by any threads) it will automatically be removed from this container by the garbage collector. + + .. versionadded:: 0.3 """ def __init__(self): @@ -191,6 +199,12 @@ def lock(name, lock_file_prefix=None, external=False, lock_path=None, active threads. :param delay: Delay between acquisition attempts (in seconds). + + .. versionchanged:: 0.2 + Added *do_log* optional parameter. + + .. versionchanged:: 0.3 + Added *delay* and *semaphores* optional parameters. """ int_lock = internal_lock(name, semaphores=semaphores) with int_lock: @@ -234,6 +248,9 @@ def synchronized(name, lock_file_prefix=None, external=False, lock_path=None, ... This way only one of either foo or bar can be executing at a time. + + .. versionchanged:: 0.3 + Added *delay* and *semaphores* optional parameter. """ def wrap(f): |