-
Notifications
You must be signed in to change notification settings - Fork 3k
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 3.4 (2) #6782
Conversation
Please let me know if this needs a news entry or a trivial file/label. |
Thanks again for picking this up @hugovk! Trivial sounds good. I've gone ahead and added the equivalent label, so less work for you. :) |
I think it might be better to use the PY2 and PY3 constants because cases like these are what they’re for and we use them elsewhere (and it reads more simply, etc). |
I agree with @cjerdonek : you should be able to use |
Good idea, updated! flake8 is failing:
But they're used in decorators like this: @pytest.mark.skipif("PY2") How should we fix it? I'd assume Python 2.7 will be dropped before Python 4.0 is released, and these constants removed. On the off-chance it's not(!), remember to review the use of |
They're not valid in the decorators. You'll want leave the pytest decorator as is. |
Thanks, I've reset and re-committed without changing the decorators. |
@pradyunsg |
Should we put a diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py
index e7b6a272..e915892f 100644
--- a/tests/functional/test_install.py
+++ b/tests/functional/test_install.py
@@ -5,6 +5,7 @@ import sys
import textwrap
from os.path import curdir, join, pardir
+import pip._vendor.six
import pytest
from pip._internal import pep425tags
@@ -528,7 +529,7 @@ def test_editable_install__local_dir_no_setup_py_with_pyproject(
assert 'A "pyproject.toml" file was found' in msg
-@pytest.mark.skipif("sys.version_info >= (3,)")
+@pytest.mark.skipif("pip._vendor.six.PY3")
@pytest.mark.xfail
def test_install_argparse_shadowed(script):
# When argparse is in the stdlib, we support installing it
@@ -543,7 +544,7 @@ def test_install_argparse_shadowed(script):
@pytest.mark.network
-@pytest.mark.skipif("sys.version_info < (3,)")
+@pytest.mark.skipif("pip._vendor.six.PY2")
def test_upgrade_argparse_shadowed(script):
# If argparse is installed - even if shadowed for imported - we support
# upgrading it and properly remove the older versions files. -> $ tox -e lint-py3
...
lint-py3 run-test: commands[0] | flake8
./tests/functional/test_install.py:10:1: F401 'pip._vendor.six' imported but unused |
IIRC we have other uses of the current style in this PR. Personally, I'm ambivalent so anything works. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 small comments, otherwise LGTM.
Looks good to me. I'll merge this eagerly -- if someone spots anything else, let's do it in a follow up PR. |
Thanks for all your work on this @hugovk! Thanks for the reviews and inputs @xavfernandez @pfmoore @cjerdonek @chrahunt! |
You're welcome and thanks for the reviews! |
Continuation of PR #6685.
As suggested in review, that PR was just for removing Python 3.4 from classifiers, CI, its deprecation warnings, and so on.
And here's a new PR for the other 3.4-related removals.