-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Hook Cleanup #101
Hook Cleanup #101
Conversation
@rmorshea I'm detecting something extremely fishy about how If I manually remove You can test this by removing the two This might be indicative of a bigger problem with how we expect Django model queries to operate. But before I go down the debugging rabbit hole, I'd like you to confirm my findings are not just a simple mistake. |
Did some more debugging and determined there is no issue.
Unrelated note, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since IDOM uses Google's style guide for docstrings, let's stick to that for consistency. That can be done in a separate PR though.
I've also been wondering whether we should add a parameter to use_query
that is False
by default but which, if set to True
, would remove the restriction that the return type be a Model
or QuerySet
. We can just create an issue for this right now, but I suspect someone is going to have a performance issue that would best be resolved by limiting what fields are returned.
Agreed that there should be an issue to modify I don't believe any other ORM has the same sync/async context protection as Django. That issue is unique to Django due to how all queries are required to be lazy. Truthfully, I really wish Django core would just give us a Regarding the docstrings, I've never been thrilled about declaring variable types via docstring. It's a bad practice that's been repeated for years (since Python 3.5+) due to Python 2 common practices. It's not DRY since it unnecessarily duplicates type-hint information. The more proper method can be seen in |
Description
This PR covers any oddities I discovered while integrating the new hooks with Conreq.
use_mutation
to haverefetch=None
, as the docs suggest is possible.use_origin
hook to return the browser'slocation.origin
test_use_query_and_mutation
test (Key presses require at least 100ms betweenkeyup
/keydown
on GH actions)use_mutation
/use_query
errors (currently silent, which is very hard to debug)use_mutation
'sreset()
use_query
requires aModel
orQuerySet
return (due to enforcing no lazy queries)Checklist:
Please update this checklist as you complete each item:
changelog.rst
has been updated with any significant changes, if necessary.