From c472e634aa6aa4c42adef5601541b641c79f6bf0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 25 Jun 2018 13:18:24 +0200
Subject: [PATCH] Support Python 3.7 (PEP 479)
See https://www.python.org/dev/peps/pep-0479/
Fixes https://github.com/WoLpH/numpy-stl/issues/82
---
.travis.yml | 7 +++++++
stl/stl.py | 2 +-
tox.ini | 5 ++++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a5af03b..b1b1aad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,13 @@ env:
- TOX_ENV=py34-nix
- TOX_ENV=py35-nix
- TOX_ENV=py36-nix
+matrix:
+ include:
+ - env: TOX_ENV=py37-nix
+ python: '3.7-dev'
+ install: pip install coveralls flake8 tox
+ # be more verbose not to timeout:
+ script: tox -vv -e $TOX_ENV
install:
- pip install -r tests/requirements.txt
- pip install coveralls flake8 tox
diff --git a/stl/stl.py b/stl/stl.py
index f4007ed..ec8225d 100644
--- a/stl/stl.py
+++ b/stl/stl.py
@@ -214,7 +214,7 @@ def get(prefix=''):
except AssertionError as e: # pragma: no cover
raise RuntimeError(recoverable[0], e)
except StopIteration:
- raise
+ return
@classmethod
def _load_ascii(cls, fh, header, speedups=True):
diff --git a/tox.ini b/tox.ini
index 275a844..f8a1057 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = {py27,py33,py34,py35,py36}-{windows-32,windows-64,nix}, docs, flake8
+envlist = {py27,py33,py34,py35,py36,py37}-{windows-32,windows-64,nix}, docs, flake8
skip_missing_interpreters = True
[testenv]
@@ -12,6 +12,7 @@ basepython =
py34-nix: python3.4
py35-nix: python3.5
py36-nix: python3.6
+ py37-nix: python3.7
py27-windows-32: C:\\Python27\\python.exe
py27-windows-64: C:\\Python27-x64\\python.exe
py34-windows-32: C:\\Python34\\python.exe
@@ -20,6 +21,8 @@ basepython =
py35-windows-64: C:\\Python35-x64\\python.exe
py36-windows-32: C:\\Python36\\python.exe
py36-windows-64: C:\\Python36-x64\\python.exe
+ py37-windows-32: C:\\Python37\\python.exe
+ py37-windows-64: C:\\Python37-x64\\python.exe
[testenv:flake8]
basepython=python