Skip to content

Commit

Permalink
Merge pull request #371 from jluebbe/topic/update
Browse files Browse the repository at this point in the history
Update several dependencies to newer versions, so that we can support Python 3.7.
  • Loading branch information
jluebbe committed Jan 7, 2019
2 parents 38c96dd + 92659ac commit fb55c92
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 30 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Expand Up @@ -33,5 +33,15 @@ matrix:
services:
- docker
script: ./docker/build.sh
- stage: optional
python: "3.7"
dist: xenial
sudo: true
- stage: optional
python: "3.8-dev"
dist: xenial
sudo: true
fast_finish: true
allow_failures:
- stage: docker
- stage: optional
2 changes: 1 addition & 1 deletion crossbar-requirements.txt
@@ -1,5 +1,5 @@
-r requirements.txt
setuptools>=38.0.0
crossbar==17.12.1
crossbar==18.12.1
# For crossbar
idna==2.5
17 changes: 8 additions & 9 deletions dev-requirements.txt
@@ -1,15 +1,14 @@
pytest-cache==1.0
pytest-cov==2.5.1
pytest-isort==0.1.0
pytest-mock==1.6.3
pytest-pylint==0.7.1
pytest-runner==3.0
pytest-dependency==0.3.2
yapf==0.20.1
pytest-cov==2.6.0
pytest-isort==0.2.1
pytest-mock==1.10.0
pytest-pylint==0.13.0
pytest-runner==4.2
pytest-dependency==0.4.0
yapf==0.24.0
-r doc-requirements.txt
-r crossbar-requirements.txt
-r onewire-requirements.txt
-r modbus-requirements.txt
-r snmp-requirements.txt
-r xena-requirements.txt
-r graph-requirements.txt
-r graph-requirements.txt
7 changes: 3 additions & 4 deletions doc-requirements.txt
@@ -1,4 +1,3 @@
sphinxcontrib-napoleon==0.6.1
Sphinx==1.6.7
sphinx_rtd_theme==0.2.4
docutils==0.14
Sphinx==1.8.1
sphinx_rtd_theme==0.4.1
docutils==0.14
2 changes: 1 addition & 1 deletion doc/conf.py
Expand Up @@ -36,7 +36,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
'sphinx.ext.napoleon',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.autosectionlabel']
Expand Down
2 changes: 1 addition & 1 deletion labgrid/pytestplugin/hooks.py
Expand Up @@ -57,7 +57,7 @@ def pytest_collection_modifyitems(config, items):
have_feature = env.get_features() | env.get_target_features()

for item in items:
marker = item.get_marker("lg_feature")
marker = item.get_closest_marker("lg_feature")
if not marker:
continue
else:
Expand Down
7 changes: 6 additions & 1 deletion labgrid/util/agentwrapper.py
Expand Up @@ -65,7 +65,12 @@ def call(self, method, *args, **kwargs):
elif 'exception' in response:
self.agent.wait()
self.agent = None
raise AgentException(response['exception'])
e = response['exception']
# work around BaseException repr change
# https://bugs.python.org/issue30399
if e[-2:] == ',)':
e = e[:-2] + ')'
raise AgentException(e)
else:
self.agent.wait()
self.agent = None
Expand Down
3 changes: 2 additions & 1 deletion labgrid/util/expect.py
Expand Up @@ -9,6 +9,7 @@ class PtxExpect(pexpect.spawn):
"""

def __init__(self, driver, logfile=None, timeout=30, cwd=None):
"Initializes a pexpect spawn instanse with required configuration"
self.driver = driver
self.logfile = logfile
self.linesep = b"\n"
Expand All @@ -30,7 +31,7 @@ def send(self, s):
return self.driver.write(b)

def read_nonblocking(self, size=1, timeout=-1):
""" Pexpects needs a nonblocking read function, simply use pyserial with a timeout of 0"""
"Pexpects needs a nonblocking read function, simply use pyserial with a timeout of 0"
assert timeout is not None
if timeout == -1:
timeout = self.timeout
Expand Down
2 changes: 1 addition & 1 deletion labgrid/util/ssh.py
Expand Up @@ -294,7 +294,7 @@ def _check_external_master(self):
stderr=subprocess.STDOUT,
)
stdout, _ = proc.communicate(timeout=60)
check = proc.wait(args)
check = proc.wait()
if check == 0:
self._logger.debug("Found existing control socket")
return True
Expand Down
2 changes: 1 addition & 1 deletion modbus-requirements.txt
@@ -1 +1 @@
pyModbusTCP==0.1.5
pyModbusTCP==0.1.7
10 changes: 5 additions & 5 deletions requirements.txt
@@ -1,11 +1,11 @@
attrs==17.4.0
jinja2==2.10
pexpect==4.3.1
pexpect==4.6
https://github.com/labgrid-project/pyserial/archive/v3.4.0.1.zip#egg=pyserial
pytest==3.4.0
pytest==4.0.2
pyudev==0.21.0
requests==2.18.4
requests==2.19.1
xmodem==0.4.5
autobahn==17.10.1
PyYAML==3.12
autobahn==18.12.1
PyYAML==3.13
ansicolors==1.1.8
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -13,7 +13,7 @@
data_files=[('share/man/1', ['man/labgrid-client.1',
'man/labgrid-exporter.1',
'man/labgrid-device-config.1'])],
python_requires='>=3.5, <3.7',
python_requires='>=3.5',
extras_require={
'onewire': ['onewire>=0.2'],
'snmp': ['pysnmp', 'pysnmp-mibs'],
Expand Down Expand Up @@ -68,5 +68,6 @@
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
)
4 changes: 2 additions & 2 deletions snmp-requirements.txt
@@ -1,2 +1,2 @@
pysnmp==4.4.4
pysnmp-mibs==0.1.6
pysnmp==4.4.6
pysnmp-mibs==0.1.6
2 changes: 1 addition & 1 deletion tests/conftest.py
Expand Up @@ -97,7 +97,7 @@ def pytest_configure(config):
"localsshmanager: test SSHManager against Localhost")

def pytest_runtest_setup(item):
envmarker = item.get_marker("sigrokusb")
envmarker = item.get_closest_marker("sigrokusb")
if envmarker is not None:
if item.config.getoption("--sigrok-usb") is False:
pytest.skip("sigrok usb tests not enabled (enable with --sigrok-usb)")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_agent.py
Expand Up @@ -59,7 +59,7 @@ def test_exception(subprocess_mock):
aw = AgentWrapper('localhost')
with pytest.raises(AgentException) as excinfo:
aw.error('foo')
assert excinfo.value.args == ("RuntimeError('foo',)",)
assert excinfo.value.args == ("RuntimeError('foo')",)

def test_error(subprocess_mock):
aw = AgentWrapper('localhost')
Expand Down

0 comments on commit fb55c92

Please sign in to comment.