Projet

Général

Profil

0001-misc-drop-support-for-django-1.11-36087.patch

Frédéric Péters, 12 septembre 2019 20:05

Télécharger (2,78 ko)

Voir les différences:

Subject: [PATCH] misc: drop support for django < 1.11 (#36087)

 debian/control            | 2 +-
 passerelle/base/models.py | 3 +--
 tox.ini                   | 9 +++------
 3 files changed, 5 insertions(+), 9 deletions(-)
debian/control
16 16
Architecture: all
17 17
Depends: ${python:Depends},
18 18
    ${misc:Depends},
19
    python-django (>= 1.8),
19
    python-django (>= 1:1.11),
20 20
    python-gadjo,
21 21
    python-django-model-utils,
22 22
    python-requests,
passerelle/base/models.py
9 9
import traceback
10 10
import base64
11 11

  
12
import django
13 12
from django.apps import apps
14 13
from django.conf import settings
15 14
from django.core.exceptions import ValidationError, ObjectDoesNotExist, PermissionDenied
......
446 445
        # "jobs" cron job to run asynchronous tasks
447 446
        resource_type = ContentType.objects.get_for_model(self)
448 447
        skip_locked = {'skip_locked': True}
449
        if django.VERSION < (1, 11, 0) or not connection.features.has_select_for_update_skip_locked:
448
        if not connection.features.has_select_for_update_skip_locked:
450 449
            skip_locked = {}
451 450
        skipped_jobs = []
452 451
        while True:
tox.ini
1 1
[tox]
2 2
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/{env:BRANCH_NAME:}
3
envlist = django{18,111}-{sqlite,pg}
3
envlist = django111-{sqlite,pg}
4 4

  
5 5
[testenv]
6 6
usedevelop = True
......
14 14
  sqlite: DB_ENGINE=django.db.backends.sqlite3
15 15
  pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
16 16
deps =
17
  django18: django>=1.8,<1.9
18 17
  django111: django>=1.11,<1.12
19 18
  psycopg2-binary
20 19
  pytest-cov
......
36 35
  http://quixote.python.ca/releases/Quixote-2.7b2.tar.gz
37 36
  vobject
38 37
  django-ratelimit
39
  django18: django-model-utils<3.2
40 38
commands =
41 39
  ./get_wcs.sh
42
  django18: py.test {posargs: {env:FAST:} --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=passerelle/ --cov-config .coveragerc tests/}
43
  django18: ./pylint.sh passerelle/
44
  django111: py.test {posargs: --junitxml=test_{envname}_results.xml tests/}
40
  django111: py.test {posargs: {env:FAST:} --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=passerelle/ --cov-config .coveragerc tests/}
41
  django111: ./pylint.sh passerelle/
45
-