Commit a343e7f
fix: add AsyncResponse type to niquests response object (#439)
Changes proposed in this pull request:
* the object returned by niquests in the response can be `AsyncResponse`
(child class of `Response`:
https://github.com/jawah/niquests/blob/6dc75e944c41551a90ccabf08a203f1a719ce87b/src/niquests/models.py#L1660)
if the request calls were made async-ly:
https://github.com/jawah/niquests/blob/6dc75e944c41551a90ccabf08a203f1a719ce87b/src/niquests/async_session.py#L1150-L1182
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Updated error handling to work consistently with both synchronous and
asynchronous response objects, including broader support in the core
exception classes and `check_error`.
* **Chores**
* Tightened the minimum supported `niquests` version requirement to
`3.4.2` (still under the same major-version cap).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: kyteinsky <kyteinsky@gmail.com>
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
Co-authored-by: Oleksandr Piskun <oleksandr2088@icloud.com>1 parent 55e120c commit a343e7f
2 files changed
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | | - | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | | - | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
44 | | - | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | | - | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments