Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for EOL Python 2.6 #1178

Closed
wants to merge 1 commit into from
Closed

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Nov 20, 2017

#1053 says to drop Python 2.6 support in unit tests and scripts, and to issue a deprecation warning in psutil.

In case or until you want to go further, this also removes Python 2.6 code, plus already dropped 3.2-3.3.

@giampaolo
Copy link
Owner

Can you change this so that set literals are not used? This way psutil can still be imported on python 2.6. Basically I'm looking to implement the original #1053 plan.

@hugovk
Copy link
Contributor Author

hugovk commented Nov 21, 2017

Done!

@@ -85,11 +85,10 @@ exe/wheel installers hosted on
If you want to compile psutil from sources you'll need **Visual Studio**
(Mingw32 is no longer supported):

* Python 2.6, 2.7: `VS-2008 <http://www.microsoft.com/en-us/download/details.aspx?id=44266>`__
* Python 3.3, 3.4: `VS-2010 <http://www.visualstudio.com/downloads/download-visual-studio-vs#d-2010-express>`__
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove instructions for 2.7 and 3.4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, mistaken removal of 2.7 along with 2.6, and 3.4 is still there, just 3.3 removed.

@@ -29,6 +29,7 @@
import threading
import time
import traceback
import unittest
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this can you please change all other test files and import unittest directly instead of from psutil.test import unittest?

@giampaolo
Copy link
Owner

giampaolo commented Nov 21, 2017

Actually I retract, sorry. I think it is better to hold off on this a little while longer. Stats for Python 2.6 show 1% usage add 29,737 downloads in the last 30 days, which is about 30x times Python 3.3 usage.
Somewhat that makes me feel uncomfortable.

~/svn/psutil {master}$ GOOGLE_APPLICATION_CREDENTIALS=pypinfo-5264aad62c1c.json pypinfo --percent  psutil pyversion
python_version percent download_count 
-------------- ------- -------------- 
2.7              82.4%      2,519,940 
3.5               8.3%        254,540 
3.6               3.9%        118,078 
3.4               2.2%         66,466 
None              2.2%         66,389 
2.6               1.0%         29,737 
3.7               0.0%          1,309 
3.3               0.0%          1,079 
1.17              0.0%            789 
3.2               0.0%             48 
2.8               0.0%              3 
2.4               0.0%              2 

~/svn/psutil {master}$ GOOGLE_APPLICATION_CREDENTIALS=pypinfo-5264aad62c1c.json pypinfo --percent  psutil system distro
system_name distro_name                     percent download_count 
----------- ------------------------------- ------- -------------- 
Linux       Ubuntu                            58.9%      1,792,630 
Linux       Debian GNU/Linux                  11.4%        345,813 
Linux       CentOS Linux                       5.7%        174,088 
Linux       None                               5.3%        162,519 
Windows     None                               4.6%        141,227 
None        None                               4.0%        120,350 
Linux       CentOS                             3.2%         96,795 
Linux       debian                             2.0%         60,222 
Linux       Amazon Linux AMI                   1.3%         40,117 
Darwin      macOS                              1.1%         33,870 
Linux       Red Hat Enterprise Linux Server    0.6%         19,573 
Linux       Fedora                             0.6%         16,956 
Linux       Alpine Linux                       0.3%         10,234 
Linux       openSUSE Leap                      0.3%          7,785 
Linux       Raspbian GNU/Linux                 0.2%          5,180 
Linux       Kali GNU/Linux                     0.1%          4,293 
Linux       Oracle Linux Server                0.1%          3,953 
Linux       RedHatEnterpriseServer             0.1%          3,337 
Linux       SLES                               0.1%          3,332 
Darwin      OS X                               0.1%          3,130 

@hugovk
Copy link
Contributor Author

hugovk commented Nov 21, 2017

Those numbers include mirrors too. How are they with the --pip switch?

@giampaolo
Copy link
Owner

~/svn/psutil {master}$ GOOGLE_APPLICATION_CREDENTIALS=pypinfo-5264aad62c1c.json pypinfo --percent --pip  psutil pyversion
python_version percent download_count 
-------------- ------- -------------- 
2.7              84.7%      2,489,139 
3.5               8.5%        249,424 
3.6               3.9%        115,803 
3.4               1.8%         52,619 
2.6               1.0%         28,810 
3.7               0.0%          1,063 
3.3               0.0%          1,002 
3.2               0.0%             22 
None              0.0%             12 
2.8               0.0%              3 

@hugovk
Copy link
Contributor Author

hugovk commented Nov 21, 2017

👍 Thanks, more or less the same. Just let me know if/when you're ready for updates to this.

@giampaolo
Copy link
Owner

giampaolo commented Nov 21, 2017

Thank you and sorry for wasting your time. I'll ping you for sure when the time comes.

@giampaolo giampaolo closed this Nov 21, 2017
@hugovk
Copy link
Contributor Author

hugovk commented Aug 26, 2018

Just to keep an eye on the trend, here's the pip installs from PyPI for July 2018:

python_version percent download_count
3.5 51.94% 1,171,601
2.7 39.47% 890,376
3.6 6.11% 137,743
3.4 1.74% 39,351
3.7 0.39% 8,871
2.6 0.33% 7,541
3.3 0.01% 137
3.8 0.00% 7
None 0.00% 4
2.8 0.00% 2
Total 2,255,633

Source: pypinfo --start-date 2018-07-01 --end-date 2018-07-31 --percent --markdown psutil pyversion

(--pip is now implicit in pypinfo; use --all to show downloads by all installers, not only pip.)

(Really nice to see Python 3 now accounts for 60%! Up from 12% in October!)

@hugovk hugovk deleted the rm-2.6 branch April 15, 2022 12:29
@hugovk hugovk mentioned this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants