Fix (Sanic 21.3): TypeError: sentry_router_get() takes 2 positional arguments but 4 were given#1066
Fix (Sanic 21.3): TypeError: sentry_router_get() takes 2 positional arguments but 4 were given#1066SaidBySolo wants to merge 6 commits into
Conversation
cakemanny
left a comment
There was a problem hiding this comment.
In 21.3 and later the first non-self argument is no longer a Request, it's the path, so this looks a bit confusing.
Since request is not being used, is there a reason to not just write it as follows?
def sentry_router_get(self, *args):
# type: (Router, *Any) -> Any
rv = old_router_get(self, *args)
hub = Hub.current
...
it was burdensome to modify the code that worked fine. I have reduced the changes as much as possible and only changed the changes for 21.3. |
|
Hey @untitaker or @ahmedetefy, what's needed for this PR to make it in? Hopefully you are the right people to ask. |
|
We will handle it this week |
|
Hey @cakemanny did you manage to run the tests for |
|
Hey @ahmedetefy, well, I have now 😅 . Looks like they broke when going from 20.9.x to 20.12.x :( This is what you were seeing, yes? Basically it looks like they've added a check to stop people accidentally re-declaring the same app. |
|
No need, I have already picked this up.. will push a PR soon |
Fixed an issue with processing requests in 21.3.