From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: Dropping Python 2 (python-m2crypto) Date: Sun, 16 May 2021 16:16:31 +0200 Message-ID: <26482daa-fe4b-c76c-331c-fcdf6368dcb5@ipfire.org> In-Reply-To: <8e1edb4d-46cb-a33f-bc5c-9490fd3d531b@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0940473293819697681==" List-Id: --===============0940473293819697681== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi All, So I migrated python-setuptools to python3-setuptools. The python3 version wo= rked with python3-daemon with no problems. However later on python-m2crypto failed to build successfully because it coul= d not find python-setuptools. So python-m2crypto needs both python-typing and= python-setuptools to be present. So this triplet looks to be the barrier to = going fully python3. Regards, Adolf. On 15/05/2021 23:03, Adolf Belka wrote: > Hi All, > > If python-m2crypto has to stay as a python2 module then so does python-typi= ng. python-m2crypto fails to build if python-typing is not present. > > > python-typing is the python2 backport of the typing capability built in to = core python3, so it is only needed for python2. > > Regards, > > Adolf. > > On 14/05/2021 21:28, Adolf Belka wrote: >> Hi Michael, >> >> The blockage of nmap to removing python2 was resolved but I have a new one= now that may be more difficult to resolve. >> >> python-m2crypt was able to be successfully built with python3. However crd= a uses python-m2crypt and from what I have read it only works with python2. >> >> When I do the build then M2Crypto is in python3.8/site-packages/ and crda = gives the following error >> >> >> =C2=A0=C2=A0=C2=A0 make[1]: Entering directory '/usr/src/crda-4.14' >> =C2=A0=C2=A0=C2=A0 GEN=C2=A0 keys-gcrypt.c >> =C2=A0=C2=A0=C2=A0 Trusted pubkeys: pubkeys/linville.key.pub.pem pubkeys/s= forshee.key.pub.pem >> =C2=A0=C2=A0=C2=A0 ERROR: Failed to import the "M2Crypto" module: No modul= e named _m2crypto >> =C2=A0=C2=A0=C2=A0 Please install the "M2Crypto" Python module. >> =C2=A0=C2=A0=C2=A0 On Debian GNU/Linux the package is called "python-m2cry= pto". >> >> >> No matter what I do crda doesn't find python-m2crypto. If I change the pyt= hon-m2crypto lfs from using >> >> =C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && python3 setup.py build >> =C2=A0=C2=A0 =C2=A0cd $(DIR_APP) && python3 setup.py install --root=3D/ >> >> to >> >> =C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && python setup.py build >> =C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && python setup.py install --root=3D/ >> >> then crda builds successfully. >> >> Arch Linux and Gentoo have a python3 patch for crda (the same patch for bo= th) but it makes no difference for my build. >> >> >> Regards, >> >> Adolf >> >> >> On 05/05/2021 16:27, Michael Tremer wrote: >>> Hello, >>> >>> I would like to talk about what has been discussed at the last developer = conference call this week: Dropping Python 2 >>> >>> This version of Python has reached its end of life and will no longer rec= eive any security fixes. Hence we need to get rid of it as soon as possible. >>> >>> However, there is lots of software that still depends on it which has to = be migrated away first. >>> >>> There are at least the following packages: >>> >>> boost >>> fetchmail >>> fireinfo >>> iotop >>> ipaddr >>> libxml2 >>> libxslt >>> newt >>> nmap >>> python >>> python-clientform >>> python-daemon >>> python-distutils >>> python-distutils-extra >>> python-docutils >>> python-feedparser >>> python-inotify >>> python-ipaddress >>> python-m2crypto >>> python-mechanize >>> python-optional-src >>> python-pyparsing >>> python-rssdler >>> python-setuptools >>> python-six >>> python-typing >>> >>> We also have the following scripts: >>> >>> config/ca-certificates/certdata2pem.py >>> config/unbound/unbound-dhcp-leases-bridge >>> >>> Fireinfo is written by us and has a lot of C which will make it a little = bit more difficult to migrate. We would also have to be very careful to not c= hange any behaviour of the current implementation. >>> >>> The rest is probably either software that is entirely written in Python 2= or software that brings bindings for Python. The latter case is easy because= we can either force it to build with Python 3 or we just disable the binding= s. >>> >>> Ultimately we might need to keep Python around in the build system if the= re are other packages that rely on it. However, it would be great if we were = able to remove it from the distribution very soon. Looking at his list, it do= es not seem to be too difficult. >>> >>> Would anyone be up to help and remove Python from any of those packages a= bove? I would like to aim for Core Update 158 and remove as much stuff as pos= sible - if we can everything - and then remove Python 2 in the update after t= hat. If anyone has any custom scripts or applications, people will have some = time to migrate away. >>> >>> Best, >>> -Michael --===============0940473293819697681==--