4 Commits

Author SHA1 Message Date
Moisés Guimarães de Medeiros
90e0c5b045 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: I005962a63341bb8585141dfe5dcff3ea79560b87
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-25 13:43:49 +02:00
Sean McGinnis
4d2310b2a9
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: I26f2df6d4657133a5c7e6ed85298aa843c1bdd73
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-31 15:56:19 -05:00
ChangBo Guo(gcb)
50618882d5 Replace safe_utils.getcallargs with inspect.getcallargs
safe_utils.getcallargs was written to support python2.6 which did not
have inspect.getcallargs.  Now that support for python2.6 has been
dropped it should be replaced with inspect.getcallargs.

Note:The interface that safe_utils.getcallargs provides did not match
inspect.getcallargs around the handling of the self parameter needing to
be passed in. It should be brought inline with inspect.getcallargs so
that it can be dropped. Nova fixed in 2910d75b28afd909af3b4ac392729ac3d5e64b65.

Change-Id: I2fbec0cc4d43b2fc424460b176bf26700f05f44a
2016-04-19 19:38:58 +08:00
Victor Stinner
0c3199f93d Fix error handling in the exception module on py3
* Replace dict.iteritems() with dict.items() in code handling errors in
  the exception module to fix Python 3 support.
* Add new unit tests on the exception module

Change-Id: Ib958421dbdd73fb442e17a8d0654c9eab8b7b70e
2015-07-29 15:24:04 +02:00