<div dir="ltr">Moved to libcxx-dev.<div><br></div><div>How about this?</div><div><br></div><div>     def platform_ver(self):<br>-        _, ver, _ = platform.linux_distribution()<br>-        ver = ver.lower().strip().replace(' ', '-')<br>-        return ver # Permitted to be None.<br>+        if 'linux_distribution' in dir(platform):<br>+            _, ver, _ = platform.linux_distribution()<br>+            ver = ver.lower().strip().replace(' ', '-')<br>+            return ver # Permitted to be None.<br>+        else:<br>+            return None<br><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 5, 2019 at 12:28 PM Sergej Jaskiewicz via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.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">The libc++ tests rely on the `platform.linux_distribution()` API [1], which is deprecated since Python 3.5 and removed [2] in Python 3.8, which is already released. This API is used to XFAIL certain tests based on the linux distro.<br>
<br>
So, I can’t run libc++ tests when the only Python I have is 3.8.<br>
<br>
Yes, I know, I could use Python 2, but I really don’t want to, since it will die in less than a month [3].<br>
<br>
The proposed solution is to use the distro package [3], but AFAIK the LLVM community doesn’t want to depend on third-party packages.<br>
<br>
Any ideas how this can be dealt with?<br>
<br>
[1] <a href="https://github.com/llvm/llvm-project/blob/c8f0d3e130d336f49c204b9ee317bf99be192a82/libcxx/utils/libcxx/test/target_info.py#L194-L216" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/c8f0d3e130d336f49c204b9ee317bf99be192a82/libcxx/utils/libcxx/test/target_info.py#L194-L216</a><br>
<br>
[2] <a href="https://docs.python.org/3.7/library/platform.html#platform.linux_distribution" rel="noreferrer" target="_blank">https://docs.python.org/3.7/library/platform.html#platform.linux_distribution</a><br>
<br>
[3] <a href="https://pythonclock.org" rel="noreferrer" target="_blank">https://pythonclock.org</a><br>
<br>
[4] <a href="https://pypi.org/project/distro/" rel="noreferrer" target="_blank">https://pypi.org/project/distro/</a><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">-Brian</div>