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

Add support for django 4.0 #62

Merged
merged 1 commit into from
Jan 7, 2022
Merged

Conversation

kernicPanel
Copy link
Contributor

Django 4.0 introduces changes on middlewares, and signals. https://docs.djangoproject.com/en/4.0/releases/4.0/

The get_response argument for django.utils.deprecation.MiddlewareMixin.init() is required and doesn’t accept None.

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

@leplatrem
Copy link
Contributor

@kernicPanel Could you try to rebase your PR on latest master?

@kernicPanel
Copy link
Contributor Author

@leplatrem I rebased this PR.

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2022

Codecov Report

Merging #62 (d682815) into main (7257535) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   97.81%   97.81%           
=======================================
  Files          19       19           
  Lines         594      594           
  Branches       93       93           
=======================================
  Hits          581      581           
  Misses          9        9           
  Partials        4        4           
Impacted Files Coverage Δ
src/dockerflow/django/middleware.py 100.00% <100.00%> (ø)
src/dockerflow/django/signals.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7257535...d682815. Read the comment docs.

@leplatrem
Copy link
Contributor

Thanks, apparently that wasn't enough to make the tests pass :(

@diox
Copy link
Contributor

diox commented Jan 7, 2022

That's because you're trying to build Django 4.0 support on Python 3.6/3.7. Django 4.0 requires Python 3.8 or greater. In addition, there is also a failure for py38-lint:
src/dockerflow/django/middleware.py:42:52: BLK100 Black would make changes.

@kernicPanel
Copy link
Contributor Author

Thanks for pointing this out, @diox
As I'm not familiar with tox, I hope this would pass now.

Copy link
Contributor

@diox diox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for taking this on, @kernicPanel !

@diox diox merged commit 5e30d69 into mozilla-services:main Jan 7, 2022
@kernicPanel
Copy link
Contributor Author

Thanks for your support @diox and @leplatrem , I'm glad to have contributed!

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

Successfully merging this pull request may close these issues.

4 participants