This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
further refine Handler validation #695
Comments
I'd prefer if we used |
pjenvey
added a commit
that referenced
this issue
Apr 4, 2017
- params -> router_data, kill unused vapid_info/body - kill bogus/unused timing vars - app_id isn't optional issue #695
pjenvey
added a commit
that referenced
this issue
Apr 4, 2017
- try to isolate it to the deferred definition and avoid passing args back and forth when not necessary - also put all_channels call back in a thread issue #695
pjenvey
added a commit
that referenced
this issue
Apr 4, 2017
- params -> router_data, kill unused vapid_info/body - kill bogus/unused timing vars - app_id isn't optional issue #695
pjenvey
added a commit
that referenced
this issue
Apr 4, 2017
- try to isolate it to the deferred definition and avoid passing args back and forth when not necessary - also put all_channels call back in a thread issue #695
pjenvey
added a commit
that referenced
this issue
Apr 4, 2017
- try to isolate it to the deferred definition and avoid passing args back and forth when not necessary - also put all_channels call back in a thread issue #695
pjenvey
added a commit
that referenced
this issue
Apr 4, 2017
- try to isolate it to the deferred definition and avoid passing args back and forth when not necessary - also put all_channels call back in a thread issue #695
pjenvey
added a commit
that referenced
this issue
Apr 4, 2017
- try to isolate it to the deferred definition and avoid passing args back and forth when not necessary - also put all_channels call back in a thread issue #695
pjenvey
added a commit
that referenced
this issue
Apr 5, 2017
- try to isolate it to the deferred definition and avoid passing args back and forth when not necessary - also put all_channels call back in a thread issue #695
pjenvey
added a commit
that referenced
this issue
Apr 6, 2017
- params -> router_data, kill unused vapid_info/body - kill bogus/unused timing vars - app_id isn't optional issue #695
pjenvey
added a commit
that referenced
this issue
Apr 6, 2017
- try to isolate it to the deferred definition and avoid passing args back and forth when not necessary - also put all_channels call back in a thread issue #695
pjenvey
added a commit
that referenced
this issue
Apr 13, 2017
- instead of valid_input call handler methods w/ the resulting dict as args/kwargs (similarly to how cyclone does) - bundle router info together in registration to ease passing it around - kill the now unneeded MessageSchema args/kwargs shuffle and its associated test_delete_topic_success2 - fix LogCheckSchema typo closes #695
pjenvey
added a commit
that referenced
this issue
Apr 13, 2017
more accurately reflects what's happening now and cyclone's path_args/kwargs are exactly the same as its calling args/kwargs anyway issue #695
pjenvey
added a commit
that referenced
this issue
Apr 13, 2017
- instead of valid_input call handler methods w/ the resulting dict as args/kwargs (similarly to how cyclone does) - bundle router info together in registration to ease passing it around - kill the now unneeded MessageSchema args/kwargs shuffle and its associated test_delete_topic_success2 - fix LogCheckSchema typo closes #695
pjenvey
added a commit
that referenced
this issue
Apr 13, 2017
more accurately reflects what's happening now and cyclone's path_args/kwargs are exactly the same as its calling args/kwargs anyway issue #695
While shaking this out it seemed like @post_load is maybe more appropriate (webpush.py already uses it). fields.Raw would require the @post_loadish code to live inside of the @validates_schema methods most of the time (and we already have some larger ones). Almost tempted to document what the schema produces to the handler in schema class docstring to make it very clear |
pjenvey
added a commit
that referenced
this issue
Apr 13, 2017
- instead of valid_input call handler methods w/ the resulting dict as args/kwargs (similarly to how cyclone does) - bundle router info together in registration to ease passing it around - kill the now unneeded MessageSchema args/kwargs shuffle and its associated test_delete_topic_success2 - fix LogCheckSchema typo closes #695
pjenvey
added a commit
that referenced
this issue
Apr 13, 2017
more accurately reflects what's happening now and cyclone's path_args/kwargs are exactly the same as its calling args/kwargs anyway issue #695
pjenvey
added a commit
that referenced
this issue
Apr 13, 2017
- instead of valid_input call handler methods w/ the resulting dict as args/kwargs (similarly to how cyclone does) - bundle router info together in registration to ease passing it around - kill the now unneeded MessageSchema args/kwargs shuffle and its associated test_delete_topic_success2 - fix LogCheckSchema typo closes #695
pjenvey
added a commit
that referenced
this issue
Apr 14, 2017
- instead of valid_input call handler methods w/ the resulting dict as args/kwargs (similarly to how cyclone does) - bundle router info together in registration to ease passing it around - kill the now unneeded MessageSchema args/kwargs shuffle and its associated test_delete_topic_success2 - fix LogCheckSchema typo closes #695
pjenvey
added a commit
that referenced
this issue
Apr 14, 2017
- instead of valid_input call handler methods w/ the resulting dict as args/kwargs (similarly to how cyclone does) - bundle router info together in registration to ease passing it around - kill the now unneeded MessageSchema args/kwargs shuffle and its associated test_delete_topic_success2 - fix LogCheckSchema typo closes #695
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Improvements we can do here:
o how we pass validation results to handlers. @threaded_validate currently attaches valid_input to the handler obj yet continues calling the handler method w/ unvalidated kwargs (which we always ignore and are thus confusing/dangerous to even keep around).
We should probably pass **valid_input as the kwargs instead
o We can also pass thru richer objects (like a fully constructed WebPushNotification object for e.g. in web/message.py). Either as fields.Raw or in a @post_load (not clear to me yet what works better)?
The text was updated successfully, but these errors were encountered: