Title: [3.8] bpo-37772: fix zipfile.Path.iterdir() outputs (GH-15170) by miss-islington · Pull Request #15461 · python/cpython · GitHub
Open Graph Title: [3.8] bpo-37772: fix zipfile.Path.iterdir() outputs (GH-15170) by miss-islington · Pull Request #15461 · python/cpython
X Title: [3.8] bpo-37772: fix zipfile.Path.iterdir() outputs (GH-15170) by miss-islington · Pull Request #15461 · python/cpython
Description: 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. (cherry picked from commit a4e2991) Co-authored-by: shireenrao shireenrao@gmail.com https://bugs.python.org/issue37772
Open Graph Description: 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. ...
X Description: 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. ...
Opengraph URL: https://github.com/python/cpython/pull/15461
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0d12b78b-49cd-bd24-0ad5-0c34166772b7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B6AA:21896:11AA182:16DB1FC:6A5B02CF |
| html-safe-nonce | 4917cadd7852d4b4b133f9f523d7130e0f04791e589a910d880ff97fc00d8291 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkFBOjIxODk2OjExQUExODI6MTZEQjFGQzo2QTVCMDJDRiIsInZpc2l0b3JfaWQiOiIyMDUwMDkwNzY1MjIxODIzMTgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dc25b459255e7ce13e434dad84559fac0cec8e80999f2ee792a796f84dfc3542 |
| hovercard-subject-tag | pull_request:310622183 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/15461/files |
| twitter:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| og:image:alt | 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. ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width