Commit 777af5f
committed
pathlib ABCs: yield progress reports from
Make `WritablePath._copy_from()` yield `(target, source, part_size)`
tuples when copying files and directories. A tuple with `part_size=0` is
emitted for every path encountered, and further tuples with `part_size>0`
**may** be emitted when copying regular files.
This should allow `anyio.Path` to wrap `_copy_from()` and make it
cancelable.WritablePath._copy_from()
1 parent f3bf304 commit 777af5f
3 files changed
Lines changed: 22 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
1112 | | - | |
| 1112 | + | |
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
| |||
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
1130 | | - | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1131 | 1133 | | |
| 1134 | + | |
1132 | 1135 | | |
1133 | 1136 | | |
1134 | 1137 | | |
1135 | 1138 | | |
1136 | 1139 | | |
1137 | 1140 | | |
1138 | | - | |
| 1141 | + | |
1139 | 1142 | | |
1140 | 1143 | | |
1141 | 1144 | | |
1142 | 1145 | | |
1143 | | - | |
| 1146 | + | |
| 1147 | + | |
1144 | 1148 | | |
1145 | 1149 | | |
1146 | 1150 | | |
1147 | 1151 | | |
1148 | 1152 | | |
1149 | | - | |
| 1153 | + | |
1150 | 1154 | | |
1151 | 1155 | | |
1152 | 1156 | | |
| |||
1160 | 1164 | | |
1161 | 1165 | | |
1162 | 1166 | | |
1163 | | - | |
1164 | | - | |
| 1167 | + | |
| 1168 | + | |
1165 | 1169 | | |
1166 | 1170 | | |
1167 | 1171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
417 | 419 | | |
418 | | - | |
| 420 | + | |
419 | 421 | | |
420 | | - | |
| 422 | + | |
| 423 | + | |
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
424 | 427 | | |
425 | 428 | | |
426 | 429 | | |
427 | | - | |
| 430 | + | |
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
431 | 434 | | |
432 | | - | |
| 435 | + | |
| 436 | + | |
433 | 437 | | |
434 | 438 | | |
435 | 439 | | |
| |||
0 commit comments