384 Commits

Author SHA1 Message Date
Andreas Jaeger
8c60d4261e Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

openstackdocstheme renames some variables, so follow the renames. A
couple of variables are also not needed anymore, remove them.

Set openstackdocs_auto_name to use project as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I129fcb2f17f7938b72fa788afa99004cc0be1d84
2020-05-21 13:43:40 +00:00
Zuul
6d80eba012 Merge "Add py38 package metadata" 2020-04-27 10:13:04 +00:00
Sean McGinnis
eca3b07731
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I50c94e1e5d8e2ef44d9c91a60f01bda530c9cb46
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:49 -05:00
Sean McGinnis
e6d23dcc58
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I92da99765c2a10518fbf924d4c4ba4c739defe07
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:12 -05:00
Stephen Finucane
4e907ed2f3 Drop use of babel
We were simply using this to get a list of language codes. Turns out
Python provides a way to do this already via the 'locale' module, which
provides all of the locales we care about [1]. Use this.

[1] https://github.com/python/cpython/blob/3.5/Lib/locale.py

Change-Id: Id6dce33fdbe3fc537dfe28d5cc604985b3347405
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-04-16 17:31:19 +01:00
434773e561 Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I8a61ffc4ba15870dfa4a07df47281a9131f6e6b6
2020-04-14 10:14:26 +00:00
20fa798205 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Icfd8706698445c2975d0261117113acd2f75b1fc
Sem-Ver: feature
2020-04-14 10:14:24 +00:00
Sean McGinnis
34aaaf2eb5
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I597461bc2ce6a480ea18950ded606ef7db717f2d
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
ussuri-em 4.0.1
2020-03-31 15:55:50 -05:00
Andreas Jaeger
e7908d07f9 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Blacklist:
W504 line break after binary operator

Change-Id: I8081a5f723c6b9fda65d72567fa1514f760c47da
2020-03-30 12:00:32 +00:00
Hervé Beraud
72bcead897 remove outdated header
Change-Id: I82a5e0a0c517601a93ef8c1e6d4ac0e9764e85ac
4.0.0
2020-02-11 18:49:19 +01:00
Hervé Beraud
281fd591e7 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in Ussuri cycle.

Complete discussion & schedule can be found in
-
http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I340a7909c49e7d2a8c82c668cbdaf9ced7196f67
Sem-Ver: api-break
2020-02-06 10:23:19 +01:00
Zuul
6889dec2aa Merge "tox: Trivial cleanup" 2020-01-30 13:24:01 +00:00
Zuul
6c8bcc94b7 Merge "Integrate sphinxcontrib-apidoc" 2020-01-09 21:05:34 +00:00
Hervé Beraud
70317a0109 tox: Trivial cleanup
Move 'basepython' to the top-level 'testenv'.
Use the default 'install_command'

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

Change-Id: I36ef5b39b48e259b51f2bb03caf3443d8969c1e9
2020-01-08 19:37:53 +01:00
OpenStack Proposal Bot
e154150bc7 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I28c524de7a6c29f06c042d47db5589ac64d53022
3.25.1
2019-12-22 07:24:41 +00:00
Stephen Finucane
3b773fb717 Integrate sphinxcontrib-apidoc
This was missed in change Ice407c712b5438b06c4f439c73946640a0c5a86d.
While we're here, we clean up some other bits of mess that were left
behind by that.

Change-Id: Id061758834eaf266766ab7344c4547fce4261e89
2019-12-17 16:36:08 +00:00
caoyuan
0d76d2cb30 tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: If8c19a7d5d2a6ca089efb6c19d81a277aba7f06d
3.25.0
2019-10-24 14:56:26 +08:00
Zuul
39c31cd95d Merge "Update master for stable/train" 2019-10-10 12:38:00 +00:00
cee9c226bb Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: Ie9ccc68184b4a1a2b3e1301eb1bb8ce30fd682dd
Sem-Ver: feature
2019-09-20 16:32:45 +00:00
Ben Nemec
2249925846 Deprecate Message.translate in favor of Message.translation
It shadows the unicode function of the same name, and there's no
way to entirely disambiguate the two based on the parameter passed
in. This change deprecates Message.translate and makes it a wrapper
around the new function, Message.translation.

Note that we never documented calling Message.translate directly.
The documented way to get the translated form of a Message is to call
the _translate.translate function in this project, so chances are
that this public API change will have little actual impact on users.

Change-Id: I0c617937f5af7467d1454f72acd0474ae2ce0293
Closes-Bug: 1841796
2019-08-29 19:10:42 +00:00
Ben Nemec
f8fa059c46 Allow Message.translate to handle unhashable inputs
We made a mistake with the API of the Message class and shadowed the
built-in function 'translate' from the unicode class that it inherits
from. This means that our translate may be called with things like
dicts and lists that are not hashable, which is problematic because
we use that value as a dict key. Unhashable types are not allowed as
dict keys so this fails.

While ideally we would address this shadowing by renaming our version
of translate, it is part of the public API of the library and thus
we can't just change it arbitrarily. As a partial fix, this change
adds a type check on the input parameter, and if it finds a type
other than a string it calls the superclass's implementation of
translate instead. This should handle most common uses of the stdlib
translate, but since technically it is possible to use a string as
input to that as well it doesn't fully address the problem.

Change-Id: Ie68cba6af19d11de8968ee80ac10107f488acb92
Partial-Bug: 1841796
2019-08-28 15:46:03 +00:00
Zuul
91b39bb60d Merge "Move doc related modules to doc/requirements.txt" train-em 3.24.0 2019-08-12 15:09:33 +00:00
Zuul
6d7004ceb1 Merge "Add Python 3 Train unit tests" 2019-07-14 05:08:38 +00:00
Zuul
a432d05235 Merge "Move to releases.openstack.org" 2019-07-08 04:56:47 +00:00
Corey Bryant
4b0518dcba Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I096444f0329f5b239d7c16744d7107b4a5685888
Story: #2005924
Task: #34234
2019-07-05 14:44:40 -04:00
Adam Spiers
a6e330857b Move doc related modules to doc/requirements.txt
Change-Id: Ice407c712b5438b06c4f439c73946640a0c5a86d
2019-07-05 17:40:32 +00:00
Adam Spiers
7934e6f405 Clarify that translation strings are extracted via source inspection
Make it clearer why the function argument to _() etc. has to be a
string, by explicitly mentioning source inspection, as suggested by
Doug:

https://review.opendev.org/#/c/664670/1/doc/source/user/guidelines.rst@164

Change-Id: I87212a709b9e474238f4a4feca5ed806cfb4bd49
2019-06-12 12:14:41 +01:00
Adam Spiers
746be6362b Fix guidelines w.r.t. translation of log messages
Translation of log messages was ceased starting with Pike, but these
guidelines were only partially updated (by Ia34ad79ca9), with a small
warning block buried in the middle of a long page of unchanged
guidelines which it somewhat contradicted.

So update the rest of the page to align with current best practices in
order to avoid confusion.

Also summarise the primary reasons for the change in policy, so that
curious readers don't have to trawl through long email threads to find
out.

Change-Id: Ib86013ff5e7bd07ddc696da2e4c56ce9d07f0cb6
2019-06-12 12:11:50 +01:00
tonybrad
ddee2b28b1 Move to releases.openstack.org
Change-Id: I16fa31a5b898cb389d9d0b333275f1c84dee4da3
2019-06-12 10:00:09 +08:00
Zuul
07f136bcea Merge "Dropping the py35 testing" 2019-05-28 14:58:50 +00:00
Ben Nemec
810d60a557 Cap Bandit below 1.6.0 and update Sphinx requirement
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.

Sphinx 2.0 no longer works on python 2.7, so we need to start capping
it there as well.

Change-Id: Id9a875393e42d9fc54d8c571d368180fec122839
Reference: https://github.com/PyCQA/bandit/pull/489
2019-05-15 15:20:46 +00:00
jacky06
292a952e2b Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I3836f1c839ca36b320b3f42d724f594f2d7b12ee
Closes-Bug: #1826196
2019-04-24 19:12:27 +08:00
OpenDev Sysadmins
5060d93798 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:34:33 +00:00
Ghanshyam Mann
37dfb9dcff Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I94852903895fd070b9a08727e09777fba8d12fc3
2019-04-15 01:04:09 +00:00
1f9cf76c74 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: I5149b6c307caa461d08b5d31812c23fd681259cb
Sem-Ver: feature
2019-03-18 14:44:50 +00:00
Zuul
20bbee510b Merge "Change python3.5 job to python3.7 job on Stein+" stein-em 3.23.1 2019-02-19 19:10:22 +00:00
ZhongShengping
90c8e9fa29 add python 3.7 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.7.

See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html
Story: #2004073
Task: #27440

Change-Id: I9fe0735e253a473995eaccc37d56ad49d75b1815
2019-02-19 13:56:42 +08:00
Charles Short
134059e512 Change python3.5 job to python3.7 job on Stein+
python3.5 was the only supported python3 version on Xenial, now that we have
Bionic Beaver nodes that support python3.7, lets switch to testing with
python3.7 in addition with python3.6 in Stein and beyond.
See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135632.html

Change-Id: Id1450a6396dfcbb9f23fe9ed495a157a076e9f85
Signed-off-by: Charles Short <chucks@redhat.com>
Story: #2004073
Task: #27440
2019-02-14 10:25:44 +00:00
ZhijunWei
362e1ed468 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Ibf57026264450c427916e8fba25f67c9f7aaa84e
Closes-Bug: #1815714
2019-02-13 14:19:10 +08:00
ZhongShengping
f6907522f2 Update mailinglist from dev to discuss
openstack-dev was decomissioned this night in https://review.openstack.org/621258
Update openstack-dev to openstack-discuss

Change-Id: I3aced52dd68bf66590ad10dec478c76a4bc46c92
2018-12-05 09:38:19 +08:00
Thomas Herve
a5fde9a90a Override getttext.find to cache result
This monkey patches gettext to cache the results of gettext.find. This
allows to drastically reduces system calls made over time for checking
the existence of mo files, which don't move.

Change-Id: I1464f131b90123aab67ef45ae2a2685a3ba111ef
3.23.0
2018-11-21 14:45:52 +01:00
Zuul
89a48dfadc Merge "Remove references to log translation functions" 2018-10-29 15:50:47 +00:00
malei
a3b5734147 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: Ie4d4b59ec6cf383875613b2fce6a7db0fdeab1db
2018-10-21 23:01:29 +08:00
ZhongShengping
8ccb5c4a36 Clean up .gitignore references to personal tools
Developers run all sorts of different tools within Git repositories,
any of which can leave their own special trashfiles all over the
place. We can't every hope to catalog them all, so better to
recommend developers simply configure a global core.excludesfile to
filter the irrelevant files which tend to get created by their
personal choice of tools.

To this end, remove the long-standing sections for "Mr Developer"
and "Editors" since their mere existence here sends the signal that
we welcome (and have time to review) additions for any old tool
someone ever might happen to try. Also add a comment block
explaining this, for clarity.

We can, and should of course, continue to list files created by the
tools recommended by our workflow (test frameworks called from tox,
documentation and packaging builds, et cetera).

This change is a port of I1b41efac219fca44e2548fc36633724d0ecfc0cb
from the openstack-dev/oslo-cookiecutter repository.

Change-Id: Ib4f696da3881e9b3d2ebc4fe90f8daec39b0f10d
2018-10-15 11:47:54 +08:00
Zuul
577e97bac0 Merge "Always build universal wheels" 2018-10-08 11:29:51 +00:00
Hervé Beraud
d08ab87987 Always build universal wheels
All of our projects are pure python, so we can build
universal wheels by default.

Change-Id: If413df68ea4e3535f45e538c6dded4a2877edd99
2018-10-05 10:43:45 +02:00
Ben Nemec
a38f70d463 Remove references to log translation functions
No new implementers of this library should be using the log-oriented
marker functions, so we shouldn't be providing examples of them.
This change removes them from the sample integration module and
updates the usage examples to reflect the current best practices.

Change-Id: I0ae89cb3500821465438ee1f5572ab5e3573044c
2018-09-12 22:23:49 +00:00
Andreas Jaeger
0444336f6a Use templates for cover and lower-constraints
Use openstack-tox-cover template, this runs the cover job as
non-voting in the check queue only.

Use openstack-lower-constraints-jobs template

Remove jobs that are part of the templates.

Sort list of templates.

Fix cover invocation in tox.ini.

Change-Id: I3edb3d275a078b3be30c9a6f339fab9321601ec8
2018-09-07 13:52:24 +02:00
Zuul
e7b3ff2001 Merge "add lib-forward-testing-python3 test job" 3.22.1 3.22.0 2018-08-27 11:39:46 +00:00
Chuck Short
eb32de4565 Remove unused code
self.stubs and self.mox were left over from oslotest changes,
so remove them.

Change-Id: I00871c45672fadee9e93722543612b0bd9d76aea
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-08-21 21:22:44 -04:00