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.
Also removing the hacking and other related dep from lower-constraints file
as theose are blacklisted requirements and does not need to be present
there.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: Icad3221eddcc5f4e3b17f7d11266d938d1ea6201
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: Ib83e626f51e6e01898bb7931c1660a1a548500f3
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.
Change-Id: I5da442bb2f1e634e6b3fe37a6ea3820cea1db96f
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: I9bfb80f2556ca7c801dde69d1685751169e25307
pycrypto is unmaintained for a while and requirements team advises using
pycryptodome or cryptography libraries instead (see openstack-dev thread
[0]).
troveclient uses pycrypto to generate random data/content in its tests
which does not require any specific cryptographic need. This commit
replaces it by os.urandom from Python standard library.
[0] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113568.html
Change-Id: Ia43c5883a51e8412c4a238d127c13db39e863da1
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: I65da7e4a99aa42f0025c1e767d0bad39412fdb33
This adds support in the python API and Trove CLI
for instance module commands. These commands include:
- module-apply
- module-remove
- module-query
- module-retrieve
- module-list-instance
The parsing of --instance was modified to allow multiple
modules to be specified. This was extended to 'nics' as well.
Partially Implements: blueprint module-management
Change-Id: If62f5e51d4628cc6a8b10303d5c3893b3bd5057e
Once we add debug testenv, we can use "tox -e debug" to debug test cases
when tox is running. Then tox will use oslotest which really debug our
test cases.
Only we should do is insert pdb into code.It's easy to use.
The same in trove:
https://review.openstack.org/#/c/265524/
usage link:
http://docs.openstack.org/developer/oslotest/features.html
Change-Id: I93709451af9a14fc9c71e1c3306a1a025aee8b44
Following files were too low on code coverage,
so the coverage has been enhanced with addition of more unit-tests.
- troveclient/client.py
- troveclient/v1/shell.py
The methodology to test shell.py has been motivated from the
one used by python-novaclient to test novaclient/v2/shell.py
Also, found an unmocked entry in test_secgroups.py,
which was causing intermittent failure while
writing the tests for shell.py.
Closes-Bug: #1455856
Change-Id: I6a148fb5caad6a83b6ac23411b6458f231064ead
Updated the hacking version as per global-requirements.
Fixed some of new appearing hacking rules, as listed follows:
- E128 continuation line under-indented for visual indent
- E265 block comment should start with '# '
- E713 test for membership should be 'not in'
- H238 old style class declaration, use new style (inherit from `object`)
Rules which are not yet fixed have been incorporated to ignorelist
- H405 Multi line docstrings should start with a one line summary
followed by an empty line
- H501 Do not use locals() or self.__dict__ for formatting strings
Change-Id: I885c6fa8ad0e6a98f7a8479f3441ed08ed2cbaa6