This repository was archived by the owner on Jul 21, 2022. It is now read-only.
Expands wants request to class, removes request from classes#45
Open
Expands wants request to class, removes request from classes#45
Conversation
Pull Request Test Coverage Report for Build 253
💛 - Coveralls |
2 tasks
|
Any chance to get this PR merged and a new version pushed to PyPI? :-) |
Owner
Author
|
Sorry to be so radio silent on this. There's been a lot going on in my personal life that's blocked this from being merged. It'll be the beginning/middle of July before I can get back to this. Sorry guys. |
|
Any chance for this to get merged and v1 being pushed to PyPI? :) |
|
ping @justanr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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_requestto 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 acceptuserbut still use_call_requirementunder the hood to compensate for functions and classes that still expect request to be passed but haven't been decorated withwants_requestwants_requestwill 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_requirementwill removed in the 1.0 release in place ofwants_request