Skip to content

Commit 26ec595

Browse files
authored
Merge pull request #3926 from Carreau/drop-27
Drop 2.7
2 parents d772277 + 37f9a41 commit 26ec595

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ cache:
77
- $HOME/.cache/pip
88
python:
99
- 3.6
10-
- 2.7
1110

1211
sudo: required
1312

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ environment:
66
matrix:
77
- CONDA_PY: 36
88
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
9-
- CONDA_PY: 27
10-
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
119

1210
platform:
1311
- x64

setup.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,29 @@
1818

1919
name = "notebook"
2020

21-
# Minimal Python version sanity check
22-
v = sys.version_info
23-
if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)):
24-
error = "ERROR: %s requires Python version 2.7 or 3.3 or above." % name
21+
if sys.version_info < (3, 4):
22+
pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.'
23+
try:
24+
import pip
25+
pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]])
26+
if pip_version < (9, 0, 1) :
27+
pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\
28+
'pip {} detected.'.format(pip.__version__)
29+
else:
30+
# pip is new enough - it must be something else
31+
pip_message = ''
32+
except Exception:
33+
pass
34+
35+
36+
error = """
37+
Notebook 6.0+ supports Python 3.4 and above.
38+
When using Python 2.7, please install Notebook 5.x.
39+
40+
Python {py} detected.
41+
{pip}
42+
""".format(py=sys.version_info, pip=pip_message )
43+
2544
print(error, file=sys.stderr)
2645
sys.exit(1)
2746

@@ -101,6 +120,7 @@
101120
'nbval', 'nose-exclude', 'selenium'],
102121
'test:sys_platform == "win32"': ['nose-exclude'],
103122
},
123+
python_requires = '>=3.4',
104124
entry_points = {
105125
'console_scripts': [
106126
'jupyter-notebook = notebook.notebookapp:main',

0 commit comments

Comments
 (0)