@@ -70,15 +70,17 @@ class _RequestFactory(Generic[_T]):
70
70
defaults : dict [str , str ]
71
71
cookies : SimpleCookie
72
72
errors : BytesIO
73
- def __init__ (self , * , json_encoder : type [JSONEncoder ] = ..., ** defaults : Any ) -> None : ...
73
+ def __init__ (
74
+ self , * , json_encoder : type [JSONEncoder ] = ..., headers : Mapping [str , Any ] | None = ..., ** defaults : Any
75
+ ) -> None : ...
74
76
def request (self , ** request : Any ) -> _T : ...
75
77
def get (
76
78
self ,
77
79
path : str ,
78
80
data : _GetDataType = ...,
79
81
secure : bool = ...,
80
82
* ,
81
- headers : dict [str , Any ] | None = ...,
83
+ headers : Mapping [str , Any ] | None = ...,
82
84
** extra : Any
83
85
) -> _T : ...
84
86
def post (
@@ -88,21 +90,21 @@ class _RequestFactory(Generic[_T]):
88
90
content_type : str = ...,
89
91
secure : bool = ...,
90
92
* ,
91
- headers : dict [str , Any ] | None = ...,
93
+ headers : Mapping [str , Any ] | None = ...,
92
94
** extra : Any
93
95
) -> _T : ...
94
96
def head (
95
- self , path : str , data : Any = ..., secure : bool = ..., * , headers : dict [str , Any ] | None = ..., ** extra : Any
97
+ self , path : str , data : Any = ..., secure : bool = ..., * , headers : Mapping [str , Any ] | None = ..., ** extra : Any
96
98
) -> _T : ...
97
- def trace (self , path : str , secure : bool = ..., * , headers : dict [str , Any ] | None = ..., ** extra : Any ) -> _T : ...
99
+ def trace (self , path : str , secure : bool = ..., * , headers : Mapping [str , Any ] | None = ..., ** extra : Any ) -> _T : ...
98
100
def options (
99
101
self ,
100
102
path : str ,
101
103
data : dict [str , str ] | str = ...,
102
104
content_type : str = ...,
103
105
secure : bool = ...,
104
106
* ,
105
- headers : dict [str , Any ] | None = ...,
107
+ headers : Mapping [str , Any ] | None = ...,
106
108
** extra : Any
107
109
) -> _T : ...
108
110
def put (
@@ -112,7 +114,7 @@ class _RequestFactory(Generic[_T]):
112
114
content_type : str = ...,
113
115
secure : bool = ...,
114
116
* ,
115
- headers : dict [str , Any ] | None = ...,
117
+ headers : Mapping [str , Any ] | None = ...,
116
118
** extra : Any
117
119
) -> _T : ...
118
120
def patch (
@@ -122,7 +124,7 @@ class _RequestFactory(Generic[_T]):
122
124
content_type : str = ...,
123
125
secure : bool = ...,
124
126
* ,
125
- headers : dict [str , Any ] | None = ...,
127
+ headers : Mapping [str , Any ] | None = ...,
126
128
** extra : Any
127
129
) -> _T : ...
128
130
def delete (
@@ -132,7 +134,7 @@ class _RequestFactory(Generic[_T]):
132
134
content_type : str = ...,
133
135
secure : bool = ...,
134
136
* ,
135
- headers : dict [str , Any ] | None = ...,
137
+ headers : Mapping [str , Any ] | None = ...,
136
138
** extra : Any
137
139
) -> _T : ...
138
140
def generic (
@@ -143,7 +145,7 @@ class _RequestFactory(Generic[_T]):
143
145
content_type : str | None = ...,
144
146
secure : bool = ...,
145
147
* ,
146
- headers : dict [str , Any ] | None = ...,
148
+ headers : Mapping [str , Any ] | None = ...,
147
149
** extra : Any
148
150
) -> _T : ...
149
151
@@ -192,7 +194,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
192
194
enforce_csrf_checks : bool = ...,
193
195
raise_request_exception : bool = ...,
194
196
* ,
195
- headers : dict [str , Any ] | None = ...,
197
+ headers : Mapping [str , Any ] | None = ...,
196
198
** defaults : Any
197
199
) -> None : ...
198
200
def request (self , ** request : Any ) -> _MonkeyPatchedWSGIResponse : ...
@@ -203,7 +205,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
203
205
follow : bool = ...,
204
206
secure : bool = ...,
205
207
* ,
206
- headers : dict [str , Any ] | None = ...,
208
+ headers : Mapping [str , Any ] | None = ...,
207
209
** extra : Any
208
210
) -> _MonkeyPatchedWSGIResponse : ...
209
211
def post ( # type: ignore
@@ -214,7 +216,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
214
216
follow : bool = ...,
215
217
secure : bool = ...,
216
218
* ,
217
- headers : dict [str , Any ] | None = ...,
219
+ headers : Mapping [str , Any ] | None = ...,
218
220
** extra : Any
219
221
) -> _MonkeyPatchedWSGIResponse : ...
220
222
def head ( # type: ignore
@@ -224,7 +226,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
224
226
follow : bool = ...,
225
227
secure : bool = ...,
226
228
* ,
227
- headers : dict [str , Any ] | None = ...,
229
+ headers : Mapping [str , Any ] | None = ...,
228
230
** extra : Any
229
231
) -> _MonkeyPatchedWSGIResponse : ...
230
232
def trace ( # type: ignore
@@ -234,7 +236,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
234
236
follow : bool = ...,
235
237
secure : bool = ...,
236
238
* ,
237
- headers : dict [str , Any ] | None = ...,
239
+ headers : Mapping [str , Any ] | None = ...,
238
240
** extra : Any
239
241
) -> _MonkeyPatchedWSGIResponse : ...
240
242
def put ( # type: ignore
@@ -245,7 +247,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
245
247
follow : bool = ...,
246
248
secure : bool = ...,
247
249
* ,
248
- headers : dict [str , Any ] | None = ...,
250
+ headers : Mapping [str , Any ] | None = ...,
249
251
** extra : Any
250
252
) -> _MonkeyPatchedWSGIResponse : ...
251
253
def patch ( # type: ignore
@@ -256,7 +258,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
256
258
follow : bool = ...,
257
259
secure : bool = ...,
258
260
* ,
259
- headers : dict [str , Any ] | None = ...,
261
+ headers : Mapping [str , Any ] | None = ...,
260
262
** extra : Any
261
263
) -> _MonkeyPatchedWSGIResponse : ...
262
264
def delete ( # type: ignore
@@ -267,7 +269,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
267
269
follow : bool = ...,
268
270
secure : bool = ...,
269
271
* ,
270
- headers : dict [str , Any ] | None = ...,
272
+ headers : Mapping [str , Any ] | None = ...,
271
273
** extra : Any
272
274
) -> _MonkeyPatchedWSGIResponse : ...
273
275
@@ -282,7 +284,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
282
284
enforce_csrf_checks : bool = ...,
283
285
raise_request_exception : bool = ...,
284
286
* ,
285
- headers : dict [str , Any ] | None = ...,
287
+ headers : Mapping [str , Any ] | None = ...,
286
288
** defaults : Any
287
289
) -> None : ...
288
290
async def request (self , ** request : Any ) -> _MonkeyPatchedASGIResponse : ...
0 commit comments