Commit Graph

63 Commits

Author SHA1 Message Date
Stephen Finucane 7f90f0cabd pre-commit: Integrate bandit
We also remove these unnecessary linter dependencies from
test-requirements.txt.

Change-Id: I6c3c5fcc329c46054a144557a79c4b3c6ca383b5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2024-01-03 12:12:19 +00:00
Hervé Beraud f8b733cd1c Bump bandit
Change-Id: I4e3076be6c50c4ec4c4bd950e25c64afc62511ae
2023-05-19 15:52:15 +02:00
Zuul 54e079c80c Merge "Fix hacking min version to 3.0.1" 2021-01-19 15:33:02 +00:00
zhoulinhui a2b52b1309 Fix hacking min version to 3.0.1
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.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: Idc5d70e753953aeb006caeb3ba8f78f5ceeafdf3
2020-09-18 00:26:46 +08:00
Hervé Beraud b828910188 Adding pre-commit
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>
2020-09-08 12:33:14 +02:00
Moisés Guimarães de Medeiros c7884b2e96 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: Ibde98a5e7e021e250b2a35008b677afa658ed47e
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-24 17:36:23 +02:00
Andreas Jaeger 5ee9b7bf54 Update hacking for Python3
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
2020-04-02 15:06:39 +02:00
Sean McGinnis d3159d4b60
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: I5b6f25b1154b9d655843615ca8402fe4f73e923f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-13 11:46:12 -05:00
Hervé Beraud 9e4adf56b2 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in Ussuri cycle.

Complete discussion & schedule can be found in
-
http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Icc43428c885853007a6ee9fc4acaf079f6349619
2020-02-03 18:34:40 +01:00
ZhijunWei c9b464c099 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I95d62bbce7fe20dd2f9ec8a96cdffeeefcda75be
2019-02-17 10:28:24 +08:00
Vu Cong Tuan dc592c68e3 Switch to stestr
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
2018-07-04 08:23:05 +07:00
OpenStack Proposal Bot 0ddc7f9a2e Updated from global requirements
Change-Id: Iec75a238ce30b97511cc237d4dd066cb04223dda
2018-03-15 07:50:57 +00:00
ZhongShengping 1b1abbedc3 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:

https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I84da413225e9410be890abf32a22e4409100d7fa
2018-03-02 10:29:49 +08:00
OpenStack Proposal Bot 53eaf91201 Updated from global requirements
Change-Id: I4849c7e0d40606da8bb9f2eff9a13078ff1f3cd4
2018-01-24 01:26:18 +00:00
OpenStack Proposal Bot c223d7c3b7 Updated from global requirements
Change-Id: I9c14d9cfa795ab4635dae924bd60d772f19f495d
2018-01-18 03:24:41 +00:00
OpenStack Proposal Bot 236901474f Updated from global requirements
Change-Id: I6b8c8a737a3568e37e2938ee67a89749e50f6d43
2018-01-16 04:27:46 +00:00
ChangBo Guo(gcb) 019c7d5744 Add bandit to pep8 job
Add the bandit security scanner to the pep8 job.

Change-Id: I1bd306757a04e6c81b2717c656f71a9e6c9d0d32
2017-12-07 13:55:56 +08:00
OpenStack Proposal Bot 780a027dfd Updated from global requirements
Change-Id: I9791828cfb382bbbb1207eb66c0d26314ba11f71
2017-09-20 16:23:19 +00:00
OpenStack Proposal Bot 8989ad3052 Updated from global requirements
Change-Id: I225d6ddc9d3f173e4f54a85ba0f6f3523e4b6656
2017-09-11 21:47:24 +00:00
OpenStack Proposal Bot 00b1a0b13a Updated from global requirements
Change-Id: I08257fe653f06aeb92650e81fc52f969411eefd9
2017-08-18 11:40:22 +00:00
OpenStack Proposal Bot 5993f015cf Updated from global requirements
Change-Id: Ife4b1e9ad9a345a2f585a603eebf3825daf4b1ca
2017-07-27 19:19:55 +00:00
Akihiro Motoki ed34d20c38 switch from oslosphinx to openstackdocstheme
Fixes formatting things related to openstackdocstheme adoption

Change-Id: I05a794b806c36b5237fc9a1b6eabaaff802aba0e
2017-07-06 21:53:27 +00:00
OpenStack Proposal Bot 0515601245 Updated from global requirements
Change-Id: I055862eb7a8a3618bf8988b7e87b66dc4f7e8fb3
2017-06-27 12:20:30 +00:00
OpenStack Proposal Bot 98642b2d69 Updated from global requirements
Change-Id: Ic382884e9e510f2edb6aec69cf8140ee6774bfc5
2017-06-02 22:05:37 +00:00
OpenStack Proposal Bot e7c6f94d41 Updated from global requirements
Change-Id: I5301b0c77e1148380be543aa68cdbfc8febee4b0
2017-05-23 11:58:14 +00:00
OpenStack Proposal Bot e74deca80a Updated from global requirements
Change-Id: Ifeba24d5f3cfd1641b5aeddb3cfb9628c81b1df5
2017-05-17 03:56:52 +00:00
OpenStack Proposal Bot 279da59d17 Updated from global requirements
Change-Id: Ib76611efc7723a4cffe56188958739d63de6145e
2017-03-03 00:03:20 +00:00
ricolin 8bbe534725 [Fix gate]Update test requirement
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: I11e9cbdc72537b150fdc6921c2b363ab0bd217df
2017-03-02 18:24:24 +08:00
OpenStack Proposal Bot e321e96eab Updated from global requirements
Change-Id: I1ed677901c9ca87969bf4d20db53175a45d7ae1b
2017-02-10 05:57:57 +00:00
ChangBo Guo(gcb) ba8abbada8 Add reno for release notes management
The release management team have indicated this is their preferred way
to collect release notes in future.

Closes-Bug: #1634356

Change-Id: Ia8a357ce4a42176b9bc46a715aef7158310c2cf0
2016-11-03 20:44:36 +08:00
OpenStack Proposal Bot 0e17d0b5f2 Updated from global requirements
Change-Id: Idec21f411f8cfc5df4351839b842e709558e6123
2016-10-22 01:26:14 +00:00
OpenStack Proposal Bot e409634751 Updated from global requirements
Change-Id: Ie6f11162ad19399cffc525080dce51b72d41d784
2016-09-28 16:59:49 +00:00
OpenStack Proposal Bot 5ee90fcb0e Updated from global requirements
Change-Id: I6ffc7b5b8ba947ce08c5e2484a4536b7719d9581
2016-06-30 18:48:37 +00:00
OpenStack Proposal Bot 23866b6d6c Updated from global requirements
Change-Id: I177163b1f2739abb83b88c561da8c92701c860cc
2016-06-09 16:13:02 +00:00
Jim Baker 8943c73662 Support serializing ipaddress objs with jsonutils
Fixes jsonutils.to_primitive so that it can serialize ipaddress
objects, as used by Python 3 or through the backport in
global-requirements.txt. Current support for netaddr is maintained.

Change-Id: I6aa1ecd5be754f61cdda4e47bc0e0180e232b366
Closes-bug: 1590076
2016-06-07 14:05:50 -06:00
OpenStack Proposal Bot bfb15368d1 Updated from global requirements
Change-Id: I6ed13473585c1968f491fc113866d193676a2aef
2016-05-26 17:04:07 +00:00
OpenStack Proposal Bot abaf968af8 Updated from global requirements
Change-Id: I5941bb05b84fb8d1a6e60eaf3be9c3bb257389dd
2016-01-23 10:35:00 +00:00
OpenStack Proposal Bot ef8da69263 Updated from global requirements
Change-Id: Idea92d3bfab4192bf3080cd6c32e392a91bc79ee
2016-01-16 03:31:27 +00:00
Ian Cordasco 29a7702a99 Remove fallback to simplejson in jsonutils
OpenStack has ended support for Python 2.6 in all services and
libraries. We no longer need to support a fallback to simplejson on
Python 2.6 so we can remove this fallback logic.

Closes-bug: 1533337
Change-Id: I613541a37229ff2f3ce269cfa7496223d1ff37d0
2016-01-12 13:53:47 -06:00
OpenStack Proposal Bot e7ef8fedb4 Updated from global requirements
Change-Id: If781fed45a559c71cf66d293b52db4b0fdfdb97b
2015-11-19 15:51:50 +00:00
OpenStack Proposal Bot 03f34312d4 Updated from global requirements
Change-Id: I4cd940008dec67204099bf4aedbd02ed2835d7c6
2015-08-31 15:35:36 +00:00
OpenStack Proposal Bot 8b6d5bd46a Updated from global requirements
Change-Id: I0af69334b485e4a6febb70ff794d0fe4e79d1795
2015-08-04 00:48:27 +00:00
OpenStack Proposal Bot 0e982c709d Updated from global requirements
Change-Id: I3ab8f562d748da0717e471593b559c2fd48bd8cf
2015-07-29 03:50:07 +00:00
OpenStack Proposal Bot f8d680b0b1 Updated from global requirements
Change-Id: Ib020ba18688f2f1e6e1d0e630c8c6f8f1d1809f0
2015-07-22 04:59:08 +00:00
OpenStack Proposal Bot 4a32d770c0 Updated from global requirements
Change-Id: I6976ed59f2763c9b6ffa6afea7066fa36f2c85db
2015-07-17 16:17:05 +00:00
OpenStack Proposal Bot 6e067fa55e Updated from global requirements
Change-Id: I4e0a987f24a8827c373106dd9e78e55e4cb33864
2015-07-15 01:36:45 +00:00
OpenStack Proposal Bot e922d0f160 Updated from global requirements
Change-Id: I98bf9e86cd422c6671abae7c2b6a23369da66e30
2015-07-12 15:21:40 +00:00
OpenStack Proposal Bot dd9e1c0ca4 Updated from global requirements
Change-Id: I5f4fbf5d2af97069483a74348e90eb20eb149697
2015-06-22 08:27:16 +00:00
Doug Hellmann b2c235e914 Uncap library requirements for liberty
Change-Id: Icda4d8f757b8f466747e67c9e5024b7514d4ec09
Depends-On: Ib948b756b8e6ca47a4c9c44c48031e54b7386a06
2015-04-16 18:08:08 +00:00
OpenStack Proposal Bot ef8657f2a6 Updated from global requirements
Change-Id: I96a4579e6c1e48aa54c54479f343384bf4f568e7
2015-03-21 00:17:09 +00:00