This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use the proper Request in type hints. #9515
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
82df4c4
Use the proper Request in handlers.
clokep ad57f41
Use the proper request in media.
clokep bea9314
Use the proper request in rest/synapse.
clokep d54cf70
Use the proper request in rest/client.
clokep 16b96eb
Use the proper request in replication.
clokep c040e42
Pin Twisted when checking mypy for now.
clokep b0e0c72
Newsfragment
clokep d91327d
Clarify comment.
clokep 8cbc815
Add back the replication requester.
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use the proper request in replication.
- Loading branch information
commit 16b96eb4684d9dccb6a12a5de83a52d08b4a6593
There are no files selected for viewing
This file contains 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
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.
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.
Here (and below) the
request
is never used after this line, so I don't think this is doing anything.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.
How confident are we? If we're getting
request
as an input parameter and than mutating it as a side effect, might that have issues elsewhere?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.
I'm not sure what you're asking. Are you asking if we're confident in this change or if the code before this change might have been masking other bugs or something?
Note that this is the replication API, which I don't think has any concept of requester? The
Requester.deserialize
doesn't do much except generate an object from a string, so it shouldn't have any real side-effects. Maybe this is here to change logging?@erikjohnston do you know what the proper thing to do here is?
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.
Yeah, I think is so that the requester is logged, rather than the default
{None}
. We should probably make it happen automatically, somehow, rather than having it only work for a subset of the replication APIs.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.
Ah, OK. The weird thing is that that implies this is actually a
SynapseRequest
then, not aRequest
. I'll see if I can rework this bit.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.
8cbc815 reverts removing this.