Commits

Ville Suoranta authored 51f2f97c793 Merge
Pull request #921: CAS-14473

Merge in CASA/casa6 from CAS-14473 to master * commit '22ff54115d60fa3559c05b9a2fa95f2fe17678c0': Update build.conf Replace distutils remove_tree with shutil.rmtree Replace distutils remove_tree with shutil shutil.copytree Update build.conf to 14473 UI wheels CAS-14503: added the reference of global scope to exec() CAS-14503: fixed for versions prior to 3.12 CAS-14503: specified an argument to exec() to set scope Update build.conf for CAS-14504

casatasks/src/private/casaxmlutil.py

Modified
147 147 else:
148 148 kwargs_[k] = v
149 149
150 150 if __DEBUG:
151 151 print(converter_function_string)
152 152 pprint(args_position_dict)
153 153 pprint(args_)
154 154
155 155 # override args by the converter generated from xml
156 156 casatasks.casalog.post('loaded constraints from XML', 'DEBUG')
157 - exec(converter_function_string)
158 - exec(f'{__FUNCTION}(args_, args_position_dict, supplied_args_flags)')
157 + _local = {}
158 + exec(converter_function_string, globals(), _local)
159 + _local[__FUNCTION](args_, args_position_dict, supplied_args_flags)
159 160
160 161 # execute task
161 162 retval = func(*args_, **kwargs_)
162 163
163 164 return retval
164 165 return wrapper
165 166
166 167
167 168 def __get_taskxmlfilepath(task):
168 169 xmlpath = os.path.abspath(casatasks.__path__[0]) + '/__xml__'

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut