Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919904 - dev-libs/glib should support python3.12
Summary: dev-libs/glib should support python3.12
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 921826
  Show dependency tree
 
Reported: 2023-12-14 20:06 UTC by Boris Staletic
Modified: 2024-01-22 11:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Staletic 2023-12-14 20:06:39 UTC
Currently available dev-libs/glib only supports up to python 3.11.
I've ran the tests with python 3.12 and everything works.
Just changing thte PYTHON_COMPAT variable to include python3_12 is enough.

Reproducible: Always
Comment 1 Mart Raudsepp gentoo-dev 2024-01-03 22:12:30 UTC
Not claiming it doesn't work anyways, but the references upstream merge request says it's going to be in glib-2.79 (which will be glib-2.80 once out of alpha/beta), but you are requesting for 2.78.x and in 2.78.3 it still imports distutils.version
Comment 2 Mart Raudsepp gentoo-dev 2024-01-03 22:14:51 UTC
What would need testing is the running of gdbus-codegen, which might testing with a package that BDEPENDs on it, not glib package tests themselves, though gdbus-codegen ebuild does claim:

        einfo "Skipping tests. This package is tested by dev-libs/glib"
        einfo "when merged with FEATURES=test"

but I'm not sure how true that is.

Anyhow, the upstream merge request improving things for 3.12, but not being included in our versions yet, makes me weary of just adding the COMPAT without more research. Feel free to ehlp with said research.
Comment 3 Boris Staletic 2024-01-04 07:14:07 UTC
Interesting. I have successfully merged =dev-libs/glib-2.78.3 with python3_12 in PYTHON_COMPAT and FEATURE=test. If it needs further testing, I have definitely not tried that.

But sure, if upstream says it does not yet work with python3.12, I can not really argue with that. I did not look through the upstream issue tracker when raising this bug.
Comment 4 Boris Staletic 2024-01-04 17:19:19 UTC
Update:
I have tried emerging, with FEATURE=test, dev-libs/glib, dev-util/gdbus-codegen and x11-libs/gtk+

glib ebuild was changed to allow python3.12.
gtk+ was chosen because it has gdbus-codegen in BDEPEND.

All of that passed all tests and installed fine.

Looking at the glib pull request, the only python file that was importing distutils does not actually get installed, at least on my system.

All that said, I can always maintain my own ebuild for a while longer, until the new version of glib, with the switch to python-packaging, arrives in gentoo. So feel free to close this bug report if you want.
Comment 5 Mart Raudsepp gentoo-dev 2024-01-04 18:03:27 UTC
(In reply to Boris Staletic from comment #4)
> Update:
> I have tried emerging, with FEATURE=test, dev-libs/glib,
> dev-util/gdbus-codegen and x11-libs/gtk+
> 
> glib ebuild was changed to allow python3.12.

The questionable part is dev-util/gdbus-codegen and its PYTHON_COMPAT. But that apparently already has python3.12 in PYTHON_COMPAT. CCing who added it for clarification (I'm not saying it's wrong, just maybe they know all the background already without us having to re-research it)
Comment 6 Mart Raudsepp gentoo-dev 2024-01-21 21:19:18 UTC
Going to add the PYTHON_COMPAT to a bump and following up checking into the other split packages (that seem to have upstream fixes for 3.12 support, yet have PYTHON_COMPAT already) into a local TODO, as there seems to be no real issues reported from that so far
Comment 7 Larry the Git Cow gentoo-dev 2024-01-21 21:23:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25f7c9419f551769ded272280e99f1b2b2fa8620

commit 25f7c9419f551769ded272280e99f1b2b2fa8620
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2024-01-21 21:18:10 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2024-01-21 21:23:33 +0000

    dev-libs/glib: add 2.78.4
    
    Closes: https://bugs.gentoo.org/919904
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 dev-libs/glib/Manifest           |   1 +
 dev-libs/glib/glib-2.78.4.ebuild | 312 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 313 insertions(+)
Comment 8 Larry the Git Cow gentoo-dev 2024-01-22 11:27:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2a3cfe3b625829a894f700da57795327a9cbe92

commit d2a3cfe3b625829a894f700da57795327a9cbe92
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-22 11:25:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-22 11:26:10 +0000

    dev-util/gdbus-codegen: patch out distutils use
    
    Just like the fix from bug #922654, but utils.py gets installed, so we need
    to make sure we both patch it here too & add dev-python/packaging to RDEPEND.
    
    Thanks to leio for pointing it out.
    
    Bug: https://bugs.gentoo.org/919904
    Bug: https://bugs.gentoo.org/922654
    Fixes: 214971a1af7edd43d423a590d17f8cff8f36526e
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/gdbus-codegen-2.78.4-distutils.patch     | 36 ++++++++++++++++++++++
 ....78.4.ebuild => gdbus-codegen-2.78.4-r1.ebuild} |  8 ++++-
 2 files changed, 43 insertions(+), 1 deletion(-)