Bug#1061143: gobject-introspection: FTBFS with Python 3.12 as default

Simon McVittie smcv at debian.org
Fri Jan 19 13:38:09 GMT 2024


On Fri, 19 Jan 2024 at 12:46:41 +0000, Simon McVittie wrote:
> On Fri, 19 Jan 2024 at 13:54:26 +0200, Graham Inggs wrote:
> > gobject-introspection FTBFS with Python 3.12 as the default version.
> > I've copied what I hope is the relevant part of the log below.
> 
> This is not a very helpful log, I hope it gives more information earlier
> or later?

It does give more useful information earlier in the log, which is that
at least one of these tests (possibly all of them) fail with:

----------------------------------- stderr -----------------------------------
Traceback (most recent call last):
  File "/home/smcv/src/debian/gobject-introspection/tests/warn/warningtester.py", line 14, in <module>
    from giscanner.annotationparser import GtkDocCommentBlockParser
  File "/home/smcv/src/debian/gobject-introspection/giscanner/annotationparser.py", line 117, in <module>
    from .message import Position, warn, error
  File "/home/smcv/src/debian/gobject-introspection/giscanner/message.py", line 26, in <module>
    from . import utils
  File "/home/smcv/src/debian/gobject-introspection/giscanner/utils.py", line 385, in <module>
    import distutils.cygwinccompiler
  File "/usr/lib/python3/dist-packages/_distutils_hack/__init__.py", line 97, in find_spec
    return method()
           ^^^^^^^^
  File "/usr/lib/python3/dist-packages/_distutils_hack/__init__.py", line 104, in spec_for_distutils
    import importlib.abc
  File "/usr/lib/python3.12/importlib/abc.py", line 18, in <module>
    from .resources import abc as _resources_abc
  File "/usr/lib/python3.12/importlib/resources/__init__.py", line 3, in <module>
    from ._common import (
  File "/usr/lib/python3.12/importlib/resources/_common.py", line 8, in <module>
    import inspect
  File "/usr/lib/python3.12/inspect.py", line 145, in <module>
    import ast
  File "/home/smcv/src/debian/gobject-introspection/_build/giscanner/ast.py", line 27, in <module>
    from . import message
ImportError: attempted relative import with no known parent package
==============================================================================

> > Although Python 3.12 is not yet the default in Debian unstable, you
> > should be able to reproduce the failure by editing:
> > 
> > /usr/share/python3/debian_defaults
> > 
> > or by exporting DEBPYTHON3_DEFAULT=3.12 during the build.
> 
> Thanks, I had been wondering how maintainers of packages that use a single
> Python version were meant to test this!

That was not enough, but I was able to reproduce the failure by
doing those steps, installing python3.12-dev, and
"ln -fns python3.12 /usr/bin/python3".

    smcv



More information about the pkg-gnome-maintainers mailing list