Skip to content

Commit

Permalink
Drop Django 2.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
therefromhere committed Jun 15, 2019
1 parent a34012e commit 2fcfb76
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ matrix:
fast_finish: true

include:
- { python: "3.5", env: TOXENV=py35-django20 }
- { python: "3.5", env: TOXENV=py35-django21 }
- { python: "3.5", env: TOXENV=py35-django22 }
- { python: "3.6", env: TOXENV=py36-django20 }
- { python: "3.6", env: TOXENV=py36-django21 }
- { python: "3.6", env: TOXENV=py36-django22 }
- { python: "3.7", env: TOXENV=py37-django20 }
- { python: "3.7", env: TOXENV=py37-django21 }
- { python: "3.7", env: TOXENV=py37-django22 }
- { python: "3.7", env: TOXENV=py37-djangomaster }
Expand Down
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ History
2.1.0 (unreleased)
------------------

- Dropped Django 2.0 support
- Dropped previously-deprecated ``Charge.fee_details`` property.
- Dropped previously-deprecated ``Transfer.fee_details`` property.
- Dropped previously-deprecated ``field_name`` parameter to ``sync_from_stripe_data``
Expand Down
9 changes: 0 additions & 9 deletions djstripe/models/base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import logging
import uuid
import warnings
from datetime import timedelta

import django
from django.db import IntegrityError, models, transaction
from django.utils import dateformat, timezone
from django.utils.encoding import smart_text
Expand Down Expand Up @@ -318,13 +316,6 @@ def _attach_objects_post_save_hook(self, cls, data, pending_relations=None):
setattr(target, field.name, self)
target.save()

if django.VERSION < (2, 1):
# refresh_from_db doesn't clear related objects cache on django<2.1
# instead manually clear the instance cache so refresh_from_db will reload it
for field in self._meta.concrete_fields:
if field.is_relation and field.is_cached(self):
field.delete_cached_value(self)

# reload so that indirect relations back to this object - eg self.charge.invoice = self are set
# TODO - reverse the field reference here to avoid hitting the DB?
self.refresh_from_db()
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ classifiers =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Framework :: Django
Framework :: Django :: 2.0
Framework :: Django :: 2.1
Framework :: Django :: 2.2

Expand All @@ -28,7 +27,7 @@ packages = find:
include_package_data = True
zip_safe = False
install_requires =
Django >= 2.0
Django >= 2.1
jsonfield >= 2.0.2
stripe >= 2.3.0

Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
py35-django{20,21,22}
py36-django{20,21,22}
py37-django{20,21,22,master}
py37-django21-checkmigrations
py35-django{21,22}
py36-django{21,22}
py37-django{21,22,master}
flake8

[testenv]
Expand Down

0 comments on commit 2fcfb76

Please sign in to comment.