Skip to content

Commit 3e3b03a

Browse files
committed
Drop outdated Python version checks
1 parent 7ef57af commit 3e3b03a

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

vpython/__init__.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,7 @@
99
# __gs_version__ exist before importing vpython, which itself imports
1010
# both of those.
1111

12-
from ._notebook_helpers import _isnotebook, __is_spyder
13-
import sys
14-
__v = sys.version_info
15-
16-
# Delete sys now that we are done with it
17-
del sys
18-
19-
__ispython3 = (__v.major == 3)
20-
__require_notebook = (not __ispython3) or (__v.minor < 5) # Python 2.7 or 3.4 require Jupyter notebook
21-
22-
if __require_notebook and (not _isnotebook):
23-
s = "The non-notebook version of vpython requires Python 3.5 or later."
24-
s += "\nvpython does work on Python 2.7 and 3.4 in the Jupyter notebook environment."
25-
raise Exception(s)
26-
12+
from ._notebook_helpers import __is_spyder
2713

2814
from .vpython import canvas
2915

vpython/vpython.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@
2828
'standardAttributes', 'text', 'textures', 'triangle', 'vertex',
2929
'wtext', 'winput', 'keysdown']
3030

31-
__p = platform.python_version()
32-
_ispython3 = (__p[0] == '3')
3331

34-
if _ispython3:
35-
from inspect import signature # Python 3; needed to allow zero arguments in a bound function
36-
else:
37-
from inspect import getargspec # Python 2; needed to allow zero arguments in a bound function
32+
from inspect import signature # Python 3; needed to allow zero arguments in a bound function
3833

3934
# __version__ is the version number of the Jupyter VPython installer, generated in building the installer.
4035
version = [__version__, 'jupyter']

0 commit comments

Comments
 (0)