public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS
@ 2021-01-24 12:21 Michał Górny
  2021-01-24 12:25 ` Toralf Förster
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 12:21 UTC (permalink / raw
  To: gentoo-dev

Hi,

Please review the news item inlined below.

I'd like to publish it ASAP and stabilize python-exec-conf on 2021-02-
01.

```
Title: Python preference to follow PYTHON_TARGETS
Author: Michał Górny <mgorny@gentoo.org>
Posted: 2021-01-24
Revision: 1
News-Item-Format: 2.0

On 2021-02-01 stable users will switch to a new method of updating
the preferred Python versions that employs the configuration update
mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
and stop installing app-eselect/eselect-python by default.

Since 2017, /usr/bin/python and the related non-versioned symlinks
are wrapped through dev-lang/python-exec.  The list of preferred Python
implementations is stored in /etc/python-exec/python-exec.conf and/or
per-program /etc/python-exec/<basename>.conf configuration files.
To preserve backwards compatibility, app-eselect/eselect-python remained
a wrapper that updated this file.

However, this mechanism alone has proven inconvenient to end users who
had to update python-exec.conf whenever the default PYTHON_TARGETS
changed.  Thanks to the fallback logic, this was not a major problem
for software installed via Gentoo packages that always ensure that
a supported implementation is used.  However, users have reported that
whenever the preference for /usr/bin/python mismatched their
PYTHON_TARGETS, their custom scripts would break due to unsatisfied
dependencies.  This does not follow the principle of least surprise.

For this reason, we have decided to change the default python-exec
configuration to match PYTHON_TARGETS by default, in the eclass
preference order, that is from the newest CPython version to oldest,
with alternative Python implementations coming afterwards.  This change
will be propagated via the configuration protection mechanism whenever
dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
changes.  This will permit the users to interactively confirm
the updates.

If the new default is not correct for you, please use your preferred
configuration update tool to discard or edit the new configuration file.

Furthermore, dev-lang/python will no longer attempt to automatically
update the Python interpreter preference, or pull in eselect-python
automatically.  If you wish to continue using it, please install it
manually to ensure that it is not unmerged.
```


-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:21 [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS Michał Górny
@ 2021-01-24 12:25 ` Toralf Förster
  2021-01-24 12:43   ` Ionen Wolkens
  2021-01-24 12:59   ` Michał Górny
  2021-01-24 12:59 ` [gentoo-dev] [News item review v2] " Michał Górny
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 21+ messages in thread
From: Toralf Förster @ 2021-01-24 12:25 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 277 bytes --]

On 1/24/21 1:21 PM, Michał Górny wrote:
> Please review the news item inlined below.

What about a tl;dr line explaining whether dev-lang/python-exec is 
optionally or mandatory -or better said - if/which user action is expected?

-- 
Toralf
PGP 23217DA7 9B888F45


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:25 ` Toralf Förster
@ 2021-01-24 12:43   ` Ionen Wolkens
  2021-01-24 12:59   ` Michał Górny
  1 sibling, 0 replies; 21+ messages in thread
From: Ionen Wolkens @ 2021-01-24 12:43 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

On Sun, Jan 24, 2021 at 01:25:13PM +0100, Toralf Förster wrote:
> What about a tl;dr line explaining whether dev-lang/python-exec is 
> optionally or mandatory -or better said - if/which user action is expected?
As I understand it user doesn't have anything to do other than either
accept or refuse the CONFIG_PROTECT changes.

Exception could be if they were heavily relying on eselect python to
change on-the-fly using scripts or whatnot.

I originally felt this could go without a news item myself but I did see
a lot of confused users believe eselect python is essential, so an
explanation makes sense.
-- 
ionen

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:21 [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS Michał Górny
  2021-01-24 12:25 ` Toralf Förster
@ 2021-01-24 12:59 ` Michał Górny
  2021-01-24 15:11   ` Thomas Deutschmann
                     ` (2 more replies)
  2021-01-24 18:53 ` [gentoo-dev] [News item review] " Rich Freeman
                   ` (2 subsequent siblings)
  4 siblings, 3 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 12:59 UTC (permalink / raw
  To: gentoo-dev

Here's v2 with extra 'tl;dr' instructions in first para:

```
Title: Python preference to follow PYTHON_TARGETS
Author: Michał Górny <mgorny@gentoo.org>
Posted: 2021-01-24
Revision: 1
News-Item-Format: 2.0

On 2021-02-01 stable users will switch to a new method of updating
the preferred Python versions that employs the configuration update
mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
and stop installing app-eselect/eselect-python by default.  If you wish
to use the newest Python version present in your PYTHON_TARGETS, you
only have to accept configuration changes.  If you wish need
to customize the behavior, read on.

Since 2017, /usr/bin/python and the related non-versioned symlinks
are wrapped through dev-lang/python-exec.  The list of preferred Python
implementations is stored in /etc/python-exec/python-exec.conf and/or
per-program /etc/python-exec/<basename>.conf configuration files.
To preserve backwards compatibility, app-eselect/eselect-python remained
a wrapper that updated this file.

However, this mechanism alone has proven inconvenient to end users who
had to update python-exec.conf whenever the default PYTHON_TARGETS
changed.  Thanks to the fallback logic, this was not a major problem
for software installed via Gentoo packages that always ensure that
a supported implementation is used.  However, users have reported that
whenever the preference for /usr/bin/python mismatched their
PYTHON_TARGETS, their custom scripts would break due to unsatisfied
dependencies.  This does not follow the principle of least surprise.

For this reason, we have decided to change the default python-exec
configuration to match PYTHON_TARGETS by default, in the eclass
preference order, that is from the newest CPython version to oldest,
with alternative Python implementations coming afterwards.  This change
will be propagated via the configuration protection mechanism whenever
dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
changes.  This will permit the users to interactively confirm
the updates.

If the new default is not correct for you, please use your preferred
configuration update tool to discard or edit the new configuration file.

Furthermore, dev-lang/python will no longer attempt to automatically
update the Python interpreter preference, or pull in eselect-python
automatically.  If you wish to continue using it, please install it
manually to ensure that it is not unmerged.

```

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:25 ` Toralf Förster
  2021-01-24 12:43   ` Ionen Wolkens
@ 2021-01-24 12:59   ` Michał Górny
  1 sibling, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 12:59 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2021-01-24 at 13:25 +0100, Toralf Förster wrote:
> On 1/24/21 1:21 PM, Michał Górny wrote:
> > Please review the news item inlined below.
> 
> What about a tl;dr line explaining whether dev-lang/python-exec is 
> optionally or mandatory -or better said - if/which user action is expected?
> 

Sent v2.

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:59 ` [gentoo-dev] [News item review v2] " Michał Górny
@ 2021-01-24 15:11   ` Thomas Deutschmann
  2021-01-24 15:23     ` Hans Fernhout
  2021-01-24 19:14     ` Michał Górny
  2021-01-24 15:16   ` Aisha Tammy
  2021-01-24 18:16   ` Alexey Sokolov
  2 siblings, 2 replies; 21+ messages in thread
From: Thomas Deutschmann @ 2021-01-24 15:11 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 807 bytes --]

Hi,

I am hot happy with this change.

Why must dev-lang/python become special?

eselect is a known interface for most (all?) slotted packages.
Configuration management tools expect that the appropriate module will 
be pulled in once you install a slotable package.

You are now forcing everyone to either migrate to a new system (manage 
python-exec.conf directly) or ensure they update their world file and 
manually ensure that eselect-python is still installed which will make 
Python special.

But because dev-lang/python does not call eselect-python anymore it 
looks like you cannot retain old, well established behavior across all 
slotable packages anymore.


-- 
Regards,
Thomas Deutschmann / Gentoo Linux Developer
fpr: C4DD 695F A713 8F24 2AA1 5638 5849 7EE5 1D5D 74A5


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:59 ` [gentoo-dev] [News item review v2] " Michał Górny
  2021-01-24 15:11   ` Thomas Deutschmann
@ 2021-01-24 15:16   ` Aisha Tammy
  2021-01-24 15:28     ` Ionen Wolkens
  2021-01-24 19:04     ` Michał Górny
  2021-01-24 18:16   ` Alexey Sokolov
  2 siblings, 2 replies; 21+ messages in thread
From: Aisha Tammy @ 2021-01-24 15:16 UTC (permalink / raw
  To: gentoo-dev

On 1/24/21 7:59 AM, Michał Górny wrote:
> Here's v2 with extra 'tl;dr' instructions in first para:
> 
> ```
> Title: Python preference to follow PYTHON_TARGETS
> Author: Michał Górny <mgorny@gentoo.org>
> Posted: 2021-01-24
> Revision: 1
> News-Item-Format: 2.0
> 
> On 2021-02-01 stable users will switch to a new method of updating
> the preferred Python versions that employs the configuration update
> mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
> and stop installing app-eselect/eselect-python by default.  If you wish
> to use the newest Python version present in your PYTHON_TARGETS, you
> only have to accept configuration changes.  If you wish need
> to customize the behavior, read on.
> 
> Since 2017, /usr/bin/python and the related non-versioned symlinks
> are wrapped through dev-lang/python-exec.  The list of preferred Python
> implementations is stored in /etc/python-exec/python-exec.conf and/or
> per-program /etc/python-exec/<basename>.conf configuration files.
> To preserve backwards compatibility, app-eselect/eselect-python remained
> a wrapper that updated this file.
> 
> However, this mechanism alone has proven inconvenient to end users who
> had to update python-exec.conf whenever the default PYTHON_TARGETS
> changed.  Thanks to the fallback logic, this was not a major problem
> for software installed via Gentoo packages that always ensure that
> a supported implementation is used.  However, users have reported that
> whenever the preference for /usr/bin/python mismatched their
> PYTHON_TARGETS, their custom scripts would break due to unsatisfied
> dependencies.  This does not follow the principle of least surprise.
> 
> For this reason, we have decided to change the default python-exec
> configuration to match PYTHON_TARGETS by default, in the eclass
> preference order, that is from the newest CPython version to oldest,
> with alternative Python implementations coming afterwards.  This change
> will be propagated via the configuration protection mechanism whenever
> dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
> changes.  This will permit the users to interactively confirm
> the updates.
> 
> If the new default is not correct for you, please use your preferred
> configuration update tool to discard or edit the new configuration file.
> 
> Furthermore, dev-lang/python will no longer attempt to automatically
> update the Python interpreter preference, or pull in eselect-python
> automatically.  If you wish to continue using it, please install it
> manually to ensure that it is not unmerged.
> 
> ```
> 

Has this change already been pushed for unstable? I am running an unstable
system but I still have eselect-python, so I assume not (unless due to my side
error).

Thanks,
Aisha


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 15:11   ` Thomas Deutschmann
@ 2021-01-24 15:23     ` Hans Fernhout
  2021-01-24 19:11       ` Michał Górny
  2021-01-24 19:14     ` Michał Górny
  1 sibling, 1 reply; 21+ messages in thread
From: Hans Fernhout @ 2021-01-24 15:23 UTC (permalink / raw
  To: gentoo-dev

Why not do it the other way around: make eselect-python leading, and 
have it populate PYTHON_TARGETS?
It could be a lot more work, but might be more intuitive.

On 1/24/21 4:11 PM, Thomas Deutschmann wrote:
> Hi,
>
> I am hot happy with this change.
>
> Why must dev-lang/python become special?
>
> eselect is a known interface for most (all?) slotted packages.
> Configuration management tools expect that the appropriate module will 
> be pulled in once you install a slotable package.
>
> You are now forcing everyone to either migrate to a new system (manage 
> python-exec.conf directly) or ensure they update their world file and 
> manually ensure that eselect-python is still installed which will make 
> Python special.
>
> But because dev-lang/python does not call eselect-python anymore it 
> looks like you cannot retain old, well established behavior across all 
> slotable packages anymore.
>
>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 15:16   ` Aisha Tammy
@ 2021-01-24 15:28     ` Ionen Wolkens
  2021-01-24 19:04     ` Michał Górny
  1 sibling, 0 replies; 21+ messages in thread
From: Ionen Wolkens @ 2021-01-24 15:28 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

On Sun, Jan 24, 2021 at 10:16:37AM -0500, Aisha Tammy wrote:
> Has this change already been pushed for unstable? I am running an unstable
> system but I still have eselect-python, so I assume not (unless due to my side
> error).
It was temporarily re-added in deps for the sake of this news item, but
it's not doing anything given the code to use eselect python wasn't
restored. You should have python-exec-conf already doing its thing.
-- 
ionen

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:59 ` [gentoo-dev] [News item review v2] " Michał Górny
  2021-01-24 15:11   ` Thomas Deutschmann
  2021-01-24 15:16   ` Aisha Tammy
@ 2021-01-24 18:16   ` Alexey Sokolov
  2021-01-24 19:06     ` Michał Górny
  2 siblings, 1 reply; 21+ messages in thread
From: Alexey Sokolov @ 2021-01-24 18:16 UTC (permalink / raw
  To: gentoo-dev

вс, 24 янв. 2021 г. в 12:59, Michał Górny <mgorny@gentoo.org>:
>
> Here's v2 with extra 'tl;dr' instructions in first para:
>
> ```
> Title: Python preference to follow PYTHON_TARGETS
> Author: Michał Górny <mgorny@gentoo.org>
> Posted: 2021-01-24
> Revision: 1
> News-Item-Format: 2.0
>
> On 2021-02-01 stable users will switch to a new method of updating
> the preferred Python versions that employs the configuration update
> mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
> and stop installing app-eselect/eselect-python by default.  If you wish
> to use the newest Python version present in your PYTHON_TARGETS, you
> only have to accept configuration changes.  If you wish need
> to customize the behavior, read on.

typo: wish need

>
> Since 2017, /usr/bin/python and the related non-versioned symlinks
> are wrapped through dev-lang/python-exec.  The list of preferred Python
> implementations is stored in /etc/python-exec/python-exec.conf and/or
> per-program /etc/python-exec/<basename>.conf configuration files.
> To preserve backwards compatibility, app-eselect/eselect-python remained
> a wrapper that updated this file.
>
> However, this mechanism alone has proven inconvenient to end users who
> had to update python-exec.conf whenever the default PYTHON_TARGETS
> changed.  Thanks to the fallback logic, this was not a major problem
> for software installed via Gentoo packages that always ensure that
> a supported implementation is used.  However, users have reported that
> whenever the preference for /usr/bin/python mismatched their
> PYTHON_TARGETS, their custom scripts would break due to unsatisfied
> dependencies.  This does not follow the principle of least surprise.
>
> For this reason, we have decided to change the default python-exec
> configuration to match PYTHON_TARGETS by default, in the eclass
> preference order, that is from the newest CPython version to oldest,
> with alternative Python implementations coming afterwards.  This change
> will be propagated via the configuration protection mechanism whenever
> dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
> changes.  This will permit the users to interactively confirm
> the updates.
>
> If the new default is not correct for you, please use your preferred
> configuration update tool to discard or edit the new configuration file.
>
> Furthermore, dev-lang/python will no longer attempt to automatically
> update the Python interpreter preference, or pull in eselect-python
> automatically.  If you wish to continue using it, please install it
> manually to ensure that it is not unmerged.

Perhaps add the "emerge" command here, to avoid users to actually
*manually* installing it? That is, not via the ebuild.

The Russian translation follows. Should I post it as a separate file somewhere?

Title: Предпочтения Python будут следовать PYTHON_TARGETS

1 февраля 2021 пользователи стабильной ветки перейдут на новый метод обновления
предпочтительной версии Python, который будет использовать значение переменной
PYTHON_TARGETS и применять механизм обновления конфигураций.  Также мы
объявляем app-eselect/eselect-python устаревшим и по умолчанию перестанем его
устанавливать.  Если вы хотите использовать самую новую версию Python из
указанных в PYTHON_TARGETS, вам надо только принять изменения конфигурации.
Если же вам нужно настроить индивидуальное поведение, продолжайте читать.

С 2017 года /usr/bin/python и тому подобные символические ссылки без версии
являются обёртками с помощью dev-lang/python-exec.  Список предпочтительных
реализаций Python хранится в /etc/python-exec/python-exec.conf и/или в
/etc/python-exec/<программа>.conf для программ с конфигурацией не по умолчанию.
Для обратной совместимости app-eselect/eselect-python остался обёрткой, которая
обновляла этот файл.

Однако сам по себе этот механизм оказался неудобен пользователям, которым
теперь приходилось обновлять python-exec.conf каждый раз, когда менялась
переменная PYTHON_TARGETS.  Благодаря логике запасных вариантов это не было
большой проблемой для программ, установленных из репозитория Gentoo, т.к. они
гарантируют использование поддерживаемой реализации Python.  Но пользователи
сообщали, что, когда предпочтение для /usr/bin/python не совпадало с их
PYTHON_TARGETS, из-за неудовлетворённых зависимостей ломались пользовательские
программы, что противоречит принципу наименьшего удивления.

Поэтому мы решили изменить стандартную настройку python-exec, теперь она будет
совпадать с PYTHON_TARGETS в порядке предпочтения, используемым eclass'ом:
сначала все CPython, начиная с новейшей версии и заканчивая старейшей, затем
другие реализации Python.  Это изменение будет установлено в систему с помощью
механизма защиты конфигураций каждый раз при установке или пересборке
dev-lang/python-exec-conf из-за изменения PYTHON_TARGETS.  При этом у
пользователей будет возможность интерактивно подтвердить данные изменения.

Если новые настройки вам не подходят, пожалуйста, используйте ваш любимый
инструмент обновления конфигурации, чтобы отбросить изменения или
отредактировать новый файл.

Более того, dev-lang/python больше не будет пытаться автоматически обновить
предпочтительную версию Python и больше не будет автоматически затягивать
eselect-python. Если вы хотите продолжать его использовать, пожалуйста,
установите его вручную, чтобы он не удалился.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:21 [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS Michał Górny
  2021-01-24 12:25 ` Toralf Förster
  2021-01-24 12:59 ` [gentoo-dev] [News item review v2] " Michał Górny
@ 2021-01-24 18:53 ` Rich Freeman
  2021-01-24 19:09   ` Michał Górny
  2021-01-24 19:56 ` [gentoo-dev] [News item review v3] " Michał Górny
  2021-01-25 22:12 ` [gentoo-dev] [News item review v4] " Michał Górny
  4 siblings, 1 reply; 21+ messages in thread
From: Rich Freeman @ 2021-01-24 18:53 UTC (permalink / raw
  To: gentoo-dev

On Sun, Jan 24, 2021 at 7:21 AM Michał Górny <mgorny@gentoo.org> wrote:
>
> For this reason, we have decided to change the default python-exec
> configuration to match PYTHON_TARGETS by default, in the eclass
> preference order, that is from the newest CPython version to oldest,
> with alternative Python implementations coming afterwards.  This change
> will be propagated via the configuration protection mechanism whenever
> dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
> changes.  This will permit the users to interactively confirm
> the updates.
>
> If the new default is not correct for you, please use your preferred
> configuration update tool to discard or edit the new configuration file.

Could we just spell out what the actual setting is?  That way if a
user accepts or rejects the change accidentally it is trivial to fix,
vs making them hunt through the installed files to do a diff...

Nothing wrong with the instructions - I'd just add one line about what
setting controls this.

-- 
Rich


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 15:16   ` Aisha Tammy
  2021-01-24 15:28     ` Ionen Wolkens
@ 2021-01-24 19:04     ` Michał Górny
  1 sibling, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 19:04 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2021-01-24 at 10:16 -0500, Aisha Tammy wrote:
> On 1/24/21 7:59 AM, Michał Górny wrote:
> > Here's v2 with extra 'tl;dr' instructions in first para:
> > 
> > ```
> > Title: Python preference to follow PYTHON_TARGETS
> > Author: Michał Górny <mgorny@gentoo.org>
> > Posted: 2021-01-24
> > Revision: 1
> > News-Item-Format: 2.0
> > 
> > On 2021-02-01 stable users will switch to a new method of updating
> > the preferred Python versions that employs the configuration update
> > mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
> > and stop installing app-eselect/eselect-python by default.  If you wish
> > to use the newest Python version present in your PYTHON_TARGETS, you
> > only have to accept configuration changes.  If you wish need
> > to customize the behavior, read on.
> > 
> > Since 2017, /usr/bin/python and the related non-versioned symlinks
> > are wrapped through dev-lang/python-exec.  The list of preferred Python
> > implementations is stored in /etc/python-exec/python-exec.conf and/or
> > per-program /etc/python-exec/<basename>.conf configuration files.
> > To preserve backwards compatibility, app-eselect/eselect-python remained
> > a wrapper that updated this file.
> > 
> > However, this mechanism alone has proven inconvenient to end users who
> > had to update python-exec.conf whenever the default PYTHON_TARGETS
> > changed.  Thanks to the fallback logic, this was not a major problem
> > for software installed via Gentoo packages that always ensure that
> > a supported implementation is used.  However, users have reported that
> > whenever the preference for /usr/bin/python mismatched their
> > PYTHON_TARGETS, their custom scripts would break due to unsatisfied
> > dependencies.  This does not follow the principle of least surprise.
> > 
> > For this reason, we have decided to change the default python-exec
> > configuration to match PYTHON_TARGETS by default, in the eclass
> > preference order, that is from the newest CPython version to oldest,
> > with alternative Python implementations coming afterwards.  This change
> > will be propagated via the configuration protection mechanism whenever
> > dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
> > changes.  This will permit the users to interactively confirm
> > the updates.
> > 
> > If the new default is not correct for you, please use your preferred
> > configuration update tool to discard or edit the new configuration file.
> > 
> > Furthermore, dev-lang/python will no longer attempt to automatically
> > update the Python interpreter preference, or pull in eselect-python
> > automatically.  If you wish to continue using it, please install it
> > manually to ensure that it is not unmerged.
> > 
> > ```
> > 
> 
> Has this change already been pushed for unstable? I am running an unstable
> system but I still have eselect-python, so I assume not (unless due to my side
> error).

dev-lang/python-exec-conf is available in ~arch already but app-
eselect/eselect-python is still pulled in unconditionally.


-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 18:16   ` Alexey Sokolov
@ 2021-01-24 19:06     ` Michał Górny
  0 siblings, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 19:06 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2021-01-24 at 18:16 +0000, Alexey Sokolov wrote:
> вс, 24 янв. 2021 г. в 12:59, Michał Górny <mgorny@gentoo.org>:
> > 
> > Here's v2 with extra 'tl;dr' instructions in first para:
> > 
> > ```
> > Title: Python preference to follow PYTHON_TARGETS
> > Author: Michał Górny <mgorny@gentoo.org>
> > Posted: 2021-01-24
> > Revision: 1
> > News-Item-Format: 2.0
> > 
> > On 2021-02-01 stable users will switch to a new method of updating
> > the preferred Python versions that employs the configuration update
> > mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
> > and stop installing app-eselect/eselect-python by default.  If you wish
> > to use the newest Python version present in your PYTHON_TARGETS, you
> > only have to accept configuration changes.  If you wish need
> > to customize the behavior, read on.
> 
> typo: wish need

Fixed, thanks.

> 
> > 
> > Since 2017, /usr/bin/python and the related non-versioned symlinks
> > are wrapped through dev-lang/python-exec.  The list of preferred Python
> > implementations is stored in /etc/python-exec/python-exec.conf and/or
> > per-program /etc/python-exec/<basename>.conf configuration files.
> > To preserve backwards compatibility, app-eselect/eselect-python remained
> > a wrapper that updated this file.
> > 
> > However, this mechanism alone has proven inconvenient to end users who
> > had to update python-exec.conf whenever the default PYTHON_TARGETS
> > changed.  Thanks to the fallback logic, this was not a major problem
> > for software installed via Gentoo packages that always ensure that
> > a supported implementation is used.  However, users have reported that
> > whenever the preference for /usr/bin/python mismatched their
> > PYTHON_TARGETS, their custom scripts would break due to unsatisfied
> > dependencies.  This does not follow the principle of least surprise.
> > 
> > For this reason, we have decided to change the default python-exec
> > configuration to match PYTHON_TARGETS by default, in the eclass
> > preference order, that is from the newest CPython version to oldest,
> > with alternative Python implementations coming afterwards.  This change
> > will be propagated via the configuration protection mechanism whenever
> > dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
> > changes.  This will permit the users to interactively confirm
> > the updates.
> > 
> > If the new default is not correct for you, please use your preferred
> > configuration update tool to discard or edit the new configuration file.
> > 
> > Furthermore, dev-lang/python will no longer attempt to automatically
> > update the Python interpreter preference, or pull in eselect-python
> > automatically.  If you wish to continue using it, please install it
> > manually to ensure that it is not unmerged.
> 
> Perhaps add the "emerge" command here, to avoid users to actually
> *manually* installing it? That is, not via the ebuild.

Indeed, I didn't think of this 'manual' ;-).  I'll update it and send v3
soonish.

> The Russian translation follows. Should I post it as a separate file somewhere?

Thank you.  To be honest, I don't really know what's the process for
localization is.  FWICS none of the existing news items includes
translations.  In any case, if you don't mind I would prefer if we
waited with this until the final news item is committed, so we don't
have to track changes in it.

> 
> Title: Предпочтения Python будут следовать PYTHON_TARGETS
> 
> 1 февраля 2021 пользователи стабильной ветки перейдут на новый метод обновления
> предпочтительной версии Python, который будет использовать значение переменной
> PYTHON_TARGETS и применять механизм обновления конфигураций.  Также мы
> объявляем app-eselect/eselect-python устаревшим и по умолчанию перестанем его
> устанавливать.  Если вы хотите использовать самую новую версию Python из
> указанных в PYTHON_TARGETS, вам надо только принять изменения конфигурации.
> Если же вам нужно настроить индивидуальное поведение, продолжайте читать.
> 
> С 2017 года /usr/bin/python и тому подобные символические ссылки без версии
> являются обёртками с помощью dev-lang/python-exec.  Список предпочтительных
> реализаций Python хранится в /etc/python-exec/python-exec.conf и/или в
> /etc/python-exec/<программа>.conf для программ с конфигурацией не по умолчанию.
> Для обратной совместимости app-eselect/eselect-python остался обёрткой, которая
> обновляла этот файл.
> 
> Однако сам по себе этот механизм оказался неудобен пользователям, которым
> теперь приходилось обновлять python-exec.conf каждый раз, когда менялась
> переменная PYTHON_TARGETS.  Благодаря логике запасных вариантов это не было
> большой проблемой для программ, установленных из репозитория Gentoo, т.к. они
> гарантируют использование поддерживаемой реализации Python.  Но пользователи
> сообщали, что, когда предпочтение для /usr/bin/python не совпадало с их
> PYTHON_TARGETS, из-за неудовлетворённых зависимостей ломались пользовательские
> программы, что противоречит принципу наименьшего удивления.
> 
> Поэтому мы решили изменить стандартную настройку python-exec, теперь она будет
> совпадать с PYTHON_TARGETS в порядке предпочтения, используемым eclass'ом:
> сначала все CPython, начиная с новейшей версии и заканчивая старейшей, затем
> другие реализации Python.  Это изменение будет установлено в систему с помощью
> механизма защиты конфигураций каждый раз при установке или пересборке
> dev-lang/python-exec-conf из-за изменения PYTHON_TARGETS.  При этом у
> пользователей будет возможность интерактивно подтвердить данные изменения.
> 
> Если новые настройки вам не подходят, пожалуйста, используйте ваш любимый
> инструмент обновления конфигурации, чтобы отбросить изменения или
> отредактировать новый файл.
> 
> Более того, dev-lang/python больше не будет пытаться автоматически обновить
> предпочтительную версию Python и больше не будет автоматически затягивать
> eselect-python. Если вы хотите продолжать его использовать, пожалуйста,
> установите его вручную, чтобы он не удалился.

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS
  2021-01-24 18:53 ` [gentoo-dev] [News item review] " Rich Freeman
@ 2021-01-24 19:09   ` Michał Górny
  2021-01-24 20:23     ` Rich Freeman
  0 siblings, 1 reply; 21+ messages in thread
From: Michał Górny @ 2021-01-24 19:09 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2021-01-24 at 13:53 -0500, Rich Freeman wrote:
> On Sun, Jan 24, 2021 at 7:21 AM Michał Górny <mgorny@gentoo.org> wrote:
> > 
> > For this reason, we have decided to change the default python-exec
> > configuration to match PYTHON_TARGETS by default, in the eclass
> > preference order, that is from the newest CPython version to oldest,
> > with alternative Python implementations coming afterwards.  This change
> > will be propagated via the configuration protection mechanism whenever
> > dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
> > changes.  This will permit the users to interactively confirm
> > the updates.
> > 
> > If the new default is not correct for you, please use your preferred
> > configuration update tool to discard or edit the new configuration file.
> 
> Could we just spell out what the actual setting is?  That way if a
> user accepts or rejects the change accidentally it is trivial to fix,
> vs making them hunt through the installed files to do a diff...
> 
> Nothing wrong with the instructions - I'd just add one line about what
> setting controls this.
> 

The exact paths are provided in the second paragraph.  Am I missing
something?

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 15:23     ` Hans Fernhout
@ 2021-01-24 19:11       ` Michał Górny
  0 siblings, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 19:11 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2021-01-24 at 16:23 +0100, Hans Fernhout wrote:
> Why not do it the other way around: make eselect-python leading, and 
> have it populate PYTHON_TARGETS?
> It could be a lot more work, but might be more intuitive.

It is not possible to do this portably or reliably.  My previous
attempts at mangling make.conf have proven mostly destructive to less
typical make.conf files.

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
  2021-01-24 15:11   ` Thomas Deutschmann
  2021-01-24 15:23     ` Hans Fernhout
@ 2021-01-24 19:14     ` Michał Górny
  1 sibling, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 19:14 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2021-01-24 at 16:11 +0100, Thomas Deutschmann wrote:
> eselect is a known interface for most (all?) slotted packages.
> Configuration management tools expect that the appropriate module will 
> be pulled in once you install a slotable package.

Could you back your claims with specific numbers?  How many packages
that do not strictly require eselect to operate are actually pulling
it in?

I don't see a single shell pulling in app-eselect/eselect-sh.

sys-devel/binutils and sys-devel/gcc are probably the most common
examples of packages not using eselect (except for one failed attempt).

> You are now forcing everyone to either migrate to a new system (manage 
> python-exec.conf directly) or ensure they update their world file and 
> manually ensure that eselect-python is still installed which will make 
> Python special.

Is it really that bad to install the tools you actually use instead of
forcing 'one size fits all' approach?

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v3] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:21 [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS Michał Górny
                   ` (2 preceding siblings ...)
  2021-01-24 18:53 ` [gentoo-dev] [News item review] " Rich Freeman
@ 2021-01-24 19:56 ` Michał Górny
  2021-01-25 22:12 ` [gentoo-dev] [News item review v4] " Michał Górny
  4 siblings, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-24 19:56 UTC (permalink / raw
  To: gentoo-dev

Now with cleaner explanation of how to keep eselect-python:
```
Title: Python preference to follow PYTHON_TARGETS
Author: Michał Górny <mgorny@gentoo.org>
Posted: 2021-01-24
Revision: 1
News-Item-Format: 2.0

On 2021-02-01 stable users will switch to a new method of updating
the preferred Python versions that employs the configuration update
mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
and stop installing app-eselect/eselect-python by default.  If you wish
to use the newest Python version present in your PYTHON_TARGETS, you
only have to accept configuration changes.  If you wish to customize
the behavior, read on.

Since 2017, /usr/bin/python and the related non-versioned symlinks
are wrapped through dev-lang/python-exec.  The list of preferred Python
implementations is stored in /etc/python-exec/python-exec.conf and/or
per-program /etc/python-exec/<basename>.conf configuration files.
To preserve backwards compatibility, app-eselect/eselect-python remained
a wrapper that updated this file.

However, this mechanism alone has proven inconvenient to end users who
had to update python-exec.conf whenever the default PYTHON_TARGETS
changed.  Thanks to the fallback logic, this was not a major problem
for software installed via Gentoo packages that always ensure that
a supported implementation is used.  However, users have reported that
whenever the preference for /usr/bin/python mismatched their
PYTHON_TARGETS, their custom scripts would break due to unsatisfied
dependencies.  This does not follow the principle of least surprise.

For this reason, we have decided to change the default python-exec
configuration to match PYTHON_TARGETS by default, in the eclass
preference order, that is from the newest CPython version to oldest,
with alternative Python implementations coming afterwards.  This change
will be propagated via the configuration protection mechanism whenever
dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
changes.  This will permit the users to interactively confirm
the updates.

If the new default is not correct for you, please use your preferred
configuration update tool to discard or edit the new configuration file.

Furthermore, dev-lang/python will no longer attempt to automatically
update the Python interpreter preference, or pull in eselect-python
automatically.  If you wish to continue using it, please install/record
it explicitly to ensure that it is not unmerged, e.g.:

    emerge -n app-eselect/eselect-python

```


-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS
  2021-01-24 19:09   ` Michał Górny
@ 2021-01-24 20:23     ` Rich Freeman
  0 siblings, 0 replies; 21+ messages in thread
From: Rich Freeman @ 2021-01-24 20:23 UTC (permalink / raw
  To: gentoo-dev

On Sun, Jan 24, 2021 at 2:09 PM Michał Górny <mgorny@gentoo.org> wrote:
>
> On Sun, 2021-01-24 at 13:53 -0500, Rich Freeman wrote:
> > On Sun, Jan 24, 2021 at 7:21 AM Michał Górny <mgorny@gentoo.org> wrote:
> > >
> > > For this reason, we have decided to change the default python-exec
> > > configuration to match PYTHON_TARGETS by default, in the eclass
> > > preference order, that is from the newest CPython version to oldest,
> > > with alternative Python implementations coming afterwards.  This change
> > > will be propagated via the configuration protection mechanism whenever
> > > dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
> > > changes.  This will permit the users to interactively confirm
> > > the updates.
> > >
> > > If the new default is not correct for you, please use your preferred
> > > configuration update tool to discard or edit the new configuration file.
> >
> > Could we just spell out what the actual setting is?  That way if a
> > user accepts or rejects the change accidentally it is trivial to fix,
> > vs making them hunt through the installed files to do a diff...
> >
> > Nothing wrong with the instructions - I'd just add one line about what
> > setting controls this.
> >
>
> The exact paths are provided in the second paragraph.  Am I missing
> something?
>

No - the way this works makes sense now.  For some reason I missed it
on the first two reads, which makes me suspect others will as well.
It wasn't the location of the config file I missed, but the fact that
the eclass will just do what eselect python used to do, and thus
trigger config protection (which is at the end of paragraph 4).

For some reason when I read the section about discarding the changes I
was thinking that there was some config toggle to change this behavior
vs the old way things worked.  Instead the new behavior is
unconditional, but the updates it makes to the python-exec config can
be rejected.

-- 
Rich


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v4] Python preference to follow PYTHON_TARGETS
  2021-01-24 12:21 [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS Michał Górny
                   ` (3 preceding siblings ...)
  2021-01-24 19:56 ` [gentoo-dev] [News item review v3] " Michał Górny
@ 2021-01-25 22:12 ` Michał Górny
  2021-01-26  6:39   ` Philip Webb
  4 siblings, 1 reply; 21+ messages in thread
From: Michał Górny @ 2021-01-25 22:12 UTC (permalink / raw
  To: gentoo-dev

Hi,

Changed eselect-python dep removal date to July 2021.

Not sure if there's a reason to display it to stable users today,
or delay until the stable request is actually filed.



```
Title: Python preference to follow PYTHON_TARGETS
Author: Michał Górny <mgorny@gentoo.org>
Posted: 2021-01-24
Revision: 1
News-Item-Format: 2.0

On 2021-02-01 stable users will switch to a new method of updating
the preferred Python versions that employs the configuration update
mechanism in order to follow PYTHON_TARGETS.  We will also deprecate
app-eselect/eselect-python, and it will stop being installed by default
after 2021-07-01.  If you wish to use the newest Python version present
in your PYTHON_TARGETS, you only have to accept configuration changes.
If you wish to customize the behavior, read on.

Since 2017, /usr/bin/python and the related non-versioned symlinks
are wrapped through dev-lang/python-exec.  The list of preferred Python
implementations is stored in /etc/python-exec/python-exec.conf and/or
per-program /etc/python-exec/<basename>.conf configuration files.
To preserve backwards compatibility, app-eselect/eselect-python remained
a wrapper that updated this file.

However, this mechanism alone has proven inconvenient to end users who
had to update python-exec.conf whenever the default PYTHON_TARGETS
changed.  Thanks to the fallback logic, this was not a major problem
for software installed via Gentoo packages that always ensure that
a supported implementation is used.  However, users have reported that
whenever the preference for /usr/bin/python mismatched their
PYTHON_TARGETS, their custom scripts would break due to unsatisfied
dependencies.  This does not follow the principle of least surprise.

For this reason, we have decided to change the default python-exec
configuration to match PYTHON_TARGETS by default, in the eclass
preference order, that is from the newest CPython version to oldest,
with alternative Python implementations coming afterwards.  This change
will be propagated via the configuration protection mechanism whenever
dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
changes.  This will permit the users to interactively confirm
the updates.

If the new default is not correct for you, please use your preferred
configuration update tool to discard or edit the new configuration file.

Furthermore, dev-lang/python will no longer attempt to automatically
update the Python interpreter preference, or pull in eselect-python
automatically.  If you wish to continue using it, please install/record
it explicitly to ensure that it is not unmerged, e.g.:

    emerge -n app-eselect/eselect-python
```

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v4] Python preference to follow PYTHON_TARGETS
  2021-01-25 22:12 ` [gentoo-dev] [News item review v4] " Michał Górny
@ 2021-01-26  6:39   ` Philip Webb
  2021-01-30 12:13     ` Michał Górny
  0 siblings, 1 reply; 21+ messages in thread
From: Philip Webb @ 2021-01-26  6:39 UTC (permalink / raw
  To: gentoo-dev

210125 Michał Górny wrote:
> Changed eselect-python dep removal date to July 2021.
> Not sure if there's a reason to display it to stable users today,
> or delay until the stable request is actually filed.

I've been using Gentoo since 2003 , happily enough most of the time ;
I'm an ordinary desktop user without any special requirements.
Python versions have been one of the reasons for the exceptions.
I finally managed to remove 2.7 from my system yesterday.

I do appreciate your work in this area,
but I can make no sense of the news item below.

> Title: Python preference to follow PYTHON_TARGETS
> Author: Michał Górny <mgorny@gentoo.org>
> Posted: 2021-01-24
> Revision: 1
> News-Item-Format: 2.0
> 
> On 2021-02-01 stable users will switch to a new method of updating
> the preferred Python versions that employs the configuration update
> mechanism in order to follow PYTHON_TARGETS.

What are "preferred Python versions" ?  Why are they multiple, not one ?
What is the "configuration update mechanism",
how does it "follow PYTHON_TARGETS" & why are they both needed ?

> We will also deprecate app-eselect/eselect-python,
> and it will stop being installed by default after 2021-07-01.

Why has there been this 3rd method of managing Python versions ?
Why might it still be needed by users ?

> If you wish to use the newest Python version present
> in your PYTHON_TARGETS, you only have to accept configuration changes.

Why doesn't Python behave like most other packages,
ie use the latest installed version ?  Why does PYTHON_TARGETS exist ?
Why are the "targets" ? -- it sounds as if they may not be achieved.
What are the "configuration changes" ?
Do you mean those in  /etc/python-exec ?

> If you wish to customize the behavior, read on.

I have no wish to customise Python.  I don't use it to develop programs ;
it is installed only as a requirement for other packages, eg Portage.
I do use it for a small script to work as a CLI calculator.
Given this, I won't comment on the rest of the news item,
but it makes even less sense to me than the section above.

In  /etc/portage/make.conf , I have

  USE_PYTHON="2.7 3.5 3.6"
  PYTHON_TARGETS="python3_7"
  PYTHON_SINGLE_TARGET="python3_7"

'eselect python list' gives

  Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6 (uninstalled)

 /etc/python-exec/  contains  1  file 'python-exec.conf',
which says (besides many lines of comment) :

  python3.7
  python3.6

'eix python' shows

  [I] dev-lang/python
     Available versions:  
     (2.7)  2.7.18-r5 ~2.7.18-r6
     (3.6)  3.6.12-r1(3.6/3.6m)^t ~3.6.12-r2(3.6/3.6m)^t
     (3.7)  3.7.9-r1(3.7/3.7m)^t ~3.7.9-r2(3.7/3.7m)^t
     (3.8)  3.8.6-r1^t ~3.8.7-r1^t
     (3.9)  3.9.0-r1^t ~3.9.1-r1^t
     (3.10) ~3.10.0_alpha3-r1^t ~3.10.0_alpha4^t
  {-berkdb bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk verify-sig +wide-unicode wininst +xml ELIBC="uclibc"}
  Installed versions:  3.7.9-r1(3.7/3.7m)^t([2021-01-24 23:26:15])(gdbm ncurses readline sqlite ssl tk xml -bluetooth -build -examples -hardened -ipv6 -libressl -test -wininst) 3.8.6-r1(3.8)^t([2021-01-24 23:28:48])(gdbm ncurses readline sqlite ssl tk xml -bluetooth -build -examples -hardened -ipv6 -libressl -test -wininst) 3.9.0-r1(3.9)^t([2021-01-24 23:31:53])(gdbm ncurses readline sqlite ssl tk xml -bluetooth -build -examples -hardened -ipv6 -libressl -test -wininst)

I can't understand why there are so many ways to control Python
nor which one users are supposed to use nor how to reconcile them.
I would be very happy simply to use 3.9 for all Python purposes.

Thanks again for your hard work on this + other areas of Gentoo.

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatcadotinterdotnet



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [News item review v4] Python preference to follow PYTHON_TARGETS
  2021-01-26  6:39   ` Philip Webb
@ 2021-01-30 12:13     ` Michał Górny
  0 siblings, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-01-30 12:13 UTC (permalink / raw
  To: gentoo-dev

On Tue, 2021-01-26 at 01:39 -0500, Philip Webb wrote:
> 210125 Michał Górny wrote:
> > Changed eselect-python dep removal date to July 2021.
> > Not sure if there's a reason to display it to stable users today,
> > or delay until the stable request is actually filed.
> 
> I've been using Gentoo since 2003 , happily enough most of the time ;
> I'm an ordinary desktop user without any special requirements.
> Python versions have been one of the reasons for the exceptions.
> I finally managed to remove 2.7 from my system yesterday.
> 
> I do appreciate your work in this area,
> but I can make no sense of the news item below.

Thank you for your kind words.  However, I don't really know if I can
help you.  The news item is supposed to tell what's new.  If I were to
keep explaining the basics, it'd become too long (and people are already
complaining that my items are getting too long).  I think this falls
into 'if you don't know whether you need to read on, don't'.

> 
> > Title: Python preference to follow PYTHON_TARGETS
> > Author: Michał Górny <mgorny@gentoo.org>
> > Posted: 2021-01-24
> > Revision: 1
> > News-Item-Format: 2.0
> > 
> > On 2021-02-01 stable users will switch to a new method of updating
> > the preferred Python versions that employs the configuration update
> > mechanism in order to follow PYTHON_TARGETS.
> 
> What are "preferred Python versions" ?  Why are they multiple, not one ?

It's the order in which the Python version used to run stuff are used. 
There are multiple because not all impls are actually supported by
everything -- so if your top preference doesn't work, it goes for
the second top, etc.

> What is the "configuration update mechanism",

CONFIG_PROTECT / etc-update / dispatch-conf.

> how does it "follow PYTHON_TARGETS" & why are they both needed ?

I think this is explained below -- it generates python-exec.conf based
on PYTHON_TARGETS.  Both are needed because we can't technically combine
both without putting a lot of effort to implement stuff that's going to
be slow and unreliable.

> 
> > We will also deprecate app-eselect/eselect-python,
> > and it will stop being installed by default after 2021-07-01.
> 
> Why has there been this 3rd method of managing Python versions ?
> Why might it still be needed by users ?

Historical reasons, as always.  Backwards compatibility.

> > If you wish to use the newest Python version present
> > in your PYTHON_TARGETS, you only have to accept configuration changes.
> 
> Why doesn't Python behave like most other packages,
> ie use the latest installed version ?  Why does PYTHON_TARGETS exist ?
> Why are the "targets" ? -- it sounds as if they may not be achieved.

Because Python versions are not ABI-compatible, and old packages are
usually broken with new major Python releases.  It takes a lot of
testing, patching, bumping to support it.

> What are the "configuration changes" ?
> Do you mean those in  /etc/python-exec ?

Yes.

> 
> > If you wish to customize the behavior, read on.
> 
> I have no wish to customise Python.  I don't use it to develop programs ;
> it is installed only as a requirement for other packages, eg Portage.
> I do use it for a small script to work as a CLI calculator.
> Given this, I won't comment on the rest of the news item,
> but it makes even less sense to me than the section above.

Then you don't have to do anything.

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-01-30 12:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-24 12:21 [gentoo-dev] [News item review] Python preference to follow PYTHON_TARGETS Michał Górny
2021-01-24 12:25 ` Toralf Förster
2021-01-24 12:43   ` Ionen Wolkens
2021-01-24 12:59   ` Michał Górny
2021-01-24 12:59 ` [gentoo-dev] [News item review v2] " Michał Górny
2021-01-24 15:11   ` Thomas Deutschmann
2021-01-24 15:23     ` Hans Fernhout
2021-01-24 19:11       ` Michał Górny
2021-01-24 19:14     ` Michał Górny
2021-01-24 15:16   ` Aisha Tammy
2021-01-24 15:28     ` Ionen Wolkens
2021-01-24 19:04     ` Michał Górny
2021-01-24 18:16   ` Alexey Sokolov
2021-01-24 19:06     ` Michał Górny
2021-01-24 18:53 ` [gentoo-dev] [News item review] " Rich Freeman
2021-01-24 19:09   ` Michał Górny
2021-01-24 20:23     ` Rich Freeman
2021-01-24 19:56 ` [gentoo-dev] [News item review v3] " Michał Górny
2021-01-25 22:12 ` [gentoo-dev] [News item review v4] " Michał Górny
2021-01-26  6:39   ` Philip Webb
2021-01-30 12:13     ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox