Skip to content

Commit

Permalink
Merge 5a1b008 into 67c0922
Browse files Browse the repository at this point in the history
  • Loading branch information
somewes committed Dec 8, 2017
2 parents 67c0922 + 5a1b008 commit b032fce
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 21 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
@@ -1,8 +1,6 @@
sudo: false
language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
addons:
Expand All @@ -11,9 +9,8 @@ env:
global:
- DB=postgres
matrix:
- DJANGO=">=1.9,<1.10"
- DJANGO=">=1.10,<1.11"
- DJANGO=">=1.11,<2.0"
- DJANGO=">=2.0,<2.1"
install:
- pip install -q coveralls coverage flake8 Django$DJANGO
- pip install -r requirements/docs.txt
Expand Down
8 changes: 8 additions & 0 deletions docs/release_notes.rst
@@ -1,6 +1,14 @@
Release Notes
=============

v2.0.0
------
* Remove python 2.7 support
* Remove python 3.4 support
* Remove Django 1.9 support
* Remove Django 1.10 support
* Add Django 2.0 support

v1.4.0
------
* Python 3.6 support
Expand Down
11 changes: 6 additions & 5 deletions issue/migrations/0001_initial.py
Expand Up @@ -4,6 +4,7 @@
from django.db import models, migrations
import jsonfield.fields
import regex_field.fields
import django.db.models.deletion


class Migration(migrations.Migration):
Expand Down Expand Up @@ -47,7 +48,7 @@ class Migration(migrations.Migration):
('execution_time', models.DateTimeField(auto_now_add=True)),
('success', models.BooleanField(default=True)),
('details', jsonfield.fields.JSONField(null=True, blank=True)),
('issue', models.ForeignKey(to='issue.Issue', related_name='executed_actions')),
('issue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='issue.Issue', related_name='executed_actions')),
],
options={
},
Expand All @@ -59,7 +60,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('check_function', models.TextField()),
('name', models.TextField()),
('model_type', models.ForeignKey(to='contenttypes.ContentType', related_name='+')),
('model_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', related_name='+')),
],
options={
'abstract': False,
Expand All @@ -76,7 +77,7 @@ class Migration(migrations.Migration):
('status', models.IntegerField(choices=[(0, 'Open'), (1, 'Resolved'), (2, 'Wont_fix')], default=0)),
('resolved_time', models.DateTimeField(null=True, blank=True)),
('record_id', models.PositiveIntegerField(default=0)),
('record_type', models.ForeignKey(null=True, related_name='+', to='contenttypes.ContentType')),
('record_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, null=True, related_name='+', to='contenttypes.ContentType')),
],
options={
'abstract': False,
Expand All @@ -100,7 +101,7 @@ class Migration(migrations.Migration):
('delay_sec', models.IntegerField()),
('target_function', models.TextField()),
('function_kwargs', jsonfield.fields.JSONField(default={})),
('responder', models.ForeignKey(to='issue.Responder', related_name='actions')),
('responder', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='issue.Responder', related_name='actions')),
],
options={
},
Expand All @@ -109,7 +110,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='issueaction',
name='responder_action',
field=models.ForeignKey(to='issue.ResponderAction'),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='issue.ResponderAction'),
preserve_default=True,
),
]
10 changes: 5 additions & 5 deletions issue/models.py
Expand Up @@ -170,7 +170,7 @@ class ModelIssue(BaseIssue):
"""
An issue involving a particular entry in the database.
"""
record_type = models.ForeignKey(ContentType, related_name='+', null=True)
record_type = models.ForeignKey(ContentType, related_name='+', null=True, on_delete=models.CASCADE)
record_id = models.PositiveIntegerField(default=0)
record = GenericForeignKey('record_type', 'record_id')

Expand All @@ -182,8 +182,8 @@ class IssueAction(models.Model):
"""
A response that was taken to address a particular issue.
"""
issue = models.ForeignKey(Issue, related_name='executed_actions')
responder_action = models.ForeignKey('issue.ResponderAction')
issue = models.ForeignKey(Issue, related_name='executed_actions', on_delete=models.CASCADE)
responder_action = models.ForeignKey('issue.ResponderAction', on_delete=models.CASCADE)
execution_time = models.DateTimeField(auto_now_add=True)
success = models.BooleanField(default=True)
details = JSONField(null=True, blank=True)
Expand Down Expand Up @@ -256,7 +256,7 @@ class ResponderAction(models.Model):
Any function can be specified in the target_function field, though some initial
helpers are defined in issue.actions
"""
responder = models.ForeignKey(Responder, related_name='actions')
responder = models.ForeignKey(Responder, related_name='actions', on_delete=models.CASCADE)

# 'buffer' period between this action and the next.
delay_sec = models.IntegerField()
Expand Down Expand Up @@ -365,7 +365,7 @@ class ModelAssertion(BaseAssertion):
An Issue is created for any record for which the assertion fails.
"""
model_type = models.ForeignKey(ContentType, related_name='+')
model_type = models.ForeignKey(ContentType, related_name='+', on_delete=models.CASCADE)

@property
def issue_class(self):
Expand Down
2 changes: 1 addition & 1 deletion issue/version.py
@@ -1 +1 @@
__version__ = '1.4.0'
__version__ = '2.0.0'
8 changes: 8 additions & 0 deletions publish.py
Expand Up @@ -3,3 +3,11 @@
subprocess.call(['pip', 'install', 'wheel'])
subprocess.call(['python', 'setup.py', 'clean', '--all'])
subprocess.call(['python', 'setup.py', 'register', 'sdist', 'bdist_wheel', 'upload'])
subprocess.call(['rm', '-r', 'dist/'])
subprocess.call(['pip', 'install', 'wheel'])
subprocess.call(['pip', 'install', 'twine'])
subprocess.call(['python', 'setup.py', 'clean', '--all'])
subprocess.call(['python', 'setup.py', 'register', 'sdist', 'bdist_wheel'])
subprocess.call(['twine', 'upload', 'dist/*'])
subprocess.call(['rm', '-r', 'dist/'])
subprocess.call(['rm', '-r', 'build/'])
9 changes: 3 additions & 6 deletions setup.py
Expand Up @@ -30,23 +30,20 @@ def get_version():
packages=find_packages(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Framework :: Django',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
],
license='MIT',
install_requires=[
'Django>=1.9',
'django-manager-utils>=0.13.0',
'django-regex-field>=0.3.1',
'django-manager-utils>=1.0.0',
'django-regex-field>=1.0.0',
'enum34>=1.0',
'jsonfield>=0.9.20',
],
Expand Down

0 comments on commit b032fce

Please sign in to comment.