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 Debug extension #365

Merged
merged 6 commits into from Dec 29, 2022
Merged

Add Debug extension #365

merged 6 commits into from Dec 29, 2022

Conversation

Kludex
Copy link
Contributor

@Kludex Kludex commented Dec 27, 2022

docs/extensions.rst Outdated Show resolved Hide resolved
docs/extensions.rst Outdated Show resolved Hide resolved
docs/extensions.rst Outdated Show resolved Hide resolved
docs/extensions.rst Outdated Show resolved Hide resolved
@Kludex
Copy link
Contributor Author

Kludex commented Dec 28, 2022

Just as a note... I think the issue that motivated this PR was more than just a "debug" extension.

I think it was more about having a namespace on which the application could add any kind of data related to the execution - because right now the ASGI applications use any field that may not conflict with the ASGI spec itself. I'm mentioned this based on the whole issue, but specifically about this comment.

In any case, maybe it's interesting to discuss if we should really add this "debug" extension or just add document a namespace to "execution" information. 🤷

@andrewgodwin
Copy link
Member

My recollection of the original motivation (granted, it's been 3 years) was that it was purely for testing - scenarios where you would be passing the raw ASGI response into more code. Server behaviour should be governed by their own extensions (private or spec'd), I think.

@Kludex
Copy link
Contributor Author

Kludex commented Dec 28, 2022

Yeah. This PR already satisfies my needs on Starlette (which is documented on the issue).

docs/extensions.rst Outdated Show resolved Hide resolved
Copy link
Member

@andrewgodwin andrewgodwin 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 apart from a single word!

docs/extensions.rst Outdated Show resolved Hide resolved
@Kludex
Copy link
Contributor Author

Kludex commented Dec 29, 2022

Applied 🙏

@andrewgodwin andrewgodwin merged commit 3602263 into django:main Dec 29, 2022
@andrewgodwin
Copy link
Member

Lovely, thanks for your work on this!

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.

Proposal: "http.response.template" extension.
2 participants