#1029505 python3-minimal installs recommend package python3

Package:
python3-minimal
Source:
python3-minimal
Description:
minimal subset of the Python language (default python3 version)
Submitter:
Ricardo Fraile
Date:
2023-01-30 15:48:02 UTC
Severity:
normal
#1029505#5
Date:
2023-01-23 13:39:34 UTC
From:
To:
Dear Maintainer,

The execution of apt installs the full python package:

# apt install python3-minimal
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libmpdec3 libpython3.10-minimal libpython3.10-stdlib media-types python3.10 python3.10-minimal
Suggested packages:
  python3.10-venv python3.10-doc binfmt-support
The following NEW packages will be installed:
  libmpdec3 libpython3.10-minimal libpython3.10-stdlib media-types python3-minimal python3.10 python3.10-minimal
0 upgraded, 7 newly installed, 0 to remove and 5 not upgraded.
Need to get 5076 kB of archives.
After this operation, 20.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]

If you hold it "apt-mark hold python3.10". The python3-minimal is installed as usual.

The full python package is a recommended package, not a requirement for python3-minimal.


Thanks,

#1029505#10
Date:
2023-01-23 14:02:14 UTC
From:
To:
Sorry, the request here is about the review of the change from
recommended to suggested to avoid the auto install.


Thanks,

#1029505#15
Date:
2023-01-23 14:08:05 UTC
From:
To:
Sorry, the request here is about the review of the change from
recommended to suggested to avoid the auto install.

Thanks,

#1029505#20
Date:
2023-01-28 21:56:40 UTC
From:
To:
Hi Ricardo (2023.01.23_09:39:34_-0400)

# apt install python3-minimal
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
  python3-minimal
1 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
Need to get 25.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian unstable/main amd64 python3-minimal amd64 3.11.1-2 [25.7 kB]
Fetched 25.7 kB in 0s (2065 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 12792 files and directories currently installed.)
Preparing to unpack .../python3-minimal_3.11.1-2_amd64.deb ...
Unpacking python3-minimal (3.11.1-2) over (3.11.1-1) ...
Setting up python3-minimal (3.11.1-2) ...
root@first-ghost:~# dpkg -l python3.11
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  python3.11     <none>       <none>       (no description available)

You sure you don't have something else installed that's bringing it in?

SR

#1029505#25
Date:
2023-01-29 08:09:09 UTC
From:
To:
Hi Stefano:

Tested with a simple container:

$ docker run -it debian:sid bash

# apt update && apt install python3-minimal
Get:1 http://deb.debian.org/debian sid InRelease [167 kB]
Get:2 http://deb.debian.org/debian sid/main amd64 Packages [9406 kB]
Fetched 9573 kB in 3s (3532 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
25 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
   krb5-locales libexpat1 libgpm2 libgssapi-krb5-2 libk5crypto3
libkeyutils1 libkrb5-3 libkrb5support0 libmpdec3 libncursesw6 libnsl2
libpython3.11-minimal libpython3.11-stdlib libreadline8
   libsqlite3-0 libssl3 libtinfo6 libtirpc-common libtirpc3 media-types
ncurses-base ncurses-bin python3.11 python3.11-minimal readline-common
Suggested packages:
   gpm krb5-doc krb5-user python3.11-venv python3.11-doc binutils
binfmt-support readline-doc
The following NEW packages will be installed:
   krb5-locales libexpat1 libgpm2 libgssapi-krb5-2 libk5crypto3
libkeyutils1 libkrb5-3 libkrb5support0 libmpdec3 libncursesw6 libnsl2
libpython3.11-minimal libpython3.11-stdlib libreadline8
   libsqlite3-0 libssl3 libtirpc-common libtirpc3 media-types
python3-minimal python3.11 python3.11-minimal readline-common
The following packages will be upgraded:
   libtinfo6 ncurses-base ncurses-bin
3 upgraded, 23 newly installed, 0 to remove and 22 not upgraded.
Need to get 10.4 MB of archives.
After this operation, 33.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Here you see the python3.11 installation, but it's because apt is
pulling the recommends by default.

Check this other execution with the argument "--no-install-recommends":

# apt install python3-minimal --no-install-recommends
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
   libexpat1 libpython3.11-minimal libssl3 python3.11-minimal
Suggested packages:
   binfmt-support
Recommended packages:
   libpython3.11-stdlib python3.11
The following NEW packages will be installed:
   libexpat1 libpython3.11-minimal libssl3 python3-minimal
python3.11-minimal
0 upgraded, 5 newly installed, 0 to remove and 25 not upgraded.
Need to get 5009 kB of archives.
After this operation, 18.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]

The python3.11 is not installed.

I think that python3.11 must be labeled inside suggests instead of
recommends. On debian/control:

85,86c85
< Recommends: python3.11
< Suggests: binfmt-support
---


Thanks,

#1029505#30
Date:
2023-01-30 15:44:55 UTC
From:
To:
Hi Ricardo (2023.01.29_04:09:09_-0400)

Ah, yes. My minimal chroot wasn't minimal enough.

I see that python3.X-minimal Recommends python3.x.
I don't know the origin of this Recommends, but it's been there a long
time.

And it really does stand. We don't recommend that anyone use the
-minimal interpreter on its own. It exists for use-cases where size
really matters, like installer environments, and Recommends would
generally be disabled in those scenarios.

We strongly discourage anything in Debian from depending on the minimal
packages:
https://www.debian.org/doc/packaging-manuals/python-policy/index.html#minimal-packages

So, let's go back to first principles. What problem are you trying to
solve that requires the minimal interpreter, but also wants Recommends
enabled?

SR