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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:269db449-29f8-1a99-b081-97832ef4977d |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 840A:4BD4F:10526BB:155D616:69815D8D |
| html-safe-nonce | b5fa33cd25b3012ae46f19d7ef57c54e9fd7a2131272e744ca068369ae186f46 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDBBOjRCRDRGOjEwNTI2QkI6MTU1RDYxNjo2OTgxNUQ4RCIsInZpc2l0b3JfaWQiOiI2MjA4NTUyMzUyNTg5MzcyODEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | de99c688345371cb55cf47d3621270de6ff3ff99801dad0d0570d4c178f7e4e5 |
| hovercard-subject-tag | pull_request:1499809932 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/checks |
| 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 | e137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6 |
| turbo-cache-control | no-preview |
| 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 full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac5d0ac5757d6140ccfa217c1ba554cd2d0b51b1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width