From 95182a8593f87046999fc50c4f4161843d68273c Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Fri, 22 Jul 2022 20:24:23 +0100 Subject: [PATCH] Refs #33865 -- Corrected signature of ExplodingBytesIO.read(). These subclasses of io.BytesIO should inherit the correct signature. --- tests/requests/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/requests/tests.py b/tests/requests/tests.py index 2d9063f4d1..4aef752894 100644 --- a/tests/requests/tests.py +++ b/tests/requests/tests.py @@ -610,7 +610,7 @@ class RequestsTests(SimpleTestCase): """ class ExplodingBytesIO(BytesIO): - def read(self, len=0): + def read(self, size=-1, /): raise OSError("kaboom!") payload = b"name=value" @@ -659,7 +659,7 @@ class RequestsTests(SimpleTestCase): """ class ExplodingBytesIO(BytesIO): - def read(self, len=0): + def read(self, size=-1, /): raise OSError("kaboom!") payload = b"x"