aiohttp icon indicating copy to clipboard operation
aiohttp copied to clipboard

Interacting with aiohttp.request results in error (version 3.11.0)

Open brent-cybrid opened this issue 2 years ago • 4 comments

Describe the bug

We're using the aiohttp.request coroutine, however since updating to v3.11.0 we see the following error:

TypeError: RequestInfo.__new__() missing 1 required positional argument: 'real_url'

To Reproduce

  1. Make a call using aiohttp.request, e.g.,
aiohttp.request(method, url, data=body, headers=headers, auth=None, **kwargs) 

Expected behavior

No error would be raised

Logs/tracebacks

TypeError: RequestInfo.__new__() missing 1 required positional argument: 'real_url'


### Python Version

```console
$ python --version

Python 3.12.7

aiohttp Version

$ python -m pip show aiohttp

3.11.0

multidict Version

$ python -m pip show multidict

6.1.0

propcache Version

$ python -m pip show propcache

0.2.0

yarl Version

$ python -m pip show yarl

1.17.1

OS

Mac OS X, Alpine container

Related component

Client

Additional context

No response

Code of Conduct

  • [X] I agree to follow the aio-libs Code of Conduct

brent-cybrid avatar Nov 14 '24 16:11 brent-cybrid

duplicate of #9866

bdraco avatar Nov 14 '24 16:11 bdraco

@bdraco is this fixed with https://github.com/aio-libs/aiohttp/pull/9875?

webknjaz avatar Nov 14 '24 16:11 webknjaz

@bdraco is this fixed with #9875?

yes

bdraco avatar Nov 14 '24 16:11 bdraco

Well, aiohttp.request() should work. I'm hoping they just failed to mention they were using aioresponses (which would be obvious if the traceback, as requested in the template, was actually provided...).

Dreamsorcerer avatar Nov 14 '24 18:11 Dreamsorcerer