We also remove these unnecessary linter dependencies from
test-requirements.txt.
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Ie797e48fb9d04649fa70e3d5c2f4161d123ed8f5
There is a bug in eventlet where logging within a native thread can lead
to a deadlock situation: https://github.com/eventlet/eventlet/issues/432
When encountered with this issue some projects in OpenStack using
oslo.log, eg. Cinder, resolve them by removing any logging withing
native threads.
There is actually a better approach. The Swift team came up with a
solution a long time ago [1], and in this patch that fix is included as
part of the setup method, but will only be run if the eventlet library
has already been loaded.
This patch adds the eventlet library as a testing dependency for the
PipeMutext unit tests.
[1]: 69c715c505
Closes-Bug: #1983863
Change-Id: Iac1b0891ae584ce4b95964e6cdc0ff2483a4e57d
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: I6663d5e0866e03f8eb8c0543d3e3e0bbfb2399ac
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: Idca2a092bdfe762d23632e44e55be9290d692de8
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
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: I5587ac8f603798aad27908d3bd6ed8ebb3a9c14e
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
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: I67c50430ced6efcc2f29ec7d8adc871415922d6f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Bandit 1.6.0 accidentally changed how to exclusion list option is
handled and breaks our use of it. Cap to the previous version until
bandit has has fixed the problem.
Sphinx 2.0 no longer works on python 2.7, so need to start capping it
there as well.
Limit monotonic to python < 3.3 and reflect the changes to
openstack/requirements introduced
in change Ib8c1bf08f5fa7463911602b0df19315907c81e04.
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
Change-Id: I4c2a19fae55e8cfea2d5ae9603a1fb086b5db1bf
This should both keep mtreinish happy and get rid of annoying 'db type
could not be determined' messages in one fell swoop.
Change-Id: I0db004a8c8d75359e7d08c73b82f98c62a7e5f7d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Resolve the following warning:
Package 'systemd-python' is used in systemd but not in
lower-constraints.txt
Also fix the lower bounds to match the lower-constraints.txt list.
Change-Id: I84bf8ec53cd80f19598d1139d21d18b4f0cadddc
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
python-subunit is not used directly anywhere
and it is dependency of both testrepository
and os-testr
(probably was used by some tox wrapper script before)
Change-Id: Iab08c9aacce00ad7f3325016c548f88247efc15b
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: Id518983a40aba2ea7a11bfea0ac403073e6069bf