Title: Remove obsolete note in _iter_packed_refs by EliahKagan · Pull Request #1727 · gitpython-developers/GitPython · GitHub
Open Graph Title: Remove obsolete note in _iter_packed_refs by EliahKagan · Pull Request #1727 · gitpython-developers/GitPython
X Title: Remove obsolete note in _iter_packed_refs by EliahKagan · Pull Request #1727 · gitpython-developers/GitPython
Description: This removes a comment noting that a try-finally block had been present (or had been intended), but was removed because some version of Python had imposed a limitation on yield appearing in try-finally. That comment was obsolete as of 58c5b99 (#326), which wrapped the relevant code in a with-statement, because: Since then, the cleanup is done in a manner equivalent to try-finally. It turned out, as noted in that PR, that cleanup had not always been done automatically. (This was contrary to the prediction given in the comment.) At some point before that, the limitation that had prevented the use of try-finally no longer affected any supported version of Python. Specifically, it appears the only limitation that this could be was the limitation lifted in Python 2.5, where along with the introduction of close(), which is automatically called when a generator object is finalized, it became permitted for yield to appear in a try-block with an associated finally-block, on the grounds that calling close() runs the finally-block (by raising GeneratorExit). For details, see: https://docs.python.org/3/whatsnew/2.5.html#pep-342-new-generator-features This obsolete comment was one of the things I discovered while working on #1725, but I didn't include this change there, having not yet looked into the history of the code enough to be sure.
Open Graph Description: This removes a comment noting that a try-finally block had been present (or had been intended), but was removed because some version of Python had imposed a limitation on yield appearing in try-fin...
X Description: This removes a comment noting that a try-finally block had been present (or had been intended), but was removed because some version of Python had imposed a limitation on yield appearing in try-fin...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1727
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8ee2f975-3feb-1b8b-ef0f-63c5592827f4 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8882:ADD79:139911:1A2017:69684357 |
| html-safe-nonce | 45e729f673c28d416f775677a702afbbee88e907fa4d38ee606a58ed024dcdb2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODgyOkFERDc5OjEzOTkxMToxQTIwMTc6Njk2ODQzNTciLCJ2aXNpdG9yX2lkIjoiMjUxMDE3NzAxNjM5MjIwNTE0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ba1723d82d566b681faa5867264d707c2ac2d57c3b8712e88a2a9a9b24c0a80c |
| hovercard-subject-tag | pull_request:1586005732 |
| 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/gitpython-developers/GitPython/pull/1727/files |
| twitter:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| og:image:alt | This removes a comment noting that a try-finally block had been present (or had been intended), but was removed because some version of Python had imposed a limitation on yield appearing in try-fin... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f16c57f41ed243e5b4dfe9b9bcd6828bd83080b1b6dbb4ff239bbe9745f12e0c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cfa7062cc6d4fe8fcb156bd33f4c97bd3b2470af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width