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

Simplify Python version checks, fix a bug #1237

Closed
wants to merge 1 commit into from

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Mar 8, 2018

The one in psutil/tests/__main__.py looks like an unintentional bug:

if sys.version_info[:2] == (2, 6):
    TEST_DEPS.extend(["ipaddress", "unittest2", "argparse", "mock==1.0.1"])
elif sys.version_info[:2] == (2, 7) or sys.version_info[:2] <= (3, 2):
    TEST_DEPS.extend(["ipaddress", "mock"])

That second elif is also true for Python 2.6 because or sys.version_info[:2] <= (3, 2) is always true.

Python 2.6 then has both mock==1.0.1 and mock in TEST_DEPS.

@giampaolo
Copy link
Owner

setup.py just changed and this is no longer necessary. Thanks though.

@giampaolo giampaolo closed this Mar 8, 2018
@hugovk hugovk deleted the simplify-version-checks branch March 8, 2018 20:39
@giampaolo giampaolo added the bug label Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants