Commit 073fa98
committed
host_env:
Python's `os.rename` supports renaming a path relative to a directory
descriptor - essentially, `renameat`. The syscall and its Rustix wrapper
does all of the work, so this patch mainly updates the Python signature
to forward to the implementation.
As of this patch, `os.rename` is still incorrect for Windows because it
always replaces the destination file. I added a small note for future
contributors (or myself, since I might tackle it) as a reminder of
what's broken.renameat support for os.rename
1 parent dbfd69e commit 073fa98
2 files changed
Lines changed: 53 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
269 | 290 | | |
270 | 291 | | |
| 292 | + | |
271 | 293 | | |
| 294 | + | |
272 | 295 | | |
273 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
274 | 301 | | |
275 | 302 | | |
276 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| |||
1377 | 1378 | | |
1378 | 1379 | | |
1379 | 1380 | | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
1380 | 1393 | | |
1381 | 1394 | | |
1382 | | - | |
| 1395 | + | |
1383 | 1396 | | |
1384 | 1397 | | |
1385 | 1398 | | |
1386 | | - | |
| 1399 | + | |
1387 | 1400 | | |
1388 | 1401 | | |
1389 | 1402 | | |
1390 | | - | |
| 1403 | + | |
1391 | 1404 | | |
1392 | | - | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1393 | 1412 | | |
1394 | 1413 | | |
1395 | 1414 | | |
| |||
1932 | 1951 | | |
1933 | 1952 | | |
1934 | 1953 | | |
1935 | | - | |
1936 | | - | |
| 1954 | + | |
| 1955 | + | |
1937 | 1956 | | |
1938 | 1957 | | |
1939 | 1958 | | |
| |||
0 commit comments