Remove the unsupported use-mirrors pip option

Remove the duplicated make_option import

Pin flake8's version to <3 as long as we are still supporting Python 2.6

Stop complaining (F999) about the assert

Fix travis.py for now

This will fail again as soon as Django 2.0 is released.
This commit is contained in:
Matthias Kestenholz 2016-09-14 11:20:59 +02:00 committed by Jacek Tomaszewski
parent 5c93fd6b7f
commit b6cc6888af
4 changed files with 10 additions and 10 deletions

View file

@ -172,20 +172,20 @@ matrix:
- python: "3.5"
env: DJANGO=1.10 DB=mysql
before_install:
- pip install -q flake8 --use-mirrors
- pip install -q 'flake8<3'
- PYFLAKES_NODOCTEST=1 flake8 modeltranslation
before_script:
- mysql -e 'create database modeltranslation;'
- psql -c 'create database modeltranslation;' -U postgres
install:
- if [[ $DB == mysql ]]; then pip install -q mysql-python --use-mirrors; fi
- if [[ $DB == postgres ]]; then pip install -q psycopg2 --use-mirrors; fi
- pip install -q Pillow --use-mirrors
- if [[ $DB == mysql ]]; then pip install -q mysql-python; fi
- if [[ $DB == postgres ]]; then pip install -q psycopg2; fi
- pip install -q Pillow
- IDJANGO=$(./travis.py $DJANGO)
- pip install -q $IDJANGO
- pip install -e . --use-mirrors
- pip install -e .
- if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then pip install 'coverage<4.0.0'; fi
- pip install -q coveralls --use-mirrors
- pip install -q coveralls
script:
- django-admin.py --version
- coverage run --source=modeltranslation ./runtests.py

View file

@ -9,7 +9,6 @@ You will need to execute this command in two cases:
Credits: Heavily inspired by django-transmeta's sync_transmeta_db command.
"""
from optparse import make_option
import django
from django import VERSION
from django.core.management.base import BaseCommand

View file

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
try:
from django.conf.urls import include, patterns, url
assert (include, patterns, url) # Workaround for pyflakes issue #13
# Workaround for pyflakes issue #13
assert (include, patterns, url) # noqa
except ImportError: # Django 1.3 fallback
from django.conf.urls.defaults import include, patterns, url # NOQA
from django.contrib import admin

View file

@ -5,5 +5,5 @@ version = sys.argv[1]
if version.startswith('http'):
print(version)
else:
next_version = float(version) + 0.1
print('Django>=%s,<%.1f' % (version, next_version))
next_version = version[:-1] + '%d' % (int(version[-1]) + 1)
print('Django>=%s,<%s' % (version, next_version))