Skip to content

The @atomic decorator now work for class grouped handler #31

@thomaszdxsn

Description

@thomaszdxsn

I watch aiohttp's doc, it teach me use the aiojobs.atomic to avoid request cancel.

And I found it not work on class grouped handler, I don't mean class view, just this mean method handler:

class UserRelated(object):
     
    def create_user_handler(self, request):
        ...

I investigate the source code, ensure the @atomic decorator cause the problem.

Traceback on class grouped handler

web_protocol.py            310 ERROR    Error handling request
Traceback (most recent call last):
  File ".../lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
    resp = await self._request_handler(request)
  File ".../lib/python3.6/site-packages/aiohttp/web_app.py", line 322, in _handle
    resp = await handler(request)
TypeError: wrapper() takes 1 positional argument but 2 were given

If you also think this is a bug, I can fix it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions