Commit 1ac4196
fix: Guard isinstance AsyncHttpTransport with ASYNC_TRANSPORT_ENABLED
When httpcore[asyncio] is not installed, AsyncHttpTransport is aliased
to HttpTransport. isinstance(transport, AsyncHttpTransport) would then
be True for ALL transports, causing close()/flush() to skip the sync
flush path. Guard with ASYNC_TRANSPORT_ENABLED flag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 38f97c2 commit 1ac4196
2 files changed
Lines changed: 25 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
1037 | 1042 | | |
1038 | 1043 | | |
1039 | 1044 | | |
1040 | | - | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1041 | 1048 | | |
1042 | 1049 | | |
1043 | 1050 | | |
| |||
1060 | 1067 | | |
1061 | 1068 | | |
1062 | 1069 | | |
1063 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1064 | 1074 | | |
1065 | 1075 | | |
1066 | 1076 | | |
| |||
1085 | 1095 | | |
1086 | 1096 | | |
1087 | 1097 | | |
1088 | | - | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1089 | 1101 | | |
1090 | 1102 | | |
1091 | 1103 | | |
| |||
1109 | 1121 | | |
1110 | 1122 | | |
1111 | 1123 | | |
1112 | | - | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
1113 | 1128 | | |
1114 | 1129 | | |
1115 | 1130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
0 commit comments