315 Commits

Author SHA1 Message Date
Zuul
e56daeda1a Merge "Use TOX_CONSTRAINTS_FILE" 2021-01-14 13:07:03 +00:00
Zuul
ab49a5dfe6 Merge "Fix hacking min version to 3.0.1" 2021-01-13 09:16:07 +00:00
Zuul
82033c4c44 Merge "Use py3 as the default runtime for tox" 2021-01-13 08:31:29 +00:00
Zuul
8795f7bb2b Merge "Replace concatenation with f-strings" 2021-01-13 04:35:09 +00:00
Hervé Beraud
00f80b4560 Dropping lower constraints testing
We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].

I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html

Change-Id: Ice8c48ed23626538c9a9311a4392d18a3a795b07
2020-12-18 15:11:40 +01:00
wangzihao
a96ee02b24 Replace concatenation with f-strings
Use f-strings instead concatenation to make it more readable and faster.

Change-Id: I208bd44c063756be85c836e1b30290e6c09f2101
2020-12-11 15:45:20 +00:00
Hervé Beraud
57cc918a06 Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://review.opendev.org/#/c/722814/
[2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: Ia5b237aa59f1c07165698b0d5edb73287d990305
2020-11-04 10:50:14 +01:00
Hervé Beraud
f67c3bad2f Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update this at
each new cycle.

Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Ie0678a020707e1d906f487c709d64447d1eee905
2020-11-04 10:04:05 +01:00
zhoulinhui
6b2ad67208 Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: Ia71dc29dedb6786c4df4546bb4e7df6956966ec0
2020-10-16 01:21:28 +00:00
wangzihao
a2122e7432 Remove all six usage
Remove six Replace the following items with Python 3 style code.

- six.string_types
- six.text_type
- six.itervalues
- six.StringIO

Change-Id: I32401859129843242922f1d0510b21e32bb7d8cc
2020-10-14 10:24:52 +08:00
Hervé Beraud
f8cd4689e9 Adding pre-commit
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: I5190044fed75d4c68e9d2686d9ab67b2afa0f9e0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-22 10:42:28 +02:00
ed06708849 Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

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

Change-Id: I5edd6bad0bead467e4da5e1048de22b097b9686f
2020-09-11 21:00:13 +00:00
003c1ceaf7 Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

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

Change-Id: I57e2b410dc232c1c5983288f77bfa32f6ec2d868
Sem-Ver: feature
2020-09-11 21:00:11 +00:00
Zuul
bc631aedef Merge "Bump bandit version" victoria-em 2.2.0 2020-08-06 16:36:25 +00:00
Ghanshyam Mann
e45d4e97e5 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

Story: #2007865
Task: #40207

Closes-Bug: #1886298

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.h>

Change-Id: I98cf0e5cee8f1996943b6274e914fcbca667fef7
2020-08-04 03:45:57 +00:00
Moisés Guimarães de Medeiros
8de1a71062 Bump bandit version
This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to
avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393

Change-Id: I4ccbdbb692e2e0b00a2517e2c5eb617756637ab0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-24 17:35:46 +02:00
Zuul
3ba127e64f Merge "Align contributing doc with oslo's policy" 2020-06-30 16:11:13 +00:00
melissaml
4b2a6ea596 Fix pygments style
New theme of docs respects pygments_style.

more info: http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I9810d0f07b1cebfa6c15e024f1483733c2ab6c72
2020-06-04 15:41:00 +08:00
Zuul
a79a13b9a4 Merge "Add release notes links to doc index" 2.1.0 2020-06-03 10:19:33 +00:00
Hervé Beraud
1976cc33f1 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Ia06ab693446bbdb3ed76bcca6bf4cc6d97d7f764
2020-06-02 20:40:02 +02:00
Zuul
138925c041 Merge "Remove the unused coding style modules" 2020-05-26 13:52:09 +00:00
Zuul
f57c3f7163 Merge "Remove translation sections from setup.cfg" 2020-05-22 22:28:05 +00:00
Andreas Jaeger
8e914079c6 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.0 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

Update Sphinx version as well.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

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

Set openstackdocs_auto_name to use project as name.

Depends-On: https://review.opendev.org/728938
Change-Id: I11c609d70b7a020547b1897cce60a7a2365e7dd8
2020-05-18 20:57:21 +02:00
jacky06
f15936b84e Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).

more info: https://github.com/openstack/requirements/blob/master/blacklist.txt

Change-Id: Icce6c4bca1d3a68326733b556708a501e24dad40
2020-05-15 17:19:46 +00:00
melissaml
119b241f16 Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Change-Id: Ibfe10044fb9a545665d48f91691e00d62450c84f
2020-05-15 11:16:23 +08:00
Hervé Beraud
7dcae118a8 Align contributing doc with oslo's policy
Related to:
- https://review.opendev.org/#/c/723044/
- https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html

Change-Id: I9fd7b10805b00a0615f0ad1b5a682bed2eac4359
2020-05-04 18:28:54 +02:00
Zuul
30996b9c92 Merge "Add py38 package metadata" 2020-04-27 10:05:51 +00:00
Sean McGinnis
3a818cd152
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: I49122f9d82688c557424a1c62d4fc207872f6436
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:50 -05:00
Sean McGinnis
fff0402e65
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: If66a647d97ed8ee94a237d1a837f00cd7a97cdd4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:13 -05:00
Hervé Beraud
6f63275405 Add release notes links to doc index
Change-Id: I4117d223a5d148216474d382115f97a855c70071
2020-04-16 17:35:13 +02:00
b8188bc197 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: I9f2dece1591e624d67992f1c80324706d404d90e
2020-04-14 10:16:44 +00:00
b6c74f9f51 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: I5fd53717da63c0e37e31b7310c3db04b4e4b4463
Sem-Ver: feature
2020-04-14 10:16:42 +00:00
Zuul
314c4e7915 Merge "Use unittest.mock instead of third party mock" ussuri-em 2.0.1 2020-04-06 15:06:02 +00:00
Andreas Jaeger
4838541e98 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: I76369aad2778418182eab7c3eaf331b8d6b8fb1d
2020-04-02 14:59:15 +02:00
Sean McGinnis
cc7f78cfa6
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: I0ec3d1c0f53bf859ea1ec115ebb47f1d5f3b217c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-31 14:43:17 -05:00
Hervé Beraud
d5b08d7568 remove outdated header
Change-Id: I4c67b11212a7ab662bdc36011eebfe88a09f24c5
2.0.0
2020-02-11 18:50:21 +01:00
Hervé Beraud
57cfce71db [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: I700fe8837312c5c9d88dcdd073389f81a1d874bd
Sem-Ver: api-break
2020-02-06 10:25:49 +01:00
Zuul
8769b65571 Merge "tox: Trivial cleanup" 2020-01-28 15:20:42 +00:00
caoyuan
edcb44e957 tox: Trivial cleanup
move 'basepython' to the top-level 'testenv'

Change-Id: I5bf3334da567eb480d573ccc1cfe62ae13bdc2a2
2019-12-23 13:52:08 +00:00
Stephen Finucane
b33d26efab trivial: Remove cruft from sphinx config file
Change-Id: I707dd369d5a26e463cf3661b82b7563eb575ce5c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2019-12-17 16:30:15 +00:00
Stephen Finucane
d18eb6c44a tox: Add missing deps for 'releasenotes' job
This was missed in change Ice407c712b5438b06c4f439c73946640a0c5a86c.

Change-Id: I9bf7f11dc2779d94c63e5d311072a6fecfb4093d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2019-12-17 16:29:28 +00:00
Stephen Finucane
1209fb97c7 Switch from 'collections' -> 'collections.abc'
Resolve the following deprecation warnings on Python 3.x:

    DeprecationWarning: Using or importing the ABCs from 'collections'
    instead of from 'collections.abc' is deprecated since Python 3.3,and
    in 3.9 it will stop working"

Note that even though we're in Ussuri, I've kept this Python 2
compatible since we haven't done all the other work to mark this
package as Python 3-only.

Change-Id: Iff4cf1871a6a91d91da03d9b79ef61e715a979cf
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1.31.1
2019-12-05 14:55:52 +00:00
Zuul
9da166ae7f Merge "Exclude tests from apidoc" 2019-12-02 18:23:26 +00:00
Zuul
5349f78d1b Merge "Switch to Ussuri jobs" 2019-12-02 14:49:49 +00:00
Chris Lamb
ca98f3fde8 Exclude tests from apidoc
it is not only useless to an end user but it also
includes random/non-deterministic contents.
This change makes the build reproducible.

See https://reproducible-builds.org/ for why this is good.

Change-Id: Ie40178da80161839379aa9762cd7a5361b44953b
2019-11-07 10:40:04 +01:00
caoyuan
8a37087388 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: Ied545a35429a87dc32b746ed54595311d903fea2
2019-10-24 14:52:46 +08:00
pengyuesheng
4948c64378 Switch to Ussuri jobs
Change-Id: I85c0073f46f56b1b17a32a38b9f15592f2e7f821
2019-10-24 14:33:45 +08:00
Zuul
d01665d7d8 Merge "Update master for stable/train" 2019-10-10 12:42:01 +00:00
pengyuesheng
0c8facb24b Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I3b54f4034c1fa24c016d381d6a48f2d85a0c290d
2019-09-26 14:05:39 +08:00
39ed8ffc50 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: I886cc59de42a5be385ba3a4aebc65c8fbfc021da
Sem-Ver: feature
1.31.0
2019-09-20 16:36:39 +00:00