From a10771fc47938aa1c4eb838db5e0a156f10b2e55 Mon Sep 17 00:00:00 2001 From: Grant McConnaughey Date: Sat, 4 Jan 2020 10:37:01 -0600 Subject: [PATCH 1/3] Test against Django 2/3, Python 3.7/3.8 --- .travis.yml | 35 ++++++++++++++++++++++++++--------- CHANGELOG.rst | 5 +++++ README.rst | 4 ---- setup.py | 9 +++++++-- 4 files changed, 38 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index be0dc2e..f258360 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ python: - 3.4 - 3.5 - 3.6 + - 3.7 + - 3.8 before_install: - pip install coveralls install: @@ -12,17 +14,32 @@ install: - pip install Django==${DJANGO} script: make test env: - - DJANGO=1.9.13 - - DJANGO=1.10.7 - - DJANGO=1.11.8 - - DJANGO=2.0 + - DJANGO=1.11.27 + - DJANGO=2.0.13 + - DJANGO=2.1.15 + - DJANGO=2.2.9 + - DJANGO=3.0.2 matrix: exclude: - - python: 3.6 - env: DJANGO=1.9.13 - - python: 3.6 - env: DJANGO=1.10.7 - python: 2.7 - env: DJANGO=2.0 + env: DJANGO=2.0.13 + - python: 3.8 + env: DJANGO=2.0.13 + - python: 2.7 + env: DJANGO=2.1.15 + - python: 3.4 + env: DJANGO=2.1.15 + - python: 3.8 + env: DJANGO=2.1.15 + - python: 2.7 + env: DJANGO=2.2.9 + - python: 3.4 + env: DJANGO=2.2.9 + - python: 2.7 + env: DJANGO=3.0.2 + - python: 3.4 + env: DJANGO=3.0.2 + - python: 3.5 + env: DJANGO=3.0.2 after_success: - coveralls diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0845138..70a9a76 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Changelog ========= +* 5.0.0 (Unreleased) + * Added Django 2.1, 2.2, and 3.0 support. + * Added Python 3.7 and 3.8 support. + * Removed Python 1.9 and 1.10 support. + * 4.1.0 (December 20, 2017) * Added Django 2.0 support. * Added ``avatar_deleted`` signal. diff --git a/README.rst b/README.rst index 2026333..59d927d 100644 --- a/README.rst +++ b/README.rst @@ -18,10 +18,6 @@ django-avatar :target: https://coveralls.io/github/grantmcconnaughey/django-avatar?branch=master :alt: Coverage -.. image:: https://lintly.com/gh/grantmcconnaughey/django-avatar/badge.svg - :target: https://lintly.com/gh/grantmcconnaughey/django-avatar/ - :alt: Lintly - Django-avatar is a reusable application for handling user avatars. It has the ability to default to Gravatar if no avatar is found for a certain user. Django-avatar automatically generates thumbnails and stores them to your default diff --git a/setup.py b/setup.py index 4dffac8..00a2abe 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,7 @@ def find_version(*file_paths): return version_match.group(1) raise RuntimeError("Unable to find version string.") + setup( name='django-avatar', version=find_version("avatar", "__init__.py"), @@ -29,9 +30,11 @@ setup( 'Framework :: Django', 'Intended Audience :: Developers', 'Framework :: Django', - 'Framework :: Django :: 1.9', - 'Framework :: Django :: 1.10', 'Framework :: Django :: 1.11', + 'Framework :: Django :: 2.0', + 'Framework :: Django :: 2.1', + 'Framework :: Django :: 2.2', + 'Framework :: Django :: 3.0', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', @@ -41,6 +44,8 @@ setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], keywords='avatar, django', author='Eric Florenzano', From 991c8657de0326a5cee6e49105abe6fc24ab4b8e Mon Sep 17 00:00:00 2001 From: Grant McConnaughey Date: Sat, 4 Jan 2020 10:52:15 -0600 Subject: [PATCH 2/3] Fix settings for Django 2.1+ --- tests/settings.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/settings.py b/tests/settings.py index 51316ce..067a6e5 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -12,6 +12,7 @@ DATABASES = { } INSTALLED_APPS = [ + 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -19,16 +20,6 @@ INSTALLED_APPS = [ 'avatar', ] -# Django 1.9 -MIDDLEWARE_CLASSES = ( - "django.middleware.common.CommonMiddleware", - "django.contrib.sessions.middleware.SessionMiddleware", - "django.middleware.csrf.CsrfViewMiddleware", - "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.messages.middleware.MessageMiddleware", -) - -# Django 1.10+ MIDDLEWARE = ( "django.middleware.common.CommonMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", @@ -43,7 +34,12 @@ TEMPLATES = [ 'APP_DIRS': True, 'DIRS': [ os.path.join(SETTINGS_DIR, 'templates') - ] + ], + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth' + ] + } } ] From 6ce67a87096d976b126a7ce25d9448d4ce8395a2 Mon Sep 17 00:00:00 2001 From: Grant McConnaughey Date: Sat, 4 Jan 2020 11:01:36 -0600 Subject: [PATCH 3/3] Add required deps for Django 2.2+ --- .travis.yml | 2 ++ tests/settings.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f258360..369fc7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,8 @@ env: - DJANGO=3.0.2 matrix: exclude: + - python: 3.8 + env: DJANGO=1.11.27 - python: 2.7 env: DJANGO=2.0.13 - python: 3.8 diff --git a/tests/settings.py b/tests/settings.py index 067a6e5..8c66dee 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -13,6 +13,7 @@ DATABASES = { INSTALLED_APPS = [ 'django.contrib.admin', + 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -37,7 +38,8 @@ TEMPLATES = [ ], 'OPTIONS': { 'context_processors': [ - 'django.contrib.auth.context_processors.auth' + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages' ] } }