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

ASGI and Async support #42

Merged
merged 18 commits into from
Oct 28, 2020
Merged

ASGI and Async support #42

merged 18 commits into from
Oct 28, 2020

Conversation

JonasKs
Copy link
Member

@JonasKs JonasKs commented Oct 26, 2020

This PR adds ASGI and async support, in other words support for the "new" modern type of Django.

This PR introduces breaking changes.

This version of Django GUID (3.0.0) requires Django3.1.1 or higher. (3.1.0 has a bug which makes it not possible to use async middlewares properly on it.)

Closes #22

JonasKs added 11 commits October 5, 2020 19:44
- Fixes tests
- Simplifies util functions
- Fixes signal for cleanup sync requests
- Splits sync and async middleware tests into two different files
- Implements async view tests with unique GUIDs
- Removes URL checker from middleware into processors
- Updates README.rst to be a bit more slick
@JonasKs JonasKs added the enhancement New feature or enhancement of the code label Oct 26, 2020
@JonasKs JonasKs self-assigned this Oct 26, 2020
@JonasKs JonasKs requested a review from sondrelg October 26, 2020 19:34
@JonasKs
Copy link
Member Author

JonasKs commented Oct 26, 2020

Sorry for the notification spam to watchers - the test matrix just won't work as I want it to.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
Copy link
Member

@sondrelg sondrelg left a comment

Choose a reason for hiding this comment

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

I would remove the SKIP_CLEANUP setting from settings, but otherwise only found some small things here and there. Great work 🔥

CHANGELOG.rst Outdated Show resolved Hide resolved
django_guid/api.py Outdated Show resolved Hide resolved
django_guid/middleware.py Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
tests/requirements-test-django31.txt Outdated Show resolved Hide resolved
- Makes the logs in the API a bit more clear
- Removes deprecated setting and warning
- Resolves comments from @sondrelg
@JonasKs JonasKs requested a review from sondrelg October 27, 2020 16:36
Copy link
Member

@sondrelg sondrelg left a comment

Choose a reason for hiding this comment

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

🥳

@JonasKs JonasKs merged commit b04199a into master Oct 28, 2020
@JonasKs JonasKs deleted the django31asgi branch November 18, 2020 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASGI support for later Django versions (works with Django 3.0.x)
2 participants