Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
When is the Python Update to 3.12?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 757

PostPosted: Sat Jun 01, 2024 5:54 pm    Post subject: When is the Python Update to 3.12? Reply with quote

I few weeks ago there was an eselect news item:
Quote:
2024-05-09 Python 3.12 to become the default on 2024-06-01


I was planning on using the default update. (Yes, I am trying to be lazy.)

Today's emerge --sync && emerge --update .... updated a couple of python packages and some QT items but no switch to Python-3.12.

I recursively greped /etc/portage for PYTHON_TARGETS and PYTHON_SINGLE_TARGET and did not see any un-commented results.

Also:
Code:
eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.11
  [2]   python3.12 (fallback)


My /etc/python-exec/python-exec.conf has one un-commented line:
Code:
python3.11


Was the update to default python switching to 3.12 postponed ?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9280

PostPosted: Sat Jun 01, 2024 6:27 pm    Post subject: Reply with quote

Today's not over yet.
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 757

PostPosted: Sat Jun 01, 2024 7:47 pm    Post subject: Reply with quote

Ok. I was being impatient. Now the Python upgrade is available.

I am running the emerge now.

I only had to "emerge --depclean" three packages that required less than python 3.12 and I don't think I need them. (We will see about printing)

    net-print/hplip

    x11-misc/menumaker

    media- sound/alsa-tools
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 757

PostPosted: Sat Jun 01, 2024 9:41 pm    Post subject: Reply with quote

Except for the three packages mentioned above which I removed, the default upgrade from system python-3.11 to python-3.12 worked without issue: 341 packages re-emerged in my case.

Thanks for the easy upgrade.
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 650
Location: Ásgarðr

PostPosted: Sat Jun 01, 2024 10:04 pm    Post subject: Reply with quote

I can't upgrade because of several packages missing 3_12, I'll sync again later. Hopefully it will be fixed.
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1171
Location: /run/user/1000

PostPosted: Sun Jun 02, 2024 12:09 am    Post subject: Reply with quote

Same, I'll leave it for later.

I'm getting "!!! Error: Can't load module python" when I issue "eselect python list" :?
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1919

PostPosted: Sun Jun 02, 2024 12:14 am    Post subject: Reply with quote

The Main Man wrote:
I'm getting "!!! Error: Can't load module python" when I issue "eselect python list" :?

eselect python is outdated unless you really want total control yourself (not recommended). The python configuration is automated through a different method.
Back to top
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 121

PostPosted: Sun Jun 02, 2024 1:52 am    Post subject: Reply with quote

grknight wrote:
The Main Man wrote:
I'm getting "!!! Error: Can't load module python" when I issue "eselect python list" :?

eselect python is outdated unless you really want total control yourself (not recommended). The python configuration is automated through a different method.


This "different method" is causing too many issues. I just spent the last hr playing which package requires PYTHON_TARGETS or PYTHON_SINGLE_TARGET. So damn annoying to deal with a messy, complicated update that supposedly a breeze.
_________________
[Never break the law to save people. Nope, there aint no heroes here. Unless you are 'Satoshi Nakamoto', that's a true anonymous.]
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1919

PostPosted: Sun Jun 02, 2024 2:45 am    Post subject: Reply with quote

myga wrote:
This "different method" is causing too many issues. I just spent the last hr playing which package requires PYTHON_TARGETS or PYTHON_SINGLE_TARGET. So damn annoying to deal with a messy, complicated update that supposedly a breeze.

I was referring to dev-python/python-exec-conf which has nothing to do with PYTHON_TARGETS or PYTHON_SINGLE_TARGET directly.
Instead of forgetting to run a program, it is managed by the USE flags. These settings only control a runtime preference and not what is actually needed.
If something was using a version outside the preference, then the necessary version would still be used.

The one time manual intervention may be desirable is for code installed outside of portage running python or python3 itself.
Back to top
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 121

PostPosted: Sun Jun 02, 2024 2:55 am    Post subject: Reply with quote

grknight wrote:
myga wrote:
This "different method" is causing too many issues. I just spent the last hr playing which package requires PYTHON_TARGETS or PYTHON_SINGLE_TARGET. So damn annoying to deal with a messy, complicated update that supposedly a breeze.

I was referring to dev-python/python-exec-conf which has nothing to do with PYTHON_TARGETS or PYTHON_SINGLE_TARGET directly.
Instead of forgetting to run a program, it is managed by the USE flags. These settings only control a runtime preference and not what is actually needed.
If something was using a version outside the preference, then the necessary version would still be used.

The one time manual intervention may be desirable is for code installed outside of portage running python or python3 itself.


As far as I was told on bugs.gentoo.org, I still need to manually set the useflags according to the news from 05/09/24. So, how are the global flags set when using pakage.use folder instead of file?

EDIT: nevermind, figured it out.
_________________
[Never break the law to save people. Nope, there aint no heroes here. Unless you are 'Satoshi Nakamoto', that's a true anonymous.]
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 757

PostPosted: Sun Jun 02, 2024 4:21 am    Post subject: Reply with quote

Quote:
eselect python is outdated unless you really want total control yourself (not recommended). The python configuration is automated through a different method.


After the upgrade to python-3.12 I am using eselect python to keep python-3.11 on my system. (Unless there is a better/more Gentooish way ?)
I have some python venvs based on python-3.11 that I need.

So currently I have:

Code:
$ eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.12
  [2]   python3.11
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2422

PostPosted: Sun Jun 02, 2024 4:29 am    Post subject: Reply with quote

jagdpanther wrote:
Quote:
eselect python is outdated unless you really want total control yourself (not recommended). The python configuration is automated through a different method.


After the upgrade to python-3.12 I am using eselect python to keep python-3.11 on my system. (Unless there is a better/more Gentooish way ?)
I have some python venvs based on python-3.11 that I need.

So currently I have:

Code:
$ eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.12
  [2]   python3.11


Eselect won't "keep" python 3.11 on your system. Eselect will only hard set the runtime version. So eselect python is outdated method. As already mentioned, the preferred method is python-exec-conf. Just enable python3_11 use flag on it and you're good to go.

Eselect does not influence portage, none of its modules does. It selects runtime preferences.

Best Regards,
Georgi
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 757

PostPosted: Sun Jun 02, 2024 5:30 pm    Post subject: Reply with quote

logrusx:

Quote:
Eselect won't "keep" python 3.11 on your system. Eselect will only hard set the runtime version. So eselect python is outdated method. As already mentioned, the preferred method is python-exec-conf. Just enable python3_11 use flag on it and you're good to go.

Eselect does not influence portage, none of its modules does. It selects runtime preferences.



Thanks for pointing this out.

Just to ensure I have this right: "eselect python" will set the default python you get if your run "python" (now I get python-3.12. If I want to run python-3.11, I run "python3.11"). To ensure the pytnon-3.11 is not removed by a future default gentoo update, I add "dev-lang/python-exec-conf python3_11" to /etc/portage/package.use/<file>.

I think I was confused because /etc/python-exec/python-exec.conf , where "eselect python" is configured is part of the python-exec-conf package and I ASSUMED just an entry in python-exec.conf would keep the older python on my system.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2422

PostPosted: Sun Jun 02, 2024 6:29 pm    Post subject: Reply with quote

jagdpanther wrote:
logrusx:

Quote:
Eselect won't "keep" python 3.11 on your system. Eselect will only hard set the runtime version. So eselect python is outdated method. As already mentioned, the preferred method is python-exec-conf. Just enable python3_11 use flag on it and you're good to go.

Eselect does not influence portage, none of its modules does. It selects runtime preferences.



Thanks for pointing this out.

Just to ensure I have this right: "eselect python" will set the default python you get if your run "python" (now I get python-3.12. If I want to run python-3.11, I run "python3.11"). To ensure the pytnon-3.11 is not removed by a future default gentoo update, I add "dev-lang/python-exec-conf python3_11" to /etc/portage/package.use/<file>.

I think I was confused because /etc/python-exec/python-exec.conf , where "eselect python" is configured is part of the python-exec-conf package and I ASSUMED just an entry in python-exec.conf would keep the older python on my system.


Well, the part about eselect python I'm not sure about, I haven't used that in quite a while if not at all. It won't keep python the same way eselect kernel won't keep old kernel sources installed. For the rest you've got it right. This configuration is not part of portage configuration. Portage doesn't look in config files outside of /etc/portage and its database to determine what to keep, so you need to either emerge it explicitly by slot/version or use python-exec-conf's use flags to explicitly tell portage to keep it. Otherwise it looks unneded and it'll be cleaned.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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