View previous topic :: View next topic |
Author |
Message |
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2255
|
Posted: Tue Jun 25, 2024 5:00 am Post subject: |
|
|
dpshak wrote: |
Knowing that Python 3.12 was going to be the default starting June 1st, I added it to 'python-exec.conf:' |
What prompted that action?
Best Regards,
Georgi |
|
Back to top |
|
|
dpshak Apprentice
Joined: 05 May 2005 Posts: 188 Location: Wisconsin
|
Posted: Thu Jun 27, 2024 2:55 am Post subject: |
|
|
asturm wrote: | As expected, none of this is KDE stuff. |
Really?
>=dev-python/packaging-24.1 python_targets_python3_11
# required by dev-python/setuptools-70.0.0::gentoo
# required by dev-python/mako-1.3.5::gentoo
# required by media-libs/mesa-24.1.2::gentoo
# required by x11-base/xwayland-24.1.0::gentoo
# required by kde-plasma/kwin-6.1.0::gentoo
# required by kde-plasma/plasma-workspace-6.1.0::gentoo
# required by kde-plasma/xdg-desktop-portal-kde-6.1.0::gentoo
# required by kde-plasma/plasma-integration-6.1.0-r1::gentoo
>=dev-python/jaraco-text-3.12.1 python_targets_python3_11
# required by dev-python/jaraco-functools-4.0.1::gentoo
# required by dev-python/jaraco-text-3.12.1::gentoo
# required by dev-python/setuptools-70.0.0::gentoo
# required by dev-python/mako-1.3.5::gentoo
# required by media-libs/mesa-24.1.2::gentoo
# required by x11-base/xwayland-24.1.0::gentoo
Edited to fix format errors.
# required by kde-plasma/kwin-6.1.0::gentoo
# required by kde-plasma/plasma-workspace-6.1.0::gentoo
# required by kde-plasma/xdg-desktop-portal-kde-6.1.0::gentoo
# required by kde-plasma/plasma-integration-6.1.0-r1::gentoo
>=dev-python/more-itertools-10.3.0 python_targets_python3_11
# required by net-libs/libaccounts-glib-1.27::gentoo
# required by net-libs/accounts-qt-1.17::gentoo
# required by kde-apps/kaccounts-integration-24.05.1::gentoo
# required by kde-plasma/plasma-desktop-6.1.0::gentoo[kaccounts]
and
>=dev-python/fastjsonschema-2.20.0 python_targets_python3_11
# required by kde-plasma/xdg-desktop-portal-kde-6.1.0::gentoo
# required by kde-plasma/plasma-integration-6.1.0-r1::gentoo
# required by kde-plasma/plasma-workspace-6.1.0::gentoo
# required by kde-plasma/plasma-desktop-6.1.0::gentoo
# required by @selected
# required by @world (argument)
Edited to fix format errors. |
|
Back to top |
|
|
dpshak Apprentice
Joined: 05 May 2005 Posts: 188 Location: Wisconsin
|
Posted: Thu Jun 27, 2024 3:26 am Post subject: |
|
|
logrusx wrote: | dpshak wrote: |
Knowing that Python 3.12 was going to be the default starting June 1st, I added it to 'python-exec.conf:' |
What prompted that action?
Best Regards,
Georgi |
A news article (eselect news list) was published a few months ago.
I don't know when the: PYTHON_SINGLE_TARGET and PYTHON_TARGETS went extinct, but earlier this year (or maybe late last year?) there was either a news item, or a message within portage, that implied that using those keywords in 'make.conf' had been deprecated in favor of a new system whereby you would append those attributes to an individual package in 'make.conf.' That seemed stupid to me, considering Python is used, almost universally in Gentoo. However, because I couldn't find any 'wiki' items that talked about the various Python iterations, I decided to leave well enough alone!
So, after some research (when building this laptop)- knowing that Python3_12 was going to be the default - I let the system build and added Python3_12 to that config file to be ready for the future update. To be clear: using emerge -uUDav solved the majority of my dependency issues on BOTH machines! |
|
Back to top |
|
|
kimchi_sg Advocate
Joined: 26 Nov 2004 Posts: 3038
|
Posted: Thu Jun 27, 2024 3:35 am Post subject: |
|
|
dpshak wrote: | logrusx wrote: | dpshak wrote: |
Knowing that Python 3.12 was going to be the default starting June 1st, I added it to 'python-exec.conf:' |
What prompted that action?
Best Regards,
Georgi |
...
...knowing that Python3_12 was going to be the default - I let the system build and added Python3_12 to that config file... |
No news item or wiki item mentions that file anywhere.
Anyway modern Gentoo has gone the way whereby the less files you edit, the better for your system. |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 9204
|
Posted: Thu Jun 27, 2024 4:44 am Post subject: |
|
|
Really. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2255
|
Posted: Thu Jun 27, 2024 7:00 am Post subject: |
|
|
dpshak wrote: | logrusx wrote: | dpshak wrote: |
Knowing that Python 3.12 was going to be the default starting June 1st, I added it to 'python-exec.conf:' |
What prompted that action?
Best Regards,
Georgi |
A news article (eselect news list) was published a few months ago.
I don't know when the: PYTHON_SINGLE_TARGET and PYTHON_TARGETS went extinct, but earlier this year (or maybe late last year?) there was either a news item, or a message within portage, that implied that using those keywords in 'make.conf' had been deprecated in favor of a new system whereby you would append those attributes to an individual package in 'make.conf.' That seemed stupid to me, considering Python is used, almost universally in Gentoo. However, because I couldn't find any 'wiki' items that talked about the various Python iterations, I decided to leave well enough alone!
So, after some research (when building this laptop)- knowing that Python3_12 was going to be the default - I let the system build and added Python3_12 to that config file to be ready for the future update. To be clear: using emerge -uUDav solved the majority of my dependency issues on BOTH machines! |
As already mentioned, no news item prompted such an action. I personally have never edited that file and I haven't heard or seen such advice here on the forums or elsewhere. I remember it mentione long ago, but that was well before the current system for python support or at most while it was still developing, at least more than 3 years ago. I don't know what that research might be but you must have somehow compiled that from incomplete information. Putting python related stuff in make.conf is discouraged in favor of per-package entries in package.use. For global settings, use the syntax from the real python 3.12 migration news item:
Code: | */* PYTHON_TARGETS -* python3_12
*/* PYTHON_SINGLE_TARGET -* python3_11 python3_12 |
again in package.use
Also refrain from attempting such random actions in-between forum posts when you're asking for help. Do not pollute the situation people are already working on to help you.
EDIT: I just checked out, maybe you're talking about:
Quote: | 2021-01-30 (2021-01-30-python-preference-to-follow-python-targets - removed?) |
but that's long been irrelevant and perhaps removed for that reason.
Best Regards,
Georgi |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 9204
|
Posted: Thu Jun 27, 2024 7:47 am Post subject: |
|
|
kimchi_sg wrote: | Anyway modern Gentoo has gone the way whereby the less files you edit, the better for your system. |
If you lack the technical understanding, the more configuration changes you make, the more complexity you add. That is neither special to "modern" Gentoo or Gentoo at all. |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1901
|
Posted: Thu Jun 27, 2024 7:48 am Post subject: |
|
|
Every option in a configuration file is an extra constraint for Portage to satisfy. Portage will try very, very hard to honour your requests and isn't always great at telling you which constraint you added years ago is causing it to do that, though. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22456
|
Posted: Thu Jun 27, 2024 11:56 am Post subject: |
|
|
dpshak wrote: | A news article (eselect news list) was published a few months ago.
I don't know when the: PYTHON_SINGLE_TARGET and PYTHON_TARGETS went extinct, but earlier this year (or maybe late last year?) there was either a news item, or a message within portage, that implied that using those keywords in 'make.conf' had been deprecated in favor of a new system whereby you would append those attributes to an individual package in 'make.conf.' That seemed stupid to me, considering Python is used, almost universally in Gentoo. | Setting these values in make.conf is an assignment, so you ignore whatever your profile would have done and get exactly what you wrote, no more, no less. Adjusting these in package.use is a modification, so you add or remove relative to the profile's choices. This is encouraged because it is much more flexible. You can change the target for a small number of special packages, without touching everything else. If you want to affect every package, you can use a wildcard, and still have the flexibility to selectively add or remove targets. For example, you could enable python3.12 on everything ahead of when the profile sets it, without disabling the inherited-from-profile python3.11 support. When Gentoo switches off python3.11-by-default (earlier this month, according to the news), then you pick up that change. The equivalent in make.conf would have been to force-enable both versions for everything, and ignore both Gentoo enabling python3.12 and disabling python3.11. |
|
Back to top |
|
|
dpshak Apprentice
Joined: 05 May 2005 Posts: 188 Location: Wisconsin
|
Posted: Mon Jul 01, 2024 10:49 pm Post subject: |
|
|
Hu wrote: | dpshak wrote: | A news article (eselect news list) was published a few months ago.
I don't know when the: PYTHON_SINGLE_TARGET and PYTHON_TARGETS went extinct, but earlier this year (or maybe late last year?) there was either a news item, or a message within portage, that implied that using those keywords in 'make.conf' had been deprecated in favor of a new system whereby you would append those attributes to an individual package in 'make.conf.' That seemed stupid to me, considering Python is used, almost universally in Gentoo. | Setting these values in make.conf is an assignment, so you ignore whatever your profile would have done and get exactly what you wrote, no more, no less. Adjusting these in package.use is a modification, so you add or remove relative to the profile's choices. This is encouraged because it is much more flexible. You can change the target for a small number of special packages, without touching everything else. If you want to affect every package, you can use a wildcard, and still have the flexibility to selectively add or remove targets. For example, you could enable python3.12 on everything ahead of when the profile sets it, without disabling the inherited-from-profile python3.11 support. When Gentoo switches off python3.11-by-default (earlier this month, according to the news), then you pick up that change. The equivalent in make.conf would have been to force-enable both versions for everything, and ignore both Gentoo enabling python3.12 and disabling python3.11. |
First of all, for all those that commented on my statement: Quote: | ...in favor of a new system whereby you would append those attributes to an individual package in 'make.conf.' | I misspoke (miss typed?). Thanks to this news item:
Code: | main /home/dave # eselect news read 28
2024-05-09-python3-12
Title Python 3.12 to become the default on 2024-06-01
Author Michał Górny <mgorny@gentoo.org>
Posted 2024-05-09
Revision 1
We are planning to switch the default Python target of Gentoo systems
on 2024-06-01, from Python 3.11 to Python 3.12. If you have not changed
the values of PYTHON_TARGETS or PYTHON_SINGLE_TARGET, the change will
have immediate effect on your system and the package manager will try
to switch automatically on the next upgrade following the change.
If you did change the values, prefer a safer approach or have problems
with the update, read on.
Please note that the default upgrade method switches packages to the new
Python versions as they are rebuilt. This means that all interdependent
packages have to support the new version for the upgrade to proceed,
and that some programs may temporarily fail to find their dependencies
throughout the upgrade (although programs that are already started
are unlikely to be affected).
If you have PYTHON_TARGETS or PYTHON_SINGLE_TARGET declared
in make.conf, please remove these declarations as they will interfere
with the package.use samples provided below. Using make.conf for Python
targets is discouraged as it prevents package defaults from applying
when necessary. This news item assumes using /etc/portage/package.use
or your package manager's equivalent file for configuration. |
I was aware that the old system of setting the python targets in 'make.conf' had been deprecated in favor of setting them in package.use. After reading the rest of that news item, regarding the new PYTHON_TARGETS settings, I was confused. WHY would I add PYTHON_TARGETS to EACH package in 'package.use?' Again, this makes no sense! So I checked the python wiki on wiki.gentoo and they talked about setting the current PYTHON_TARGET stuff in /etc/python-exec/python-exec.conf. So I added Python3_12 to that config file, while leaving the Python3_11 stuff in place.
So here we are today. After reading the various posts, commenting on MY post, I did some experimenting. When I read the news item, listed above, I didn't think I could create a "*.*" file. I now know you can. But that begs another question! How is adding a "*.*" file to /etc/portage/package.use any different than the global assignments in "make.conf?" And if we have a /etc/python-exec/python-exec.conf, why do we need the "*.*" file in /etc/portage/package.use? I was under the impression that the /etc/portage/package.use files were used to tweak individual packages - i.e."net-misc/tigervnc [+/-] server," not GLOBAL settings?!?
I don't pretend to be an expert here, my day job is driving a semi, but I HAVE been running Gentoo for around 20 years, so I know a little something! |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 9204
|
Posted: Mon Jul 01, 2024 10:57 pm Post subject: |
|
|
dpshak wrote: | So I checked the python wiki on wiki.gentoo and they talked about setting the current PYTHON_TARGET stuff in /etc/python-exec/python-exec.conf. So I added Python3_12 to that config file, while leaving the Python3_11 stuff in place. |
Would you quote the section that made you do that?
dpshak wrote: | So here we are today. After reading the various posts, commenting on MY post, I did some experimenting. When I read the news item, listed above, I didn't think I could create a "*.*" file. I now know you can. But that begs another question! How is adding a "*.*" file to /etc/portage/package.use any different than the global assignments in "make.conf?" And if we have a /etc/python-exec/python-exec.conf, why do we need the "*.*" file in /etc/portage/package.use? I was under the impression that the /etc/portage/package.use files were used to tweak individual packages - i.e."net-misc/tigervnc [+/-] server," not GLOBAL settings?!?
I don't pretend to be an expert here, my day job is driving a semi, but I HAVE been running Gentoo for around 20 years, so I know a little something! |
You certainly don't know that file names in /etc/portage/package.use/ don't mean anything except the order in which they are processed. Heck, /etc/portage/package.use used to be a single file and it still can be. Content matters, and wild cards exist.
Look no further than, again, the python wiki: https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS
Last edited by asturm on Mon Jul 01, 2024 10:59 pm; edited 1 time in total |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1901
|
Posted: Mon Jul 01, 2024 10:58 pm Post subject: |
|
|
USE_EXPAND interacts poorly with make.conf assignments so package.use is preferred for it with */*. See bug 718396 and bug 922307 for example. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22456
|
Posted: Tue Jul 02, 2024 12:33 am Post subject: |
|
|
dpshak wrote: | How is adding a "*.*" file to /etc/portage/package.use any different than the global assignments in "make.conf?" | As I wrote above, and you even quoted, package.use modifies values, taking what existed before and adding or removing according to your statements. make.conf assigns values, overriding what existed before. Consider some worked examples below. Suppose that your profile from Gentoo enables python3_12 only. /etc/portage/make.conf: | # Pick a value that will not exist for a while, to discourage copying. This is only for demonstration purposes.
PYTHON_TARGETS="python3_300" | That will set PYTHON_TARGETS to exactly python3_300 for all packages, disabling all other PYTHON_TARGETS values and suppressing anything you get from your profile. /etc/portage/package.use: | */* PYTHON_TARGETS: python3_300 | That adds python3_300 to whatever would have been active before, so now all your packages are python3_12 python3_300. The first from the Gentoo profile. The second from your package.use. /etc/portage/package.use: | */* PYTHON_TARGETS: -python3_12 python3_300 | This disables python3_12 (which your profile would have enabled), then enables python3_300. When Gentoo enables python3_13, this line will not inhibit python3_13. /etc/portage/package.use: | */* PYTHON_TARGETS: -* python3_300 | This disables all PYTHON_TARGETS from your profile, mimicking what make.conf would have done. It then enables python3_300. When Gentoo enables python3_13, this line will inhibit python3_13.
The value of package.use is you can also do: /etc/portage/package.use: | # Use exactly one PYTHON_TARGETS value for Portage. Inherit profile settings for all other packages.
sys-apps/portage PYTHON_TARGETS: -* python3_300 | Or: /etc/portage/package.use: | # Use python3_12 for everything except Portage, which will use python3_300.
*/* PYTHON_TARGETS: -* python3_12
sys-apps/portage PYTHON_TARGETS: -* python3_300 |
|
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2255
|
Posted: Tue Jul 02, 2024 5:21 am Post subject: |
|
|
dpshak wrote: | I was under the impression that the /etc/portage/package.use files were used to tweak individual packages - i.e."net-misc/tigervnc [+/-] server," not GLOBAL settings?!? |
I think that last bit will bring clarity for you, in addition to what Hu explained:
https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS
https://wiki.gentoo.org/wiki/Python#Elective_version_upgrade
https://wiki.gentoo.org/wiki//etc/portage/package.use
What I didn't see explicitly explained is the PYTHON_ variables syntax, but Hu did a good job explaining it.
dpshak wrote: | I don't pretend to be an expert here, my day job is driving a semi, but I HAVE been running Gentoo for around 20 years, so I know a little something! |
Things have changed plenty for the last 20 years. Even for the last 5.
dpshak wrote: |
I was aware that the old system of setting the python targets in 'make.conf' had been deprecated in favor of setting them in package.use. After reading the rest of that news item, regarding the new PYTHON_TARGETS settings, I was confused. WHY would I add PYTHON_TARGETS to EACH package in 'package.use?' Again, this makes no sense! So I checked the python wiki on wiki.gentoo and they talked about setting the current PYTHON_TARGET stuff in /etc/python-exec/python-exec.conf. So I added Python3_12 to that config file, while leaving the Python3_11 stuff in place. |
I'm still curious where you found all those clues that let you that path though. If they are on the wiki, they sure need clarification and cleanup. Please try to find the time to find and report them here.
Best Regards,
Georgi |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|