mitmedialab / django-channels-presence

"Rooms" and "Presence" for django-channels
MIT License
79 stars 38 forks source link

Incompatible with Django 4.0 due to use of provides_args argument for Signal #23

Open KyleCH opened 2 years ago

KyleCH commented 2 years ago

The providing_args argument for django.dispatch.Signal was deprecated in Django 3.1 and removed in Django 4.0 (see Additional details below). The use of said argument in channels_presence (see below) renders this application incompatible with Django 4.0.

https://github.com/mitmedialab/django-channels-presence/blob/bcc9f71ca2162d8d8539466ad9787715d43c0faf/channels_presence/signals.py#L1-L5

Additional details

The Django 3.0 documentation for Signal states:

The providing_args is a list of the names of arguments the signal will provide to listeners. This is purely documentational, however, as there is nothing that checks that the signal actually provides these arguments to its listeners.

The Django 3.1 release notes state:

The purely documentational providing_args argument for Signal is deprecated. If you rely on this argument as documentation, you can move the text to a code comment or docstring.

The Django 4.0 release notes simply states:

The providing_args argument for django.dispatch.Signal is removed.

cristianrat commented 2 years ago

so then, dead project. Look elsewhere, yes? :) @KyleCH ? any luck?

jayvdb commented 2 years ago

Note issue title should say "providing_args" not "provides_args" .

You can use https://pypi.org/project/django-upgrade/ to fix this. e.g.

django-upgrade --exit-zero-even-if-changed --target-version 4.0 channels_presence/signals.py

A backwards compatible patch shouldnt be too difficult, if that is desirable.