-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Raise with message for 3.5.2 and earlier #27288
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
Conversation
def test_old_python_raises(): | ||
code = "import sys; sys.version_info = (3, 5, 2); import pandas" | ||
# match = 'pandas requires Python >=3.5.3 but 3.5.2 is installed' | ||
out = subprocess.run(["python", "-c", code], check=False, capture_output=True) |
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.
capture_output I don't think is available until 3.7 so source of CI errors. Maybe not needed at all?
@@ -150,3 +150,11 @@ def test_missing_required_dependency(): | |||
output = exc.value.stdout.decode() | |||
for name in ["numpy", "pytz", "dateutil"]: | |||
assert name in output | |||
|
|||
|
|||
def test_old_python_raises(): |
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.
we could move the import of just pandas.compat
at the beginning of init and define PY35 there (and import here); would put the code more logically together.
Would it work to put this error in setup.py instead? Install time errors seem better than import time errors. Or are there cases where that doesn’t get run? |
i think if you have a old pip and install from a wheel this wont be hit in setup.py |
Agreed that this should be in The reported fail case in #27247 was from (incorrectly) using |
Closes #27247