Skip to content

Remove reader parameter from request.multipart() #3090

Closed
@asvetlov

Description

The parameter exists from the very beginning, it is declared as:

    async def multipart(self, *, reader=multipart.MultipartReader):

I found that we can drop it: reader is always multipart.MultipartReader, aiohttp doesn't provide an alternative multipart reader implementation.

I have a problem with adding type hints to the method. Now it can return anything which is returned by reader(headers, content) call. Dropping the parameter allows specifying the method return type without any functionality lose.

@kxepal maybe you have a comment?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions