Title: gh-118761: Improve import time for `pstats` and `zipfile` by removing imports to `typing` by picnixz · Pull Request #128981 · python/cpython · GitHub
Open Graph Title: gh-118761: Improve import time for `pstats` and `zipfile` by removing imports to `typing` by picnixz · Pull Request #128981 · python/cpython
X Title: gh-118761: Improve import time for `pstats` and `zipfile` by removing imports to `typing` by picnixz · Pull Request #128981 · python/cpython
Description: Those two imports are not really needed and we can reduce the import time of zipfile, or anything import it. Roughly, importing zipfile takes 8ms with this PR while it takes 10ms on main. Also, zipfile is not typed by default, so adding -> Self is a bit inconsistent (though it helps type checkers). I think such typing should be left to typeshed. cc @jaraco as the one who added the type hints in zipfile. Issue: gh-118761
Open Graph Description: Those two imports are not really needed and we can reduce the import time of zipfile, or anything import it. Roughly, importing zipfile takes 8ms with this PR while it takes 10ms on main. Also, zip...
X Description: Those two imports are not really needed and we can reduce the import time of zipfile, or anything import it. Roughly, importing zipfile takes 8ms with this PR while it takes 10ms on main. Also, zip...
Opengraph URL: https://github.com/python/cpython/pull/128981
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e1688bb3-a656-7355-a667-744185be1142 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C306:22A978:AD6B08:F42423:696A1CF2 |
| html-safe-nonce | 8b5d734a948574cb70f214c81aff416d1606440bd12be10e142bee798b9e852a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzA2OjIyQTk3ODpBRDZCMDg6RjQyNDIzOjY5NkExQ0YyIiwidmlzaXRvcl9pZCI6IjEwOTU5ODE2Nzc1MjgzNTgxMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1a0bf1284c6cf6e7513846b358917d90d7aa3971c526b592d8fb329160c916fb |
| hovercard-subject-tag | pull_request:2285601975 |
| 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/128981/files |
| twitter:image | https://avatars.githubusercontent.com/u/10796600?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10796600?s=400&v=4 |
| og:image:alt | Those two imports are not really needed and we can reduce the import time of zipfile, or anything import it. Roughly, importing zipfile takes 8ms with this PR while it takes 10ms on main. Also, zip... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3 |
| 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 | d515f6f09fa57a93bf90355cb894eb84ca4f458f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width