8000 fix: Mark language and user middleware synchronous for ASGI (#7985) by jbazik · Pull Request #7986 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Mark language and user middleware synchronous for ASGI (#7985) #7986

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

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

jbazik
Copy link
Contributor
@jbazik jbazik commented Sep 4, 2024

Description

Mark LanguageCookieMiddleware and CurrentUserMiddleware as non-asynchronous so that django wraps them properly to run in an asynchronous ASGI middleware stack. It's a pretty simple fix.

Related resources

Issue

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • [ x] I have followed the conventional commits guidelines to add meaningful information into the changelog
  • [ x] I have read the contribution guidelines and I have joined the channel #pr-reviews on our Discord Server to find a “pr review buddy” who is going to review my pull request.

Copy link
Member
@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

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

@marksweb I think this fix is great for django CMS 3.11. For 4.x we should see if we can get rid of the MiddlewareMixin.

@fsbraun fsbraun merged commit da38abd into django-cms:release/3.11.x Sep 8, 2024
75 of 77 checks passed
fsbraun added a commit that referenced this pull request Oct 7, 2024
* [4.1.3 release process] Building locales

* [4.1.3 release process] Bumped version to 4.1.3

* [4.1.3 release process] compilemessages

* [4.1.3 release process] compiling new static files

* [4.1.3 release process] updating latest docs

* Update CHANGELOG.rst

* Update 4.1.3.rst

* Update 4.1.3.rst

* chore: Django 5.2-compatible test fixtures (#8008)

* chore: Re-hook fixture loading to stay compatible with django 5.2

* Remove Postgres pin to v12 for testing

* Exclude Py39 from dj51

* Pin postgres to version 15

* Switch from psycopg2 to recommended psycopg>=3.1.8

---------

Co-authored-by: Github Release Action <info@django-cms.org>

* Update CHANGELOG.rst typo

* chore: Backport #8021

* fix: Update databases.txt to include psycopg2 for Django < 4.2

* fix: Mark language and user middleware synchronous for ASGI (Backport of #7986)

---------

Co-authored-by: Github Release Action <info@django-cms.org>
fsbraun pushed a commit that referenced this pull request Feb 17, 2025
fsbraun added a commit that referenced this pull request Feb 19, 2025
* fix: Mark language and user middleware synchronous for ASGI (#7985) (#7986)

Co-authored-by: John Bazik <jbazik@cs.brown.edu>

* fix: Remove MiddlewareMixin from middlewares

* Remove unneded `async_capable`

---------

Co-authored-by: John Bazik <jsb@cs.brown.edu>
Co-authored-by: John Bazik <jbazik@cs.brown.edu>
Co-authored-by: Vinit Kumar <mail@vinitkumar.me>
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.

2 participants
0