mirror of
https://github.com/jazzband/django-downloadview.git
synced 2026-03-16 22:40:25 +00:00
Import ABCs from collections.abc, not collections
The types in collections.abc were moved from just collections in Python 3.3, and Python 3.10 removed the old aliases. We no longer support Python versions earlier than 3.3 and need to support 3.10, so update the import.
This commit is contained in:
parent
0578729a66
commit
95b36fc843
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ Download middlewares capture :py:class:`django_downloadview.DownloadResponse`
|
|||
responses and may replace them with optimized download responses.
|
||||
|
||||
"""
|
||||
import collections
|
||||
import collections.abc
|
||||
import copy
|
||||
import os
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ class SmartDownloadMiddleware(BaseDownloadMiddleware):
|
|||
for key, options in enumerate(options_list):
|
||||
args = []
|
||||
kwargs = {}
|
||||
if isinstance(options, collections.Mapping): # Using kwargs.
|
||||
if isinstance(options, collections.abc.Mapping): # Using kwargs.
|
||||
kwargs = options
|
||||
else:
|
||||
args = options
|
||||
|
|
|
|||
Loading…
Reference in a new issue