Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service incompatible with Python 3.13 #366

Open
picdc opened this issue Nov 5, 2024 · 1 comment
Open

Service incompatible with Python 3.13 #366

picdc opened this issue Nov 5, 2024 · 1 comment

Comments

@picdc
Copy link

picdc commented Nov 5, 2024

Fedora 41 ships with Python 3.13, which results in a failure when compiling the service (sudo ./install.sh):

> sudo ./install.sh
...
      gi/pygi-resulttuple.c: In function ‘resulttuple_dealloc’:
      gi/pygi-resulttuple.c:312:5: error: implicit declaration of function ‘Py_TRASHCAN_SAFE_BEGIN’; did you mean ‘Py_TRASHCAN_BEGIN’? [-Wimplicit-function-declaration]
        312 |     Py_TRASHCAN_SAFE_BEGIN (self)
            |     ^~~~~~~~~~~~~~~~~~~~~~
            |     Py_TRASHCAN_BEGIN
      gi/pygi-resulttuple.c:312:5: warning: nested extern declaration of ‘Py_TRASHCAN_SAFE_BEGIN’ [-Wnested-externs]
      gi/pygi-resulttuple.c:312:34: error: expected ‘;’ before ‘len’
        312 |     Py_TRASHCAN_SAFE_BEGIN (self)
            |                                  ^
            |                                  ;
      ......
        317 |     len = Py_SIZE (self);
            |     ~~~
      gi/pygi-resulttuple.c:334:5: error: implicit declaration of function ‘Py_TRASHCAN_SAFE_END’; did you mean ‘Py_TRASHCAN_END’? [-Wimplicit-function-declaration]
        334 |     Py_TRASHCAN_SAFE_END (self)
            |     ^~~~~~~~~~~~~~~~~~~~
            |     Py_TRASHCAN_END
      gi/pygi-resulttuple.c:334:5: warning: nested extern declaration of ‘Py_TRASHCAN_SAFE_END’ [-Wnested-externs]
      gi/pygi-resulttuple.c:334:32: error: expected ‘;’ before ‘}’ token
        334 |     Py_TRASHCAN_SAFE_END (self)
            |                                ^
            |                                ;
        335 | }
            | ~
      At top level:
      cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
      cc1: note: unrecognized command-line option ‘-Wno-incompatible-pointer-types-discards-qualifiers’ may have been intended to silence earlier diagnostics
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyGObject
Failed to build PyGObject

This is due to the version of PyGObject that is unfortunately too old for Python 3.13. Forcing it to 3.48.2 in requirements.txt (the one packaged in Fedora 41 at the moment) works perfectly.

I'm not an expert (at all) on Python dependency so I'm not sure how to handle it so that it works for multiple versions of Python.

@picdc
Copy link
Author

picdc commented Nov 5, 2024

It is actually resolved by #357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant