Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support and testing for Django 3.1 #916

Merged
merged 2 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ matrix:
env: TOXENV=py37-django30
- python: 3.8
env: TOXENV=py38-django30
- python: 3.6
env: TOXENV=py36-django31
- python: 3.7
env: TOXENV=py37-django31
- python: 3.8
env: TOXENV=py38-django31
- python: 3.6
env: TOXENV=py36-djangomaster
- python: 3.7
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ django-storages CHANGELOG
UNRELEASED
**********

- Add support for Django 3.1.

**Breaking**

- Removed support for end-of-life Python 2.7 and 3.4.
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import os
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Framework :: Django
Framework :: Django :: 2.2
Framework :: Django :: 3.0
Framework :: Django :: 3.1
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Expand Down Expand Up @@ -60,4 +61,3 @@ include_trailing_comma = true
known_first_party = storages
line_length = 79
multi_line_output = 5
not_skip = __init__.py
2 changes: 1 addition & 1 deletion storages/backends/gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
)

try:
from google.cloud.exceptions import NotFound
from google.cloud.storage import Blob, Client
from google.cloud.storage.blob import _quote
from google.cloud.exceptions import NotFound
except ImportError:
raise ImproperlyConfigured("Could not load Google Cloud Storage bindings.\n"
"See https://github.com/GoogleCloudPlatform/gcloud-python")
Expand Down
2 changes: 1 addition & 1 deletion storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _use_cryptography_signer():
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives.serialization import (
load_pem_private_key
load_pem_private_key,
)

def _cloud_front_signer_from_pem(key_id, pem):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from django.template import Context, Template
from django.test import TestCase, override_settings
from django.utils import timezone
from tests.integration.models import SimpleFileModel

from storages.backends import azure_storage
from tests.integration.models import SimpleFileModel


class AzureStorageTest(TestCase):
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ minversion = 1.9
envlist =
py{35,36,37,38}-django22
py{36,37,38}-django30
py{36,37,38}-django31
py{36,37,38}-djangomaster
integration
flake8
Expand All @@ -16,6 +17,7 @@ commands = pytest --cov=storages --ignore=tests/integration/ tests/ {posargs}
deps =
django22: Django>=2.2,<3.0
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
djangomaster: https://github.com/django/django/archive/master.tar.gz
cryptography
pytest
Expand Down Expand Up @@ -50,8 +52,8 @@ extras =
[testenv:flake8]
deps =
flake8
isort
isort>=5.0.0
commands =
flake8
isort --recursive --check-only --diff storages/ tests/
isort --check-only --diff .
skip_install = true