Run all jobs by default using python3

This patch implements the community wide goal to run all jobs by
default using python3.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ie235cbffcfc69eee96c4b34358467009ca34ef9f
This commit is contained in:
openstack 2019-02-13 08:27:34 +00:00 committed by shilpa
parent 041af276d7
commit 68b9c42bef
4 changed files with 17 additions and 3 deletions

View File

@ -4,7 +4,8 @@
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python35-jobs-nonvoting
- openstack-python35-jobs
- openstack-python36-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@ -270,7 +270,7 @@ class PatternPropertiesTestCase(APIValidationTestCase):
self.check_validation_error(self.post, body={'0123456789a': 'bar'},
expected_detail=details)
if sys.version[:3] == '3.5':
if sys.version[:3] in ['3.5', '3.6', '3.7']:
detail = "expected string or bytes-like object"
else:
detail = "expected string or buffer"

View File

@ -12,11 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
import textwrap
import ddt
import mock
import pep8
import testtools
from masakari.hacking import checks
from masakari import test
@ -362,6 +364,11 @@ class HackingTestCase(test.NoDBTestCase):
filename="masakari/cmd/serialproxy.py",
expected_errors=errors)
# TODO(neha-alhat): Remove when
# https://bugs.launchpad.net/masakari/+bug/1804062 is resolved.
@testtools.skipIf(
sys.version_info[0:3] >= (3, 6, 7),
'tokenize has backwards incompatible behavior from 3.6.7')
def test_check_doubled_words(self):
errors = [(1, 0, "M325")]

View File

@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = py35,py27,pep8
envlist = pep8,py27,py35,py36
skipsdist = True
[testenv]
@ -33,6 +33,12 @@ commands =
{[testenv]commands}
stestr run {posargs}
[testenv:py36]
basepython = python3.6
commands =
{[testenv]commands}
stestr run {posargs}
[testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file=etc/masakari/masakari-config-generator.conf