Commit Graph

9 Commits

Author SHA1 Message Date
Hervé Beraud dc07afb686 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update this at
each new cycle.

Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: I9791e5696bab3af4a6109e756ce791d23b9d28b1
2021-01-21 15:42:04 +01:00
Hervé Beraud 4ea5fb3285 Use Python 3.8 as the default runtime for tox
Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

Moving on the most recent officially supported runtime as the default runtime
for tox.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: I913d3dd7af3e82bdea63b96609739772ece81326
2020-11-03 14:32:48 +01:00
Hervé Beraud 89cb11c85c 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: I042162e9f303d2409491f71d3011db175930116d
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-15 15:19:35 +02:00
Moisés Guimarães de Medeiros 2c36df6bf3 fix python version in tox file: py35 -> py37
Change-Id: I74cdd7462cd5134b22d0c6b13aafd0e88ef60e1c
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-02-14 16:06:54 +01:00
Andreas Jaeger dbf8dd6bcf [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

Switch to modern sphinx-build and using openstackdocstheme
(note that repo is not building and publishing docs, docs building works
locally with these changes).

Change-Id: I9542c1dba3f339c2acece83d7d2b5726c1c3e2bc
2020-02-03 17:12:24 +01:00
huang.zhiping 3f2247327a fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ia908e642ad1a3f67710d48a71d097c13b7743a5a
2018-06-09 10:41:40 +08:00
Chris Dent b5359fcd80 Add MicroversionMiddleware
This change imports (with slight modification) the
MicroversionMiddleware created for the placement service.

For the time being the middleware relies on WebOb as that is
what it originally relied on. If there are requirements to do
otherwise, later, we can make adjustments then.

The README is updated with limited usage instructions.

Gabbi tests are added, requiring adjustments to the test configuration,
so the opportunity was taken to switch to using stestr instead of testr.

Though arguably "functional" tests because they are not strictly unit
tests, no distinction is made in the tests directory, for now, as it
is all nice and fast and we'd like to keep it that way.

Change-Id: I9d27b6fad35f7aea0085f08c0353f8e8acdb8b73
2018-03-20 17:24:56 +00:00
Chris Dent 33e0066354 Enable gerrit, gitreview and gate testing
Initial setup for git review.

Add basic docs handling so that docs tests will pass. No
actual docs in place yet.

Align with global requirements.

Change-Id: I8ae7c2c6ce410c04f4ce53ce5278b2b85c141c93
2016-03-31 12:31:20 +01:00
Chris Dent 49b44934b9 Initial proof of concept of microversion_parse
See README.rst for details.

The basic gist is that a get_version method is provided. It takes a
dict or list of headers and returned a version for a service_type if
it can find it.
2016-03-22 17:48:42 +00:00