From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: Dropping Python 2 (questions about python modules that are in python3 and python2 versions) Date: Thu, 13 May 2021 19:36:13 +0200 Message-ID: <8bd0cdbf-7705-343d-0d74-98e9e1980772@ipfire.org> In-Reply-To: <2E5E06D8-27FF-41EA-905B-A313E07DBFFD@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1126311644653007164==" List-Id: --===============1126311644653007164== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Jonatan, On 12/05/2021 20:34, Jonatan Schlag wrote: > Hi, >=20 >> Am 11.05.2021 um 14:18 schrieb Adolf Belka : >> >> =EF=BB=BFHi all, >> >> Three of the python-xxx files listed for python2 already seem to have a py= thon3 versions available in IPFire. >> >> >> For python-six there is python3-six. Both are addons. Can python3-six repl= ace python-six? >> >> Both python-six and python3-six appear to be the same source file but just= a different version number 1.10.0 vs 1.14.0 and they have a different PROG n= ame. Searching in the git repository I found spice refers to needing python-s= ix to be built but it is not mentioned in the spice source install instructio= ns under either mandatory or optional dependencies for building. >> > So the easiest way to try would be to disable python-six and doing a clean = build. If nothing needs it it can be dropped. Otherwise you could give the py= thon3 version a try. Thanks for the suggestion. It worked well. I found that python3-dateutil had python3-six defined as a dependency. Howeve= r python3-dateutil is built with python3 and as we are trying to remove pytho= n2 then the use of six "as a compatibility module that can be used to allow p= rojects to be run on either python2 or python3, whatever is available" is no = longer needed. So I removed python3-six as a dependency from python3-dateutil and removed bo= th python3-six and python-six from make.sh and did a clean build and had no p= roblems. Patch has been submitted. Thanks for your help, Adolf >> >> For python-docutils there is python3-docutils. They again appear to be the= same filename but different versions. python-docutils is version 0.12 and is= a core program. python3-docutils is version 0.14 and is an addon. Current ve= rsion is 0.17.1 >> >> Could python3-docutils be made into a core program and updated and python-= docutils removed? >> > Seem to be added because of python daemon, so I would update this package f= irst and then see what happen. >=20 > Greetings Jonatan >> >> >> There is python-setuptools and python3-setupttols-scm. These do look to be= different files. Both are addons and grepping in the git repository neither = are dependencies for any other package as far as I can find. Python-setuptool= s also appears to be a very old version of setuptools at 0.6c11 and the insta= llation is running a .egg file via the bash command. >> >> Can python-setuptools just be removed without creating an equivalent pytho= n3 version or is it being used/required somewhere that I have been unable to = identify? >> >> >> 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 --===============1126311644653007164==--