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.0 compatibility, fixes #135 #136

Merged
merged 8 commits into from
Dec 29, 2021

Conversation

tswfi
Copy link
Contributor

@tswfi tswfi commented Dec 18, 2021

Add Django 4.0.0 compatibility.

  • Django template tags ifequal and ifnotequal have been deprecated since 1.2. Change all templates to use if
  • Django 3.0.0 deprecated urlquote and 4.0.0 removed it. Switch to use urllib.parse.quote()
  • Django 3.1 deprecated url and 4.0.0 removed it. Switch to use django.urls.re_path()
  • Drop support for < Django1.5 (its been end of life since September 2, 2014
  • Remove providing_args from signal definitions. Its purely documentational and has been removed in Django 4.0.0
  • smart_text was deprecated in Django 3.0 and removed in 4.0. Switch to smart_str

This should make the package Django 4.0.0 compatible.

According to https://github.com/stephenmcd/filebrowser-safe/blob/master/README.rst#contributing this project follows Mezzanine's Contribution Guidelines but this repo does not have AUTHORS file. Not sure if it should be added so I left it out.

Django template tags `ifequal` and `ifnotequal` have been deprecated since 1.2. Change all templates to use `if`

https://code.djangoproject.com/ticket/31532
Django 3.0.0 deprecated urlquote and 4.0.0 removed it.

https://docs.djangoproject.com/en/dev/releases/3.0/#deprecated-features-3-0

Switch to use urllib.parse.quote() (urlquote was just an alias for it anyway)
Django 3.1 deprecated `url` and 4.0.0 removed it

https://docs.djangoproject.com/en/3.2/ref/urls/#url

Switch to use `django.urls.re_path()`
* Drop support for < Django1.5 (its been end of life since September 2, 2014 https://www.djangoproject.com/download/#unsupported-versions)
* remove `providing_args` from signal definitions. Its purely documentational and has been removed in Django 4.0.0 (django/django@1adcf20#diff-65f7ef82645dcdb6a7898f2126781336c222437f65d3666c9d65b89edf725a6b)
* smart_text was deprecated in Django 3.0 and removed in 4.0
@tswfi tswfi changed the title Django 4.0.0 compatibility Django 4.0.0 compatibility, fixes #135 Dec 18, 2021
@tswfi
Copy link
Contributor Author

tswfi commented Dec 20, 2021

@jerivas sorry to ping you, but I guess you have to approve the workflow to be ran again? I also enabled the Django4 parts of the workflow.

@tswfi
Copy link
Contributor Author

tswfi commented Dec 20, 2021

ok, now the workflow should do its thing. @jerivas One more approval for the workflow please?

@tswfi
Copy link
Contributor Author

tswfi commented Dec 20, 2021

ok, so tests and lint are fine but I have a feeling the release step should not be done in a pr (at least from my pr :)

I'm not sure how the workflow is supposed to work.

Any pointers @jerivas?

@jerivas
Copy link
Collaborator

jerivas commented Dec 20, 2021

@tswfi you're correct, the release step doesn't apply to this branch. It should just be skipped but I'm not sure why it's failing. We can ignore it for now, I'll just do some manual testing later this week and hopefully get this merged soon. Thanks for your initiative!

@jerivas jerivas self-requested a review December 29, 2021 23:01
@jerivas jerivas merged commit b2c1b01 into stephenmcd:master Dec 29, 2021
@jerivas
Copy link
Collaborator

jerivas commented Dec 29, 2021

Thanks for the help @tswfi. I tested locally and this is working great.

Unfortunately the release workflow keeps failing and it appears to be an issue with the Action we're using cycjimmy/semantic-release-action#79. I'm working on a fix next.

@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tswfi tswfi deleted the django_4.0.0_compatibility branch December 30, 2021 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants