<div dir="ltr"><div>I believe I fixed this upstream some time ago:</div><div><a href="https://github.com/dkriegner/xrayutilities/commit/8da8fd0fda2a54a23d5e65b6d043f6f808cb06ff">https://github.com/dkriegner/xrayutilities/commit/8da8fd0fda2a54a23d5e65b6d043f6f808cb06ff</a></div><div>Likely you can patch that in debian easily.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 2, 2024 at 12:39 PM Drew Parsons <<a href="mailto:dparsons@debian.org">dparsons@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Source: xrayutilities<br>
Version: 1.7.4-1<br>
Severity: normal<br>
<br>
xrayutilities is failing tests with matplotlib 3.8 from experimental<br>
<br>
470s _________________ TestExampleScripts.test_simpack_powdermodel __________________<br>
470s <br>
470s self = <test_examples.TestExampleScripts testMethod=test_simpack_powdermodel><br>
470s <br>
470s     def test(self):<br>
470s         with tempfile.TemporaryFile(mode='w') as fid:<br>
470s             env = os.environ.copy()<br>
470s             env['MPLBACKEND'] = 'agg'<br>
470s             cmd = [sys.executable, scriptname]<br>
470s >           subprocess.run(cmd, env=env, cwd=scriptdir, stdout=fid,<br>
470s                            check=True)<br>
470s <br>
470s tests/test_examples.py:78: <br>
470s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br>
470s <br>
470s input = None, capture_output = False, timeout = None, check = True<br>
470s popenargs = (['/usr/bin/python3.11', 'simpack_powdermodel.py'],)<br>
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'>}<br>
470s process = <Popen: returncode: 1 args: ['/usr/bin/python3.11', 'simpack_powdermodel.py']><br>
470s stdout = None, stderr = None, retcode = 1<br>
470s <br>
470s     def run(*popenargs,<br>
470s             input=None, capture_output=False, timeout=None, check=False, **kwargs):<br>
470s         """Run command with arguments and return a CompletedProcess instance.<br>
470s     <br>
470s         The returned instance will have attributes args, returncode, stdout and<br>
470s         stderr. By default, stdout and stderr are not captured, and those attributes<br>
470s         will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,<br>
470s         or pass capture_output=True to capture both.<br>
470s     <br>
470s         If check is True and the exit code was non-zero, it raises a<br>
470s         CalledProcessError. The CalledProcessError object will have the return code<br>
470s         in the returncode attribute, and output & stderr attributes if those streams<br>
470s         were captured.<br>
470s     <br>
470s         If timeout is given, and the process takes too long, a TimeoutExpired<br>
470s         exception will be raised.<br>
470s     <br>
470s         There is an optional argument "input", allowing you to<br>
470s         pass bytes or a string to the subprocess's stdin.  If you use this argument<br>
470s         you may not also use the Popen constructor's "stdin" argument, as<br>
470s         it will be used internally.<br>
470s     <br>
470s         By default, all communication is in bytes, and therefore any "input" should<br>
470s         be bytes, and the stdout and stderr will be bytes. If in text mode, any<br>
470s         "input" should be a string, and stdout and stderr will be strings decoded<br>
470s         according to locale encoding, or by "encoding" if set. Text mode is<br>
470s         triggered by setting any of text, encoding, errors or universal_newlines.<br>
470s     <br>
470s         The other arguments are the same as for the Popen constructor.<br>
470s         """<br>
470s         if input is not None:<br>
470s             if kwargs.get('stdin') is not None:<br>
470s                 raise ValueError('stdin and input arguments may not both be used.')<br>
470s             kwargs['stdin'] = PIPE<br>
470s     <br>
470s         if capture_output:<br>
470s             if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:<br>
470s                 raise ValueError('stdout and stderr arguments may not be used '<br>
470s                                  'with capture_output.')<br>
470s             kwargs['stdout'] = PIPE<br>
470s             kwargs['stderr'] = PIPE<br>
470s     <br>
470s         with Popen(*popenargs, **kwargs) as process:<br>
470s             try:<br>
470s                 stdout, stderr = process.communicate(input, timeout=timeout)<br>
470s             except TimeoutExpired as exc:<br>
470s                 process.kill()<br>
470s                 if _mswindows:<br>
470s                     # Windows accumulates the output in a single blocking<br>
470s                     # read() call run on child threads, with the timeout<br>
470s                     # being done in a join() on those threads.  communicate()<br>
470s                     # _after_ kill() is required to collect that and add it<br>
470s                     # to the exception.<br>
470s                     exc.stdout, exc.stderr = process.communicate()<br>
470s                 else:<br>
470s                     # POSIX _communicate already populated the output so<br>
470s                     # far into the TimeoutExpired exception.<br>
470s                     process.wait()<br>
470s                 raise<br>
470s             except:  # Including KeyboardInterrupt, communicate handled that.<br>
470s                 process.kill()<br>
470s                 # We don't call process.wait() as .__exit__ does that for us.<br>
470s                 raise<br>
470s             retcode = process.poll()<br>
470s             if check and retcode:<br>
470s >               raise CalledProcessError(retcode, process.args,<br>
470s                                          output=stdout, stderr=stderr)<br>
470s E               subprocess.CalledProcessError: Command '['/usr/bin/python3.11', 'simpack_powdermodel.py']' returned non-zero exit status 1.<br>
470s <br>
470s /usr/lib/python3.11/subprocess.py:571: CalledProcessError<br>
470s ----------------------------- Captured stderr call -----------------------------<br>
470s Traceback (most recent call last):<br>
470s   File "/tmp/autopkgtest-lxc.jsvdm1mu/downtmp/autopkgtest_tmp/examples/simpack_powdermodel.py", line 137, in <module><br>
470s     main()<br>
470s   File "/tmp/autopkgtest-lxc.jsvdm1mu/downtmp/autopkgtest_tmp/examples/simpack_powdermodel.py", line 128, in main<br>
470s     xu.simpack.plot_powder(tt, det, pm, scale='sqrt', mask=mask)<br>
470s   File "/usr/lib/python3/dist-packages/xrayutilities/simpack/powdermodel.py", line 584, in plot_powder<br>
470s     sim.plot(twotheta[mask], label=labelsim, formatspec=formatsim, ax=ax)<br>
470s   File "/usr/lib/python3/dist-packages/xrayutilities/simpack/powdermodel.py", line 420, in plot<br>
470s     tax.figure.texts.append(tax.texts.pop())<br>
470s                             ^^^^^^^^^^^^^<br>
470s AttributeError: 'ArtistList' object has no attribute 'pop'<br>
<br>
</blockquote></div>