Skip to content

Commit

Permalink
Merge pull request #274 from ska-sa/fix-deprecations
Browse files Browse the repository at this point in the history
Fix deprecations
  • Loading branch information
bennahugo authored Jan 11, 2022
2 parents baae3b2 + fecd7d8 commit fefb941
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion montblanc/impl/rime/tensorflow/RimeSolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def pop(self, key, default=None):
cpus = [d.name for d in devices if d.device_type == 'CPU']

if device_type == 'GPU' and len(gpus) == 0:
montblanc.log.warn("No GPUs are present, falling back to CPU.")
montblanc.log.warning("No GPUs are present, falling back to CPU.")
device_type = 'CPU'

use_cpus = device_type == 'CPU'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _proxy(self, *args, **kwargs):
return getattr(self._cube, name)(*args, **kwargs)

wrap = functools.update_wrapper(_proxy, method)
spec = inspect.getargspec(method)
spec = inspect.getfullargspec(method)
return wrap

for name, method in hc_members:
Expand Down
4 changes: 2 additions & 2 deletions montblanc/impl/rime/tensorflow/ms/ms_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
'INT' : np.int32,
'FLOAT' : np.float32,
'DOUBLE' : np.float64,
'BOOLEAN' : np.bool,
'BOOLEAN' : np.bool_,
'COMPLEX' : np.complex64,
'DCOMPLEX' : np.complex128
}
Expand Down Expand Up @@ -246,7 +246,7 @@ def __init__(self, msname, slvr_cfg):
d, s in zip(MS_DIM_ORDER, shape))
row_desc = " x ".join('%s' % s for s in shape)

montblanc.log.warn("Encountered '{msr}' rows in '{ms}' "
montblanc.log.warning("Encountered '{msr}' rows in '{ms}' "
"but expected '{rd} = {er}' after finding the following "
"dimensions by inspection: [{d}]. Irregular Measurement Sets "
"are not fully supported due to the generality of the format.".format(
Expand Down
2 changes: 1 addition & 1 deletion montblanc/impl/rime/tensorflow/sinks/ms_sink_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def model_vis(self, context):
if msshape is None:
guessed_shape = [self._manager._nchan, 4]

montblanc.log.warn("Could not obtain 'shape' from the '{c}' "
montblanc.log.warning("Could not obtain 'shape' from the '{c}' "
"column descriptor. Guessing it is '{gs}'.".format(
c=column, gs=guessed_shape))

Expand Down
2 changes: 1 addition & 1 deletion montblanc/impl/rime/tensorflow/sinks/sink_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def f(self, ctx):
SINK_ARGSPEC = ['self', 'context']

return { n: m for n, m in inspect.getmembers(obj, inspect.ismethod)
if inspect.getargspec(m)[0] == SINK_ARGSPEC }
if inspect.getfullargspec(m)[0] == SINK_ARGSPEC }

class SinkProvider(AbstractSinkProvider):

Expand Down
2 changes: 1 addition & 1 deletion montblanc/impl/rime/tensorflow/sources/source_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def f(self, ctx):

return { n: m for n, m in inspect.getmembers(obj, callable)
if not n.startswith('_') and
inspect.getargspec(m).args in argspec }
inspect.getfullargspec(m).args in argspec }


class SourceProvider(AbstractSourceProvider):
Expand Down
2 changes: 1 addition & 1 deletion montblanc/util/parallactic_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
pm = pyrap.measures.measures()
except ImportError as e:
pm = None
montblanc.log.warn("python-casacore import failed. "
montblanc.log.warning("python-casacore import failed. "
"Parallactic Angle computation will fail.")

def parallactic_angles(times, antenna_positions, field_centre, offsets=None):
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def nvcc_compiler_settings():

# No NVCC, try find it in the CUDA_PATH
if not nvcc_found:
log.warn("nvcc compiler not found at '{}'. "
log.warning("nvcc compiler not found at '{}'. "
"Searching within the CUDA_PATH '{}'"
.format(nvcc_path, cuda_path))

Expand All @@ -109,7 +109,7 @@ def nvcc_compiler_settings():
cuda_path = os.path.normpath(
os.path.join(os.path.dirname(nvcc_path), ".."))

log.warn("CUDA_PATH not found, inferring it as '{}' "
log.warning("CUDA_PATH not found, inferring it as '{}' "
"from the nvcc location '{}'".format(
cuda_path, nvcc_path))

Expand Down Expand Up @@ -306,7 +306,7 @@ def dl_cub(cub_url, cub_archive_name):

if (remote_file_size is not None and
not local_file_size == remote_file_size):
log.warn("Local file size '{}' "
log.warning("Local file size '{}' "
"does not match remote '{}'".format(
local_file_size, remote_file_size))

Expand Down Expand Up @@ -753,7 +753,7 @@ def readme():
log.info('install_requires={}'.format(install_requires))

setup(name='montblanc',
version="0.7.0",
version="0.7.1",
description='GPU-accelerated RIME implementations.',
long_description=readme(),
url='http://github.com/ska-sa/montblanc',
Expand Down

0 comments on commit fefb941

Please sign in to comment.