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

Switch environ usage to headers in request mixins #1808

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

pgjones
Copy link
Member

@pgjones pgjones commented May 16, 2020

This allows these mixins to be used in ASGI frameworks that have no
concept of environs but do have headers.

The downside is the extra indirection, although the headers are a cached property and the environ/headers are immutable.

@davidism davidism added this to the 2.0.0 milestone Oct 14, 2020
This allows these mixins to be used in ASGI frameworks that have no
concept of environs but do have headers.
@davidism
Copy link
Member

Had to add # type: ignore to the mixins, luckily there weren't a lot of uses. I've been thinking about this for a while, but I really think the mixins should inherit from BaseRequest. Or they should mostly be integrated into BaseRequest or Request since they don't add any overhead, just more attributes and methods.

@davidism davidism merged commit 7b3e34d into pallets:master Oct 14, 2020
@pgjones
Copy link
Member Author

pgjones commented Oct 14, 2020

Thanks 🎉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
@pgjones pgjones deleted the request_wrapper_headers branch June 11, 2022 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants