Title: Fix iter_change_type diff renamed property to prevent warning by kamilkrzyskow · Pull Request #1918 · gitpython-developers/GitPython · GitHub
Open Graph Title: Fix iter_change_type diff renamed property to prevent warning by kamilkrzyskow · Pull Request #1918 · gitpython-developers/GitPython
X Title: Fix iter_change_type diff renamed property to prevent warning by kamilkrzyskow · Pull Request #1918 · gitpython-developers/GitPython
Description: Hello 👋, in #1886 and e7dec7d a proper warning message was introduced for the usage of Diff.renamed pointing to use Diff.renamed_file. However, the usage of this property wasn't changed in the iter_change_type (since 3 years at that), so the internals use deprecated code 😞 GitPython/git/diff.py Lines 328 to 329 in 9fbfb71 elif change_type == "R" and diffidx.renamed: yield diffidx Given that the code wasn't reported yet, perhaps I'm doing something wrong using the iter_change_type and there are better ways 👀 I'm using a custom MkDocs hook to run GitPython and check for renames to automatically create redirects mappings for paths, and another plugin handles the redirect creation for the static pages. Here is the line which triggered the warning https://github.com/Gothic-Modding-Community/gmc/blob/b15fc318827d18ae1c2b67a4a73bc3d74c08b0ea/overrides/.hooks/git_redirects.py#L128 And the CI: https://github.com/Gothic-Modding-Community/gmc/actions/runs/9248064690/job/25437812921#step:8:21 WarningAs this is a one line change, I took the liberty to omit setting up an environment and just used the GitHub GUI to make a small change. I also didn't investigate deeper to check if the iter_change_type has any tests. Thanks for your time ✌️
Open Graph Description: Hello 👋, in #1886 and e7dec7d a proper warning message was introduced for the usage of Diff.renamed pointing to use Diff.renamed_file. However, the usage of this property wasn't changed in the ...
X Description: Hello 👋, in #1886 and e7dec7d a proper warning message was introduced for the usage of Diff.renamed pointing to use Diff.renamed_file. However, the usage of this property wasn't changed in ...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1918
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:54767081-8c59-4582-8cb3-ba7fc8fbf61c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A86A:2A0BC9:405094:58F24E:69689663 |
| html-safe-nonce | 190cbf62e82c131e92b60e233f26635b7861651108172f6a4e33d940dcf4e67d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODZBOjJBMEJDOTo0MDUwOTQ6NThGMjRFOjY5Njg5NjYzIiwidmlzaXRvcl9pZCI6IjcxMjYzMTgyMDAxMDA3ODc4MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 79f3ab4009e4a03f12a22a7b96c97e54e325746d8d3d60d88fe78ddcef789f3f |
| hovercard-subject-tag | pull_request:1891010114 |
| 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/1918/files |
| twitter:image | https://avatars.githubusercontent.com/u/34622465?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/34622465?s=400&v=4 |
| og:image:alt | Hello 👋, in #1886 and e7dec7d a proper warning message was introduced for the usage of Diff.renamed pointing to use Diff.renamed_file. However, the usage of this property wasn't changed in the ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 50f46dc2d6192249fd8ebf20e76c800f4f2596d4a5f3ab63dd63a754df154f54 |
| 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 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 | fef287f17234b4529a4b112a3d47fe8551e32ddd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width