Comment 1 for bug 1850283

Revision history for this message
Frank Heimes (fheimes) wrote :

I just installed python3-ldap on 19.10 and 18.04 and it installs fine on both.

You're right that it pulls in some python(2) packages:

$ sudo apt --no-install-recommends install python3-ldap
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-ldap
  python-minimal python-pyasn1 python-pyasn1-modules python2.7
  python2.7-minimal python3-pyasn1 python3-pyasn1-modules
Suggested packages:
  python-doc python-tk python2.7-doc binutils binfmt-support
The following NEW packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-ldap
  python-minimal python-pyasn1 python-pyasn1-modules python2.7
  python2.7-minimal python3-ldap python3-pyasn1 python3-pyasn1-modules
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
...

The needed packages are all in main, hence are all fully supported - as the following command shows:
apt show python libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-ldap python-minimal python-pyasn1 python-pyasn1-modules python2.7 python2.7-minimal python3-ldap python3-pyasn1 python3-pyasn1-modules | grep 'Supported\|APT-Sources'

The situation in 19.10/Eoan (and therefore also in Focal) is different - if python3-ldap is installed there, no python2 packages are pulled-in:

$ sudo apt install python3-ldap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  python3-pyasn1 python3-pyasn1-modules
The following NEW packages will be installed:
  python3-ldap python3-pyasn1 python3-pyasn1-modules
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.

I'm not sure what you are going to accomplish - why do you want to get rid of the python2-related packages in bionic already?
Please notice that any patched and/or recompiled packages are usually w/o support - just the one from the archives are in support.