Commit 0eb52f5
authored
Don't bother calling `os.scandir()` to scan for literal pattern segments,
like `foo` in `foo/*.py`. Instead, append the segment(s) as-is and call
through to the next selector with `exists=False`, which signals that the
path might not exist. Subsequent selectors will call `os.scandir()` or
`os.lstat()` to filter out missing paths as needed.
1 parent 069de14 commit 0eb52f5
File tree
4 files changed
+42
-11
lines changed- Lib
- pathlib
- test/test_pathlib
- Misc/NEWS.d/next/Library
4 files changed
+42
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| |||
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| 377 | + | |
| 378 | + | |
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
| |||
387 | 390 | | |
388 | 391 | | |
389 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
390 | 410 | | |
391 | 411 | | |
392 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
689 | 695 | | |
690 | | - | |
| 696 | + | |
691 | 697 | | |
692 | 698 | | |
693 | 699 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | | - | |
1433 | | - | |
| 1432 | + | |
| 1433 | + | |
1434 | 1434 | | |
1435 | | - | |
| 1435 | + | |
1436 | 1436 | | |
1437 | 1437 | | |
1438 | 1438 | | |
| |||
1741 | 1741 | | |
1742 | 1742 | | |
1743 | 1743 | | |
| 1744 | + | |
1744 | 1745 | | |
1745 | | - | |
| 1746 | + | |
1746 | 1747 | | |
1747 | 1748 | | |
1748 | 1749 | | |
| |||
1753 | 1754 | | |
1754 | 1755 | | |
1755 | 1756 | | |
1756 | | - | |
1757 | | - | |
1758 | 1757 | | |
1759 | 1758 | | |
1760 | 1759 | | |
| |||
1857 | 1856 | | |
1858 | 1857 | | |
1859 | 1858 | | |
| 1859 | + | |
1860 | 1860 | | |
1861 | | - | |
| 1861 | + | |
1862 | 1862 | | |
1863 | 1863 | | |
1864 | 1864 | | |
| |||
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
1871 | | - | |
1872 | 1871 | | |
1873 | 1872 | | |
1874 | 1873 | | |
| |||
1931 | 1930 | | |
1932 | 1931 | | |
1933 | 1932 | | |
1934 | | - | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
1935 | 1938 | | |
1936 | 1939 | | |
1937 | 1940 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments