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

Django 4 django.dispatch.Signal unexpected keyword argument providing_args #502

Open
jayvdb opened this issue Dec 26, 2021 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Dec 26, 2021

SUSE Tumbleweed has updated django to 4.0, and while fixing django packages I've noticed a lot of packages are failing with this.
e.g. https://build.opensuse.org/package/show/home:jayvdb:branches:devel:languages:python:django/python-django-avatar

https://docs.djangoproject.com/en/dev/releases/4.0/

See Features deprecated in 3.1 for details on these changes, including how to remove usage of these features.
..
The providing_args argument for django.dispatch.Signal is removed.

Deprecation timeline

  • Deprecated in: 3.1
  • Removed in: 4.0
@jayvdb jayvdb added the enhancement New feature or request label Dec 26, 2021
@browniebroke
Copy link
Owner

This is handled by django-upgrade, see https://github.com/adamchainz/django-upgrade#signal, have you tried it? Django Upgrade took a different approach and is much faster as a result. I need to update the readme here to point to that project. Is there a reason why you cannot use it?

@jayvdb
Copy link
Contributor Author

jayvdb commented Dec 26, 2021

@browniebroke
Copy link
Owner

not going to be very reliable as it isn't a CST

AFAIK, a lot of tools aren't using CST and I rely on them everyday, they are extremely reliable: black, pyupgrade. Django-upgrade takes a similar approach and it worked fine on a project I tried it on.

I'm not familiar with build.opensuse.org, I'm not sure what I'm supposed to see in them. Can we see the logs of the problem somewhere? Can you make a summary here of what's wrong?

@jayvdb
Copy link
Contributor Author

jayvdb commented Dec 27, 2021

Yea, django-upgrade worked on most of the projects I mentioned earlier.

I think you need to create an account in order to see the build logs on OBS. The logs are under a clickable red link "failed". The .spec files in each project show where I have added django-upgrade, and the logs show it doesn't work for two of them.

If you don't want to create an OBS account, the same commands can be run on the github repos for each project.

I've done a PR for django-mailman3; the rest had other additional Django 4 problems, often the middleware get_response problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants