Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Bengtsson 08a5a58e8c Fix requirements issues
This patch is the merge of 2 current fixes that need to be solved in the
same time. Indeed each issue lock our gates independently.

Dropping lower constraints testing

We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].

I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html

Move flake8 as a pre-commit local target.

The goal here is to avoid conflicts between flake8 and hacking version each
2 days.

Inspired from nova's approach[1].

The flake8 version to install will be determined by hacking and
requirements[2] will stay aligned instead of relying on different versions.

[1] https://opendev.org/openstack/nova/src/branch/master/.pre-commit-config.yaml#L26-L35
[2] https://opendev.org/openstack/hacking/src/branch/master/requirements.txt#L1

Co-authored-by: Hervé Beraud <hberaud@redhat.com>
Change-Id: Ic2242c5fc9d3bd03b87d9728449c3eb6e1ce8043
2021-03-30 11:47:05 +02:00
haixin 8609dc2c4c Remove all usage of six library
Replace six with Python 3 style code.

Change-Id: I3d2b0f7a78d4914913a3af3b68388392bf30b982
2020-11-26 14:41:12 +08:00
Zuul 7e00c5939a Merge "Remove the unused coding style modules" 2020-05-26 13:52:07 +00:00
Andreas Jaeger 8c60d4261e Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

openstackdocstheme renames some variables, so follow the renames. A
couple of variables are also not needed anymore, remove them.

Set openstackdocs_auto_name to use project as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I129fcb2f17f7938b72fa788afa99004cc0be1d84
2020-05-21 13:43:40 +00:00
jacky06 9db7c9a548 Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).

more info: https://github.com/openstack/requirements/blob/master/blacklist.txt

Change-Id: Ib95193465723442b4b3b889e260a8f3846693a50
2020-05-15 17:19:35 +00:00
Stephen Finucane 4e907ed2f3 Drop use of babel
We were simply using this to get a list of language codes. Turns out
Python provides a way to do this already via the 'locale' module, which
provides all of the locales we care about [1]. Use this.

[1] https://github.com/python/cpython/blob/3.5/Lib/locale.py

Change-Id: Id6dce33fdbe3fc537dfe28d5cc604985b3347405
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-04-16 17:31:19 +01:00
Sean McGinnis 34aaaf2eb5
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: I597461bc2ce6a480ea18950ded606ef7db717f2d
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-31 15:55:50 -05:00
caoyuan 0d76d2cb30 tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: If8c19a7d5d2a6ca089efb6c19d81a277aba7f06d
2019-10-24 14:56:26 +08:00
Vu Cong Tuan e690af4a3c 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: I43565d0f5b89f0b6d438f88dab941688ee3aef5c
2018-07-03 16:10:13 +07:00
Doug Hellmann 85693aaea9 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Ifb7c7bbefa178fdec474650432a2f73cd2dec2d1
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-24 17:33:07 -04:00