[Python-modules-commits] [django-reversion] 02/12: New upstream version 2.0.13
Michael Fladischer
fladi at moszumanska.debian.org
Sat Jan 27 12:28:14 UTC 2018
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch debian/master
in repository django-reversion.
commit 6ae407437391a88a037290405a98b1fcd07e8681
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Sat Jan 27 11:37:11 2018 +0100
New upstream version 2.0.13
---
.gitignore | 1 -
.travis.yml | 53 ++++++++++++++++++++++++++--------------
CHANGELOG.rst | 7 ++++++
README.rst | 4 +--
reversion/__init__.py | 2 +-
reversion/models.py | 4 +--
setup.cfg | 4 +++
tests/test_app/tests/test_api.py | 2 +-
tox.ini | 46 ----------------------------------
9 files changed, 51 insertions(+), 72 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9ea259e..d474089 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,3 @@ MANIFEST
docs/_build
.coverage
*.sqlite3
-.tox
diff --git a/.travis.yml b/.travis.yml
index 11c2535..8903a08 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,31 +1,44 @@
sudo: false
language: python
python:
-- 3.6
-addons:
- apt:
- packages:
- - libmysqlclient-dev
-cache:
- directories:
- - "$HOME/.cache/pip"
+ - 3.6
+ - 3.5
+ - 2.7
+cache: pip
env:
global:
- - PYTHONWARNINGS=default,ignore::PendingDeprecationWarning,ignore::ResourceWarning
- - DJANGO_DATABASE_USER_POSTGRES=postgres
- - DJANGO_DATABASE_USER_MYSQL=travis
+ - PYTHONWARNINGS=default,ignore::PendingDeprecationWarning,ignore::ResourceWarning
+ - DJANGO_DATABASE_USER_POSTGRES=postgres
+ - DJANGO_DATABASE_USER_MYSQL=travis
+ matrix:
+ - DJANGO='>=2.0,<2.1'
+ - DJANGO='>=1.11,<1.12'
+ - DJANGO='>=1.10,<1.11'
+ - DJANGO='>=1.9,<1.10'
+ - DJANGO='>=1.8,<1.9'
matrix:
fast_finish: true
+ exclude:
+ - python: 2.7
+ env: DJANGO='>=2.0,<2.1'
+addons:
+ apt:
+ packages:
+ - libmysqlclient-dev
services:
-- postgresql
-- mysql
+ - postgresql
+ - mysql
install:
-- pyenv shell 2.7 3.5 3.6
-- pip install 'tox>=2.3.1'
+ - pip install flake8 coverage mock sphinx django$DJANGO psycopg2 mysqlclient -e .
before_script:
-- mysql -e 'create database test_project'
-- psql -c 'create database test_project;' -U postgres;
-script: tox
+ - mysql -e 'create database test_project'
+ - psql -c 'create database test_project;' -U postgres;
+script:
+ - flake8
+ - coverage run tests/manage.py test tests
+ - (cd docs && sphinx-build -n -W . _build)
+after_success:
+ - coverage report
deploy:
provider: pypi
user: etianen
@@ -33,7 +46,9 @@ deploy:
secure: XW4/9HiChbPJSJe4d/MRcO+ViPGhW1iQ8kVi814KJh7mCxOAKijpW5hfdc9oSKB6d8iYB3OzZ7naIUU9GMce40bpeTgPDLVBLCSYKRNLuVoJdh+Q6ItGUiFf8kAJz5jgopG80QnCpLA9JvYxKVJ4amfYWWm204eQmIEnRRAd+Jk=
on:
tags: true
- distributions: sdist bdist_wheel
+ condition: $DJANGO='>=2.0,<2.1'
+ python: 3.6
repo: etianen/django-reversion
+ distributions: sdist bdist_wheel
notifications:
email: false
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 422bbc0..8dee870 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,6 +3,13 @@
django-reversion changelog
==========================
+2.0.13 - 23/01/2017
+-------------------
+
+- Improve performance of ``get_deleted()`` for Oracle (@passuf).
+- Minor tweaks (@etianen, @michael-k).
+
+
2.0.12 - 05/12/2017
-------------------
diff --git a/README.rst b/README.rst
index d302636..03dae97 100644
--- a/README.rst
+++ b/README.rst
@@ -44,8 +44,8 @@ commands. The test suite requires that both MySQL and PostgreSQL be installed.
.. code:: bash
- pip install 'tox>=2.3.1'
- tox
+ pip install psycopg2 mysqlclient -e .
+ tests/manage.py test tests
The django-reversion project is built on every push with `Travis CI <https://travis-ci.org/etianen/django-reversion>`_.
diff --git a/reversion/__init__.py b/reversion/__init__.py
index 72eafec..55a295f 100644
--- a/reversion/__init__.py
+++ b/reversion/__init__.py
@@ -36,4 +36,4 @@ else:
get_registered_models,
)
-__version__ = VERSION = (2, 0, 12)
+__version__ = VERSION = (2, 0, 13)
diff --git a/reversion/models.py b/reversion/models.py
index f75266e..d7eb198 100644
--- a/reversion/models.py
+++ b/reversion/models.py
@@ -129,12 +129,12 @@ class VersionQuerySet(models.QuerySet):
# Try to do a faster JOIN.
model_db = model_db or router.db_for_write(model)
connection = connections[self.db]
- if self.db == model_db and connection.vendor in ("sqlite", "postgresql"):
+ if self.db == model_db and connection.vendor in ("sqlite", "postgresql", "oracle"):
content_type = _get_content_type(model, self.db)
subquery = SubquerySQL(
"""
SELECT MAX(V.{id})
- FROM {version} AS V
+ FROM {version} V
LEFT JOIN {model} ON V.{object_id} = CAST({model}.{model_id} as {str})
WHERE
V.{db} = %s AND
diff --git a/setup.cfg b/setup.cfg
index 2a9acf1..3018c47 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,6 @@
[bdist_wheel]
universal = 1
+
+[flake8]
+max-line-length=120
+exclude=venv,migrations
diff --git a/tests/test_app/tests/test_api.py b/tests/test_app/tests/test_api.py
index e12b102..c7301c1 100644
--- a/tests/test_app/tests/test_api.py
+++ b/tests/test_app/tests/test_api.py
@@ -106,7 +106,7 @@ class CreateRevisionTest(TestModelMixin, TestBase):
with reversion.create_revision():
TestModel.objects.create()
raise Exception("Boom!")
- except Exception as ex:
+ except Exception:
pass
self.assertNoRevision()
diff --git a/tox.ini b/tox.ini
deleted file mode 100644
index bd6c472..0000000
--- a/tox.ini
+++ /dev/null
@@ -1,46 +0,0 @@
-[tox]
-envlist =
- coverage-erase
- test-{py27,py35,py36}-django{18,19,110,111}
- test-{py35,py36}-djangomaster
- coverage-report
- flake8
- docs
-
-[testenv]
-usedevelop = True
-deps =
- py27: mock
- django18: Django>=1.8,<1.9
- django19: Django>=1.9,<1.10
- django110: Django>=1.10,<1.11
- django111: Django>=1.11a,<2.0
- djangomaster: https://github.com/django/django/archive/master.tar.gz
- psycopg2>=2.6.1
- mysqlclient>=1.3.12
- coverage>=4.1
-ignore_outcome =
- djangomaster: True
-commands =
- coverage-erase: coverage erase
- test: coverage run --append tests/manage.py test tests
- coverage-report: coverage report
-
-[testenv:flake8]
-basepython = python3.5
-deps =
- flake8>=2.5.4
-commands =
- flake8
-
-[flake8]
-max-line-length=120
-exclude=venv,migrations,.tox
-
-[testenv:docs]
-basepython = python3.5
-changedir = docs
-deps =
- sphinx>=1.4.2
-commands=
- sphinx-build -n -W . _build
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-reversion.git
More information about the Python-modules-commits
mailing list