Title: util: close lockfile after opening successfully by skshetry · Pull Request #1639 · gitpython-developers/GitPython · GitHub
Open Graph Title: util: close lockfile after opening successfully by skshetry · Pull Request #1639 · gitpython-developers/GitPython
X Title: util: close lockfile after opening successfully by skshetry · Pull Request #1639 · gitpython-developers/GitPython
Description: Otherwise, this will leak file handles and can be a problem in Windows. Also, closefd=true is the default here, so no need to pass it explicitly. Regression from #1619. I noticed after our tests started raising ResourceWarning after 3.1.33 release. Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/git/util.py", line 938, in _obtain_lock_or_raise open(lock_file, mode='w', closefd=True) ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-runner/pytest-0/popen-gw0/external0/project.git/.git/config.lock' mode='w' encoding='UTF-8'>
Open Graph Description: Otherwise, this will leak file handles and can be a problem in Windows. Also, closefd=true is the default here, so no need to pass it explicitly. Regression from #1619. I noticed after our tests st...
X Description: Otherwise, this will leak file handles and can be a problem in Windows. Also, closefd=true is the default here, so no need to pass it explicitly. Regression from #1619. I noticed after our tests st...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1639
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:087dda04-1fcd-1a57-cce3-ba21ef9e1900 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AFAA:187A5:13C049F:1BF7BA9:6969015E |
| html-safe-nonce | b08aaf7f35c72f3ae713031484178d1761d9f97f29e00db620e8a1c7933cf325 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkFBOjE4N0E1OjEzQzA0OUY6MUJGN0JBOTo2OTY5MDE1RSIsInZpc2l0b3JfaWQiOiI2NjA1ODk0MzU0MjU5NzM4OTc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4929ba748521771c355efd21b388e4bb7e8d4ed9d9d817832e390824649d0800 |
| hovercard-subject-tag | pull_request:1499809932 |
| 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/1639/files |
| twitter:image | https://avatars.githubusercontent.com/u/18718008?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/18718008?s=400&v=4 |
| og:image:alt | Otherwise, this will leak file handles and can be a problem in Windows. Also, closefd=true is the default here, so no need to pass it explicitly. Regression from #1619. I noticed after our tests st... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e6156bd4ef9f2dc8dadf4c49a8f7ed8532186388cef72eda3ccb9f0ab3b8cfca |
| 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 | fd1938215b152e2c6a29cf56fec07fd9f91f1203 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width