Skip to content

Commit

Permalink
Merge pull request #14 from novafloss/9-deprecate-django16-django17
Browse files Browse the repository at this point in the history
graceful deprecation of Django 1.6 and 1.7
  • Loading branch information
brunobord committed Jul 19, 2016
2 parents 5f85cf8 + a5ff383 commit 6ba11f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

## master (unreleased)

**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+.

- Added Django 1.9 support (#9).
- Python 3.4 jobs are being tested in travis (#10).
- Deprecate Django 1.6 and 1.7 support (#9).

## 1.0.0 (2016-06-23)

Expand Down
13 changes: 13 additions & 0 deletions chunkator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
"""
Toolbox for chunking / slicing querysets
"""
import warnings

from distutils.version import StrictVersion
import django

if StrictVersion(django.get_version()) < StrictVersion('1.8.0'):
with warnings.catch_warnings():
# This will force the warning to be triggered.
warnings.simplefilter("always")
warnings.warn(
"Django 1.7 and lower versions will soon be deprecated. Please upgrade.", # noqa
PendingDeprecationWarning
)


class MissingPkFieldException(Exception):
Expand Down

0 comments on commit 6ba11f7

Please sign in to comment.