We also remove these unnecessary linter dependencies from
test-requirements.txt.
Change-Id: I6c3c5fcc329c46054a144557a79c4b3c6ca383b5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Bandit 1.7.6 now always raises B411 error when xmlrpc is imported.
The error can't be resolved even if we make the suggested change in
code. Let's disable the check for now to unblock gate.
Change-Id: I515af75af2b790eaee52692abebae2fa8387aed1
'setenv' and 'commands' should be at the same level of indentation
otherwise it breaks some build tooling as we are hitting in
RDO.
Change-Id: Ib6ac2e4b62aa26dc9d5c5ff97844f0e7b61386e5
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: I8c993d6ffaf869f67713bbbde8632a0143ed0c72
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
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: I72444ae863915b98182a6badeef94ea9109036ab
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
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: I94aabb5b1ef43e8f0a5850620afce91ae0755e97
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: Iace9acb9bcbc29760de5b5c12b0a92353edde80e
- Use constraints for documentation targets
- Indicate support for Python 3.7
- Remove remnants of the usage of 'build_sphinx'
Change-Id: I176384504dc5491abb7b4d417763df125cc398f1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I78a93c29f2c9033bba1859c79d826578d72257f5
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I671e0108b2cafd14e10184f68d38172519075f22
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Set the default python to python3 except for the py27 environment. We
have to set that explicitly to override the new default.
Change-Id: I19923d160901a96ee175192d23d09ad9800bcc57
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I1a851389a2bb2f445dac922fab2d151ec23b8c6d
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: If154b4806e4f7d45718713663da1c37a0bc315e0
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: Ife9af5f7e68f5f7b25ff1b210e457cd4283146d2
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.
Change-Id: Iac4c303d3d064758c918f38f77f7a45cc51691a6
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove oslo.serialization.
Change-Id: If02798738dd0293ede4e3d6939e6d5cf6b0182ec
The release management team have indicated this is their preferred way
to collect release notes in future.
Closes-Bug: #1634356
Change-Id: Ia8a357ce4a42176b9bc46a715aef7158310c2cf0
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.
Change-Id: I6f67834cc0f6f204aba2457f71e788d1fafd2640
* Remove support for python 2.6
* Remove skipsdist : Needs to be set only if
sdist is expensive
* Remove usedevelop : only needed when skipsdist
is set to True
* Remove install_command : We can just use the
default, we don't need to override
* Remove setenv : We can just use the default as
we don't need any extra environment variables
* Remove requirements.txt from deps, as this is
already added automatically
Change-Id: I741b7cae51555bc5f8d79a018598d1dccbba4459
Currently translatable messages are not used, so there are no uses
of _.
This will ensure if _ is used in the future pep8 won't assume
it is provided as a builtin.
Change-Id: Ia182d834cf3156f16f851ee7524e1713dd47425d