Merged
Conversation
Owner
Author
|
Python 3.8 tests failing because of: Kludex/starlette#1106 |
- Catch errors from before and after hooks to ensure the resulted body is JSON:API compliant. - Added request_context to handle_error. - Went back to the temporary partial implementation, since Starlette is still not supporting functools.partial over classmethods.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Version 2.0 proposal:
BaseResource.get_allrenamed toBaseResource.get_manystarlette >= 0.14.2to install, for thefunctools.partialsupporthandle_{get, patch, delete, get_many, post}in favor of partialsidargument ofget,patch,deleteas required, because the framework already expects and passes it.before_requestandafter_requesthooksrequest_contexttoBaseResource.handle_errorandBaseRelationshipResource.handle_error_BaseResourceHandlerand moved / refactored common logicJSONAPIExceptionserialize itsdetaileven if a list of errors is giveninclude_resource_linkage=Truewhen creating aJSONAPIRelationshipBaseResource.register_routesnow optionally acceptsbase_pathBaseResource.prepare_relationsrenamed toBaseResource.include_relations