Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
The switch to python 3.9?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Thu May 06, 2021 7:49 am    Post subject: The switch to python 3.9? Reply with quote

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
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1406
Location: Germany

PostPosted: Thu May 06, 2021 8:11 am    Post subject: Reply with quote

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
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Thu May 06, 2021 8:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1406
Location: Germany

PostPosted: Thu May 06, 2021 1:45 pm    Post subject: Reply with quote

Well then comment them with a # and try it for yourself. Could be a lot of rebuilds but will safe some headaches in the future.
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Thu May 06, 2021 2:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54330
Location: 56N 3W

PostPosted: Thu May 06, 2021 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Thu May 06, 2021 5:44 pm    Post subject: Reply with quote

Then if you allow me to ask you, NeddySeagoon (happy to talk to you again :) )
why do we have to risk it so soon? 8O
Or have I misunderstood?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8938

PostPosted: Thu May 06, 2021 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54330
Location: 56N 3W

PostPosted: Thu May 06, 2021 5:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Thu May 06, 2021 5:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54330
Location: 56N 3W

PostPosted: Thu May 06, 2021 5:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21725

PostPosted: Thu May 06, 2021 6:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Thu May 06, 2021 6:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54330
Location: 56N 3W

PostPosted: Thu May 06, 2021 6:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Thu May 06, 2021 6:22 pm    Post subject: Reply with quote

Thank you, Neddy, good call.
Have a nice evening, or rest of the day.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8938

PostPosted: Thu May 06, 2021 6:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Thu May 06, 2021 8:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Thu May 06, 2021 8:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8938

PostPosted: Thu May 06, 2021 11:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Fri May 07, 2021 6:04 am    Post subject: Reply with 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 :(
_________________
Having problems compiling since 2021 :(
Back to top
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Fri May 07, 2021 9:08 am    Post subject: Reply with quote

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 :oops:
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8938

PostPosted: Fri May 07, 2021 9:42 am    Post subject: Reply with quote

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Fri May 07, 2021 11:13 am    Post subject: Reply with quote

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
View user's profile Send private message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Fri May 07, 2021 12:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3638

PostPosted: Fri May 07, 2021 12:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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