On Mon, 31 Mar 2025 at 12:30, Francesco Ballarin
<francesco.balla...@unicatt.it> wrote:
> ...
> indeed in there I have
> /usr/lib/python3/dist-packages/gi/overrides/Gedit.py
> and dpkg -S /usr/lib/python3/dist-packages/gi/overrides/Gedit.py shows
> gedit: /usr/lib/python3/dist-packages/gi/overrides/Gedit.py

Ok; thank you for checking that.  That does seem to explain the
problem, and hints at a possible workaround (removing the package(s)
that contain the overrides from the system.. not a universal
solution).

> Feel free to re-assign to gedit, or to close altogether if fixing this is not
> worth the effort. We have found a reasonable solution in fenics-dolfinx, and 
> we
> are happy to keep the environment variable for future builds.

Multiple packages in Debian include similar gobject-introspection
overrides -- and the decision to include those files has been
discussed and is sensible[1], I think.

The code in matplot is written with the intent to detect failures to
import gobject-introspection (aka gi), and so the bug is somehow
related to both matplotlib and Debian's packaging of the override
files.

I think a path forward could be to patch the matplotlib package in
Debian so that the presence of a dist-packages/gi directory -- perhaps
only created implicitly for the overrides -- is insufficient for the
Python import of gi to be successful.

If we can write such a patch in a way that would be suitable for other
distributions (I do not know how they ship override files), then
perhaps it could also be sent upstream for their consideration.

[1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754670

On Mon, 31 Mar 2025 at 12:30, Francesco Ballarin
<francesco.balla...@unicatt.it> wrote:
>
> Package: python3-matplotlib
> Followup-For: Bug #1101565
> X-Debbugs-Cc: francesco.balla...@unicatt.it, j...@jp-hosting.net
>
> Hi James,
> indeed in there I have
> /usr/lib/python3/dist-packages/gi/overrides/Gedit.py
> and dpkg -S /usr/lib/python3/dist-packages/gi/overrides/Gedit.py shows
> gedit: /usr/lib/python3/dist-packages/gi/overrides/Gedit.py
>
> Feel free to re-assign to gedit, or to close altogether if fixing this is not
> worth the effort. We have found a reasonable solution in fenics-dolfinx, and 
> we
> are happy to keep the environment variable for future builds.
>
> Thanks,
> Francesco

Reply via email to