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: redirect.github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:05c0f89c-b874-5fb7-e8d5-fba9b9ccdf4f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9A94:B754B:690FC:9122C:6980F7F5 |
| html-safe-nonce | 336221a52c0ff6cfafbada19df6c0f93f5e833a4651d43ad9b2d6515b8050f32 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTk0OkI3NTRCOjY5MEZDOjkxMjJDOjY5ODBGN0Y1IiwidmlzaXRvcl9pZCI6IjU2OTQ3MTQ5MzY2MzE2MDMwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1de06056206cdc28d15dc917413ac9a1508b90b7733597629c95054ce844e9a9 |
| 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 | 39fe8101494cbb823c09b619b68c80cd4d05ab7279997038dbe06bb91608abe1 |
| 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 | d5b34a4e4898b066c629879feb4b184bc471d6a7 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width