Moved to python3.
Change-Id: Ifeed2269440f2922e8631a4ac20af4ac5c0c2913
This commit is contained in:
parent
60acb5cfbb
commit
74974117d8
|
@ -10,7 +10,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import cPickle
|
||||
try:
|
||||
import cPickle
|
||||
except Exception:
|
||||
# allow iotronic api to run also with python3
|
||||
import pickle as cPickle
|
||||
import json
|
||||
import logging
|
||||
|
||||
|
|
|
@ -10,7 +10,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import cPickle
|
||||
try:
|
||||
import cPickle
|
||||
except Exception:
|
||||
# allow iotronic api to run also with python3
|
||||
import pickle as cPickle
|
||||
import logging
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
|
|
48
tox.ini
48
tox.ini
|
@ -1,39 +1,39 @@
|
|||
[tox]
|
||||
envlist = py27,py27dj18,pep8
|
||||
minversion = 2.3.1
|
||||
envlist = py3,pep8
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
LANGUAGE=en_US
|
||||
LC_ALL=en_US.utf-8
|
||||
whitelist_externals = bash
|
||||
find
|
||||
rm
|
||||
usedevelop = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
BRANCH_NAME=master
|
||||
CLIENT_NAME=iotronic-ui
|
||||
install_command = pip install {opts} {packages}
|
||||
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = {}
|
||||
whitelist_externals = flake8
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python2.7
|
||||
# commands = flake8 {posargs}
|
||||
commands =
|
||||
commands = flake8 {posargs}
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
[testenv:py3]
|
||||
basepython = python3
|
||||
|
||||
[testenv:py27]
|
||||
basepython = python2.7
|
||||
commands =
|
||||
|
||||
[testenv:py27dj18]
|
||||
basepython = python2.7
|
||||
commands =
|
||||
pip install django>=1.8,<2.0
|
||||
|
||||
[flake8]
|
||||
# TODO(dmllr): Analyze or fix the warnings blacklisted below
|
||||
# E711 comparison to None should be 'if cond is not None:'
|
||||
# E712 comparison to True should be 'if cond is True:' or 'if cond:'
|
||||
# H404 multi line docstring should start with a summary
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
show-source = True
|
||||
builtins = _
|
||||
ignore = E711,E712,H404,H405,E123,E125,E901,H301,H701,E226
|
||||
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,node_modules
|
||||
max-complexity = 20
|
||||
ignore = E711,E712,H404,H405,E123,E125,E901,H301
|
||||
exclude = .venv,.git,.tox,dist,doc,etc,*lib/python*,*egg,build
|
||||
|
|
Loading…
Reference in New Issue