diff --git a/.travis.yml b/.travis.yml index b8837410..9cc09e02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,8 @@ matrix: env: TOXENV=py,codecov - python: 3.4 env: TOXENV=py,codecov - - python: 3.3 - env: TOXENV=py,py-lowest,codecov - python: 2.7 env: TOXENV=py,codecov - - python: 2.6 - env: TOXENV=py,py-lowest,codecov - python: pypy env: TOXENV=py,codecov - python: nightly diff --git a/docs/conf.py b/docs/conf.py index fae9cd73..1e805970 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,7 +45,7 @@ # General information about the project. project = u'Flask-SQLAlchemy' -copyright = u'2010 - {0}, Armin Ronacher'.format(datetime.utcnow().year) +copyright = u'2010 - {}, Armin Ronacher'.format(datetime.utcnow().year) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/examples/hello.py b/examples/hello.py index 4275ccd2..3ead2425 100644 --- a/examples/hello.py +++ b/examples/hello.py @@ -1,6 +1,6 @@ from datetime import datetime from flask import Flask, request, flash, url_for, redirect, \ - render_template, abort + render_template from flask_sqlalchemy import SQLAlchemy diff --git a/flask_sqlalchemy/__init__.py b/flask_sqlalchemy/__init__.py index 520afa00..cc82d5d7 100644 --- a/flask_sqlalchemy/__init__.py +++ b/flask_sqlalchemy/__init__.py @@ -29,7 +29,7 @@ from sqlalchemy.orm.session import Session as SessionBase from flask_sqlalchemy.model import Model -from ._compat import itervalues, string_types, to_str, xrange +from ._compat import itervalues, string_types, xrange from .model import DefaultMeta __version__ = '2.3.2' diff --git a/flask_sqlalchemy/model.py b/flask_sqlalchemy/model.py index 9c55db2a..d34e1f10 100644 --- a/flask_sqlalchemy/model.py +++ b/flask_sqlalchemy/model.py @@ -148,7 +148,7 @@ class Model(object): def __repr__(self): identity = inspect(self).identity if identity is None: - pk = "(transient {0})".format(id(self)) + pk = "(transient {})".format(id(self)) else: pk = ', '.join(to_str(value) for value in identity) - return '<{0} {1}>'.format(type(self).__name__, pk) + return '<{} {}>'.format(type(self).__name__, pk) diff --git a/scripts/make-release.py b/scripts/make-release.py index f6a077a5..36301085 100755 --- a/scripts/make-release.py +++ b/scripts/make-release.py @@ -26,7 +26,6 @@ def parse_changelog(): match = re.search('^Version\s+(.*)', line.strip()) if match is None: continue - length = len(match.group(1)) version = match.group(1).strip() if lineiter.next().count('-') != len(match.group(0)): continue diff --git a/setup.py b/setup.py index 91c87d5a..a2774506 100755 --- a/setup.py +++ b/setup.py @@ -43,10 +43,8 @@ 'Topic :: Software Development :: Libraries :: Python Modules', 'Programming Language :: Python', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', diff --git a/tests/test_pagination.py b/tests/test_pagination.py index 05621c71..051b5efd 100644 --- a/tests/test_pagination.py +++ b/tests/test_pagination.py @@ -30,7 +30,7 @@ def test_query_paginate(app, db, Todo): @app.route('/') def index(): p = Todo.query.paginate() - return '{0} items retrieved'.format(len(p.items)) + return '{} items retrieved'.format(len(p.items)) c = app.test_client() # request default diff --git a/tox.ini b/tox.ini index e3a1ccc8..3fe51dfc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = - py{36,35,34,33,27,26,py} - py{36,33,27,26,py}-lowest + py{36,35,34,27,py} + py{36,34,27,py}-lowest docs_html coverage_report @@ -39,7 +39,6 @@ deps = codecov skip_install = true commands = - python -c 'import sys, pip; sys.version_info < (2, 7) and pip.main(["install", "argparse", "-q"])' coverage combine coverage report codecov