Repository navigation
Commit 3126762
authored
Give os.chmod a valid
* Order chmod's arguments the way CPython declares them
posix.chmod took dir_fd between path and mode. Since #8807 renders
each argument's parameter kind, that put `/` after `*`, which inspect
cannot parse, and path and mode stayed positional-only, so
os.chmod(path=..., mode=...) raised TypeError.
A ChmodArgs struct follows CPython's order, as nt.chmod already does.
path and mode are positional-or-keyword. follow_symlinks shows
CPython's text through py_default, like LinkArgs.
Assisted-by: Claude Code:claude-opus-5
* Reject a text signature that puts `/` after `*` or `**`
The writer counts positional-only parameters up front and emits `/`
when they run out, which assumes they come first in the Rust argument
list. Nothing enforced that, and posix.chmod violated it. The
signature is composed in a const context, so the assert fails the
build and names the fix.
Assisted-by: Claude Code:claude-opus-5__text_signature__ and keyword arguments (#8968)1 parent 52581b1 commit 3126762
3 files changed
Lines changed: 67 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| 259 | + | |
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| |||
575 | 577 | | |
576 | 578 | | |
577 | 579 | | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
578 | 586 | | |
579 | 587 | | |
580 | 588 | | |
| |||
591 | 599 | | |
592 | 600 | | |
593 | 601 | | |
594 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
595 | 606 | | |
596 | 607 | | |
597 | 608 | | |
| |||
631 | 642 | | |
632 | 643 | | |
633 | 644 | | |
| 645 | + | |
634 | 646 | | |
635 | 647 | | |
636 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
1189 | | - | |
| 1189 | + | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | 1192 | | |
| |||
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
1198 | | - | |
| 1198 | + | |
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
| |||
1219 | 1219 | | |
1220 | 1220 | | |
1221 | 1221 | | |
1222 | | - | |
| 1222 | + | |
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
| |||
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
1240 | 1241 | | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
1244 | 1258 | | |
1245 | 1259 | | |
1246 | 1260 | | |
1247 | | - | |
| 1261 | + | |
1248 | 1262 | | |
1249 | 1263 | | |
1250 | 1264 | | |
| |||
1254 | 1268 | | |
1255 | 1269 | | |
1256 | 1270 | | |
1257 | | - | |
1258 | | - | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1259 | 1274 | | |
1260 | | - | |
| 1275 | + | |
1261 | 1276 | | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1265 | 1293 | | |
1266 | 1294 | | |
1267 | 1295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments