Skip to content

Commit 5fc722c

Browse files
authored
Merge pull request #180 from mwcraig/change-version-check
Updates for Python 3.10 and some housecleaning
2 parents 85e40d7 + 3e3b03a commit 5fc722c

File tree

5 files changed

+9
-30
lines changed

5 files changed

+9
-30
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
max-parallel: 4
1010
fail-fast: false
1111
matrix:
12-
python-version: [3.7, 3.8, 3.9]
12+
python-version: [3.8, 3.9, '3.10']
1313
platform: [ubuntu-latest, macos-latest, windows-latest]
1414
runs-on: ${{ matrix.platform }}
1515

.github/workflows/upload_pypi.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
max-parallel: 4
1212
fail-fast: false
1313
matrix:
14-
python-version: [3.7, 3.8, 3.9]
15-
platform: [macos-latest, windows-latest] # No wheels on linux yet
14+
python-version: [3.7, 3.8, 3.9, '3.10']
15+
platform: [macos-latest, windows-latest] # Wheels on linux below
1616
runs-on: ${{ matrix.platform }}
1717

1818
steps:
@@ -55,9 +55,9 @@ jobs:
5555
python -m pip install --upgrade pip
5656
pip install twine
5757
- name: Python wheels manylinux build
58-
uses: RalfG/python-wheels-manylinux-build@v0.3.4
58+
uses: RalfG/python-wheels-manylinux-build@v0.4.0
5959
with:
60-
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38'
60+
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
6161
build-requirements: 'setuptools cython'
6262
- name: Build and publish wheel
6363
env:
@@ -73,7 +73,7 @@ jobs:
7373
- name: Set up Python
7474
uses: actions/setup-python@v1
7575
with:
76-
python-version: '3.8'
76+
python-version: '3.10'
7777
- name: Install dependencies
7878
run: |
7979
python -m pip install --upgrade pip

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
install_requires = ['jupyter', 'jupyter-server-proxy', 'numpy', 'ipykernel',
2222
'autobahn>=18.8.2']
2323

24-
if sys.version_info.major == 3 and sys.version_info.minor >= 5:
25-
install_requires.append('autobahn')
26-
2724
setup_args = dict(
2825
name='vpython',
2926
packages=['vpython'],
@@ -50,6 +47,7 @@
5047
],
5148
ext_modules=extensions,
5249
install_requires=install_requires,
50+
python_requires=">=3.7",
5351
package_data={'vpython': ['vpython_data/*',
5452
'vpython_libraries/*',
5553
'vpython_libraries/images/*']},

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)