This repository has been archived by the owner on Jul 21, 2022. It is now read-only.
Expands wants request to class, removes request from classes #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Considering just making this the 1.0 release.
Expands
wants_request
to also work on subclasses of Requirement rather than just functions:This adds a
__call__
method at the front of the MRO that accepts user and request.In combination with this change,
Requirement.__call__
has been changed to only accept user. This change includes conditional requirements, which now only acceptuser
but still use_call_requirement
under the hood to compensate for functions and classes that still expect request to be passed but haven't been decorated withwants_request
wants_request
will also become a permanent member of the public API since injecting the request into requirements is still useful for some instances and not having to depend on it statically is nice._call_requirement
will removed in the 1.0 release in place ofwants_request