summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge "Flesh out the README"Jenkins2014-11-191-1/+3
|\
| * Flesh out the READMEDavanum Srinivas2014-11-171-1/+3
| | | | | | | | | | | | | | Add details to the README on what can be done with the library Closes-Bug: #1391550 Change-Id: Ia5d34d4d23eaab663764aad0d877999a5414e8d0
* | Move locale files to proper placeAndreas Jaeger2014-11-197-0/+0
| | | | | | | | | | | | | | | | The module is called oslo.concurrency and thus locale files must reside in oslo.concurrency/locale for the infra scripts to work - as configured in setup.cfg as well. Change-Id: Id39a495bb91dc0ad443a943e754aba62f4a55d6a
* | Move out of the oslo namespace packageDoug Hellmann2014-11-1432-23/+1169
|/ | | | | | | | | | Move the public API out of oslo.concurrency to oslo_concurrency. Retain the ability to import from the old namespace package for backwards compatibility for this release cycle. bp/drop-namespace-packages Change-Id: I20d1647b1c3ef8cab3b69eccfe168eeb01703b72
* Improve testing in py3 environmentVictor Sergeyev2014-11-133-8/+8
| | | | Change-Id: I1d169f0a87d4251778b32e80b3627b407340fec8
* Only modify autoindex.rst if it existsDan Prince2014-10-291-8/+10
| | | | | | | This fixes doc build errors when using older Sphinx versions. Change-Id: I0ed9bed311d6309257c0a111671d0fea46f5da7c Closes-bug: #1387343
* Imported Translations from TransifexOpenStack Proposal Bot2014-10-292-6/+26
| | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I8eb9dc27716e59ad507f1b1ec0450da1b4795b67
* lockutils-wrapper cleanupBen Nemec2014-10-282-2/+16
| | | | | | | | | | | | | | | There were a couple of issues with the lockutils wrapper. Most importantly, lockutils silently did nothing if it was called in the same way as the old incubator lockutils module. This had the potential to cause problems when simply doing a find and replace to migrate to oslo.concurrency. The problem is fixed by making lockutils raise an exception if it is called directly. There was also a name mismatch in the docstring for the console entry point, which is also fixed in this change. Closes-Bug: 1386734 Change-Id: I8868820ca314eb8d6fee83cc66fea886c1e74e27
* Don't use variables that aren't initializedJoshua Harlow2014-10-271-0/+5
| | | | | | | | | The code should not try to use acquire_time if it has not been initialized to some reasonable value. This commit sets it to none and checks that it has been set before using it in the release method to calculate the holding time. Change-Id: Id55d549f75a348d744f753a68e1ec298bdd25b33
* Merge "Clean up lockutils logging"0.2.0Jenkins2014-10-251-14/+23
|\
| * Clean up lockutils loggingBen Nemec2014-10-241-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in [1], the logging in lockutils is not ideal, both in terms of clarity and volume. This change removes some redundant or just plain unnecessary log messages, while improving the remaining ones to provide more detail to help debugging contention issues. Specifically, it: * Adds timing information to external lock messages, similar to what was already added for internal locks. * Removes a now-unnecessary 'attempting' message that was only useful for determining the timing info now included in the log message itself. * Removes a "released and closed" log message that isn't really interesting since it happens after the file was unlocked, and only tells us that the file was closed normally, when we would only care if that step failed for some reason (which will still be logged). * Removes the logging in internal_lock that was primarily added to debug a phantom problem with eventlet semaphores. * Adds a parameter to the lock() context that tells it whether to log its debug messages. This allows synchronized to not log duplicate messages when it acquires a lock. Changes for more intelligent logging, such as only logging when contention occurs as opposed always, are left as a future enhancement. [1]: http://lists.openstack.org/pipermail/openstack-dev/2014-September/047181.html Partial-Bug: 1374075 Change-Id: I7bb36cdbb2e0f1643e1499054433894142cd2ee3
* | Merge "Add deprecated name test case"Jenkins2014-10-251-0/+13
|\ \
| * | Add deprecated name test caseBen Nemec2014-10-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is being separated from the change to deprecate the DEFAULT grouped options because it is exposing a python 3 incompatibility in oslotest and I don't want to block the release on something this minor. Once oslotest is fixed we can merge this to make sure the deprecated options continue working. Change-Id: Iabf5ad6ad1e7ad9a426783592f23f58452484b32
* | | Merge "Use six.wraps"Jenkins2014-10-251-1/+2
|\ \ \
| * | | Use six.wrapsJoshua Harlow2014-10-241-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | There is a slight difference in functools.wraps on python3.x and on python2.x in regards to the __wrapped__ attribute that the six version makes transparent; so instead of using the functools one just use the six one to gain the added compatability. Change-Id: Iccf2aede08504469c148ee5f81f448cadfc08d5e
* | | Merge "Add pbr to installation requirements"Jenkins2014-10-251-0/+1
|\ \ \
| * | | Add pbr to installation requirementsDoug Hellmann2014-10-241-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Add pbr to the list of installation requirements so that it is installed via pip before this library is installed, instead of with easy_install. This avoids issues like Bug #1384919, and ensures that projects that use this library as a dependency are properly installed. Change-Id: I6c155370dbd01fe4748d5137bdf288e8d3e1a67e
* | | Imported Translations from TransifexOpenStack Proposal Bot2014-10-254-180/+34
| | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I0700b92fc3f9b97e91961ebacb41420e2ab82164
* | | Merge "Improve lock_path help and documentation"Jenkins2014-10-251-1/+7
|\ \ \
| * | | Improve lock_path help and documentationAndreas Jaeger2014-10-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve help string to state default value and that it's mandatory. Document set_defaults function. DocImpact: Document that the value needs to evaluate to a valid path. So, either environment variable is set or option is set. Change-Id: I481d2f8107476ba166a18bc56d3b4c1be5ff726f
* | | | Remove unused incubator modulesBen Nemec2014-10-248-1422/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All of these modules have been obsoleted by libs, so we don't need them in this project anymore. Change-Id: I99a52cb0f8f760ee54b6e6230dd83c9627d5cb46
* | | | Merge fileutils from oslo-incubatorDavanum Srinivas2014-10-242-705/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to get rid of our copy of log.py in oslo.concurrency. oslo.concurrency code needs fileutils from oslo-incubator. fileutils needs the common copy of log.py. What happens when we import oslo.concurrency into nova, we end up with duplicate options for default_log_levels. So to unravel the knots, we switch fileutils over to python logging and hence remove the need for common copy of log.py in oslo.concurrency. Fixed the import for excutils as well since that change has already been made in the oslo-incubator copy of fileutils Closes-Bug: #1385492 Change-Id: I5310bf8a6584ac4f71b607d30b9dae0b12441d41
* | | Merge "Imported Translations from Transifex"0.1.0Jenkins2014-10-231-5/+5
|\ \ \
| * | | Imported Translations from TransifexOpenStack Proposal Bot2014-10-221-5/+5
| |/ / | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Ibfce32314ef291f57f3f7f3b02b1cb13bbf8361d
* | | Updated from global requirementsOpenStack Proposal Bot2014-10-221-1/+1
|/ / | | | | | | Change-Id: I429f9bcdcdf88773a7d0af3b1a8c0c11377c2336
* | Updated from global requirementsOpenStack Proposal Bot2014-10-131-1/+1
| | | | | | | | Change-Id: I8b06d0788b7564942c57690b55ba58f5f2f9985b
* | Updated from global requirementsOpenStack Proposal Bot2014-10-111-1/+1
| | | | | | | | Change-Id: Ie6c5cfdd1e28489ed1b72d16e586edf8711626f6
* | Merge "Make lock_wrapper private"Jenkins2014-10-092-4/+4
|\ \ | |/
| * Make lock_wrapper privateBen Nemec2014-10-082-4/+4
| | | | | | | | | | | | | | This is only intended to be called via the main() function, so it doesn't need to be public. Change-Id: Ia215abbe8f8b9e1d8f4f36027b95bc33788a1886
* | Merge "Remove extraneous vim editor configuration comments"Jenkins2014-10-091-2/+0
|\ \
| * | Remove extraneous vim editor configuration commentsChristian Berendt2014-10-081-2/+0
| |/ | | | | | | | | Change-Id: I0a48345e7fd2703b6651531087097f096264dc7d Partial-Bug: #1229324
* | Merge "Support building wheels (PEP-427)"Jenkins2014-10-081-0/+3
|\ \ | |/ |/|
| * Support building wheels (PEP-427)Davanum Srinivas2014-10-071-0/+3
| | | | | | | | | | | | | | | | Universal is used to identify pure-Python module(by bdist_wheel). For these, it is sufficient to build a wheel with _any_ Python ABI version and publish that to PyPI (by whatever means). Change-Id: I25af4512f3e7198d03828a87bdca719cb7105d7b
* | Merge "Address race in file locking tests"Jenkins2014-10-081-2/+30
|\ \
| * | Address race in file locking testsBen Nemec2014-09-101-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears the intermittent failures in the linked bug are caused by the parent process grabbing the lock after the child has created the file but before the child has had a chance to lock it. In order to avoid that happening, wait until the lock has actually been grabbed, instead of just until the file is created. This problem does not apply to the threaded test case, and a note as to why was added in the code. Change-Id: Icfbdc745d129a9028b2c12d0962e4621261ee111 Closes-Bug: 1357582
* | | Handle Python 3's O_CLOEXEC defaultBen Nemec2014-10-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 2, a file opened by a process was inherited by all of its children. Python 3 sets the O_CLOEXEC flag on the file descriptor by default so this doesn't happen. Because of the Python 2 behavior, our test code explicitly closes the file descriptor in one test, but we shouldn't be doing that since it wouldn't happen in a real usage scenario. Fortunately, it appears both cases work in a sane fashion anyway. With the explicit release removed from the child process, the py2 tests still run fine, and with that done the py3 tests no longer have a problem either. This is fortunate because if the py2 behavior allowed multiple processes to hold the lock at once it would obviously be a Bad Thing. :-) Change-Id: I133334dee068984b1309180c5338ac19d9934274
* | | Remove hard dep on eventletBen Nemec2014-10-033-6/+20
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | We don't want to force users of this library to pull in eventlet, so conditionally import it in processutils and only use subprocess from eventlet if the stdlib is monkey patched. eventlet doesn't monkey patch subprocess so we can't rely on it to do that for us. Also uses sleep from the stdlib time module since it will be monkey patched when eventlet is in use and the right version will be used. Change-Id: I0df528d5ad0d67d6bbc0e7c217ef2d7fa45cce9a
* | Test with both vanilla and eventlet stdlibBen Nemec2014-10-033-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We intend this project's code to function both with and without eventlet monkey patching, so we should test that way too. This adds a separate test run that explicitly enables eventlet and removes the racy monkey patching that existed before. I left the eventlet-specific unit test because it's making direct calls into eventlet, so it is a somewhat different case from implicitly using monkey patched classes and I'd rather leave a redundant test than remove it and find out it covered something the others don't. Change-Id: Idbe9cdd90e9ce5e38b03ec1c20066928daa9ef00 Closes-Bug: 1367966
* | Imported Translations from TransifexOpenStack Proposal Bot2014-10-034-84/+0
| | | | | | | | Change-Id: Ic90ba586cdeac141f61257683ac0af47ce5fafc7
* | Fix coverage testingAndreas Jaeger2014-10-011-0/+1
| | | | | | | | | | | | | | Add coverage to test-requirements so that tox-e cover works - this is part of the post jobs that are run. Change-Id: Ie8e5cb47068baa9c05da43efca718222ab841e0a
* | Clean up doc headerBen Nemec2014-09-301-3/+3
| | | | | | | | Change-Id: Ib7a8f32eb690ba68cc48afa655e02a2c07d680bb
* | Use ConfigFilter for optsBen Nemec2014-09-302-3/+4
| | | | | | | | | | | | | | | | This will prevent them being registered on the global config object and becoming available to consuming applications. Change-Id: Ibddb876d18c6aefef9dca08cf5883d8bdca17925 bp graduate-oslo-concurrency
* | Make lockutils main() a console entry pointBen Nemec2014-09-304-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | This is more lib-ish than calling python -m on the module. As part of this change, I also improved the unit tests for this code. Before we weren't unsetting OSLO_LOCK_PATH before calling the main function, so we had no way of knowing if it was being set correctly. I also added a test case to verify return value propagation and removed a private method that was never called. Change-Id: I6c35b5409bf567767c5c71b9041dd7f7a012255d
* | Expose lockutils opts to config generatorBen Nemec2014-09-304-17/+68
| | | | | | | | | | | | | | | | | | | | * Adds an opts module for the config generator to use. * Makes the opts in lockutils private since we don't want consumers using them directly. * Moves the options to an oslo_concurrency group with appropriate deprecated_group settings to keep existing configs working. Change-Id: Ifdb4d99e27588e8a91d941c60b248ea526c06e0a
* | Merge "Add lock_path as param to remove_external function"Jenkins2014-09-292-6/+18
|\ \
| * | Add lock_path as param to remove_external functionjichenjc2014-09-202-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit b0d0c335 added remove external lock file function, but the lock_path as lock file location folder is missing and it make it's impossible to specify where to find the lock file. This patch added the params. Change-Id: I9be2fb68fab4690993395d01ef5ad13c0c92f3a3 Related-Bug: #1256306
* | | Merge "Add hacking import exception for i18n"Jenkins2014-09-293-2/+6
|\ \ \
| * | | Add hacking import exception for i18nBen Nemec2014-09-263-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is preferred over adding noqa's everywhere we import a translation function. Change-Id: I171df45b62beb9776e8dbb52e33a408a832bf86f
* | | | Imported Translations from TransifexOpenStack Proposal Bot2014-09-262-0/+42
|/ / / | | | | | | | | | Change-Id: I68d736457e762e388d149de8ce039fb639e2b5bc
* | | provide sane cmd exit reportingSean Dague2014-09-241-1/+5
|/ / | | | | | | | | | | | | | | | | Previously the debug messages around command exit were a naked return code with no reference to what was run. When dealing with very long running commands (especially those that fail) this means that figuring out what command was run is possibly very difficult. Change-Id: I6c44e1106f77fab517fcb0b6d6dd8ed56c853496