Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Running the following code works:
importsocketwithsocket.socket()ass:s.setsockopt(socket.SOL_SOCKET,socket.SO_RCVBUF,2)
But if someone accidently passes a big value like so:
importsocketwithsocket.socket()ass:s.setsockopt(socket.SOL_SOCKET,socket.SO_RCVBUF,2**31)
He will get the follwing misleading error message:TypeError: a bytes-like object is required, not 'int'
Your environment
- CPython versions tested on: 3.13.0a0
- Operating system and architecture: x64 Ubuntu 20.04 LTS and Win10 x64 22H2