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 python 3.4 & 3.5 support #2246

Merged
merged 3 commits into from
Aug 1, 2023
Merged

Conversation

mayeut
Copy link
Contributor

@mayeut mayeut commented Apr 22, 2023

Summary

  • OS: all
  • Bug fix: no
  • Type: core

Description

Python 3.4 & 3.5 are currently untested in CI (c.f. #2162 & #2102 (comment))

Given the download count for last week below, I propose to just drop support for those versions.

psutil % pypinfo -l 25 --percent -sd -8 'psutil==5.9.*' pyversion
Served from cache: False
Data processed: 691.93 MiB
Data billed: 692.00 MiB
Estimated cost: $0.01

| python_version | percent | download_count |
| -------------- | ------- | -------------- |
| 3.8            |  38.26% |      5,134,737 |
| 3.7            |  31.19% |      4,186,332 |
| 3.9            |  10.86% |      1,456,900 |
| 3.10           |   9.75% |      1,309,074 |
| 3.6            |   6.60% |        885,766 |
| 3.11           |   2.22% |        298,476 |
| 2.7            |   1.05% |        140,466 |
| 3.5            |   0.06% |          7,460 |
| 3.12           |   0.01% |            688 |
| 3.4            |   0.00% |            371 |
| Total          |         |     13,420,270 |

@mayeut mayeut changed the title Drop python 3.4 & 3.5 Drop python 3.4 & 3.5 support Apr 22, 2023
@giampaolo
Copy link
Owner

Mmm. This should be part of a major release. Let's merge this for psutil 6.0.0, where I will also introduce some other (not serious) incompatibilities.

@mayeut
Copy link
Contributor Author

mayeut commented Apr 23, 2023

IMHO, it could also be part of a minor version bump like it was when dropping 2.6. Obviously it depends on the plans you have for minor vs major release.
If you have plans for a 6.0, it might be time to consider dropping 2.7 ?
It still has many downloads but python 2.7 has now been EOL for more than 3 years. It might also depend on what kind of commitment you have w.r.t. Tidelift support ?

@@ -28,7 +28,7 @@
from . import _psutil_osx


if sys.version_info >= (3, 4):
if sys.version_info[0] >= 3:
Copy link
Owner

Choose a reason for hiding this comment

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

Please use PY3 constant instead.

@@ -53,7 +53,7 @@
from ._compat import basestring


if sys.version_info >= (3, 4):
if sys.version_info[0] >= 3:
Copy link
Owner

Choose a reason for hiding this comment

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

Please use PY3 constant instead.

@@ -56,7 +56,7 @@
else:
raise

if sys.version_info >= (3, 4):
if sys.version_info[0] >= 3:
Copy link
Owner

Choose a reason for hiding this comment

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

Please use PY3 constant instead.

@@ -67,7 +67,7 @@
warnings.simplefilter("ignore")
import mock # NOQA - requires "pip install mock"

if sys.version_info >= (3, 4):
if sys.version_info[0] >= 3:
Copy link
Owner

Choose a reason for hiding this comment

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

Please use PY3 constant instead.

@@ -723,7 +723,7 @@ def nice(self, ret, info):
priorities = [getattr(psutil, x) for x in dir(psutil)
if x.endswith('_PRIORITY_CLASS')]
self.assertIn(ret, priorities)
if sys.version_info > (3, 4):
if sys.version_info[0] >= 3:
Copy link
Owner

Choose a reason for hiding this comment

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

Please use PY3 constant instead.

@@ -751,7 +751,7 @@ def test_net_if_addrs(self):
self.assertIsInstance(addr.netmask, (str, type(None)))
self.assertIsInstance(addr.broadcast, (str, type(None)))
self.assertIn(addr.family, families)
if sys.version_info >= (3, 4) and not PYPY:
if sys.version_info[0] >= 3 and not PYPY:
Copy link
Owner

Choose a reason for hiding this comment

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

Ditto.

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
@giampaolo giampaolo merged commit 252b6fd into giampaolo:master Aug 1, 2023
12 of 15 checks passed
giampaolo added a commit that referenced this pull request Aug 1, 2023
@mayeut mayeut deleted the drop-python-3.5 branch August 1, 2023 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants