LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2019, 03:50 PM   #31
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,591
Blog Entries: 2

Rep: Reputation: 390Reputation: 390Reputation: 390Reputation: 390

I write programs in python 3 - can't say for 2.7, but the 3 is quite tolerable and pip (pip3) works as expected.

my 2c
 
Old 03-07-2019, 03:15 AM   #32
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 350

Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
I'm not nearly versed enough in python to know the issues... would you care to expound on them? Does python3 not have pip? Or was it reworked to remove whatever crappiness it had? What other issues did python2 have?
Python 3 is backwards incompatible. To make a codebase work with both 2 and 3, some voodoo is required.
 
Old 03-07-2019, 06:20 AM   #33
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 963

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
As long as the are packages in Slackware that need Python 2, Python 2 should stay.
 
Old 03-07-2019, 07:38 AM   #34
chemfire
Member
 
Registered: Sep 2012
Posts: 231

Rep: Reputation: Disabled
Mostly the issues with python 2 are around classes, and general lack of orthogonal consistency. Its a difficult language to work with because of those inconsistency and leads to some tortured expressions. Its also just long in the tooth. Everyone and their brother was allowed to put modules into the pip ecosystem. A lot of that code was amateur hour, its loaded with coupling and cohesion problems. Things are tied to highly specific versions of other things because they break the object model, and because maintainers made no effort to design stable APIs. Basically its all a huge mess. Try to install more than few large projects and you are in version hell unless you use virtual environments (read keeping copies of old unmaintained code often with serious vulnerabilities around indefinitely)

Python3 on the other hand has benefited enormously from PEP. People have worked hard to define the right way to do things; and my anecdotal observation is most of the projects getting into pip3 are a lot better.

Last edited by chemfire; 03-07-2019 at 07:40 AM.
 
2 members found this post helpful.
Old 03-07-2019, 12:02 PM   #35
Skaendo
Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 932

Rep: Reputation: Disabled
My suggestion, since it's obvious that python 2 will still be used after EOL, is to start removing python 2 where it is not needed. Eventually (hopefully) it will get to a point where python 2 will no longer be needed and can go. But it's time to start pruning the tree now.
 
2 members found this post helpful.
Old 03-07-2019, 01:26 PM   #36
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 14.2, SARPI
Posts: 327

Rep: Reputation: 30
Personally, I think it should be removed, and have the ability to install it separately, like 32bit compatibility. I just think that if you haven't migrated to 3.x by now, I mean, 3 has been out for like a decade and it's high to leave 2 behind.
 
2 members found this post helpful.
Old 03-07-2019, 01:32 PM   #37
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,093

Rep: Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929
Is Python 2 not a requirement for LLVM now?
 
Old 03-07-2019, 01:34 PM   #38
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,591
Blog Entries: 2

Rep: Reputation: 390Reputation: 390Reputation: 390Reputation: 390
Thumbs up

Quote:
Originally Posted by Skaendo View Post
My suggestion, since it's obvious that python 2 will still be used after EOL, is to start removing python 2 where it is not needed. Eventually (hopefully) it will get to a point where python 2 will no longer be needed and can go. But it's time to start pruning the tree now.
I second this
 
Old 03-07-2019, 03:16 PM   #39
phalange
Member
 
Registered: May 2018
Distribution: Slackware, Nixos, Arch, Centos
Posts: 185

Rep: Reputation: Disabled
Quote:
Originally Posted by hedron View Post
Personally, I think it should be removed, and have the ability to install it separately, like 32bit compatibility. I just think that if you haven't migrated to 3.x by now, I mean, 3 has been out for like a decade and it's high to leave 2 behind.
Agreed, there are ways to keep legacy stuff available to those who need it, but no reason to give Python 2 'base system' status in Slackware15.

This was posted earlier, but bears repeating:
https://pythonclock.org/
 
1 members found this post helpful.
Old 03-07-2019, 03:30 PM   #40
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,934

Rep: Reputation: Disabled
Code:
/var/lib/pkgtools/packages# grep usr\/lib64\/python2\.7\/site-packages * | cut -d: -f1 | uniq > /tmp/1
/var/lib/pkgtools/packages# grep usr\/lib64\/python3\.7\/site-packages * | cut -d: -f1 | uniq > /tmp/2
/var/lib/pkgtools/packages# diff -Naur /tmp/1 /tmp/2
--- /tmp/1	2019-03-07 22:21:15.482398000 +0100
+++ /tmp/2	2019-03-07 22:21:09.314398000 +0100
@@ -1,43 +1,31 @@
 Cython-0.29.6-x86_64-1
-M2Crypto-0.31.0-x86_64-1
 Mako-1.0.7-x86_64-3
 PyQt-4.12.1-x86_64-3
 QScintilla-2.10.8-x86_64-2
-bind-9.12.4-x86_64-1
+blueman-2.0.8-x86_64-2
 dbus-python-1.2.8-x86_64-2
-fetchmail-6.3.26-x86_64-5
-gamin-0.1.10-x86_64-6
-getmail-5.13-x86_64-1
+distcc-3.3.2-x86_64-2
 gexiv2-0.10.10-x86_64-2
 gpgme-1.12.0-x86_64-2
-kate-4.14.3-x86_64-4
-kde-workspace-4.11.22-x86_64-6
+hplip-3.19.1-x86_64-2
 kmod-26-x86_64-2
 libcaca-0.99.beta19-x86_64-4
 libcap-ng-0.7.9-x86_64-2
-libieee1284-0.2.11-x86_64-4
-libplist-2.0.0-x86_64-2
-libproxy-0.4.15-x86_64-3
 libwebp-1.0.2-x86_64-2
 libxml2-2.9.9-x86_64-2
-libxslt-1.1.33-x86_64-1
-linuxdoc-tools-0.9.73-x86_64-2
 llvm-7.0.1-x86_64-2
-mercurial-4.9-x86_64-1
-net-snmp-5.8-x86_64-4
+lxc-2.0.9_d3a03247-x86_64-2
+meson-0.49.2-x86_64-2
 newt-0.52.20-x86_64-4
-nmap-7.70-x86_64-3
 obexftp-0.24.2-x86_64-4
-pilot-link-0.12.5-x86_64-13
+pssh-2.3.1-x86_64-4
 pycairo-1.18.0-x86_64-2
 pycups-1.9.74-x86_64-2
 pycurl-7.43.0.2-x86_64-2
 pygobject-2.28.7-x86_64-3
 pygobject3-3.30.4-x86_64-2
-pygtk-2.24.0-x86_64-5
 pykde4-4.14.3-x86_64-8
 pyparsing-2.3.1-x86_64-2
-python-2.7.16-x86_64-1
 python-appdirs-1.4.3-x86_64-3
 python-certifi-2018.11.29-x86_64-2
 python-chardet-3.0.4-x86_64-3
@@ -52,12 +40,10 @@
 python-setuptools-40.8.0-x86_64-2
 python-six-1.12.0-x86_64-3
 python-urllib3-1.24.1-x86_64-2
+python3-3.7.2-x86_64-1
 pyxdg-0.26-x86_64-1
 rpm-4.14.2.1-x86_64-2
-samba-4.9.4-x86_64-2
-scons-3.0.4-x86_64-1
 sip-4.19.8-x86_64-3
-subversion-1.11.1-x86_64-1
 system-config-printer-1.5.11-x86_64-4
 talloc-2.1.16-x86_64-1
 tdb-1.3.18-x86_64-1
@@ -65,4 +51,3 @@
 urwid-1.0.3-x86_64-4
 util-linux-2.33.1-x86_64-2
 xcb-proto-1.13-x86_64-3
-xpyb-1.3.1-x86_64-5
it's not a complete survey, because it doesn't consider, for example, python scripts installed out of site-packages, but just to have an idea of the python modules in current, the packages prefixed with "-" contain exclusively python2 ones (and so they need python-2.x), while those prefixed with "+" just python3 ones.

Last edited by ponce; 03-08-2019 at 12:09 AM.
 
4 members found this post helpful.
Old 03-07-2019, 03:55 PM   #41
phalange
Member
 
Registered: May 2018
Distribution: Slackware, Nixos, Arch, Centos
Posts: 185

Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
it's not a complete survey,
This is helpful, thanks for posting. One caveat is that in some cases at least, python2.7 is an optional dependency, so probably an element of the overall functionality might be unavailable, but not complete breakage or inability to build the package. For example nmap only uses python for ndiff.
 
Old 03-07-2019, 04:03 PM   #42
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,093

Rep: Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929Reputation: 3929
There's also the stuff linked against libpython2.7.so. Like vim.
 
1 members found this post helpful.
Old 03-08-2019, 03:06 AM   #43
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,591
Blog Entries: 2

Rep: Reputation: 390Reputation: 390Reputation: 390Reputation: 390
Quote:
Originally Posted by ponce View Post
Code:
/var/lib/pkgtools/packages# grep usr\/lib64\/python2\.7\/site-packages * | cut -d: -f1 | uniq > /tmp/1
/var/lib/pkgtools/packages# grep usr\/lib64\/python3\.7\/site-packages * | cut -d: -f1 | uniq > /tmp/2
/var/lib/pkgtools/packages# diff -Naur /tmp/1 /tmp/2
--- /tmp/1	2019-03-07 22:21:15.482398000 +0100
+++ /tmp/2	2019-03-07 22:21:09.314398000 +0100
@@ -1,43 +1,31 @@
 Cython-0.29.6-x86_64-1
-M2Crypto-0.31.0-x86_64-1
 Mako-1.0.7-x86_64-3
 PyQt-4.12.1-x86_64-3
 QScintilla-2.10.8-x86_64-2
-bind-9.12.4-x86_64-1
+blueman-2.0.8-x86_64-2
 dbus-python-1.2.8-x86_64-2
-fetchmail-6.3.26-x86_64-5
-gamin-0.1.10-x86_64-6
-getmail-5.13-x86_64-1
+distcc-3.3.2-x86_64-2
 gexiv2-0.10.10-x86_64-2
 gpgme-1.12.0-x86_64-2
-kate-4.14.3-x86_64-4
-kde-workspace-4.11.22-x86_64-6
+hplip-3.19.1-x86_64-2
 kmod-26-x86_64-2
 libcaca-0.99.beta19-x86_64-4
 libcap-ng-0.7.9-x86_64-2
-libieee1284-0.2.11-x86_64-4
-libplist-2.0.0-x86_64-2
-libproxy-0.4.15-x86_64-3
 libwebp-1.0.2-x86_64-2
 libxml2-2.9.9-x86_64-2
-libxslt-1.1.33-x86_64-1
-linuxdoc-tools-0.9.73-x86_64-2
 llvm-7.0.1-x86_64-2
-mercurial-4.9-x86_64-1
-net-snmp-5.8-x86_64-4
+lxc-2.0.9_d3a03247-x86_64-2
+meson-0.49.2-x86_64-2
 newt-0.52.20-x86_64-4
-nmap-7.70-x86_64-3
 obexftp-0.24.2-x86_64-4
-pilot-link-0.12.5-x86_64-13
+pssh-2.3.1-x86_64-4
 pycairo-1.18.0-x86_64-2
 pycups-1.9.74-x86_64-2
 pycurl-7.43.0.2-x86_64-2
 pygobject-2.28.7-x86_64-3
 pygobject3-3.30.4-x86_64-2
-pygtk-2.24.0-x86_64-5
 pykde4-4.14.3-x86_64-8
 pyparsing-2.3.1-x86_64-2
-python-2.7.16-x86_64-1
 python-appdirs-1.4.3-x86_64-3
 python-certifi-2018.11.29-x86_64-2
 python-chardet-3.0.4-x86_64-3
@@ -52,12 +40,10 @@
 python-setuptools-40.8.0-x86_64-2
 python-six-1.12.0-x86_64-3
 python-urllib3-1.24.1-x86_64-2
+python3-3.7.2-x86_64-1
 pyxdg-0.26-x86_64-1
 rpm-4.14.2.1-x86_64-2
-samba-4.9.4-x86_64-2
-scons-3.0.4-x86_64-1
 sip-4.19.8-x86_64-3
-subversion-1.11.1-x86_64-1
 system-config-printer-1.5.11-x86_64-4
 talloc-2.1.16-x86_64-1
 tdb-1.3.18-x86_64-1
@@ -65,4 +51,3 @@
 urwid-1.0.3-x86_64-4
 util-linux-2.33.1-x86_64-2
 xcb-proto-1.13-x86_64-3
-xpyb-1.3.1-x86_64-5
it's not a complete survey, because it doesn't consider, for example, python scripts installed out of site-packages, but just to have an idea of the python modules in current, the packages prefixed with "-" contain exclusively python2 ones (and so they need python-2.x), while those prefixed with "+" just python3 ones.
Would you say this list would be significantly in favor of python3 if there was any effort to compile against python3 where applicable?
 
Old 03-08-2019, 04:29 AM   #44
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 963

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Quote:
Originally Posted by Skaendo View Post
My suggestion, since it's obvious that python 2 will still be used after EOL, is to start removing python 2 where it is not needed. Eventually (hopefully) it will get to a point where python 2 will no longer be needed and can go. But it's time to start pruning the tree now.
Agree and I think the pruning has already begun.
 
1 members found this post helpful.
Old 04-07-2019, 11:16 AM   #45
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 73

Rep: Reputation: Disabled
It's time to cut python 2 from the tree and recompile all stuff with python 3

my 2c
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware current - Openssl and python2 update broke python-setuptools? orbea Slackware 28 03-14-2016 03:16 PM
[SOLVED] How can I make Python2.7 my default Python without deleting/removing python2.6. steves504 Linux - Server 2 03-21-2014 11:57 AM
[SOLVED] Trying to install 'Gmail Backup' but it requires python2.5 - I have python2.8... Robert.Thompson Slackware 6 05-10-2011 08:23 AM
Python2.5-devel is unable to find installed Python2.5 Setya SUSE / openSUSE 1 06-08-2007 01:35 AM
python2.2 Dependencies webboss Linux - General 3 03-06-2002 04:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration