diff -Nru python-oslo.concurrency-3.7.0/AUTHORS python-oslo.concurrency-3.18.0/AUTHORS --- python-oslo.concurrency-3.7.0/AUTHORS 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/AUTHORS 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1,87 @@ +Alex Gaynor +Alexander Gorodnev +Amrith Kumar +Andreas Jaeger +Andreas Jaeger +Angus Lees +Ann Kamyshnikova +Arata Notsu +Ben Nemec +Ben Nemec +Brad Pokorny +Brant Knudson +Brian D. Elliott +Chang Bo Guo +ChangBo Guo(gcb) +Christian Berendt +Chuck Short +Claudiu Belu +Csaba Henk +Dan Prince +Daniel P. Berrange +Davanum Srinivas +Davanum Srinivas +David Ripton +Denis Buliga +Dina Belova +Dirk Mueller +Doug Hellmann +Doug Hellmann +Eric Windisch +Flaper Fesp +Flavio Percoco +Gary Kotton +Gevorg Davoian +IWAMOTO Toshihiro +Ian Cordasco +Ihar Hrachyshka +James Carey +Jason Kölker +Jay S. Bryant +Jeremy Stanley +Joe Gordon +Joe Gordon +Joe Heck +Johannes Erdfelt +Joshua Harlow +Joshua Harlow +Joshua Harlow +Julien Danjou +Kirill Bespalov +Lucian Petrut +Mark McLoughlin +Matt Riedemann +Matthew Treinish +Michael Still +Monty Taylor +Nikhil Manchanda +Noorul Islam K M +Pedro Navarro Perez +Roman Prykhodchenko +Ronald Bradford +Russell Bryant +Salvatore Orlando +Sean Dague +Sean M. Collins +Sergey Kraynev +Sergey Lukjanov +Shawn Boyette +Steve Kowalik +Steve Martinelli +Thomas Bechtold +Thomas Herve +Tony Breeds +Victor Sergeyev +Victor Stinner +Victor Stinner +Wu Wenxiang +Yuriy Taraday +ZhiQiang Fan +Zhongyue Luo +gecong1973 +howardlee +jichenjc +melissaml +vponomaryov +yanheven +zhangsong diff -Nru python-oslo.concurrency-3.7.0/ChangeLog python-oslo.concurrency-3.18.0/ChangeLog --- python-oslo.concurrency-3.7.0/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/ChangeLog 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1,491 @@ +CHANGES +======= + +3.18.0 +------ + +* Automatically convert process_input to bytes +* Add Constraints support +* Show team and repo badges on README + +3.16.0 +------ + +* Updated from global requirements +* Updated from global requirements +* Updated from global requirements +* Imported Translations from Zanata +* Remove unnecessary requirements +* [TrivialFix] Replace 'assertTrue(a in b)' with 'assertIn(a, b)' + +3.15.0 +------ + +* Changed the home-page link +* Change assertTrue(isinstance()) by optimal assert +* Enable release notes translation +* Ignore prlimit argument on Windows +* Updated from global requirements +* Updated from global requirements +* Update reno for stable/newton + +3.14.0 +------ + +* Updated from global requirements +* Fix external lock tests on Windows + +3.13.0 +------ + +* Updated from global requirements +* Fix parameters of assertEqual are misplaced +* Add Python 3.5 classifier and venv + +3.12.0 +------ + +* Updated from global requirements +* Imported Translations from Zanata +* Updated from global requirements + +3.11.0 +------ + +* Imported Translations from Zanata + +3.10.0 +------ + +* Imported Translations from Zanata +* Updated from global requirements +* Add reno for releasenotes management + +3.9.0 +----- + +* Add doc/ to pep8 check +* Remove unused import statement +* Add timeout option to ssh_execute +* Fix wrong import example in docstring +* Trivial: ignore openstack/common in flake8 exclude list + +3.8.0 +----- + +* Updated from global requirements +* Imported Translations from Zanata +* processutils: add support for missing process limits +* Remove direct dependency on babel +* Updated from global requirements +* Updated from global requirements +* Updated from global requirements +* Add a few usage examples for lockutils +* Revert "Use tempfile.tempdir for lock_path if OSLO_LOCK_PATH is not set" +* Updated from global requirements +* Use tempfile.tempdir for lock_path if OSLO_LOCK_PATH is not set + +3.6.0 +----- + +* Updated from global requirements + +3.5.0 +----- + +* Updated from global requirements +* Make ProcessExecutionError picklable +* Updated from global requirements + +3.4.0 +----- + +* Update translation setup +* Add prlimit parameter to execute() +* Updated from global requirements +* Updated from global requirements +* Updated from global requirements +* Updated from global requirements +* Imported Translations from Zanata +* Updated from global requirements + +3.3.0 +----- + +* Remove unnecessary package in setup.cfg +* Updated from global requirements +* Updated from global requirements + +3.2.0 +----- + +* Updated from global requirements +* Updated from global requirements +* Trival: Remove 'MANIFEST.in' +* Add complementary remove lock with prefix function + +3.1.0 +----- + +* Drop python 2.6 support + +3.0.0 +----- + +* Updated from global requirements +* Updated from global requirements +* Remove python 2.6 classifier +* Remove python 2.6 and cleanup tox.ini +* Use versionadded and versionchanged in doc +* Updated from global requirements +* Imported Translations from Zanata +* Updated from global requirements + +2.8.0 +----- + +* Updated from global requirements + +2.7.0 +----- + +* Fix Tests to run under OSX +* Fix coverage configuration and execution +* Imported Translations from Zanata +* Move 'history' -> release notes section +* add auto-generated docs for config options +* Change ignore-errors to ignore_errors +* Updated from global requirements +* Imported Translations from Zanata +* Use int enumerations for log error constants + +2.6.0 +----- + +* Removes unused posix-ipc requirement +* Updated from global requirements +* Updated from global requirements + +2.5.0 +----- + +* Updated from global requirements +* Updated from global requirements +* Use oslo_utils reflection to get 'f' callable name +* flake8 - remove unused rules +* Imported Translations from Transifex +* Updated from global requirements + +2.4.0 +----- + +* Imported Translations from Transifex +* Updated from global requirements +* Imported Translations from Transifex +* Updated from global requirements + +2.3.0 +----- + +* Imported Translations from Transifex +* Allow preexec_fn method for processutils.execute +* Updated from global requirements +* Use pypi name for requirements.txt +* processutils: ensure on_completion callback is always called +* Updated from global requirements +* Remove redundant fileutils +* Add tox target to find missing requirements + +2.2.0 +----- + + +2.1.0 +----- + +* Imported Translations from Transifex +* Updated from global requirements +* Ensure we 'join' on the timer watchdog thread +* Use better timing mechanisms instead of time.time() +* Updated from global requirements +* Add 2 callbacks to processutils.execute() +* Updated from global requirements +* Fix LockFixture docstring +* Updated from global requirements +* Switch badges from 'pypip.in' to 'shields.io' +* Updated from global requirements +* Replace locks and replace with fasteners library provides ones + +2.0.0 +----- + +* Remove oslo namespace package + +1.10.0 +------ + +* Imported Translations from Transifex +* Sync from oslo-incubator +* Updated from global requirements +* Advertise support for Python3.4 / Remove support for 3.3 +* Updated from global requirements +* Imported Translations from Transifex +* Remove run_cross_tests.sh +* Updated from global requirements +* Updated from global requirements + +1.9.0 +----- + +* Add binary parameter to execute and ssh_execute +* Port processutils to Python 3 +* Uncap library requirements for liberty +* Move fixtures to test-requirements.txt +* Fix test_as_root* tests to work when run as root +* Add pypi download + version badges +* Standardize setup.cfg summary for oslo libs +* Imported Translations from Transifex +* Updated from global requirements +* Remove tools/run_cross_tests.sh from openstack-common.conf + +1.8.0 +----- + +* Switch to non-namespaced module imports +* Remove py33 env from default tox list +* Add lockutils.get_lock_path() function + +1.7.0 +----- + +* Imported Translations from Transifex +* Updated from global requirements + +1.6.0 +----- + +* Updated from global requirements +* processutils: execute(): fix option incompatibility + +1.5.0 +----- + +* Ability to set working directory +* Add eventlet test check to new tests __init__.py +* Drop use of namespaced oslo.i18n +* Updated from global requirements +* Updated from global requirements +* Update Oslo imports to remove namespace package + +1.4.1 +----- + +* Revert "Port processutils to Python 3" + +0.4.0 +----- + +* Bump to hacking 0.10 +* Updated from global requirements +* add watchdog module +* Updated from global requirements +* make time format for processutils match lockutils +* Correct the translation domain for loading messages +* Add a reader/writer lock +* Don't use ConfigFilter for lockutils +* Report import warnings where the import occurs +* Port processutils to Python 3 +* Activate pep8 check that _ is imported +* Drop requirements-py3.txt +* Updated from global requirements +* Clean up API documentation +* Workflow documentation is now in infra-manual +* Remove noqa from test files +* test compatibility for old imports +* Fix bug link in README.rst + +0.3.0 +----- + +* Add external lock fixture +* Add a TODO for retrying pull request #20 +* Allow the lock delay to be provided +* Allow for providing a customized semaphore container +* Move locale files to proper place +* Flesh out the README +* Move out of the oslo namespace package +* Improve testing in py3 environment +* Only modify autoindex.rst if it exists +* Imported Translations from Transifex +* lockutils-wrapper cleanup +* Don't use variables that aren't initialized + +0.2.0 +----- + +* Imported Translations from Transifex +* Use six.wraps +* Clean up lockutils logging +* Remove unused incubator modules +* Improve lock_path help and documentation +* Add pbr to installation requirements + +0.1.0 +----- + +* Updated from global requirements +* Imported Translations from Transifex +* Updated from global requirements +* Updated from global requirements +* Remove extraneous vim editor configuration comments +* Add deprecated name test case +* Make lock_wrapper private +* Support building wheels (PEP-427) +* Handle Python 3's O_CLOEXEC default +* Remove hard dep on eventlet +* Test with both vanilla and eventlet stdlib +* Imported Translations from Transifex +* Fix coverage testing +* Clean up doc header +* Use ConfigFilter for opts +* Make lockutils main() a console entry point +* Expose lockutils opts to config generator +* Add hacking import exception for i18n +* Imported Translations from Transifex +* provide sane cmd exit reporting +* Imported Translations from Transifex +* Add lock_path as param to remove_external function +* Updated from global requirements +* Cleanup and adding timing to lockutils logging +* Imported Translations from Transifex +* Remove oslo-incubator fixture +* Break up the logging around the lockfile release/unlock +* Always log the releasing, even under failure +* Clarify logging in lockutils +* Imported Translations from Transifex +* Address race in file locking tests +* Updated from global requirements +* Imported Translations from Transifex +* Updated from global requirements +* Handle a failure on communicate() +* Imported Translations from Transifex +* Add code/api documentation +* Add history file to documentation +* Update contributing instructions +* Work toward Python 3.4 support and testing +* warn against sorting requirements +* Log stdout, stderr and command on execute() error +* Mask passwords in exceptions and error messages +* Imported Translations from Transifex +* Address some potential security issues in lockutils +* Use file locks by default again +* Switch to oslo.i18n in our code +* Imported Translations from Transifex +* Switch to oslo.utils in our code +* Mask passwords in exceptions and error messages +* Initial translation setup +* Fix docs generation +* Make all tests pass +* exported from oslo-incubator by graduate.sh +* Remove oslo.log from lockutils +* lockutils: split tests and run in Python 3 +* Fix exception message in openstack.common.processutils.execute +* Allow test_lockutils to run in isolation +* Remove `processutils` dependency on `log` +* Don't import fcntl on Windows +* Fix broken formatting of processutils.execute log statement +* Move nova.utils.cpu_count() to processutils module +* pep8: fixed multiple violations +* fixed typos found by RETF rules +* Mask passwords that are included in commands +* Improve help strings +* Remove str() from LOG.* and exceptions +* Fixed several typos +* Emit a log statement when releasing internal lock +* Allow passing environment variables to execute() +* Use oslotest instead of common test module +* Remove rendundant parentheses of cfg help strings +* Allow external locks to work with threads +* Re-enable file-based locking behavior +* Use Posix IPC in lockutils +* Update log translation domains +* Update oslo log messages with translation domains +* Move the released file lock to the successful path +* Add remove external lock files API in lockutils +* Catch OSError in processutils +* Use threading.ThreadError instead of reraising IOError +* Have the interprocess lock follow lock conventions +* lockutils: move directory creation in lock class +* lockutils: remove lock_path parameter +* lockutils: expand add_prefix +* lockutils: remove local usage +* lockutils: do not grab the lock in creators +* Remove unused variables +* Utilizes assertIsNone and assertIsNotNone +* Fix i18n problem in processutils module +* lockutils: split code handling internal/external lock +* lockutils: fix testcase wrt Semaphore +* Use hacking import_exceptions for gettextutils._ +* Correct invalid docstrings +* Fix violations of H302:import only modules +* Fixed misspellings of common words +* Trivial: Make vertical white space after license header consistent +* Unify different names between Python2/3 with six.moves +* Remove vim header +* Use six.text_type instead of unicode function in tests +* Adjust import order according to PEP8 imports rule +* fix lockutils.lock() to make it thread-safe +* Add main() to lockutils that creates temp dir for locks +* Allow lockutils to get lock_path conf from envvar +* Correct execute() to check 0 in check_exit_code +* Replace assertEquals with assertEqual +* Move LockFixture into a fixtures module +* Fix to properly log when we release a semaphore +* Add LockFixture to lockutils +* Modify lockutils.py due to dispose of eventlet +* Replace using tests.utils part2 +* Fix processutils.execute errors on windows +* Bump hacking to 0.7.0 +* Replace using tests.utils with openstack.common.test +* Allow passing a logging level to processutils.execute +* BaseException.message is deprecated since Python 2.6 +* Fix locking bug +* Move synchronized body to a first-class function +* Make lock_file_prefix optional +* Enable H302 hacking check +* Enable hacking H404 test +* Use param keyword for docstrings +* Use Python 3.x compatible octal literal notation +* Use Python 3.x compatible except construct +* Enable hacking H402 test +* python3: python3 binary/text data compatbility +* Removes len() on empty sequence evaluation +* Added convenience APIs for lockutils +* Import trycmd and ssh_execute from nova +* Update processutils +* Use print_function __future__ import +* Improve Python 3.x compatibility +* Replaces standard logging with common logging +* Locking edge case when lock_path does not exist +* lockutils: add a failing unit test +* lockutils: improve the external locks test +* Removes unused imports in the tests module +* Fix locking issues in Windows +* Fix Copyright Headers - Rename LLC to Foundation +* Use oslo-config-2013.1b3 +* Emit a warning if RPC calls made with lock +* Default lockutils to using a tempdir +* Replace direct use of testtools BaseTestCase +* Use testtools as test base class +* Start adding reusable test fixtures +* Fixes import order errors +* Log when release file lock +* Eliminate sleep in the lockutils test case (across processes) +* Disable lockutils test_synchronized_externally +* Fix import order in openstack/common/lockutils.py +* Make project pyflakes clean +* updating sphinx documentation +* Remove unused greenthread import in lockutils +* Move utils.execute to its own module +* Fix missing import in lockutils +* Move nova's util.synchronized decorator to openstack common diff -Nru python-oslo.concurrency-3.7.0/debian/changelog python-oslo.concurrency-3.18.0/debian/changelog --- python-oslo.concurrency-3.7.0/debian/changelog 2016-04-04 08:42:29.000000000 +0000 +++ python-oslo.concurrency-3.18.0/debian/changelog 2017-02-05 02:52:54.000000000 +0000 @@ -1,3 +1,79 @@ +python-oslo.concurrency (3.18.0-0ubuntu1~ubuntu16.04.1~ppa1) xenial; urgency=medium + + * No-change backport to xenial + + -- Chuck Short Sat, 04 Feb 2017 21:52:54 -0500 + +python-oslo.concurrency (3.18.0-0ubuntu1) zesty; urgency=medium + + * New upstream release. + + -- Corey Bryant Thu, 19 Jan 2017 12:20:00 -0500 + +python-oslo.concurrency (3.17.0-0ubuntu1) zesty; urgency=medium + + * New upstream version. + * debian/control: Add autopkgtest. + + -- Chuck Short Fri, 13 Jan 2017 09:05:05 -0500 + +python-oslo.concurrency (3.16.0-0ubuntu1) zesty; urgency=medium + + * New upstream version. + * d/control: Align (build-)depends with upstream. + * d/control: Dropped python-retrying. + + -- Chuck Short Mon, 05 Dec 2016 10:45:17 -0500 + +python-oslo.concurrency (3.15.0-1ubuntu1) zesty; urgency=medium + + [ Corey Bryant ] + * d/gbp.conf: Update gbp configuration file. + * d/control: Update Vcs-* links and maintainers. + + [ Chuck Short ] + * New upstream version. + + -- Chuck Short Mon, 24 Oct 2016 14:58:45 -0400 + +python-oslo.concurrency (3.14.0-1) experimental; urgency=medium + + * New upstream release. + * d/control: Align (build-)depends with upstream. + * d/p/fix-tests-i386.patch: Rebased. + + -- Corey Bryant Thu, 25 Aug 2016 08:10:15 +0100 + +python-oslo.concurrency (3.11.0-1) experimental; urgency=medium + + [ David Della Vecchia ] + * New upstream release. + * d/control: Align (build-)depends with upstream. + + [ Thomas Goirand ] + * Switch to openstack-pkg-tools pkgos-dh_auto_{test,install}. + * Drop python-oslo- binary packages (not needed for Ubuntu anymore). + + -- Thomas Goirand Fri, 01 Jul 2016 13:51:01 +0000 + +python-oslo.concurrency (3.9.0-1) experimental; urgency=medium + + [ Ondřej Nový ] + * Standards-Version is 3.9.8 now (no change) + * d/rules: Changed UPSTREAM_GIT protocol to https + + [ James Page ] + * New upstream release. + * d/control: Align (Build-)Depends with upstream + + [ Corey Bryant ] + * New upstream release. + + [ Thomas Goirand ] + * Added Corey Bryant as Uploaders. + + -- Thomas Goirand Fri, 03 Jun 2016 12:48:36 +0000 + python-oslo.concurrency (3.7.0-2) unstable; urgency=medium * Uploading to unstable. diff -Nru python-oslo.concurrency-3.7.0/debian/control python-oslo.concurrency-3.18.0/debian/control --- python-oslo.concurrency-3.7.0/debian/control 2016-04-04 08:42:29.000000000 +0000 +++ python-oslo.concurrency-3.18.0/debian/control 2017-01-19 17:20:00.000000000 +0000 @@ -1,11 +1,13 @@ Source: python-oslo.concurrency Section: python Priority: optional -Maintainer: PKG OpenStack +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: PKG OpenStack Uploaders: Thomas Goirand , + Corey Bryant , Build-Depends: debhelper (>= 9), dh-python, - openstack-pkg-tools, + openstack-pkg-tools (>= 52~), python-all, python-pbr (>= 1.8), python-setuptools, @@ -13,57 +15,52 @@ python3-all, python3-pbr (>= 1.8), python3-setuptools, -Build-Depends-Indep: python-babel, - python-concurrent.futures, +Build-Depends-Indep: python-concurrent.futures, python-coverage, python-eventlet (>= 0.18.2), python-enum34, python-fasteners, - python-fixtures (>= 1.3.1), + python-fixtures (>= 3.0.0), python-greenlet, python-hacking, python-iso8601, - python-oslo.config (>= 1:3.7.0), + python-oslo.config (>= 1:3.14.0), python-oslo.i18n (>= 2.1.0), - python-oslo.utils (>= 3.5.0), + python-oslo.utils (>= 3.18.0), python-oslosphinx (>= 2.5.0), python-oslotest (>= 1.5.1), python-posix-ipc, - python-retrying, python-six (>= 1.9.0), - python3-babel, python3-eventlet (>= 0.18.2), python3-fasteners, - python3-fixtures (>= 1.3.1), + python3-fixtures (>= 3.0.0), python3-greenlet, python3-iso8601, - python3-oslo.config (>= 1:3.7.0), + python3-oslo.config (>= 1:3.14.0), python3-oslo.i18n (>= 2.1.0), - python3-oslo.utils (>= 3.5.0), + python3-oslo.utils (>= 3.18.0), python3-oslotest (>= 1.5.1), python3-posix-ipc, - python3-retrying, python3-six (>= 1.9.0), subunit, testrepository, -Standards-Version: 3.9.7 -Vcs-Browser: https://anonscm.debian.org/cgit/openstack/python-oslo.concurrency.git/ -Vcs-Git: https://anonscm.debian.org/git/openstack/python-oslo.concurrency.git +Standards-Version: 3.9.8 +Vcs-Browser: https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-oslo.concurrency +Vcs-Git: git://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-oslo.concurrency Homepage: https://github.com/openstack/oslo.concurrency +Testsuite: autopkgtest-pkg-python Package: python-oslo.concurrency Architecture: all -Depends: python-babel, - python-concurrent.futures, +Depends: python-concurrent.futures, python-enum34, python-fixtures, python-iso8601, - python-oslo.config (>= 1:3.7.0), + python-oslo.config (>= 1:3.14.0), python-oslo.i18n (>= 2.1.0), - python-oslo.utils (>= 3.5.0), + python-oslo.utils (>= 3.18.0), python-pbr (>= 1.8), python-posix-ipc, - python-retrying, python-six (>= 1.9.0), ${misc:Depends}, ${python:Depends}, @@ -78,16 +75,14 @@ Package: python3-oslo.concurrency Architecture: all -Depends: python3-babel, - python3-eventlet (>= 0.18.2), +Depends: python3-eventlet (>= 0.18.2), python3-fixtures, python3-iso8601, - python3-oslo.config (>= 1:3.7.0), + python3-oslo.config (>= 1:3.14.0), python3-oslo.i18n (>= 2.1.0), - python3-oslo.utils (>= 3.5.0), + python3-oslo.utils (>= 3.18.0), python3-pbr (>= 1.8), python3-posix-ipc, - python3-retrying, python3-six (>= 1.9.0), ${misc:Depends}, ${python3:Depends}, @@ -110,33 +105,3 @@ locks within OpenStack projects. . This package contains the documentation. - -Package: python-oslo-concurrency -Section: oldlibs -Priority: extra -Architecture: all -Depends: python-oslo.concurrency, - ${misc:Depends}, -Description: transitional dummy package for python-oslo-concurrency - This transitional package is safe to remove and use python-oslo.concurrency - instead. - -Package: python-oslo-concurrency-doc -Section: oldlibs -Priority: extra -Architecture: all -Depends: python-oslo.concurrency-doc, - ${misc:Depends}, -Description: transitional dummy package for python-oslo-concurrency-doc - This transitional package is safe to remove and use - python-oslo.concurrency-doc instead. - -Package: python3-oslo-concurrency -Section: oldlibs -Priority: extra -Architecture: all -Depends: python3-oslo.concurrency, - ${misc:Depends}, -Description: transitional dummy package for python3-oslo-concurrency - This transitional package is safe to remove and use python3-oslo.concurrency - instead. diff -Nru python-oslo.concurrency-3.7.0/debian/gbp.conf python-oslo.concurrency-3.18.0/debian/gbp.conf --- python-oslo.concurrency-3.7.0/debian/gbp.conf 2016-04-04 08:42:29.000000000 +0000 +++ python-oslo.concurrency-3.18.0/debian/gbp.conf 2017-01-19 17:20:00.000000000 +0000 @@ -1,9 +1,7 @@ [DEFAULT] -upstream-branch = master -debian-branch = debian/mitaka +debian-branch = master upstream-tag = %(version)s -compression = xz +pristine-tar = True [buildpackage] -export-dir = ../build-area/ - +export-dir = ../build-area diff -Nru python-oslo.concurrency-3.7.0/debian/patches/fix-tests-i386.patch python-oslo.concurrency-3.18.0/debian/patches/fix-tests-i386.patch --- python-oslo.concurrency-3.7.0/debian/patches/fix-tests-i386.patch 2016-04-04 08:42:29.000000000 +0000 +++ python-oslo.concurrency-3.18.0/debian/patches/fix-tests-i386.patch 2017-01-19 17:20:00.000000000 +0000 @@ -6,13 +6,13 @@ --- a/oslo_concurrency/tests/unit/test_processutils.py +++ b/oslo_concurrency/tests/unit/test_processutils.py -@@ -784,7 +784,8 @@ +@@ -795,7 +795,8 @@ args = [sys.executable, '-c', code] stdout, stderr = processutils.execute(*args, prlimit=prlimit) expected = (value, value) -- self.assertEqual(stdout.rstrip(), str(expected)) -+ self.assertEqual(stdout.rstrip().replace('L',''), -+ str(expected).replace('L','')) +- self.assertEqual(str(expected), stdout.rstrip()) ++ self.assertEqual(str(expected).replace('L',''), ++ stdout.rstrip().replace('L','')) def test_address_space(self): prlimit = self.limit_address_space() diff -Nru python-oslo.concurrency-3.7.0/debian/rules python-oslo.concurrency-3.18.0/debian/rules --- python-oslo.concurrency-3.7.0/debian/rules 2016-04-04 08:42:29.000000000 +0000 +++ python-oslo.concurrency-3.18.0/debian/rules 2017-01-19 17:20:00.000000000 +0000 @@ -1,46 +1,20 @@ #!/usr/bin/make -f -PYTHONS:=$(shell pyversions -vr) -PYTHON3S:=$(shell py3versions -vr) - -UPSTREAM_GIT = git://github.com/openstack/oslo.concurrency.git +UPSTREAM_GIT := https://github.com/openstack/oslo.concurrency.git include /usr/share/openstack-pkg-tools/pkgos.make -export OSLO_PACKAGE_VERSION=$(VERSION) - %: dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc override_dh_install: - set -e ; for pyvers in $(PYTHONS); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python-oslo.concurrency; \ - done - set -e ; for pyvers in $(PYTHON3S); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python3-oslo.concurrency; \ - done - mv $(CURDIR)/debian/python-oslo.concurrency/usr/bin/lockutils-wrapper $(CURDIR)/debian/python-oslo.concurrency/usr/bin/python2-lockutils-wrapper - mv $(CURDIR)/debian/python3-oslo.concurrency/usr/bin/lockutils-wrapper $(CURDIR)/debian/python3-oslo.concurrency/usr/bin/python3-lockutils-wrapper - rm -rf $(CURDIR)/debian/python*-oslo.concurrency/usr/lib/python*/dist-packages/*.pth + pkgos-dh_auto_install override_dh_python3: dh_python3 --shebang=/usr/bin/python3 override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) - echo "===> Running tests: WARNING: Not running Python3 tests because of namespaces!" - set -e ; for i in $(PYTHONS) $(PYTHON3S) ; do \ - PYMAJOR=`echo $$i | cut -d'.' -f1` ; \ - echo "===> Testing with python$$i (python$$PYMAJOR)" ; \ - rm -rf .testrepository ; \ - testr-python$$PYMAJOR init ; \ - TEMP_REZ=`mktemp -t` ; \ - PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \ - cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \ - rm -f $$TEMP_REZ ; \ - testr-python$$PYMAJOR slowest ; \ - done + pkgos-dh_auto_test endif override_dh_clean: @@ -60,4 +34,3 @@ override_dh_installxfonts override_dh_gconf override_dh_icons override_dh_perl override_dh_usrlocal: override_dh_installcron override_dh_installdebconf: override_dh_installlogrotate override_dh_installgsettings: - diff -Nru python-oslo.concurrency-3.7.0/doc/source/conf.py python-oslo.concurrency-3.18.0/doc/source/conf.py --- python-oslo.concurrency-3.7.0/doc/source/conf.py 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/doc/source/conf.py 2017-01-18 19:30:48.000000000 +0000 @@ -14,8 +14,7 @@ import os import sys -import fileinput -import fnmatch + sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- @@ -78,4 +77,4 @@ ] # Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} +# intersphinx_mapping = {'http://docs.python.org/': None} diff -Nru python-oslo.concurrency-3.7.0/doc/source/usage.rst python-oslo.concurrency-3.18.0/doc/source/usage.rst --- python-oslo.concurrency-3.7.0/doc/source/usage.rst 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/doc/source/usage.rst 2017-01-18 19:30:48.000000000 +0000 @@ -6,11 +6,62 @@ example:: from oslo_concurrency import lockutils + from oslo_concurrency import processutils .. seealso:: * :doc:`API Documentation ` +Locking a function (local to a process) +======================================= + +To ensure that a function (which is not thread safe) is only used in +a thread safe manner (typically such type of function should be refactored +to avoid this problem but if not then the following can help):: + + @lockutils.synchronized('not_thread_safe') + def not_thread_safe(): + pass + +Once decorated later callers of this function will be able to call into +this method and the contract that two threads will **not** enter this +function at the same time will be upheld. Make sure that the names of the +locks used are carefully chosen (typically by namespacing them to your +app so that other apps will not chose the same names). + +Locking a function (local to a process as well as across process) +================================================================= + +To ensure that a function (which is not thread safe **or** multi-process +safe) is only used in a safe manner (typically such type of function should +be refactored to avoid this problem but if not then the following can help):: + + @lockutils.synchronized('not_thread_process_safe', external=True) + def not_thread_process_safe(): + pass + +Once decorated later callers of this function will be able to call into +this method and the contract that two threads (or any two processes) +will **not** enter this function at the same time will be upheld. Make +sure that the names of the locks used are carefully chosen (typically by +namespacing them to your app so that other apps will not chose the same +names). + +Common ways to prefix/namespace the synchronized decorator +========================================================== + +Since it is **highly** recommended to prefix (or namespace) the usage +of the synchronized there are a few helpers that can make this much easier +to achieve. + +An example is:: + + myapp_synchronized = lockutils.synchronized_with_prefix("myapp") + +Then further usage of the ``lockutils.synchronized`` would instead now use +this decorator created above instead of using ``lockutils.synchronized`` +directly. + Command Line Wrapper ==================== diff -Nru python-oslo.concurrency-3.7.0/.gitignore python-oslo.concurrency-3.18.0/.gitignore --- python-oslo.concurrency-3.7.0/.gitignore 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -*.py[cod] - -# C extensions -*.so - -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs -.installed.cfg -lib -lib64 - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -cover -.tox -nosetests.xml -.testrepository - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Complexity -output/*.html -output/*/index.html - -# Sphinx -doc/build - -# pbr generates these -AUTHORS -ChangeLog - -# Editors -*~ -.*.swp diff -Nru python-oslo.concurrency-3.7.0/.gitreview python-oslo.concurrency-3.18.0/.gitreview --- python-oslo.concurrency-3.7.0/.gitreview 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/.gitreview 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -[gerrit] -host=review.openstack.org -port=29418 -project=openstack/oslo.concurrency.git -defaultbranch=stable/mitaka diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency-log-info.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency-log-info.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency-log-info.po 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency-log-info.po 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,19 @@ +# Andreas Jaeger , 2016. #zanata +msgid "" +msgstr "" +"Project-Id-Version: oslo.concurrency 3.9.1.dev2\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-06-04 05:27+0000\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2016-06-02 07:05+0000\n" +"Last-Translator: Andreas Jaeger \n" +"Language-Team: German\n" +"Language: de\n" +"X-Generator: Zanata 3.7.3\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +#, python-format +msgid "Failed to remove file %(file)s" +msgstr "Fehler beim Entfernen der Datei %(file)s" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency.po 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency.po 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,101 @@ +# Translations template for oslo.concurrency. +# Copyright (C) 2015 ORGANIZATION +# This file is distributed under the same license as the oslo.concurrency +# project. +# +# Translators: +# Christian Berendt , 2014 +# Ettore Atalan , 2014 +# Andreas Jaeger , 2016. #zanata +msgid "" +msgstr "" +"Project-Id-Version: oslo.concurrency 3.9.1.dev3\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-06-07 17:48+0000\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2016-06-08 06:36+0000\n" +"Last-Translator: Andreas Jaeger \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Generated-By: Babel 2.0\n" +"X-Generator: Zanata 3.7.3\n" +"Language-Team: German\n" + +#, python-format +msgid "" +"%(desc)r\n" +"command: %(cmd)r\n" +"exit code: %(code)r\n" +"stdout: %(stdout)r\n" +"stderr: %(stderr)r" +msgstr "" +"%(desc)r\n" +"Kommando: %(cmd)r\n" +"Abschlusscode: %(code)r\n" +"Stdout: %(stdout)r\n" +"Stderr: %(stderr)r" + +#, python-format +msgid "" +"%(description)s\n" +"Command: %(cmd)s\n" +"Exit code: %(exit_code)s\n" +"Stdout: %(stdout)r\n" +"Stderr: %(stderr)r" +msgstr "" +"%(description)s\n" +"Befehl: %(cmd)s.\n" +"Beendigungscode: %(exit_code)s.\n" +"Standardausgabe: %(stdout)r\n" +"Standardfehler: %(stderr)r" + +#, python-format +msgid "%r failed. Not Retrying." +msgstr "%r fehlgeschlagen. Wird nicht wiederholt." + +#, python-format +msgid "%r failed. Retrying." +msgstr "%r fehlgeschlagen. Neuversuch." + +msgid "" +"Calling lockutils directly is no longer supported. Please use the lockutils-" +"wrapper console script instead." +msgstr "" +"Ein direkter Aufruf von lockutils wird nicht mehr unterstützt. Verwenden Sie " +"stattdessen das lockutils-wrapper Konsolescript." + +msgid "Command requested root, but did not specify a root helper." +msgstr "Kommando braucht root, es wurde aber kein root helper spezifiziert." + +msgid "Environment not supported over SSH" +msgstr "Umgebung wird nicht über SSH unterstützt" + +#, python-format +msgid "" +"Got an OSError\n" +"command: %(cmd)r\n" +"errno: %(errno)r" +msgstr "" +"OS Fehler aufgetreten:\n" +"Kommando: %(cmd)r\n" +"Fehlernummer: %(errno)r" + +#, python-format +msgid "Got invalid arg log_errors: %r" +msgstr "Ungültiges Argument für log_errors: %r" + +#, python-format +msgid "Got unknown keyword args: %r" +msgstr "Ungültige Schlüsswelwortargumente: %r" + +#, python-format +msgid "Running cmd (subprocess): %s" +msgstr "Führe Kommando (subprocess) aus: %s" + +msgid "Unexpected error while running command." +msgstr "Unerwarteter Fehler bei der Ausführung des Kommandos." + +msgid "process_input not supported over SSH" +msgstr "process_input wird nicht über SSH unterstützt" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency-log-info.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency-log-info.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency-log-info.po 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency-log-info.po 2017-01-18 19:30:48.000000000 +0000 @@ -5,12 +5,12 @@ # # Translators: # Andi Chandler , 2014 -# OpenStack Infra , 2015. #zanata +# Andreas Jaeger , 2016. #zanata msgid "" msgstr "" -"Project-Id-Version: oslo.concurrency 3.2.1.dev3\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2016-01-13 08:54+0000\n" +"Project-Id-Version: oslo.concurrency 3.6.1.dev10\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-04-19 12:20+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency.po 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency.po 2017-01-18 19:30:48.000000000 +0000 @@ -5,12 +5,12 @@ # # Translators: # Andi Chandler , 2014-2015 -# OpenStack Infra , 2015. #zanata +# Andreas Jaeger , 2016. #zanata msgid "" msgstr "" -"Project-Id-Version: oslo.concurrency 3.2.1.dev3\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2016-01-13 08:54+0000\n" +"Project-Id-Version: oslo.concurrency 3.6.1.dev10\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-04-19 12:20+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency-log-info.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency-log-info.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency-log-info.po 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency-log-info.po 2017-01-18 19:30:48.000000000 +0000 @@ -5,12 +5,12 @@ # # Translators: # Adriana Chisco Landazábal , 2015 -# OpenStack Infra , 2015. #zanata +# Andreas Jaeger , 2016. #zanata msgid "" msgstr "" -"Project-Id-Version: oslo.concurrency 3.2.1.dev3\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2016-01-13 08:54+0000\n" +"Project-Id-Version: oslo.concurrency 3.6.1.dev10\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-04-19 12:20+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency.po 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency.po 2017-01-18 19:30:48.000000000 +0000 @@ -5,12 +5,12 @@ # # Translators: # Adriana Chisco Landazábal , 2015 -# OpenStack Infra , 2015. #zanata +# Andreas Jaeger , 2016. #zanata msgid "" msgstr "" -"Project-Id-Version: oslo.concurrency 3.2.1.dev3\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2016-01-13 08:54+0000\n" +"Project-Id-Version: oslo.concurrency 3.6.1.dev10\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-04-19 12:20+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency-log-info.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency-log-info.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency-log-info.po 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency-log-info.po 2017-01-18 19:30:48.000000000 +0000 @@ -5,12 +5,12 @@ # # Translators: # Maxime COQUEREL , 2015 -# OpenStack Infra , 2015. #zanata +# Andreas Jaeger , 2016. #zanata msgid "" msgstr "" -"Project-Id-Version: oslo.concurrency 3.2.1.dev3\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2016-01-13 08:54+0000\n" +"Project-Id-Version: oslo.concurrency 3.6.1.dev10\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-04-19 12:20+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency.po python-oslo.concurrency-3.18.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency.po --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency.po 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency.po 2017-01-18 19:30:48.000000000 +0000 @@ -5,12 +5,12 @@ # # Translators: # Maxime COQUEREL , 2015 -# OpenStack Infra , 2015. #zanata +# Andreas Jaeger , 2016. #zanata msgid "" msgstr "" -"Project-Id-Version: oslo.concurrency 3.2.1.dev3\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2016-01-13 08:54+0000\n" +"Project-Id-Version: oslo.concurrency 3.6.1.dev10\n" +"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" +"POT-Creation-Date: 2016-04-19 12:20+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/oslo_concurrency-log-info.pot python-oslo.concurrency-3.18.0/oslo_concurrency/locale/oslo_concurrency-log-info.pot --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/oslo_concurrency-log-info.pot 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/oslo_concurrency-log-info.pot 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -# Translations template for oslo.concurrency. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.concurrency -# project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.concurrency 2.6.1.dev7\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-09-26 06:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.1.1\n" - -#: oslo_concurrency/lockutils.py:153 -#, python-format -msgid "Failed to remove file %(file)s" -msgstr "" - diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/locale/oslo_concurrency.pot python-oslo.concurrency-3.18.0/oslo_concurrency/locale/oslo_concurrency.pot --- python-oslo.concurrency-3.7.0/oslo_concurrency/locale/oslo_concurrency.pot 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/locale/oslo_concurrency.pot 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -# Translations template for oslo.concurrency. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.concurrency -# project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.concurrency 2.6.1.dev7\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-09-26 06:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.1.1\n" - -#: oslo_concurrency/lockutils.py:324 -msgid "" -"Calling lockutils directly is no longer supported. Please use the " -"lockutils-wrapper console script instead." -msgstr "" - -#: oslo_concurrency/processutils.py:72 -msgid "Unexpected error while running command." -msgstr "" - -#: oslo_concurrency/processutils.py:75 -#, python-format -msgid "" -"%(description)s\n" -"Command: %(cmd)s\n" -"Exit code: %(exit_code)s\n" -"Stdout: %(stdout)r\n" -"Stderr: %(stderr)r" -msgstr "" - -#: oslo_concurrency/processutils.py:221 -#, python-format -msgid "Got unknown keyword args: %r" -msgstr "" - -#: oslo_concurrency/processutils.py:226 -#, python-format -msgid "Got invalid arg log_errors: %r" -msgstr "" - -#: oslo_concurrency/processutils.py:232 -msgid "Command requested root, but did not specify a root helper." -msgstr "" - -#: oslo_concurrency/processutils.py:250 -#, python-format -msgid "Running cmd (subprocess): %s" -msgstr "" - -#: oslo_concurrency/processutils.py:312 -#, python-format -msgid "" -"%(desc)r\n" -"command: %(cmd)r\n" -"exit code: %(code)r\n" -"stdout: %(stdout)r\n" -"stderr: %(stderr)r" -msgstr "" - -#: oslo_concurrency/processutils.py:321 -#, python-format -msgid "" -"Got an OSError\n" -"command: %(cmd)r\n" -"errno: %(errno)r" -msgstr "" - -#: oslo_concurrency/processutils.py:327 -#, python-format -msgid "%r failed. Not Retrying." -msgstr "" - -#: oslo_concurrency/processutils.py:331 -#, python-format -msgid "%r failed. Retrying." -msgstr "" - -#: oslo_concurrency/processutils.py:379 -msgid "Environment not supported over SSH" -msgstr "" - -#: oslo_concurrency/processutils.py:383 -msgid "process_input not supported over SSH" -msgstr "" - diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/lockutils.py python-oslo.concurrency-3.18.0/oslo_concurrency/lockutils.py --- python-oslo.concurrency-3.7.0/oslo_concurrency/lockutils.py 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/lockutils.py 2017-01-18 19:30:48.000000000 +0000 @@ -291,7 +291,7 @@ Redefine @synchronized in each project like so:: (in nova/utils.py) - from nova.openstack.common import lockutils + from oslo_concurrency import lockutils synchronized = lockutils.synchronized_with_prefix('nova-') @@ -316,7 +316,7 @@ Redefine remove_external_lock_file_with_prefix in each project like so:: (in nova/utils.py) - from nova.openstack.common import lockutils + from oslo_concurrency import lockutils synchronized = lockutils.synchronized_with_prefix('nova-') synchronized_remove = lockutils.remove_external_lock_file_with_prefix( diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/prlimit.py python-oslo.concurrency-3.18.0/oslo_concurrency/prlimit.py --- python-oslo.concurrency-3.7.0/oslo_concurrency/prlimit.py 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/prlimit.py 2017-01-18 19:30:48.000000000 +0000 @@ -26,8 +26,15 @@ RESOURCES = ( # argparse argument => resource ('as', resource.RLIMIT_AS), + ('core', resource.RLIMIT_CORE), + ('cpu', resource.RLIMIT_CPU), + ('data', resource.RLIMIT_DATA), + ('fsize', resource.RLIMIT_FSIZE), + ('memlock', resource.RLIMIT_MEMLOCK), ('nofile', resource.RLIMIT_NOFILE), + ('nproc', resource.RLIMIT_NPROC), ('rss', resource.RLIMIT_RSS), + ('stack', resource.RLIMIT_STACK), ) @@ -35,10 +42,24 @@ parser = argparse.ArgumentParser(description='prlimit', prog=USAGE_PROGRAM) parser.add_argument('--as', type=int, help='Address space limit in bytes') + parser.add_argument('--core', type=int, + help='Core file size limit in bytes') + parser.add_argument('--cpu', type=int, + help='CPU time limit in seconds') + parser.add_argument('--data', type=int, + help='Data size limit in bytes') + parser.add_argument('--fsize', type=int, + help='File size limit in bytes') + parser.add_argument('--memlock', type=int, + help='Locked memory limit in bytes') parser.add_argument('--nofile', type=int, help='Maximum number of open files') + parser.add_argument('--nproc', type=int, + help='Maximum number of processes') parser.add_argument('--rss', type=int, help='Maximum Resident Set Size (RSS) in bytes') + parser.add_argument('--stack', type=int, + help='Stack size limit in bytes') parser.add_argument('program', help='Program (absolute path)') parser.add_argument('program_args', metavar="arg", nargs='...', diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/processutils.py python-oslo.concurrency-3.18.0/oslo_concurrency/processutils.py --- python-oslo.concurrency-3.7.0/oslo_concurrency/processutils.py 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/processutils.py 2017-01-18 19:30:48.000000000 +0000 @@ -28,6 +28,7 @@ import time import enum +from oslo_utils import encodeutils from oslo_utils import importutils from oslo_utils import strutils from oslo_utils import timeutils @@ -134,16 +135,36 @@ Attributes: * address_space: Address space limit in bytes - * number_files: Maximum number of open files. + * core_file_size: Core file size limit in bytes + * cpu_time: CPU time limit in seconds + * data_size: Data size limit in bytes + * file_size: File size limit in bytes + * memory_locked: Locked memory limit in bytes + * number_files: Maximum number of open files + * number_processes: Maximum number of processes * resident_set_size: Maximum Resident Set Size (RSS) in bytes + * stack_size: Stack size limit in bytes This object can be used for the *prlimit* parameter of :func:`execute`. """ + _LIMITS = { + "address_space": "--as", + "core_file_size": "--core", + "cpu_time": "--cpu", + "data_size": "--data", + "file_size": "--fsize", + "memory_locked": "--memlock", + "number_files": "--nofile", + "number_processes": "--nproc", + "resident_set_size": "--rss", + "stack_size": "--stack", + } + def __init__(self, **kw): - self.address_space = kw.pop('address_space', None) - self.number_files = kw.pop('number_files', None) - self.resident_set_size = kw.pop('resident_set_size', None) + for limit in self._LIMITS.keys(): + setattr(self, limit, kw.pop(limit, None)) + if kw: raise ValueError("invalid limits: %s" % ', '.join(sorted(kw.keys()))) @@ -151,12 +172,10 @@ def prlimit_args(self): """Create a list of arguments for the prlimit command line.""" args = [] - if self.address_space: - args.append('--as=%s' % self.address_space) - if self.number_files: - args.append('--nofile=%s' % self.number_files) - if self.resident_set_size: - args.append('--rss=%s' % self.resident_set_size) + for limit in self._LIMITS.keys(): + val = getattr(self, limit) + if val is not None: + args.append("%s=%s" % (self._LIMITS[limit], val)) return args @@ -170,7 +189,7 @@ :param cwd: Set the current working directory :type cwd: string :param process_input: Send to opened process. - :type process_input: string + :type process_input: string or bytes :param env_variables: Environment variables and their values that will be set for the process. :type env_variables: dict @@ -241,6 +260,9 @@ process. If this parameter is used, the child process will be spawned by a wrapper process which will set limits before spawning the command. + .. versionchanged:: 3.17 + *process_input* can now be either bytes or string on python3. + .. versionchanged:: 3.4 Added *prlimit* optional parameter. @@ -248,7 +270,7 @@ Added *cwd* optional parameter. .. versionchanged:: 1.9 - Added *binary* optional parameter. On Python 3, *stdout* and *stdout* + Added *binary* optional parameter. On Python 3, *stdout* and *stderr* are now returned as Unicode strings by default, or bytes if *binary* is true. @@ -261,6 +283,8 @@ cwd = kwargs.pop('cwd', None) process_input = kwargs.pop('process_input', None) + if process_input is not None: + process_input = encodeutils.to_utf8(process_input) env_variables = kwargs.pop('env_variables', None) check_exit_code = kwargs.pop('check_exit_code', [0]) ignore_exit_code = False @@ -309,11 +333,16 @@ cmd = [str(c) for c in cmd] if prlimit: - args = [sys.executable, '-m', 'oslo_concurrency.prlimit'] - args.extend(prlimit.prlimit_args()) - args.append('--') - args.extend(cmd) - cmd = args + if os.name == 'nt': + LOG.log(loglevel, + _('Process resource limits are ignored as ' + 'this feature is not supported on Windows.')) + else: + args = [sys.executable, '-m', 'oslo_concurrency.prlimit'] + args.extend(prlimit.prlimit_args()) + args.append('--') + args.extend(cmd) + cmd = args sanitized_cmd = strutils.mask_password(' '.join(cmd)) @@ -448,7 +477,7 @@ def ssh_execute(ssh, cmd, process_input=None, addl_env=None, check_exit_code=True, - binary=False): + binary=False, timeout=None): """Run a command through SSH. .. versionchanged:: 1.9 @@ -463,7 +492,8 @@ # This is (probably) fixable if we need it... raise InvalidArgumentError(_('process_input not supported over SSH')) - stdin_stream, stdout_stream, stderr_stream = ssh.exec_command(cmd) + stdin_stream, stdout_stream, stderr_stream = ssh.exec_command( + cmd, timeout=timeout) channel = stdout_stream.channel # NOTE(justinsb): This seems suspicious... diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/tests/unit/test_lockutils.py python-oslo.concurrency-3.18.0/oslo_concurrency/tests/unit/test_lockutils.py --- python-oslo.concurrency-3.7.0/oslo_concurrency/tests/unit/test_lockutils.py 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/tests/unit/test_lockutils.py 2017-01-18 19:30:48.000000000 +0000 @@ -13,7 +13,7 @@ # under the License. import collections -import fcntl +import multiprocessing import os import shutil import signal @@ -31,6 +31,50 @@ from oslo_concurrency import lockutils from oslo_config import fixture as config +if sys.platform == 'win32': + import msvcrt +else: + import fcntl + + +def lock_file(handle): + if sys.platform == 'win32': + msvcrt.locking(handle.fileno(), msvcrt.LK_NBLCK, 1) + else: + fcntl.flock(handle, fcntl.LOCK_EX | fcntl.LOCK_NB) + + +def unlock_file(handle): + if sys.platform == 'win32': + msvcrt.locking(handle.fileno(), msvcrt.LK_UNLCK, 1) + else: + fcntl.flock(handle, fcntl.LOCK_UN) + + +def lock_files(handles_dir, out_queue): + with lockutils.lock('external', 'test-', external=True): + # Open some files we can use for locking + handles = [] + for n in range(50): + path = os.path.join(handles_dir, ('file-%s' % n)) + handles.append(open(path, 'w')) + + # Loop over all the handles and try locking the file + # without blocking, keep a count of how many files we + # were able to lock and then unlock. If the lock fails + # we get an IOError and bail out with bad exit code + count = 0 + for handle in handles: + try: + lock_file(handle) + count += 1 + unlock_file(handle) + except IOError: + os._exit(2) + finally: + handle.close() + return out_queue.put(count) + class LockTestCase(test_base.BaseTestCase): @@ -44,9 +88,9 @@ """Bar.""" pass - self.assertEqual(foo.__doc__, 'Bar.', "Wrapped function's docstring " + self.assertEqual('Bar.', foo.__doc__, "Wrapped function's docstring " "got lost") - self.assertEqual(foo.__name__, 'foo', "Wrapped function's name " + self.assertEqual('foo', foo.__name__, "Wrapped function's name " "got mangled") def test_lock_internally_different_collections(self): @@ -92,7 +136,7 @@ for thread in threads: thread.join() - self.assertEqual(len(seen_threads), 100) + self.assertEqual(100, len(seen_threads)) # Looking at the seen threads, split it into chunks of 10, and verify # that the last 9 match the first in each chunk. for i in range(10): @@ -126,51 +170,20 @@ def _do_test_lock_externally(self): """We can lock across multiple processes.""" - - def lock_files(handles_dir): - - with lockutils.lock('external', 'test-', external=True): - # Open some files we can use for locking - handles = [] - for n in range(50): - path = os.path.join(handles_dir, ('file-%s' % n)) - handles.append(open(path, 'w')) - - # Loop over all the handles and try locking the file - # without blocking, keep a count of how many files we - # were able to lock and then unlock. If the lock fails - # we get an IOError and bail out with bad exit code - count = 0 - for handle in handles: - try: - fcntl.flock(handle, fcntl.LOCK_EX | fcntl.LOCK_NB) - count += 1 - fcntl.flock(handle, fcntl.LOCK_UN) - except IOError: - os._exit(2) - finally: - handle.close() - - # Check if we were able to open all files - self.assertEqual(50, count) - handles_dir = tempfile.mkdtemp() try: children = [] for n in range(50): - pid = os.fork() - if pid: - children.append(pid) - else: - try: - lock_files(handles_dir) - finally: - os._exit(0) - - for child in children: - (pid, status) = os.waitpid(child, 0) - if pid: - self.assertEqual(0, status) + queue = multiprocessing.Queue() + proc = multiprocessing.Process( + target=lock_files, + args=(handles_dir, queue)) + proc.start() + children.append((proc, queue)) + for child, queue in children: + child.join() + count = queue.get(block=False) + self.assertEqual(50, count) finally: if os.path.exists(handles_dir): shutil.rmtree(handles_dir, ignore_errors=True) @@ -250,9 +263,9 @@ # a semaphore will be yielded with lockutils.lock("test") as sem: if six.PY2: - self.assertTrue(isinstance(sem, threading._Semaphore)) + self.assertIsInstance(sem, threading._Semaphore) else: - self.assertTrue(isinstance(sem, threading.Semaphore)) + self.assertIsInstance(sem, threading.Semaphore) # NOTE(flaper87): Lock is external so an InterProcessLock # will be yielded. @@ -261,8 +274,8 @@ with lockutils.lock("test1", external=True) as lock1: - self.assertTrue(isinstance(lock1, - lockutils.InterProcessLock)) + self.assertIsInstance(lock1, + lockutils.InterProcessLock) finally: if os.path.exists(lock_dir): shutil.rmtree(lock_dir, ignore_errors=True) @@ -276,9 +289,9 @@ try: with lockutils.lock("test") as sem: if six.PY2: - self.assertTrue(isinstance(sem, threading._Semaphore)) + self.assertIsInstance(sem, threading._Semaphore) else: - self.assertTrue(isinstance(sem, threading.Semaphore)) + self.assertIsInstance(sem, threading.Semaphore) with lockutils.lock("test2", external=True) as lock: self.assertTrue(lock.exists()) @@ -336,7 +349,7 @@ conf = cfg.ConfigOpts() conf(['--config-file', paths[0]]) conf.register_opts(lockutils._opts, 'oslo_concurrency') - self.assertEqual(conf.oslo_concurrency.lock_path, 'foo') + self.assertEqual('foo', conf.oslo_concurrency.lock_path) self.assertTrue(conf.oslo_concurrency.disable_process_locking) @@ -436,7 +449,7 @@ thread1.start() thread1.join() thread.join() - self.assertEqual(call_list, ['other', 'other', 'main', 'main']) + self.assertEqual(['other', 'other', 'main', 'main'], call_list) def test_non_destructive(self): lock_file = os.path.join(self.lock_dir, 'not-destroyed') @@ -445,7 +458,7 @@ with lockutils.lock('not-destroyed', external=True, lock_path=self.lock_dir): with open(lock_file) as f: - self.assertEqual(f.read(), 'test') + self.assertEqual('test', f.read()) class LockutilsModuleTestCase(test_base.BaseTestCase): @@ -470,7 +483,7 @@ ]) argv = ['', sys.executable, '-c', script] retval = lockutils._lock_wrapper(argv) - self.assertEqual(retval, 0, "Bad OSLO_LOCK_PATH has been set") + self.assertEqual(0, retval, "Bad OSLO_LOCK_PATH has been set") def test_return_value_maintained(self): script = '\n'.join([ @@ -479,7 +492,7 @@ ]) argv = ['', sys.executable, '-c', script] retval = lockutils._lock_wrapper(argv) - self.assertEqual(retval, 1) + self.assertEqual(1, retval) def test_direct_call_explodes(self): cmd = [sys.executable, '-m', 'oslo_concurrency.lockutils'] diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/tests/unit/test_processutils.py python-oslo.concurrency-3.18.0/oslo_concurrency/tests/unit/test_processutils.py --- python-oslo.concurrency-3.7.0/oslo_concurrency/tests/unit/test_processutils.py 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/tests/unit/test_processutils.py 2017-01-18 19:30:48.000000000 +0000 @@ -21,6 +21,7 @@ import os import pickle import resource +import socket import stat import subprocess import sys @@ -124,23 +125,23 @@ def test_defaults(self): err = processutils.ProcessExecutionError() - self.assertTrue('None\n' in six.text_type(err)) - self.assertTrue('code: -\n' in six.text_type(err)) + self.assertIn('None\n', six.text_type(err)) + self.assertIn('code: -\n', six.text_type(err)) def test_with_description(self): description = 'The Narwhal Bacons at Midnight' err = processutils.ProcessExecutionError(description=description) - self.assertTrue(description in six.text_type(err)) + self.assertIn(description, six.text_type(err)) def test_with_exit_code(self): exit_code = 0 err = processutils.ProcessExecutionError(exit_code=exit_code) - self.assertTrue(str(exit_code) in six.text_type(err)) + self.assertIn(str(exit_code), six.text_type(err)) def test_with_cmd(self): cmd = 'telinit' err = processutils.ProcessExecutionError(cmd=cmd) - self.assertTrue(cmd in six.text_type(err)) + self.assertIn(cmd, six.text_type(err)) def test_with_stdout(self): stdout = """ @@ -164,12 +165,12 @@ """.strip() err = processutils.ProcessExecutionError(stdout=stdout) print(six.text_type(err)) - self.assertTrue('people-kings' in six.text_type(err)) + self.assertIn('people-kings', six.text_type(err)) def test_with_stderr(self): stderr = 'Cottonian library' err = processutils.ProcessExecutionError(stderr=stderr) - self.assertTrue(stderr in six.text_type(err)) + self.assertIn(stderr, six.text_type(err)) def test_retry_on_failure(self): fd, tmpfilename = tempfile.mkstemp() @@ -206,11 +207,12 @@ fp = open(tmpfilename2, 'r') runs = fp.read() fp.close() - self.assertNotEqual(runs.strip(), 'failure', 'stdin did not ' - 'always get passed ' - 'correctly') + self.assertNotEqual('failure', 'stdin did not ' + 'always get passed ' + 'correctly', + runs.strip()) runs = int(runs.strip()) - self.assertEqual(runs, 10, 'Ran %d times instead of 10.' % (runs,)) + self.assertEqual(10, runs, 'Ran %d times instead of 10.' % (runs,)) finally: os.unlink(tmpfilename) os.unlink(tmpfilename2) @@ -234,6 +236,14 @@ cwd=tmpdir) self.assertIn(tmpdir, out) + def test_process_input_with_string(self): + code = ';'.join(('import sys', + 'print(len(sys.stdin.readlines()))')) + args = [sys.executable, '-c', code] + input = "\n".join(['foo', 'bar', 'baz']) + stdout, stderr = processutils.execute(*args, process_input=input) + self.assertEqual("3", stdout.rstrip()) + def test_check_exit_code_list(self): processutils.execute('/usr/bin/env', 'sh', '-c', 'exit 101', check_exit_code=(101, 102)) @@ -397,9 +407,10 @@ self.assertIsInstance(err.stderr, six.text_type) self.assertIn('onstdout --password="***"', err.stdout) self.assertIn('onstderr --password="***"', err.stderr) - self.assertEqual(err.cmd, ' '.join([tmpfilename, - 'password="***"', - 'something'])) + self.assertEqual(' '.join([tmpfilename, + 'password="***"', + 'something']), + err.cmd) self.assertNotIn('secret', str(err)) def execute_undecodable_bytes(self, out_bytes, err_bytes, @@ -427,8 +438,8 @@ out, err = self.execute_undecodable_bytes(out_bytes, err_bytes, binary=binary) if six.PY3 and not binary: - self.assertEqual(out, os.fsdecode(out_bytes)) - self.assertEqual(err, os.fsdecode(err_bytes)) + self.assertEqual(os.fsdecode(out_bytes), out) + self.assertEqual(os.fsdecode(err_bytes), err) else: self.assertEqual(out, out_bytes) self.assertEqual(err, err_bytes) @@ -454,13 +465,13 @@ if six.PY3: # On Python 3, stdout and stderr attributes of # ProcessExecutionError must always be Unicode - self.assertEqual(out, os.fsdecode(out_bytes)) - self.assertEqual(err, os.fsdecode(err_bytes)) + self.assertEqual(os.fsdecode(out_bytes), out) + self.assertEqual(os.fsdecode(err_bytes), err) else: # On Python 2, stdout and stderr attributes of # ProcessExecutionError must always be bytes - self.assertEqual(out, out_bytes) - self.assertEqual(err, err_bytes) + self.assertEqual(out_bytes, out) + self.assertEqual(err_bytes, err) def test_undecodable_bytes_error(self): self.check_undecodable_bytes_error(False) @@ -481,7 +492,7 @@ self.assertEqual(42, exc.exit_code) self.assertEqual('my cmd', exc.cmd) self.assertEqual('my description', exc.description) - self.assertEqual(exc_message, str(exc)) + self.assertEqual(str(exc), exc_message) class ProcessExecutionErrorLoggingTest(test_base.BaseTestCase): @@ -599,7 +610,9 @@ self.out = out self.err = err - def exec_command(self, cmd): + def exec_command(self, cmd, timeout=None): + if timeout: + raise socket.timeout() stdout = FakeSshStream(self.out) stdout.setup_channel(self.rc) return (six.BytesIO(), @@ -618,6 +631,12 @@ processutils.ssh_execute, None, 'ls', process_input='important') + def test_timeout_error(self): + self.assertRaises(socket.timeout, + processutils.ssh_execute, + FakeSshConnection(0), 'ls', + timeout=10) + def test_works(self): out, err = processutils.ssh_execute(FakeSshConnection(0), 'ls') self.assertEqual('stdout', out) @@ -640,11 +659,11 @@ out, err = processutils.ssh_execute(conn, 'ls', binary=binary) if six.PY3 and not binary: - self.assertEqual(out, os.fsdecode(out_bytes)) - self.assertEqual(err, os.fsdecode(err_bytes)) + self.assertEqual(os.fsdecode(out_bytes), out) + self.assertEqual(os.fsdecode(err_bytes), err) else: - self.assertEqual(out, out_bytes) - self.assertEqual(err, err_bytes) + self.assertEqual(out_bytes, out) + self.assertEqual(err_bytes, err) def test_undecodable_bytes(self): self.check_undecodable_bytes(False) @@ -670,13 +689,13 @@ if six.PY3: # On Python 3, stdout and stderr attributes of # ProcessExecutionError must always be Unicode - self.assertEqual(out, os.fsdecode(out_bytes)) - self.assertEqual(err, os.fsdecode(err_bytes)) + self.assertEqual(os.fsdecode(out_bytes), out) + self.assertEqual(os.fsdecode(err_bytes), err) else: # On Python 2, stdout and stderr attributes of # ProcessExecutionError must always be bytes - self.assertEqual(out, out_bytes) - self.assertEqual(err, err_bytes) + self.assertEqual(out_bytes, out) + self.assertEqual(err_bytes, err) def test_undecodable_bytes_error(self): self.check_undecodable_bytes_error(False) @@ -711,9 +730,9 @@ check_exit_code=check) self.assertEqual(rc, err.exit_code) - self.assertEqual(err.stdout, 'password="***"') - self.assertEqual(err.stderr, 'password="***"') - self.assertEqual(err.cmd, 'ls --password="***"') + self.assertEqual('password="***"', err.stdout) + self.assertEqual('password="***"', err.stderr) + self.assertEqual('ls --password="***"', err.cmd) self.assertNotIn('secret', str(err)) self.assertNotIn('foobar', str(err)) else: @@ -752,7 +771,7 @@ # Create a new soft limit for a resource, lower than the current # soft limit. soft_limit, hard_limit = resource.getrlimit(res) - if soft_limit < 0: + if soft_limit <= 0: soft_limit = default_limit else: soft_limit -= substract @@ -775,7 +794,7 @@ prlimit = self.limit_address_space() stdout, stderr = processutils.execute(*self.SIMPLE_PROGRAM, prlimit=prlimit) - self.assertEqual(stdout.rstrip(), '') + self.assertEqual('', stdout.rstrip()) self.assertEqual(stderr.rstrip(), '') def check_limit(self, prlimit, resource, value): @@ -784,12 +803,37 @@ args = [sys.executable, '-c', code] stdout, stderr = processutils.execute(*args, prlimit=prlimit) expected = (value, value) - self.assertEqual(stdout.rstrip(), str(expected)) + self.assertEqual(str(expected), stdout.rstrip()) def test_address_space(self): prlimit = self.limit_address_space() self.check_limit(prlimit, 'RLIMIT_AS', prlimit.address_space) + def test_core_size(self): + size = self.soft_limit(resource.RLIMIT_CORE, 1, 1024) + prlimit = processutils.ProcessLimits(core_file_size=size) + self.check_limit(prlimit, 'RLIMIT_CORE', prlimit.core_file_size) + + def test_cpu_time(self): + time = self.soft_limit(resource.RLIMIT_CPU, 1, 1024) + prlimit = processutils.ProcessLimits(cpu_time=time) + self.check_limit(prlimit, 'RLIMIT_CPU', prlimit.cpu_time) + + def test_data_size(self): + max_memory = self.memory_limit(resource.RLIMIT_DATA) + prlimit = processutils.ProcessLimits(data_size=max_memory) + self.check_limit(prlimit, 'RLIMIT_DATA', max_memory) + + def test_file_size(self): + size = self.soft_limit(resource.RLIMIT_FSIZE, 1, 1024) + prlimit = processutils.ProcessLimits(file_size=size) + self.check_limit(prlimit, 'RLIMIT_FSIZE', prlimit.file_size) + + def test_memory_locked(self): + max_memory = self.memory_limit(resource.RLIMIT_MEMLOCK) + prlimit = processutils.ProcessLimits(memory_locked=max_memory) + self.check_limit(prlimit, 'RLIMIT_MEMLOCK', max_memory) + def test_resident_set_size(self): max_memory = self.memory_limit(resource.RLIMIT_RSS) prlimit = processutils.ProcessLimits(resident_set_size=max_memory) @@ -800,6 +844,16 @@ prlimit = processutils.ProcessLimits(number_files=nfiles) self.check_limit(prlimit, 'RLIMIT_NOFILE', nfiles) + def test_number_processes(self): + nprocs = self.soft_limit(resource.RLIMIT_NPROC, 1, 65535) + prlimit = processutils.ProcessLimits(number_processes=nprocs) + self.check_limit(prlimit, 'RLIMIT_NPROC', nprocs) + + def test_stack_size(self): + max_memory = self.memory_limit(resource.RLIMIT_STACK) + prlimit = processutils.ProcessLimits(stack_size=max_memory) + self.check_limit(prlimit, 'RLIMIT_STACK', max_memory) + def test_unsupported_prlimit(self): self.assertRaises(ValueError, processutils.ProcessLimits, xxx=33) @@ -818,8 +872,8 @@ try: processutils.execute(*args, prlimit=prlimit) except processutils.ProcessExecutionError as exc: - self.assertEqual(exc.exit_code, 1) - self.assertEqual(exc.stdout, '') + self.assertEqual(1, exc.exit_code) + self.assertEqual('', exc.stdout) expected = ('%s -m oslo_concurrency.prlimit: ' 'failed to execute /missing_path/dont_exist/program: ' % os.path.basename(sys.executable)) @@ -841,11 +895,33 @@ try: processutils.execute(*args, prlimit=prlimit) except processutils.ProcessExecutionError as exc: - self.assertEqual(exc.exit_code, 1) - self.assertEqual(exc.stdout, '') + self.assertEqual(1, exc.exit_code) + self.assertEqual('', exc.stdout) expected = ('%s -m oslo_concurrency.prlimit: ' 'failed to set the AS resource limit: ' % os.path.basename(sys.executable)) self.assertIn(expected, exc.stderr) else: self.fail("ProcessExecutionError not raised") + + @mock.patch.object(os, 'name', 'nt') + @mock.patch.object(processutils.subprocess, "Popen") + def test_prlimit_windows(self, mock_popen): + # We want to ensure that process resource limits are + # ignored on Windows, in which case this feature is not + # supported. We'll just check the command passed to Popen, + # which is expected to be unaltered. + prlimit = self.limit_address_space() + mock_popen.return_value.communicate.return_value = None + + processutils.execute( + *self.SIMPLE_PROGRAM, + prlimit=prlimit, + check_exit_code=False) + + mock_popen.assert_called_once_with( + self.SIMPLE_PROGRAM, + stdin=mock.ANY, stdout=mock.ANY, + stderr=mock.ANY, close_fds=mock.ANY, + preexec_fn=mock.ANY, shell=mock.ANY, + cwd=mock.ANY, env=mock.ANY) diff -Nru python-oslo.concurrency-3.7.0/oslo_concurrency/version.py python-oslo.concurrency-3.18.0/oslo_concurrency/version.py --- python-oslo.concurrency-3.7.0/oslo_concurrency/version.py 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo_concurrency/version.py 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,18 @@ +# Copyright 2016 OpenStack Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +import pbr.version + +version_info = pbr.version.VersionInfo('oslo_concurrency') diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/dependency_links.txt python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/dependency_links.txt --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/dependency_links.txt 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1 @@ + diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/entry_points.txt python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/entry_points.txt --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/entry_points.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/entry_points.txt 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1,6 @@ +[console_scripts] +lockutils-wrapper = oslo_concurrency.lockutils:main + +[oslo.config.opts] +oslo.concurrency = oslo_concurrency.opts:list_opts + diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/not-zip-safe python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/not-zip-safe --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/not-zip-safe 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/not-zip-safe 2017-01-18 19:32:10.000000000 +0000 @@ -0,0 +1 @@ + diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/pbr.json python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/pbr.json --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/pbr.json 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/pbr.json 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1 @@ +{"git_version": "7afbc99", "is_release": true} \ No newline at end of file diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/PKG-INFO python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/PKG-INFO --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/PKG-INFO 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1,51 @@ +Metadata-Version: 1.1 +Name: oslo.concurrency +Version: 3.18.0 +Summary: Oslo Concurrency library +Home-page: http://docs.openstack.org/developer/oslo.concurrency +Author: OpenStack +Author-email: openstack-dev@lists.openstack.org +License: UNKNOWN +Description: ======================== + Team and repository tags + ======================== + + .. image:: http://governance.openstack.org/badges/oslo.concurrency.svg + :target: http://governance.openstack.org/reference/tags/index.html + + .. Change things from this point on + + ================== + oslo.concurrency + ================== + + .. image:: https://img.shields.io/pypi/v/oslo.concurrency.svg + :target: https://pypi.python.org/pypi/oslo.concurrency/ + :alt: Latest Version + + .. image:: https://img.shields.io/pypi/dm/oslo.concurrency.svg + :target: https://pypi.python.org/pypi/oslo.concurrency/ + :alt: Downloads + + The oslo.concurrency library has utilities for safely running multi-thread, + multi-process applications using locking mechanisms and for running + external processes. + + * Free software: Apache license + * Documentation: http://docs.openstack.org/developer/oslo.concurrency + * Source: http://git.openstack.org/cgit/openstack/oslo.concurrency + * Bugs: http://bugs.launchpad.net/oslo.concurrency + + +Platform: UNKNOWN +Classifier: Environment :: OpenStack +Classifier: Intended Audience :: Information Technology +Classifier: Intended Audience :: System Administrators +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/requires.txt python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/requires.txt --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/requires.txt 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1,7 @@ +pbr>=1.8 +enum34 +oslo.config!=3.18.0,>=3.14.0 +oslo.i18n>=2.1.0 +oslo.utils>=3.18.0 +six>=1.9.0 +fasteners>=0.7 diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/SOURCES.txt python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/SOURCES.txt --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/SOURCES.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/SOURCES.txt 2017-01-18 19:32:31.000000000 +0000 @@ -0,0 +1,69 @@ +.coveragerc +.mailmap +.testr.conf +AUTHORS +CONTRIBUTING.rst +ChangeLog +HACKING.rst +LICENSE +README.rst +babel.cfg +requirements.txt +setup.cfg +setup.py +test-requirements.txt +tox.ini +doc/source/conf.py +doc/source/contributing.rst +doc/source/history.rst +doc/source/index.rst +doc/source/installation.rst +doc/source/opts.rst +doc/source/usage.rst +doc/source/api/fixture.lockutils.rst +doc/source/api/index.rst +doc/source/api/lockutils.rst +doc/source/api/opts.rst +doc/source/api/processutils.rst +doc/source/api/watchdog.rst +oslo.concurrency.egg-info/PKG-INFO +oslo.concurrency.egg-info/SOURCES.txt +oslo.concurrency.egg-info/dependency_links.txt +oslo.concurrency.egg-info/entry_points.txt +oslo.concurrency.egg-info/not-zip-safe +oslo.concurrency.egg-info/pbr.json +oslo.concurrency.egg-info/requires.txt +oslo.concurrency.egg-info/top_level.txt +oslo_concurrency/__init__.py +oslo_concurrency/_i18n.py +oslo_concurrency/lockutils.py +oslo_concurrency/opts.py +oslo_concurrency/prlimit.py +oslo_concurrency/processutils.py +oslo_concurrency/version.py +oslo_concurrency/watchdog.py +oslo_concurrency/fixture/__init__.py +oslo_concurrency/fixture/lockutils.py +oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency-log-info.po +oslo_concurrency/locale/de/LC_MESSAGES/oslo_concurrency.po +oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency-log-info.po +oslo_concurrency/locale/en_GB/LC_MESSAGES/oslo_concurrency.po +oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency-log-info.po +oslo_concurrency/locale/es/LC_MESSAGES/oslo_concurrency.po +oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency-log-info.po +oslo_concurrency/locale/fr/LC_MESSAGES/oslo_concurrency.po +oslo_concurrency/tests/__init__.py +oslo_concurrency/tests/unit/__init__.py +oslo_concurrency/tests/unit/test_lockutils.py +oslo_concurrency/tests/unit/test_lockutils_eventlet.py +oslo_concurrency/tests/unit/test_processutils.py +releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml +releasenotes/source/conf.py +releasenotes/source/index.rst +releasenotes/source/newton.rst +releasenotes/source/unreleased.rst +releasenotes/source/_static/.placeholder +releasenotes/source/_templates/.placeholder +releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po +releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po +tools/tox_install.sh \ No newline at end of file diff -Nru python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/top_level.txt python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/top_level.txt --- python-oslo.concurrency-3.7.0/oslo.concurrency.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/oslo.concurrency.egg-info/top_level.txt 2017-01-18 19:32:30.000000000 +0000 @@ -0,0 +1 @@ +oslo_concurrency diff -Nru python-oslo.concurrency-3.7.0/PKG-INFO python-oslo.concurrency-3.18.0/PKG-INFO --- python-oslo.concurrency-3.7.0/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/PKG-INFO 2017-01-18 19:32:31.000000000 +0000 @@ -0,0 +1,51 @@ +Metadata-Version: 1.1 +Name: oslo.concurrency +Version: 3.18.0 +Summary: Oslo Concurrency library +Home-page: http://docs.openstack.org/developer/oslo.concurrency +Author: OpenStack +Author-email: openstack-dev@lists.openstack.org +License: UNKNOWN +Description: ======================== + Team and repository tags + ======================== + + .. image:: http://governance.openstack.org/badges/oslo.concurrency.svg + :target: http://governance.openstack.org/reference/tags/index.html + + .. Change things from this point on + + ================== + oslo.concurrency + ================== + + .. image:: https://img.shields.io/pypi/v/oslo.concurrency.svg + :target: https://pypi.python.org/pypi/oslo.concurrency/ + :alt: Latest Version + + .. image:: https://img.shields.io/pypi/dm/oslo.concurrency.svg + :target: https://pypi.python.org/pypi/oslo.concurrency/ + :alt: Downloads + + The oslo.concurrency library has utilities for safely running multi-thread, + multi-process applications using locking mechanisms and for running + external processes. + + * Free software: Apache license + * Documentation: http://docs.openstack.org/developer/oslo.concurrency + * Source: http://git.openstack.org/cgit/openstack/oslo.concurrency + * Bugs: http://bugs.launchpad.net/oslo.concurrency + + +Platform: UNKNOWN +Classifier: Environment :: OpenStack +Classifier: Intended Audience :: Information Technology +Classifier: Intended Audience :: System Administrators +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 diff -Nru python-oslo.concurrency-3.7.0/README.rst python-oslo.concurrency-3.18.0/README.rst --- python-oslo.concurrency-3.7.0/README.rst 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/README.rst 2017-01-18 19:30:48.000000000 +0000 @@ -1,3 +1,12 @@ +======================== +Team and repository tags +======================== + +.. image:: http://governance.openstack.org/badges/oslo.concurrency.svg + :target: http://governance.openstack.org/reference/tags/index.html + +.. Change things from this point on + ================== oslo.concurrency ================== diff -Nru python-oslo.concurrency-3.7.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml python-oslo.concurrency-3.18.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml --- python-oslo.concurrency-3.7.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,3 @@ +--- +other: + - Switch to reno for managing release notes. \ No newline at end of file diff -Nru python-oslo.concurrency-3.7.0/releasenotes/source/conf.py python-oslo.concurrency-3.18.0/releasenotes/source/conf.py --- python-oslo.concurrency-3.7.0/releasenotes/source/conf.py 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/releasenotes/source/conf.py 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,276 @@ +# -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'oslosphinx', + 'reno.sphinxext', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'oslo.concurrency Release Notes' +copyright = u'2016, oslo.concurrency Developers' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +from oslo_concurrency.version import version_info as oslo_concurrency_version +# The full version, including alpha/beta/rc tags. +release = oslo_concurrency_version.version_string_with_vcs() +# The short X.Y version. +version = oslo_concurrency_version.canonical_version_string() + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'oslo.concurrencyReleaseNotesDoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', 'oslo.concurrencyReleaseNotes.tex', + u'oslo.concurrency Release Notes Documentation', + u'oslo.concurrency Developers', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'oslo.concurrencyReleaseNotes', + u'oslo.concurrency Release Notes Documentation', + [u'oslo.concurrency Developers'], 1) +] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'oslo.concurrencyReleaseNotes', + u'oslo.concurrency Release Notes Documentation', + u'oslo.concurrency Developers', 'oslo.concurrencyReleaseNotes', + 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + +# -- Options for Internationalization output ------------------------------ +locale_dirs = ['locale/'] diff -Nru python-oslo.concurrency-3.7.0/releasenotes/source/index.rst python-oslo.concurrency-3.18.0/releasenotes/source/index.rst --- python-oslo.concurrency-3.7.0/releasenotes/source/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/releasenotes/source/index.rst 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,9 @@ +================================ + oslo.concurrency Release Notes +================================ + + .. toctree:: + :maxdepth: 1 + + unreleased + newton diff -Nru python-oslo.concurrency-3.7.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po python-oslo.concurrency-3.18.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po --- python-oslo.concurrency-3.7.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,30 @@ +# Andi Chandler , 2016. #zanata +msgid "" +msgstr "" +"Project-Id-Version: oslo.concurrency Release Notes 3.11.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-01 03:44+0000\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2016-06-28 05:54+0000\n" +"Last-Translator: Andi Chandler \n" +"Language-Team: English (United Kingdom)\n" +"Language: en-GB\n" +"X-Generator: Zanata 3.7.3\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +msgid "3.10.0" +msgstr "3.10.0" + +msgid "Other Notes" +msgstr "Other Notes" + +msgid "Switch to reno for managing release notes." +msgstr "Switch to reno for managing release notes." + +msgid "Unreleased Release Notes" +msgstr "Unreleased Release Notes" + +msgid "oslo.concurrency Release Notes" +msgstr "oslo.concurrency Release Notes" diff -Nru python-oslo.concurrency-3.7.0/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po python-oslo.concurrency-3.18.0/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po --- python-oslo.concurrency-3.7.0/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,33 @@ +# Gérald LONLAS , 2016. #zanata +msgid "" +msgstr "" +"Project-Id-Version: oslo.concurrency Release Notes 3.15.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-10-25 16:33+0000\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2016-10-22 05:58+0000\n" +"Last-Translator: Gérald LONLAS \n" +"Language-Team: French\n" +"Language: fr\n" +"X-Generator: Zanata 3.7.3\n" +"Plural-Forms: nplurals=2; plural=(n > 1)\n" + +msgid "3.10.0" +msgstr "3.10.0" + +msgid "Newton Series Release Notes" +msgstr "Note de release pour Newton" + +msgid "Other Notes" +msgstr "Autres notes" + +msgid "Switch to reno for managing release notes." +msgstr "Commence à utiliser reno pour la gestion des notes de release" + +msgid "Unreleased Release Notes" +msgstr "Note de release pour les changements non déployées" + +msgid "oslo.concurrency Release Notes" +msgstr "Note de release pour oslo.concurrency" diff -Nru python-oslo.concurrency-3.7.0/releasenotes/source/newton.rst python-oslo.concurrency-3.18.0/releasenotes/source/newton.rst --- python-oslo.concurrency-3.7.0/releasenotes/source/newton.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/releasenotes/source/newton.rst 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,6 @@ +============================= + Newton Series Release Notes +============================= + +.. release-notes:: + :branch: origin/stable/newton diff -Nru python-oslo.concurrency-3.7.0/releasenotes/source/unreleased.rst python-oslo.concurrency-3.18.0/releasenotes/source/unreleased.rst --- python-oslo.concurrency-3.7.0/releasenotes/source/unreleased.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/releasenotes/source/unreleased.rst 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,5 @@ +========================== + Unreleased Release Notes +========================== + +.. release-notes:: diff -Nru python-oslo.concurrency-3.7.0/requirements.txt python-oslo.concurrency-3.18.0/requirements.txt --- python-oslo.concurrency-3.7.0/requirements.txt 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/requirements.txt 2017-01-18 19:30:48.000000000 +0000 @@ -2,13 +2,10 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr>=1.6 # Apache-2.0 -Babel>=1.3 # BSD +pbr>=1.8 # Apache-2.0 enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -iso8601>=0.1.9 # MIT -oslo.config>=3.7.0 # Apache-2.0 +oslo.config!=3.18.0,>=3.14.0 # Apache-2.0 oslo.i18n>=2.1.0 # Apache-2.0 -oslo.utils>=3.5.0 # Apache-2.0 +oslo.utils>=3.18.0 # Apache-2.0 six>=1.9.0 # MIT fasteners>=0.7 # Apache-2.0 -retrying!=1.3.0,>=1.2.3 # Apache-2.0 diff -Nru python-oslo.concurrency-3.7.0/setup.cfg python-oslo.concurrency-3.18.0/setup.cfg --- python-oslo.concurrency-3.7.0/setup.cfg 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/setup.cfg 2017-01-18 19:32:31.000000000 +0000 @@ -1,32 +1,33 @@ [metadata] name = oslo.concurrency summary = Oslo Concurrency library -description-file = - README.rst +description-file = + README.rst author = OpenStack author-email = openstack-dev@lists.openstack.org -home-page = http://launchpad.net/oslo -classifier = - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.4 +home-page = http://docs.openstack.org/developer/oslo.concurrency +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 [files] -packages = - oslo_concurrency +packages = + oslo_concurrency [entry_points] -oslo.config.opts = - oslo.concurrency = oslo_concurrency.opts:list_opts -console_scripts = - lockutils-wrapper = oslo_concurrency.lockutils:main +oslo.config.opts = + oslo.concurrency = oslo_concurrency.opts:list_opts +console_scripts = + lockutils-wrapper = oslo_concurrency.lockutils:main [build_sphinx] source-dir = doc/source @@ -55,3 +56,8 @@ [wheel] universal = 1 + +[egg_info] +tag_build = +tag_date = 0 + diff -Nru python-oslo.concurrency-3.7.0/test-requirements.txt python-oslo.concurrency-3.18.0/test-requirements.txt --- python-oslo.concurrency-3.7.0/test-requirements.txt 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/test-requirements.txt 2017-01-18 19:30:48.000000000 +0000 @@ -4,12 +4,13 @@ hacking<0.11,>=0.10.0 oslotest>=1.10.0 # Apache-2.0 -coverage>=3.6 # Apache-2.0 +coverage>=4.0 # Apache-2.0 futures>=3.0;python_version=='2.7' or python_version=='2.6' # BSD -fixtures>=1.3.1 # Apache-2.0/BSD +fixtures>=3.0.0 # Apache-2.0/BSD # These are needed for docs generation -oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 -sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD +oslosphinx>=4.7.0 # Apache-2.0 +sphinx!=1.3b1,<1.4,>=1.2.1 # BSD +reno>=1.8.0 # Apache-2.0 eventlet!=0.18.3,>=0.18.2 # MIT diff -Nru python-oslo.concurrency-3.7.0/tools/tox_install.sh python-oslo.concurrency-3.18.0/tools/tox_install.sh --- python-oslo.concurrency-3.7.0/tools/tox_install.sh 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.concurrency-3.18.0/tools/tox_install.sh 2017-01-18 19:30:48.000000000 +0000 @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Client constraint file contains this client version pin that is in conflict +# with installing the client from source. We should remove the version pin in +# the constraints file before applying it for from-source installation. + +CONSTRAINTS_FILE="$1" +shift 1 + +set -e + +# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get +# published to logs.openstack.org for easy debugging. +localfile="$VIRTUAL_ENV/log/upper-constraints.txt" + +if [[ "$CONSTRAINTS_FILE" != http* ]]; then + CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE" +fi +# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep +curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile" + +pip install -c"$localfile" openstack-requirements + +# This is the main purpose of the script: Allow local installation of +# the current repo. It is listed in constraints file and thus any +# install will be constrained and we need to unconstrain it. +edit-constraints "$localfile" -- "$CLIENT_NAME" + +pip install -c"$localfile" -U "$@" +exit $? diff -Nru python-oslo.concurrency-3.7.0/tox.ini python-oslo.concurrency-3.18.0/tox.ini --- python-oslo.concurrency-3.7.0/tox.ini 2016-03-24 13:49:21.000000000 +0000 +++ python-oslo.concurrency-3.18.0/tox.ini 2017-01-18 19:30:48.000000000 +0000 @@ -1,18 +1,19 @@ [tox] -minversion = 1.6 -envlist = py34,py27,pep8 +minversion = 2.0 +envlist = py35,py34,py27,pep8 [testenv] +setenv = + VIRTUAL_ENV={envdir} + BRANCH_NAME=master + CLIENT_NAME=oslo.concurrency +install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} deps = -r{toxinidir}/test-requirements.txt # We want to support both vanilla stdlib and eventlet monkey patched commands = lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}' env TEST_EVENTLET=1 lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}' -[testenv:py34] -commands = - lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}' - [testenv:pep8] commands = flake8 @@ -28,7 +29,7 @@ [flake8] show-source = True ignore = H405 -exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build +exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build [hacking] import_exceptions = @@ -41,3 +42,6 @@ # of the requirements.txt files deps = pip_missing_reqs commands = pip-missing-reqs -d --ignore-module=oslo_concurrency* --ignore-file=oslo_concurrency/tests/* --ignore-file=tests/ oslo_concurrency + +[testenv:releasenotes] +commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html