Commit a4e2991
* fix Path._add_implied_dirs to include all implied directories
* fix Path._add_implied_dirs to include all implied directories
* Optimize code by using sets instead of lists
* ππ€ Added by blurb_it.
* fix Path._add_implied_dirs to include all implied directories
* Optimize code by using sets instead of lists
* ππ€ Added by blurb_it.
* Add tests to zipfile.Path.iterdir() fix
* Update test for zipfile.Path.iterdir()
* remove whitespace from test file
* Rewrite NEWS blurb to describe the user-facing impact and avoid implementation details.
* remove redundant [] within set comprehension
* Update to use unique_everseen to maintain order and other suggestions in review
* remove whitespace and add back add_dirs in tests
* Add new standalone function parents using posixpath to get parents of a directory
* removing whitespace (sorry)
* Remove import pathlib from zipfile.py
* Rewrite _parents as a slice on a generator of the ancestry of a path.
* Remove check for '.' and '/', now that parents no longer returns those.
* Separate calculation of implied dirs from adding those
* Re-use _implied_dirs in tests for generating zipfile with dir entries.
* Replace three fixtures (abcde, abcdef, abde) with one representative example alpharep.
* Simplify implementation of _implied_dirs by collapsing the generation of parent directories for each name.
1 parent ef61c52 commit a4e2991
File tree
3 files changed
+135
-52
lines changed- Lib
- test
- Misc/NEWS.d/next/Library
3 files changed
+135
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2397 | 2397 | | |
2398 | 2398 | | |
2399 | 2399 | | |
2400 | | - | |
| 2400 | + | |
2401 | 2401 | | |
2402 | | - | |
| 2402 | + | |
2403 | 2403 | | |
2404 | 2404 | | |
2405 | | - | |
2406 | | - | |
2407 | | - | |
2408 | | - | |
2409 | | - | |
2410 | | - | |
2411 | | - | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
2412 | 2408 | | |
2413 | 2409 | | |
2414 | | - | |
| 2410 | + | |
2415 | 2411 | | |
2416 | 2412 | | |
2417 | 2413 | | |
2418 | 2414 | | |
2419 | 2415 | | |
2420 | | - | |
2421 | | - | |
2422 | | - | |
2423 | | - | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
2424 | 2434 | | |
2425 | 2435 | | |
2426 | 2436 | | |
2427 | 2437 | | |
2428 | 2438 | | |
2429 | 2439 | | |
2430 | | - | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2431 | 2443 | | |
2432 | 2444 | | |
2433 | 2445 | | |
| |||
2436 | 2448 | | |
2437 | 2449 | | |
2438 | 2450 | | |
2439 | | - | |
| 2451 | + | |
2440 | 2452 | | |
2441 | | - | |
| 2453 | + | |
2442 | 2454 | | |
2443 | | - | |
| 2455 | + | |
2444 | 2456 | | |
2445 | 2457 | | |
2446 | 2458 | | |
2447 | | - | |
2448 | | - | |
2449 | | - | |
2450 | | - | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
2451 | 2463 | | |
2452 | 2464 | | |
2453 | 2465 | | |
2454 | 2466 | | |
2455 | | - | |
2456 | | - | |
2457 | | - | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
2458 | 2470 | | |
2459 | | - | |
| 2471 | + | |
2460 | 2472 | | |
2461 | 2473 | | |
2462 | | - | |
2463 | | - | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
2464 | 2477 | | |
2465 | 2478 | | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
2466 | 2482 | | |
2467 | 2483 | | |
2468 | | - | |
2469 | | - | |
2470 | | - | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
2471 | 2487 | | |
2472 | 2488 | | |
2473 | 2489 | | |
2474 | 2490 | | |
2475 | 2491 | | |
2476 | | - | |
2477 | | - | |
2478 | | - | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
2479 | 2495 | | |
2480 | 2496 | | |
2481 | 2497 | | |
2482 | 2498 | | |
2483 | | - | |
2484 | | - | |
| 2499 | + | |
| 2500 | + | |
2485 | 2501 | | |
2486 | 2502 | | |
2487 | 2503 | | |
2488 | 2504 | | |
2489 | 2505 | | |
2490 | 2506 | | |
2491 | | - | |
2492 | | - | |
| 2507 | + | |
| 2508 | + | |
2493 | 2509 | | |
2494 | 2510 | | |
2495 | 2511 | | |
| |||
2504 | 2520 | | |
2505 | 2521 | | |
2506 | 2522 | | |
2507 | | - | |
2508 | | - | |
| 2523 | + | |
| 2524 | + | |
2509 | 2525 | | |
2510 | 2526 | | |
2511 | 2527 | | |
2512 | | - | |
2513 | | - | |
| 2528 | + | |
| 2529 | + | |
2514 | 2530 | | |
2515 | 2531 | | |
2516 | 2532 | | |
2517 | 2533 | | |
2518 | | - | |
2519 | | - | |
| 2534 | + | |
| 2535 | + | |
2520 | 2536 | | |
2521 | 2537 | | |
2522 | 2538 | | |
2523 | 2539 | | |
2524 | | - | |
2525 | | - | |
| 2540 | + | |
| 2541 | + | |
2526 | 2542 | | |
2527 | 2543 | | |
| 2544 | + | |
2528 | 2545 | | |
2529 | 2546 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
2104 | 2105 | | |
2105 | 2106 | | |
2106 | 2107 | | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
2107 | 2167 | | |
2108 | 2168 | | |
2109 | 2169 | | |
| |||
2227 | 2287 | | |
2228 | 2288 | | |
2229 | 2289 | | |
2230 | | - | |
2231 | | - | |
2232 | | - | |
2233 | | - | |
2234 | | - | |
2235 | | - | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
2236 | 2301 | | |
2237 | 2302 | | |
2238 | 2303 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments