Title: AutoInterrupt is broken with Python 3.12.9 · Issue #2003 · gitpython-developers/GitPython · GitHub
Open Graph Title: AutoInterrupt is broken with Python 3.12.9 · Issue #2003 · gitpython-developers/GitPython
X Title: AutoInterrupt is broken with Python 3.12.9 · Issue #2003 · gitpython-developers/GitPython
Description: Refer to the comment, CPython is refactoring stdlib modules with lazy import, improving performance on loading. Unfortunately, this breaks the AutoInterrupt wrapper in GitPython, whose finalizer makes use of subprocess.Popen.terminate()....
Open Graph Description: Refer to the comment, CPython is refactoring stdlib modules with lazy import, improving performance on loading. Unfortunately, this breaks the AutoInterrupt wrapper in GitPython, whose finalizer ma...
X Description: Refer to the comment, CPython is refactoring stdlib modules with lazy import, improving performance on loading. Unfortunately, this breaks the AutoInterrupt wrapper in GitPython, whose finalizer ma...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/2003
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AutoInterrupt is broken with Python 3.12.9","articleBody":"Refer to [the comment](https://github.com/python/cpython/issues/118761#issuecomment-2661504264), CPython is refactoring stdlib modules with lazy import, improving performance on loading.\n\nUnfortunately, this breaks the AutoInterrupt wrapper in GitPython, whose finalizer makes use of subprocess.Popen.terminate(). After the refactor of subprocess module[1], the terminate() method may lazily load signal module, which is problematic if it is invoked during the interpreter finalization.\n\nA real-world reproducer is the spdxcheck.py[2] script in Linux kernel,\n\n```console\n$ ./scripts/spdxcheck.py outgoing/clock/v3/v3-0001-dt-bindings-clock-Document-clock-and-reset-unit-o.patch \nException ignored in: \u003cfunction Git.AutoInterrupt.__del__ at 0x7f25d89cd260\u003e\nTraceback (most recent call last):\n File \"/usr/lib/python3.12/site-packages/git/cmd.py\", line 790, in __del__\n File \"/usr/lib/python3.12/site-packages/git/cmd.py\", line 781, in _terminate\n File \"/usr/lib/python3.12/subprocess.py\", line 2220, in terminate\nImportError: sys.meta_path is None, Python is likely shutting down\n```\n\n[1]: https://github.com/python/cpython/pull/129427\n[2]: https://github.com/torvalds/linux/blob/master/scripts/spdxcheck.py","author":{"url":"https://github.com/ziyao233","@type":"Person","name":"ziyao233"},"datePublished":"2025-02-16T16:36:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/2003/GitPython/issues/2003"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d8c4d843-b63f-878c-19c2-e7d640bcd99d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE08:201610:206EB2:2DAD32:696914BE |
| html-safe-nonce | e3dd7d4879afc49c96c8bb195fed4f8558842fe7adb58a3f3029f5fa2690b801 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTA4OjIwMTYxMDoyMDZFQjI6MkRBRDMyOjY5NjkxNEJFIiwidmlzaXRvcl9pZCI6IjMxMTY2MDI5MzUxODExMjA3MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1a5be5a0ab4dba5a8f61592364715baf7a0957e09da1a0e91d89c7dba0433464 |
| hovercard-subject-tag | issue:2856200826 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/gitpython-developers/GitPython/2003/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3582d6665b36c67be6e04d32d288ec43c62e8335f353ef4058fd4e771511a14f/gitpython-developers/GitPython/issues/2003 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3582d6665b36c67be6e04d32d288ec43c62e8335f353ef4058fd4e771511a14f/gitpython-developers/GitPython/issues/2003 |
| og:image:alt | Refer to the comment, CPython is refactoring stdlib modules with lazy import, improving performance on loading. Unfortunately, this breaks the AutoInterrupt wrapper in GitPython, whose finalizer ma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ziyao233 |
| hostname | github.com |
| expected-hostname | github.com |
| None | afd5814870f8609d217a32dd3bccc05a5df5f5699df4d458c242e80fdfddcc2e |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 572e69339f2401a569f15071214cbbee314ea8bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width