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: Ic88cf026a74e9da4acaf9e00c50fddd2c8a48fbe
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
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: I23fd4082e2566242b5fce093a4685c97663c947f
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.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: I9a2a7c6cd9a0dfd02c6193ceca5653431eed3753
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: Icac647c8e89cd94cae69e357b009d676b1c744f7
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
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: I24a66b454a28d00f96867fa1b24dd408591b41be
Reference: https://github.com/PyCQA/bandit/pull/489
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: I06d7b72fcaa4ce1f8764fd51635ae8239ea649b2
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: I3fd302a36c11a9087a143ede4ef64a64e4eb15ba
Supports starting privileged process via fork or sudo, and a thread-safe
client and server communication mechanism.
Coming in later changes:
- Extend json encoding to deal with non-unicode and more varied dict
keys (see test_comm.py).
- eventlet test case.
- Linux capabilities.
Change-Id: If6456631c51d4f2a1c95805ab9d6962b04f172bc
Implements: blueprint privsep
This is the unmodified output of
cookiecutter https://git.openstack.org/openstack-dev/oslo-cookiecutter
Change-Id: I8fbc11c50bbd171b9f99bd9b5ba39eef1f686860
Implements: blueprint privsep
Depends-On: Iee84120f4da14ee3d441933a0e03a67c22fce8d1
Depends-On: Ia4d56747d56dcfe50889ebbdf9d553df13e1b950