Commit Graph

48 Commits

Author SHA1 Message Date
Takashi Kajinami 300a41c151 Bump hacking
hacking 3.0.x is too old.

Change-Id: Id95477ce65868e49ea4c1ab1e165f9c69596f5da
2024-01-16 22:24:57 +09:00
Hervé Beraud be31cd0a5d Bump bandit
Change-Id: Ia9b9dcbda0c6be800319e80099d6d59461afc51b
2023-05-17 16:45:50 +02:00
Hervé Beraud 80190b395c 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: Id03c1ea4752db3236c36521ca9c67125d5ba2526
Co-authored-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-22 12:32:18 +02:00
Ghanshyam Mann e42c73343f [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- Bump the lower constraints for required deps which added python3.8 support
in their later version.

Story: #2007865
Task: #40207

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.h>

Change-Id: I978482f860a766c474944c77e2c569541f4849b1
2020-09-06 00:53:30 +00:00
Moisés Guimarães de Medeiros 9201de3ca9 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: I44f0b485266d6a03d12953f3f45e476ba821a00c
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-24 17:33:01 +02:00
Zuul a0f44c1755 Merge "requirements: Drop os-testr" 2020-07-10 17:07:01 +00:00
Stephen Finucane a9e699227d requirements: Drop os-testr
Change-Id: I9525eda24465bdedb9ae917350263fa91e9b780a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-07-09 11:37:49 +01:00
zhangboye ec81810654 Fix hacking min version to 3.0.1
Change-Id: I4674616e3adda12f67ed143c23363a7e58f71caa
2020-05-22 10:29:38 +08:00
Sean McGinnis b903d4e1ee
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: I3e1e5ed4e72837d45b78e5ccb9ce8cca416e5c11
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-31 14:31:03 -05:00
Andreas Jaeger 4e6fe7cf7d Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

blacklist:
 W504 line break after binary operator

Fix:
E305 expected 2 blank lines after class or function definition, found 1

Change-Id: I56d62f67914f07e7aef74f857c4b42e3bfd3416e
2020-03-30 11:57:43 +00:00
Ben Nemec 925bb81c7f Cap Bandit below 1.6.0 and update Sphinx requirement
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: If86c82e0f4a519baca664af79352846c4af9a01c
Reference: https://github.com/PyCQA/bandit/pull/489
2019-05-13 20:09:00 +00:00
Ben Nemec 57333e902a Bump psycopg lower-constraint to 2.7
Earlier versions don't work with postgresql 10, which is now showing
up in distros.

Change-Id: I56589eb4ac55bec426d16f355398720f2994edcb
Closes-Bug: 1821400
2019-03-22 19:34:32 +00:00
ZhijunWei 0d75776ae5 Update hacking version
update the hacking to latest, due to [1]

[1]: https://github.com/openstack/oslo.db/blob/master/HACKING.rst

Change-Id: I04147f3cbcb9c89a9a1afc1bcb299be8bdf06718
2019-01-03 00:53:13 +08:00
Vu Cong Tuan 944fe4b6c1 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: Ifd51e726de277d33ff61db47110bf8b5563fcda7
2018-07-13 10:18:54 +07:00
Doug Hellmann d2fcf86fa1 uncap eventlet
We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

Change-Id: Id852a3e6c7f9ac39001618384ced8289c2e6866e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-11 11:52:27 -04:00
Mike Bayer acd1ceb699 Add testresources / testscenarios to requirements.txt
oslo.db is consumed by the test suites of downstream libraries
as a test dependency; they make use of the oslo_db.sqlalchemy.test_fixtures
module which imports testresources and testscenarios, therefore
these are normal requirements of oslo.db; they are not limited
to test requirements.

Change-Id: I240fbc28ddf238614ff37e742a1415a5566bcd2d
Closes-bug: #1756352
2018-03-16 10:35:54 -04:00
OpenStack Proposal Bot 83c1f18099 Updated from global requirements
Change-Id: Ia4e66a804bea3eee74fedc3c5a7f610cb05d9c8c
2018-03-15 07:48:10 +00:00
Monty Taylor 621332cf36
Remove tox_install.sh and align constraints consumption
As part of removing reliance on the old and deprecated zuul-cloner,
we need to shift constraints declaration to the deps line. This
means we unfortunately have to duplicate the extras declarations
into test-requirements - because otherwise the contraints for
oslo.db conflicts with the installation of itself.

Change-Id: I2b79444a58a9144993131f9cba7494b236d9e950
2018-03-08 09:46:24 -06:00
Robert Collins 01359ef167 Refactor deps to use extras and env markers
Adds extras for e.g. nova to use for testing, so that oslo.db can
control the libraries used.

Removes test-requirements.txt - it becomes a single env-marker
controlled list, and shows how tox will access those dependencies.

Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>

Change-Id: I97ef5bad215abe60d92c3fda4474c48ccb13eab0
2015-11-30 17:01:36 +00:00
OpenStack Proposal Bot b2b748a06a Updated from global requirements
Change-Id: If775c65d34d99a93a7e56de9dfb1f017f8b9216f
2015-11-19 16:00:20 +00:00
OpenStack Proposal Bot 4454f6bb6a Updated from global requirements
Change-Id: I7ce9fd2785bad9b3f6870288d2e47ffdae60f970
2015-10-13 11:03:57 +00:00
OpenStack Proposal Bot 7a52dcf17f Updated from global requirements
Change-Id: I18558198038f6e674276166c7c05b4ada690ce29
2015-10-02 17:19:50 +00:00
OpenStack Proposal Bot d87228c311 Updated from global requirements
Change-Id: I667e40446868d3f56e15e229492efb89fda53667
2015-09-18 16:41:34 +00:00
OpenStack Proposal Bot 6f5a49719a Updated from global requirements
Change-Id: I90e470114d974d4539783a8166efcf1d02b9f5d3
2015-09-07 15:17:23 +00:00
OpenStack Proposal Bot 1f3b7958b4 Updated from global requirements
Change-Id: I015ad91a17539c2f8ab58abeee3157d8dcc557ff
2015-08-04 00:48:14 +00:00
OpenStack Proposal Bot 4457606b0a Updated from global requirements
Change-Id: I7b72630c0601f7d5ddbef4813bf938809ef46248
2015-07-29 03:49:54 +00:00
OpenStack Proposal Bot cfe52c7d57 Updated from global requirements
Change-Id: I78c3e37c0f4693523ac373e1c343656136400ea6
2015-07-22 04:58:56 +00:00
OpenStack Proposal Bot 0f4d516020 Updated from global requirements
Change-Id: I2136a5474ef552d6ce40b9106ce0700b00d495f2
2015-07-21 23:16:21 +00:00
Roman Podoliaka a21111d971 Add mock to test-requirements.txt
Mention mock explicitly rather than relying on it to be installed
as a transitive dependency, so that we have control on the mock
versions allowed.

Partial-Bug: #1476665

Change-Id: Id734c3d7b7ef1ab8d97a13edb1de006c029c22a0
2015-07-21 16:23:54 +03:00
Angus Lees 112aa3dd00 Test that concurrent sqlalchemy transactions don't block
Neutron (and presumably other projects) expect to be able to have
overlapping transactions open from two eventlets at once, without
deadlock.

Note that the default mysql sqlalchemy engine (mysqldb) fails this test.

This change modifies py27 tox env to run the full test suite separately
with and without TEST_EVENTLET environment variable set.  When set,
tests are run with eventlet imported and monkey_patched.

Change-Id: Ib35c95defea8ace5b456af28801659f2ba67eb96
Related-Bug: #1350149
2015-07-16 20:20:45 +10:00
OpenStack Proposal Bot 9b79858453 Updated from global requirements
Change-Id: Ie12d4adc0235be241da4ab96de5a3f3e7bee7590
2015-07-15 01:36:31 +00:00
OpenStack Proposal Bot de2f8c037f Updated from global requirements
Change-Id: I13768626ca47dd8b6723a8e42d66665cc038d069
2015-06-30 22:44:35 +00:00
OpenStack Proposal Bot a9f6a2ed76 Updated from global requirements
Change-Id: I408cd890c231afb98e2f34930a7beaa0b93c7df5
2015-06-22 08:27:02 +00:00
Jeremy Stanley 9b552046f5 Switch from MySQL-python to PyMySQL
As discussed in the Liberty Design Summit "Moving apps to Python 3"
cross-project workshop, the way forward in the near future is to
switch to the pure-python PyMySQL library as a default.

Added a special test environment to keep MySQL-python support.
Documentation modified.

https://etherpad.openstack.org/p/liberty-cross-project-python3

Change-Id: I12b32dc097a121bd43991bc38dd4d289b65e86c1
2015-06-18 15:42:23 +03:00
Joshua Harlow 4fa3350945 Start adding a environment for py34/py33
Get a tox environment for py34/py33 that doesn't stop the existing
py26 and py27 to continue working with the adjusted test-requirements since
MySQL-python and sqlalchemy-migrate do not yet exist in 3.x.

Note that this does not fully make py34 work yet but it starts to work
in this direction of getting it to work (which will apparently require
quite a big more tweaking).

Change-Id: I024957a76f2de0bd406d14da5af6e4caf3d493e7
2014-09-25 13:05:09 -07:00
OpenStack Proposal Bot 0928d7319a Updated from global requirements
Change-Id: I7e4d84dc6c45c1220766261363f2fabc5085fe31
2014-09-23 02:00:17 +00:00
OpenStack Proposal Bot c785beefe7 Updated from global requirements
Change-Id: Ia959fbf504268aa13e077cb2637fc14367deb247
2014-09-13 07:27:35 +00:00
Doug Hellmann ab475162c8 warn against sorting requirements
Change-Id: I64ae9191863564e278a35d42ec9cd743a233028e
Addresses-Bug: #1365061
2014-09-03 14:20:03 -04:00
Christian Berendt f2f0960b15 Add doc8 to tox environment docs
Check reStructuredText documents for common style issues.

Change-Id: I10e61742e86d2d4781c5a00532c8e17d38a7d4b4
2014-09-01 11:40:08 +02:00
OpenStack Proposal Bot 7c57798457 Updated from global requirements
Change-Id: I834ba5e6a6d583370099b5c87d28680a67a802c1
2014-08-22 23:35:01 +00:00
Christian Berendt 2df7e88f54 Bump hacking to version 0.9.2
Change-Id: I646d9393beca6e2da430a6e051b587311b5cb61e
2014-07-16 16:28:26 +02:00
OpenStack Proposal Bot 819671afd6 Updated from global requirements
Change-Id: I2b04948fa4560ee5735be99421982e999ab1bb14
2014-06-18 00:46:59 +00:00
Jenkins 0c85dc524a Merge "Bump hacking to 0.9.x series" 2014-06-14 22:53:14 +00:00
Roman Podoliaka af32ad219d Add psycopg2 to test-requirements.txt
We have a few opportunistic test cases which are skipped in the gate
now because psycopg2 is missing.

Change-Id: Ia5e96ed4a6af7a311d8dc89b00a1fb4cc02f56ac
2014-06-13 18:08:19 +03:00
Davanum Srinivas 455b47168f Bump hacking to 0.9.x series
In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future patches.

Change-Id: I632655eb975a9f6c2b922c065c029e9870bc2b70
2014-06-12 07:48:09 -04:00
OpenStack Proposal Bot fb889453b7 Updated from global requirements
Change-Id: I4716bc17dd898ecf25f730641fc6901ade0da7eb
2014-05-29 13:46:40 +00:00
Victor Sergeyev 276f7570d7 Make the tests passing
- add missed requirements
- add required modules from openstack.common
- added entry points to setup.cfg
- fixed tests location
- fixed incorrect common modules imports
2014-04-18 12:51:26 +03:00
Victor Sergeyev e4cfa6d39d Fix the graduate.sh script result 2014-04-18 11:33:16 +03:00