This MR intends to fix multiple compatibility issues.
The first one is the use of collections.Mapping which has been deprecated since python 3.3, instead of collections.abc.Mapping. In Python 3.10, this won't work anymore.
$ python
Python 3.9.1 (default, Jan 20 2021, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Mapping
<stdin>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
The second one is a compatibility issue with the upcoming Django 4.0 version. The use of the providing_args parameter for django's Signal object has always been purely documentational, and is planned to be completely removed in Django 4.0.
$ python -W all
Python 3.9.1 (default, Jan 20 2021, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.dispatch import Signal
>>> Signal(providing_args=["foo"])
<stdin>:1: RemovedInDjango40Warning: The providing_args argument is deprecated. As it is purely documentational, it has no replacement. If you rely on this argument as documentation, you can move the text to a code comment or docstring.
The third one is another compatibility issue with Django 4.0. The use of django.conf.urls is deprecated since django 2.0. Also, django.urls.url will be removed from Django 4.0. django.urls.re_path can be used instead, as it was an alias for the same function since django 2.0.
The last one is another compatibility issue with Django 4.0, but I didn't find any documentation on it. It's due to this commit that modifies the internal attribute name of the FieldFile class.
For each of these issues, I tried to keep full retro-compatibility with the previous version.
This MR intends to fix multiple compatibility issues.
collections.Mapping
which has been deprecated since python 3.3, instead ofcollections.abc.Mapping
. In Python 3.10, this won't work anymore.providing_args
parameter for django'sSignal
object has always been purely documentational, and is planned to be completely removed in Django 4.0.The third one is another compatibility issue with Django 4.0. The use of
django.conf.urls
is deprecated since django 2.0. Also,django.urls.url
will be removed from Django 4.0.django.urls.re_path
can be used instead, as it was an alias for the same function since django 2.0.The last one is another compatibility issue with Django 4.0, but I didn't find any documentation on it. It's due to this commit that modifies the internal attribute name of the
FieldFile
class.For each of these issues, I tried to keep full retro-compatibility with the previous version.