From: "Duje Mihanović" <duje.mihanovic@skole.hr>
To: Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ricardo Ribalda <ribalda@chromium.org>
Cc: linux-spdx@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/spdxcheck: Limit the scope of git.Repo
Date: Mon, 07 Apr 2025 16:38:19 +0200 [thread overview]
Message-ID: <12647854.O9o76ZdvQC@radijator> (raw)
In-Reply-To: <20250225-spx-v1-1-e935b27eb80d@chromium.org>
On Tuesday, 25 February 2025 14:10:41 Central European Summer Time Ricardo
Ribalda wrote:
> If the git.Repo object's scope extends to the Python interpreter's
> shutdown phase, its destructor may fail due to the interpreter's state.
>
> Exception ignored in: <function Git.AutoInterrupt.__del__ at 0x7f1941dd5620>
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/git/cmd.py", line 565, in __del__
> File "/usr/lib/python3/dist-packages/git/cmd.py", line 546, in _terminate
> File "/usr/lib/python3.13/subprocess.py", line 2227, in terminate
> ImportError: sys.meta_path is None, Python is likely shutting down
>
> Use the `with` statement to limit the scope of git.Repo and ensure
> proper resource management.
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
checkpatch suddenly broke for me with the same error as shown here and the
patch fixed it.
Tested-by: Duje Mihanović <duje.mihanovic@skole.hr>
Regards,
--
Duje
next prev parent reply other threads:[~2025-04-07 14:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 13:10 [PATCH] scripts/spdxcheck: Limit the scope of git.Repo Ricardo Ribalda
2025-04-03 21:34 ` Ricardo Ribalda
2025-04-04 6:21 ` Greg Kroah-Hartman
2025-04-04 6:29 ` Ricardo Ribalda
2025-04-04 8:06 ` Greg Kroah-Hartman
2025-04-07 14:38 ` Duje Mihanović [this message]
2025-04-08 8:39 ` Gon Solo
2025-04-08 9:33 ` Gon Solo
2025-04-08 10:36 ` Gon Solo
2025-04-08 17:34 ` spdxcheck: python git module considered harmful (was RE: [PATCH] scripts/spdxcheck: Limit the scope of git.Repo) Bird, Tim
2025-04-08 18:10 ` Greg Kroah-Hartman
2025-04-08 21:39 ` Ricardo Ribalda
2025-04-08 23:41 ` Thomas Gleixner
2025-04-09 17:44 ` Bird, Tim
2025-04-09 20:25 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12647854.O9o76ZdvQC@radijator \
--to=duje.mihanovic@skole.hr \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spdx@vger.kernel.org \
--cc=ribalda@chromium.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.