• Re: [gentoo-dev] [RFC] Splitting dev-lang/python into per-slot packages

    From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Eray Aslan on Sat Oct 12 12:00:01 2024
    On Sat, 2024-10-12 at 11:49 +0200, Eray Aslan wrote:
    On Sat, Oct 12, 2024 at 10:12:56AM +0200, Michał Górny wrote:

    As a side notice, the existing versions would probably remain as-is
    until removal, since there's really no gain in splitting them, given
    we'd have to retain compatibility with existing depstrings.

    so no dev-lang/python3_13t? nothing crucial but would have been nice

    Actually, I've put the whole freethreading work on hold to determine if
    we want to go for dev-lang/python3_13t. What I've meant, regular 3.13
    and older will remain as dev-lang/python:3.N.

    --
    Best regards,
    Michał Górny


    -----BEGIN PGP SIGNATURE-----

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmcKRrISHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQO3IoH/RTe9ElDU9kcBby1ZQrmku1zr+EYzZOI 7wFIroKZvNNfuVVjtFCTSchNLJ+Eh6HUjsAUuhBW8lQevo8shekRF7eyvWGzKGRd MLBftCggyuKIOj6VzuKjqgGyb4vGpdN46o6q3Xbtff7tebAbElZQp+P6WyzMGd70 YMaKCr70VxBCuydhTqe94iJ56p5oPpH7ZiXHBqKBIUxxTxo/eiSR7nHjhrbY0Zg9 YVDiZ/4QsIkSl86p6WpWqjBbeozt1ukKIkFgXlJifyJLp2erBBZC2zT7Gy3ARikB LUuiMQRxxVfSehl51ZIi43EN1LRZuk010CRg42VaV+x8KU9B0hL/p8k=
    =jYbt
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eray Aslan@21:1/5 to All on Sat Oct 12 11:50:02 2024
    On Sat, Oct 12, 2024 at 10:12:56AM +0200, Michał Górny wrote:
    Historically, all versions of CPython were slotted in a single package,
    i.e.:

    dev-lang/python:3.N

    This approach has been causing a major annoyance for users -- due to
    Portage "greedy" upgrade behavior, any time a new Python version was keyworded, Portage insisted on installing it, even though user's
    selected targets did not request the specific version. The potentially
    worst consequence of that would be random user scripts stopping to work,
    as they suddenly start using new Python, while all their dependencies
    are still installed per PYTHON_TARGETS.

    Upstream has recently added freethreading support to CPython. Since
    this support is not ABI compatible with the regular build, we need to introduce a separate target for it, and to package it separately.
    In the planned patchset, I've already put it as a separate package (dev- lang/python-freethreading), because otherwise Portage would insist
    on upgrading to it!

    However, I think the cleanest way forward would be to stop slotting
    CPython like this, and instead have a separate package for each version,
    just like the vast majority of distributions do, i.e.:

    dev-lang/python3_N

    FWIW, if I were to start anew, my ideal env would probably be:

    1/ keep N versions of python installed all the time
    2/ give the option to define N with sane defaults and limits
    3/ upgrade greedily
    4/ give the option to define upgrade behaviour (switch default python interpreter to newest, no change, no change unless no longer in the tree
    etc)
    5/ do not change from free-threaded to regular GIL versions or vice
    versa automatically. keep to one lane (this might even apply to jits so
    perhaps make it easy to define lanes)
    6/ make it easy to create virtualenvs with any python interpreter
    7/ make it easy to change between any python interpreter and set a
    default

    Your proposal is close. It would require some (minimal) manual work but
    that is reasonable afaic

    This naturally means that only the specific version requested (e.g. via targets) would be installed, and no cross-slot autoupgrades would
    happen. Ideally, I'd like to start doing that with Python 3.14 whose
    first alpha is expected next week. Depending on how they handle freethreading, we'd end up having the first or both of:

    dev-lang/python3_14
    dev-lang/python3_14t

    (Alternatives: python-3_14, python-freethreading-3_14? Though I think following PYTHON_TARGETS is cleaner here.)

    dev-lang/python3_14t is a better looking option imho

    As a side notice, the existing versions would probably remain as-is
    until removal, since there's really no gain in splitting them, given
    we'd have to retain compatibility with existing depstrings.

    so no dev-lang/python3_13t? nothing crucial but would have been nice

    Comments?

    Thanks for doing this

    --
    Eray

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich Mueller@21:1/5 to All on Sat Oct 12 12:10:01 2024
    On Sat, 12 Oct 2024, Ulrich Mueller wrote:

    IMHO this would abuse the package name for information that absolutely doesn't belong there. It belongs in PV or SLOT.

    To me it seems that you try to work around a problem (greedy upgrade behaviour) that should really be solved in the package manager.

    How about introducing something like PROPERTIES="separate-slot" instead,
    which would instruct the PM to treat the slot like a separate package?

    Ulrich

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmcKSX0PHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uInsH/RBeOTOecUDPoGvisozCD9W4FOtwXE4BMRRy IE20ofiuH/uuKGv+kWxKMTF4UHg6dD9mFUS9/Gn0dZkhDa5uQH6mscwpPbY2UbBC hABE1LAK0ZBPwhckLBfHLhlUNaU1sQW+eJMzIG8PYK1q/rO1uCkk/IpXzUzh+vpd 1GDnU5nse1fTxfSxOfqafexj6n6o8sc347dmNdDe4nRVWx62yp7EyKSjraz6zVtL nPcX9NdUb8UOoFLJFeh7r6z+YXNVVeQT6J50MOKzWxmf3Ab33ajWHOFe1+CamQlD jNqXXJ6OFkzxM+eD5MhjB9iQqxyzc6OV5CACo26uivympEEWeI4=
    =gI5V
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Ulrich Mueller on Sat Oct 12 12:10:01 2024
    On Sat, 2024-10-12 at 12:03 +0200, Ulrich Mueller wrote:
    On Sat, 12 Oct 2024, Ulrich Mueller wrote:

    IMHO this would abuse the package name for information that absolutely doesn't belong there. It belongs in PV or SLOT.

    To me it seems that you try to work around a problem (greedy upgrade behaviour) that should really be solved in the package manager.

    How about introducing something like PROPERTIES="separate-slot" instead, which would instruct the PM to treat the slot like a separate package?


    Isn't it ironic that I didn't manage to finish sending my reply about
    slots being abused and things bent so hard to make them fit slots,
    and you've already managed to propose adding more complexity in order to
    bend things even more into the wrong solution?

    --
    Best regards,
    Michał Górny


    -----BEGIN PGP SIGNATURE-----

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmcKSjsSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOJD4IAI9p2aMoiJmlO1utgqTZV8wFlqY99XYx 4Uvxo3OPpYao3oT148OzgJhCS6H9NL+oa5j5ow80VQ+pNUBU/IXh++7OB1T2vZqF NLWvVwuG/osAjTnvT72MeJzyhFOE44DOiHROO+gtbu/Ar0uAptJuEv5So+/dabz6 vVqKDkJyH5+TNJKWIcdW/Ees4qLewI7PDl/ZVacvSZQByfgbMfxhV4mKIWWMpiMD K0VYUEatYohYF8NX2p4rRp+ODmsWv6KiFliaSIshfTg+G6pE5cDj/HPumkL33uXF j4Dv666ru/VljhDG52dnumLus9RMF6RDtgU6Vfe1oOVtrDKs1pAcaNA=
    =y3ST
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)