diff --git a/labrad/decorators.py b/labrad/decorators.py index aba22d0..e6659b5 100644 --- a/labrad/decorators.py +++ b/labrad/decorators.py @@ -102,7 +102,7 @@ def __init__(self, func, lr_ID, lr_name, returns, unflatten, **params): # unpack tuples, so this case is not allowed: The first argument # cannot be a tuple or '?' tag if the second argument is optional. - argspec = inspect.getargspec(self.func) + argspec = inspect.getfullargspec(self.func) args = argspec.args[2:] # Skip 'self' and context data arguments. if inspect.isgeneratorfunction(func): @@ -224,8 +224,8 @@ def messageHandler(lr_ID, lr_name=None, returns=[], lr_num_params=2, **params): strings of allowed types. """ def decorated(f): - args, varargs, varkw, defaults = inspect.getargspec(f) - args = args[lr_num_params:] + argspec = inspect.getfullargspec(f) + args, defaults = argspec.args[lr_num_params:], argspec.defaults # handle generators as defer.inlineCallbacks if inspect.isgeneratorfunction(f): diff --git a/labrad/node/server_config.py b/labrad/node/server_config.py index f83733a..95d2ebf 100644 --- a/labrad/node/server_config.py +++ b/labrad/node/server_config.py @@ -30,7 +30,7 @@ def from_string(conf, filename=None, path=None, platform=sys.platform): if isinstance(conf, bytes): conf = conf.decode('utf-8') scp = ConfigParser() - scp.readfp(io.StringIO(conf)) + scp.read_file(io.StringIO(conf)) # general information name = scp.get('info', 'name', raw=True) diff --git a/labrad/test/extraction_test.py b/labrad/test/extraction_test.py index 97fb808..1354f78 100644 --- a/labrad/test/extraction_test.py +++ b/labrad/test/extraction_test.py @@ -17,8 +17,8 @@ def timeIt(f, *a, **kw): return result def extractAverage(packets): - data = ''.join(packets) - Is, Qs = np.fromstring(data, dtype='