View previous topic :: View next topic |
Author |
Message |
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Thu May 06, 2021 7:49 am Post subject: The switch to python 3.9? |
|
|
Hi,
I just read that Gentoo will be switching to python 3.9 as the default in July.
However, after reading it, I want to take the safe approach but there's one catch:
Code: | First, enable both Python 3.8 and Python 3.9, and then run the upgrade
commands:
*/* PYTHON_TARGETS: -* python3_8 python3_9
*/* PYTHON_SINGLE_TARGET: -* python3_8
Then switch PYTHON_SINGLE_TARGET and run a second batch of upgrades:
*/* PYTHON_TARGETS: -* python3_8 python3_9
*/* PYTHON_SINGLE_TARGET: -* python3_9
Finally, switch to the final version and upgrade:
*/* PYTHON_TARGETS: -* python3_9
*/* PYTHON_SINGLE_TARGET: -* python3_9
|
I'm not sure if I should put both
Code: |
PYTHON_TARGETS: -* python3_8 python3_9
PYTHON_SINGLE_TARGET: -* python3_8
|
into my make.conf, then remove that previous one and put in
Code: |
PYTHON_TARGETS: -* python3_8 python3_9
PYTHON_SINGLE_TARGET: -* python3_9
|
then remove the previous one again and THEN put the final one in make make.conf
Code: |
PYTHON_TARGETS: -* python3_9
PYTHON_SINGLE_TARGET: -* python3_9
|
Please correct me incase that's the wrong way.[/u] _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
Banana Veteran
Joined: 21 May 2004 Posts: 1406 Location: Germany
|
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Thu May 06, 2021 8:31 am Post subject: |
|
|
Banana wrote: | both, then update, switch update and then remove and update
But only if you are really have a need to set those variables. If you do not have this case, remove them completely |
I'm actually not sure if I need to set those variables. _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
Banana Veteran
Joined: 21 May 2004 Posts: 1406 Location: Germany
|
|
Back to top |
|
|
EasterParade l33t
Joined: 26 Jul 2003 Posts: 938
|
Posted: Thu May 06, 2021 2:31 pm Post subject: |
|
|
May I, guys?
I just read the news item about the envisioned switch to python-3.9 in June.
There´s a reason why it is so long, a wall of text and many, many options to choose from as any python upgrade may break your system.
But let´s ask real quick: if no PYTHON_TARGETS and PYTHON_SINGLE_TARGETS are set in make.conf what are the chances that the switch
will go well as to be expected? Or IF nothing is set in make.conf can I trust portage to do the upgrade smoothly?
Edit I just ran equery d python and saw that the only package that cannot run on python 3.9 as of now is alsa-libs. If there is no update of alsa-libs
that eliminates its dependency of python 3.8 I´d need to put that into package.use with PYTHON_SINGLE_TARGET=python-3.8 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54330 Location: 56N 3W
|
Posted: Thu May 06, 2021 5:13 pm Post subject: |
|
|
transsib,
Trust but verify :)
and don't be first.
My reading of the mailing list is that Gentoo isn't quite ready for Python-3.9 only yet. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
EasterParade l33t
Joined: 26 Jul 2003 Posts: 938
|
Posted: Thu May 06, 2021 5:44 pm Post subject: |
|
|
Then if you allow me to ask you, NeddySeagoon (happy to talk to you again )
why do we have to risk it so soon?
Or have I misunderstood? |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8938
|
Posted: Thu May 06, 2021 5:46 pm Post subject: |
|
|
The news doesn't tell you to risk it at this point. That said, 3.8 is gone on most of my systems. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54330 Location: 56N 3W
|
Posted: Thu May 06, 2021 5:51 pm Post subject: |
|
|
transsib,
Good to speak with you again too :)
I thought what was announced was a statement of intent rather than a you need to do this now.
I've been doing a full rebuild for gcc-11.1 and I said don't be first :) so I've not synched for a week, so I could be out of date with portage news items.
My gcc-11.1 rebuild is on a system I can afford to abandon if it goes badly. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
EasterParade l33t
Joined: 26 Jul 2003 Posts: 938
|
Posted: Thu May 06, 2021 5:52 pm Post subject: |
|
|
Ok, I misunderstood again.
Quote: | We are planning to switch the default Python target of Gentoo systems
on 2021-06-01, from Python 3.8 to Python 3.9. 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.
|
There´s no PYTHON_TARGETS or PYTHON_SINGLE_TARGET in my make.conf.
So the system will automatically switch to Python 3.9 unless I prevent it by setting
PYTHON_TARGETS or PYTHON_SINGLE_TARGET again?
Edit Lemme be blunt: why announce D-Day and then not strike? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54330 Location: 56N 3W
|
Posted: Thu May 06, 2021 5:55 pm Post subject: |
|
|
transsib,
That's correct. PYTHON_TARGETS and PYTHON_SINGLE_TARGET are set in your profile _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21725
|
Posted: Thu May 06, 2021 6:02 pm Post subject: |
|
|
transsib wrote: | Edit Lemme be blunt: why announce D-Day and then not strike? | The announced date is still in the future, so you cannot know yet whether they will strike on schedule. It was announced now because some people may, for various reasons, want to remain on Python 3.8 even after that date. This gives them time to update their configuration to suppress the change, before it shows up in their emerge --update @world run. Other people may want to proactively switch to Python 3.9, perhaps because they know they have a free weekend in late May, but will be too busy to deal with the update when it hits in June. For such people, this is an indication that the switch is close enough that the maintainers have some confidence in it working. |
|
Back to top |
|
|
EasterParade l33t
Joined: 26 Jul 2003 Posts: 938
|
Posted: Thu May 06, 2021 6:09 pm Post subject: |
|
|
Ok, NeddySeagoon and Hu, I pass, meaning I will sit on my hands and do nothing.
I will trust my system to know best what´s gonna happen.
Or I boot into Windows on June 1st and wait until ... until the storm has passed
or Gentoo is ready to embrace python 3.9 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54330 Location: 56N 3W
|
Posted: Thu May 06, 2021 6:19 pm Post subject: |
|
|
transsib,
Gentoo is close to being ready. As always there are a few stragglers.
I'll try it on something expendable before I do it on a must have system.
There will be a lot of rebuilding. If that won't matter, do nothing.
If you want to control the date of the update, set PYTHON_TARGETS and PYTHON_SINGLE_TARGET is make.conf to either delay it it bring it forward. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
EasterParade l33t
Joined: 26 Jul 2003 Posts: 938
|
Posted: Thu May 06, 2021 6:22 pm Post subject: |
|
|
Thank you, Neddy, good call.
Have a nice evening, or rest of the day. |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8938
|
Posted: Thu May 06, 2021 6:51 pm Post subject: |
|
|
NeddySeagoon wrote: | If you want to control the date of the update, set PYTHON_TARGETS and PYTHON_SINGLE_TARGET is make.conf to either delay it it bring it forward. |
No. Not in make.conf. Follow exactly the news item about * Deferring the upgrade *. |
|
Back to top |
|
|
EasterParade l33t
Joined: 26 Jul 2003 Posts: 938
|
Posted: Thu May 06, 2021 8:23 pm Post subject: |
|
|
Will do asturm; already asked myself that question about the make.conf.
But "deferring the update" also doesn´t explicitly tell where to set
Quote: | */* PYTHON_TARGETS: -* python3_8
*/* PYTHON_SINGLE_TARGET: -* python3_8
|
either. In package.use, I suppose.
Thanks everyone for clearing this up and sorry to the op for hijacking his thread. |
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Thu May 06, 2021 8:56 pm Post subject: |
|
|
transsib wrote: | Will do asturm; already asked myself that question about the make.conf.
But "deferring the update" also doesn´t explicitly tell where to set
Quote: | */* PYTHON_TARGETS: -* python3_8
*/* PYTHON_SINGLE_TARGET: -* python3_8
|
either. In package.use, I suppose.
Thanks everyone for clearing this up and sorry to the op for hijacking his thread. |
It's fine .
I figured it out a few hours ago and it took a bit but i managed to (mostly) migrate to 3.9 _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8938
|
Posted: Thu May 06, 2021 11:41 pm Post subject: |
|
|
Guys, read that stuff. A few people spend valuable time on it. Also right there:
Code: | 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. |
|
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Fri May 07, 2021 6:04 am Post subject: |
|
|
asturm wrote: | Guys, read that stuff. A few people spend valuable time on it. Also right there:
Code: | 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. |
|
Sorry _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
EasterParade l33t
Joined: 26 Jul 2003 Posts: 938
|
Posted: Fri May 07, 2021 9:08 am Post subject: |
|
|
fullbyte wrote:
Quote: | asturm wrote:
Guys, read that stuff. A few people spend valuable time on it. Also right there:
Code:
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.
Sorry
|
I agree with fullbyte. I am grateful for the hard work but updating python is delicate business with python-exec being a vital, integral part of the system.
All sorts of stuff can go wrong even without any specifics in the make.conf. So I better ask twice.
Sorry |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8938
|
Posted: Fri May 07, 2021 9:42 am Post subject: |
|
|
Don't be all sorry, it's fine, I just have to point out obvious misreadings of the news.
Take your time and don't panic, the default switch is a few weeks away, and there's nothing scary about a python target upgrade. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Fri May 07, 2021 11:13 am Post subject: |
|
|
Code: |
*/* PYTHON_SINGLE_TARGET: -* python3_9
|
was easy.
However i needed to keep python38 as a target.
Code: |
*/* PYTHON_TARGETS: -python2_7 -python3_6 -python3_7 python3_8 python3_9
|
_________________
|
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Fri May 07, 2021 12:12 pm Post subject: |
|
|
asturm wrote: | Don't be all sorry, it's fine, I just have to point out obvious misreadings of the news.
Take your time and don't panic, the default switch is a few weeks away, and there's nothing scary about a python target upgrade. |
Cheers _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3638
|
Posted: Fri May 07, 2021 12:50 pm Post subject: |
|
|
Applying the first of the three steps described for 3_7 to 3_8 migration the following amd64 stable packages don't take the new python3_8 PYTHON_TARGETS into account: Code: | dev-python/numpy-1.20.2
dev-python/webencodings-0.5.1-r1
dev-python/cppy-1.1.0
dev-python/parso-0.8.2
dev-python/cffi-1.14.5
dev-python/flask-babel-2.0.0
dev-python/pycairo-1.20.0
dev-python/Babel-2.9.1 | Manual forcing at package level seems required. (tested working for the first package, i.e. numpy.).
These packages could raise same issue when moving to python3_9.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
|