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.0 Support #62

Open
ICSGrade opened this issue Jan 1, 2022 · 10 comments
Open

Django 4.0 Support #62

ICSGrade opened this issue Jan 1, 2022 · 10 comments

Comments

@ICSGrade
Copy link

ICSGrade commented Jan 1, 2022

Currently there are two items in the pinax-messages that are depreciated in Django 4.0/4.1.

/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/django/apps/registry.py:91: RemovedInDjango41Warning: 'pinax.messages' defines default_app_config = 'pinax.messages.apps.AppConfig'. Django now detects this configuration automatically. You can remove default_app_config.
app_config = AppConfig.create(entry)

/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pinax/messages/signals.py:3: 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.
message_sent = Signal(providing_args=["message", "thread", "reply"])
System check identified no issues (0 silenced).

Can someone update the code to make this package work with 4.0?

@ghost
Copy link

ghost commented Jan 2, 2022

Would be great

@ICSGrade
Copy link
Author

ICSGrade commented Jan 2, 2022

In Signals.py, you just need to change it to say:

message_sent = Signal()

I checked the rest of the code and do not believe it needed more than that to work.

default_app_config = 'pinax.messages.apps.AppConfig' should be removed as it is redundant at this point in Django 4. Hopefully one of the Devs can push out this change quickly as it is a minute of time to make these changes.

@ICSGrade
Copy link
Author

ICSGrade commented Jan 5, 2022

I forked the package and made the changes so that it is now Django 4.0 compatible. Please see the following repo if you need to use the pinax-messages package with Django 4.0 https://github.com/ICSGrade/ics-pinax-messages

@Ladet02
Copy link

Ladet02 commented Jan 21, 2022

File "C:\Users\Lanre Adetoro\Desktop\Dev\Lanlod\landvenv\lib\site-packages\pinax\messages\urls.py", line 1, in
from django.conf.urls import url
ImportError: cannot import name 'url' from 'django.conf.urls' (C:\Users\Lanre Adetoro\Desktop\Dev\Lanlod\landvenv\lib\site-packages\django\conf\urls_init_.py)

@ICSGrade i got this error using your build

@ICSGrade
Copy link
Author

File "C:\Users\Lanre Adetoro\Desktop\Dev\Lanlod\landvenv\lib\site-packages\pinax\messages\urls.py", line 1, in from django.conf.urls import url ImportError: cannot import name 'url' from 'django.conf.urls' (C:\Users\Lanre Adetoro\Desktop\Dev\Lanlod\landvenv\lib\site-packages\django\conf\urls__init__.py)

@ICSGrade i got this error using your build

Are you on Django 4.0? I’ll try and look at this later today and update the code.

@Ladet02
Copy link

Ladet02 commented Jan 21, 2022

File "C:\Users\Lanre Adetoro\Desktop\Dev\Lanlod\landvenv\lib\site-packages\pinax\messages\urls.py", line 1, in from django.conf.urls import url ImportError: cannot import name 'url' from 'django.conf.urls' (C:\Users\Lanre Adetoro\Desktop\Dev\Lanlod\landvenv\lib\site-packages\django\conf\urls__init__.py)
@ICSGrade i got this error using your build

Are you on Django 4.0? I’ll try and look at this later today and update the code.

Yes I am.

It might interest you to look at this

https://stackoverflow.com/questions/70319606/importerror-cannot-import-name-url-from-django-conf-urls-after-upgrading-to

thanks

@ICSGrade
Copy link
Author

OK I believe this is working properly now.... Try to pip install --upgrade -e git+git://github.com/ICSGrade/ics-pinax-messages@c9bfa6f#egg=pinax-messages . If there are any more issues then please let me know and I can try and fix them.

@HenryMehta
Copy link

HenryMehta commented May 17, 2022

@ICSGrade
I'm getting the following error when I attempt pip install --upgrade -e git+git://github.com/ICSGrade/ics-pinax-messages@c9bfa6f#egg=pinax-messages

WARNING: Discarding git+git://github.com/ICSGrade/ics-pinax-messages@c9bfa6f#egg=pinax-messages. Command errored out with exit status 128: git clone --filter=blob:none -q git://github.com/ICSGrade/ics-pinax-messages /home/henry/Documents/Sites/patch/env/src/pinax-messages Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pinax-messages (unavailable) (from versions: 0.1, 0.2, 0.3, 1.0.0, 1.0.1, 1.2.0, 2.0.0, 2.0.1, 2.0.2, 3.0.0)
ERROR: No matching distribution found for pinax-messages (unavailable)

Any thoughts?

@HenryMehta
Copy link

For me it installed with pip install git+https://github.com/ICSGrade/ics-pinax-messages@c9bfa6f#egg=pinax-messages

@paltman
Copy link
Contributor

paltman commented Dec 3, 2022

#63 anyone interested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants