Skip to content

Commit 7055272

Browse files
committed
graceful deprecation of Django 1.6 and 1.7
refs #9
1 parent 5f85cf8 commit 7055272

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
## master (unreleased)
44

5+
**Warning**: this version will be the last to support Django 1.6 or 1.7. Starting of the next version, we'll only support 1.8+.
6+
57
- Added Django 1.9 support (#9).
68
- Python 3.4 jobs are being tested in travis (#10).
9+
- Deprecate Django 1.6 and 1.7 support (#9).
710

811
## 1.0.0 (2016-06-23)
912

chunkator/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
"""
22
Toolbox for chunking / slicing querysets
33
"""
4+
import warnings
5+
6+
from distutils.version import StrictVersion
7+
import django
8+
9+
if StrictVersion(django.get_version()) < StrictVersion('1.8.0'):
10+
warnings.warn(
11+
"Django 1.7 and lower versions will soon be deprecated. Please upgrade.", # noqa
12+
DeprecationWarning
13+
)
414

515

616
class MissingPkFieldException(Exception):

0 commit comments

Comments
 (0)