[Debian-pan-maintainers] Bug#1074630: xrayutilities: fails tests with matplotlib 3.8

Drew Parsons dparsons at debian.org
Tue Jul 2 11:35:43 BST 2024


Source: xrayutilities
Version: 1.7.4-1
Severity: normal

xrayutilities is failing tests with matplotlib 3.8 from experimental

470s _________________ TestExampleScripts.test_simpack_powdermodel __________________
470s 
470s self = <test_examples.TestExampleScripts testMethod=test_simpack_powdermodel>
470s 
470s     def test(self):
470s         with tempfile.TemporaryFile(mode='w') as fid:
470s             env = os.environ.copy()
470s             env['MPLBACKEND'] = 'agg'
470s             cmd = [sys.executable, scriptname]
470s >           subprocess.run(cmd, env=env, cwd=scriptdir, stdout=fid,
470s                            check=True)
470s 
470s tests/test_examples.py:78: 
470s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
470s 
470s input = None, capture_output = False, timeout = None, check = True
470s popenargs = (['/usr/bin/python3.11', 'simpack_powdermodel.py'],)
470s kwargs = {'cwd': '/tmp/autopkgtest-lxc.jsvdm1mu/downtmp/autopkgtest_tmp/tests/../examples', 'env': {'ADTTMP': '/tmp/autopkgtest...topkgtest-lxc.jsvdm1mu/downtmp/autopkgtest_tmp', ...}, 'stdout': <_io.TextIOWrapper name=12 mode='w' encoding='UTF-8'>}
470s process = <Popen: returncode: 1 args: ['/usr/bin/python3.11', 'simpack_powdermodel.py']>
470s stdout = None, stderr = None, retcode = 1
470s 
470s     def run(*popenargs,
470s             input=None, capture_output=False, timeout=None, check=False, **kwargs):
470s         """Run command with arguments and return a CompletedProcess instance.
470s     
470s         The returned instance will have attributes args, returncode, stdout and
470s         stderr. By default, stdout and stderr are not captured, and those attributes
470s         will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
470s         or pass capture_output=True to capture both.
470s     
470s         If check is True and the exit code was non-zero, it raises a
470s         CalledProcessError. The CalledProcessError object will have the return code
470s         in the returncode attribute, and output & stderr attributes if those streams
470s         were captured.
470s     
470s         If timeout is given, and the process takes too long, a TimeoutExpired
470s         exception will be raised.
470s     
470s         There is an optional argument "input", allowing you to
470s         pass bytes or a string to the subprocess's stdin.  If you use this argument
470s         you may not also use the Popen constructor's "stdin" argument, as
470s         it will be used internally.
470s     
470s         By default, all communication is in bytes, and therefore any "input" should
470s         be bytes, and the stdout and stderr will be bytes. If in text mode, any
470s         "input" should be a string, and stdout and stderr will be strings decoded
470s         according to locale encoding, or by "encoding" if set. Text mode is
470s         triggered by setting any of text, encoding, errors or universal_newlines.
470s     
470s         The other arguments are the same as for the Popen constructor.
470s         """
470s         if input is not None:
470s             if kwargs.get('stdin') is not None:
470s                 raise ValueError('stdin and input arguments may not both be used.')
470s             kwargs['stdin'] = PIPE
470s     
470s         if capture_output:
470s             if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
470s                 raise ValueError('stdout and stderr arguments may not be used '
470s                                  'with capture_output.')
470s             kwargs['stdout'] = PIPE
470s             kwargs['stderr'] = PIPE
470s     
470s         with Popen(*popenargs, **kwargs) as process:
470s             try:
470s                 stdout, stderr = process.communicate(input, timeout=timeout)
470s             except TimeoutExpired as exc:
470s                 process.kill()
470s                 if _mswindows:
470s                     # Windows accumulates the output in a single blocking
470s                     # read() call run on child threads, with the timeout
470s                     # being done in a join() on those threads.  communicate()
470s                     # _after_ kill() is required to collect that and add it
470s                     # to the exception.
470s                     exc.stdout, exc.stderr = process.communicate()
470s                 else:
470s                     # POSIX _communicate already populated the output so
470s                     # far into the TimeoutExpired exception.
470s                     process.wait()
470s                 raise
470s             except:  # Including KeyboardInterrupt, communicate handled that.
470s                 process.kill()
470s                 # We don't call process.wait() as .__exit__ does that for us.
470s                 raise
470s             retcode = process.poll()
470s             if check and retcode:
470s >               raise CalledProcessError(retcode, process.args,
470s                                          output=stdout, stderr=stderr)
470s E               subprocess.CalledProcessError: Command '['/usr/bin/python3.11', 'simpack_powdermodel.py']' returned non-zero exit status 1.
470s 
470s /usr/lib/python3.11/subprocess.py:571: CalledProcessError
470s ----------------------------- Captured stderr call -----------------------------
470s Traceback (most recent call last):
470s   File "/tmp/autopkgtest-lxc.jsvdm1mu/downtmp/autopkgtest_tmp/examples/simpack_powdermodel.py", line 137, in <module>
470s     main()
470s   File "/tmp/autopkgtest-lxc.jsvdm1mu/downtmp/autopkgtest_tmp/examples/simpack_powdermodel.py", line 128, in main
470s     xu.simpack.plot_powder(tt, det, pm, scale='sqrt', mask=mask)
470s   File "/usr/lib/python3/dist-packages/xrayutilities/simpack/powdermodel.py", line 584, in plot_powder
470s     sim.plot(twotheta[mask], label=labelsim, formatspec=formatsim, ax=ax)
470s   File "/usr/lib/python3/dist-packages/xrayutilities/simpack/powdermodel.py", line 420, in plot
470s     tax.figure.texts.append(tax.texts.pop())
470s                             ^^^^^^^^^^^^^
470s AttributeError: 'ArtistList' object has no attribute 'pop'



More information about the Debian-pan-maintainers mailing list