Commit 05fd0ff
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 05fd0ff
2 files changed
Lines changed: 58 additions & 8 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 | + | |
269 | 272 | | |
270 | 273 | | |
| 274 | + | |
271 | 275 | | |
| 276 | + | |
272 | 277 | | |
273 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
274 | 290 | | |
275 | 291 | | |
276 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
277 | 307 | | |
278 | 308 | | |
279 | 309 | | |
| |||
| 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 | + | |
| 1393 | + | |
1380 | 1394 | | |
1381 | 1395 | | |
1382 | | - | |
| 1396 | + | |
1383 | 1397 | | |
1384 | 1398 | | |
1385 | 1399 | | |
1386 | | - | |
| 1400 | + | |
1387 | 1401 | | |
1388 | 1402 | | |
1389 | 1403 | | |
1390 | | - | |
| 1404 | + | |
1391 | 1405 | | |
1392 | | - | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1393 | 1413 | | |
1394 | 1414 | | |
1395 | 1415 | | |
| |||
1932 | 1952 | | |
1933 | 1953 | | |
1934 | 1954 | | |
1935 | | - | |
1936 | | - | |
| 1955 | + | |
| 1956 | + | |
1937 | 1957 | | |
1938 | 1958 | | |
1939 | 1959 | | |
| |||
0 commit comments