Skip to content

Conversation

mxschmitt
Copy link
Member

self.times = times

def __call__(self) -> Any:
arg_count = len(inspect.signature(self._handler).parameters)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not require the param?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We treat it the same as for route() handling. In route() its either route or route + request.

if self._dispatcher_fiber:
handler_finished_future = self._loop.create_future()

def _handler() -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def _handler() -> None:
def handler() -> None:

),
is_internal=True,
)
except Error:
pass

async def remove_locator_handler(self, locator: "Locator") -> None:
for uid, data in self._locator_handlers.copy().items():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does python not support deletion during iteration?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>       for uid, data in self._locator_handlers.items():
E       RuntimeError: dictionary changed size during iteration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants