<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/127434>127434</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] Some tests failing with Python >= 3.12 due to dependency on `imp`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          koachan
      </td>
    </tr>
</table>

<pre>
    When I tried running OpenMP tests, some tests are failing:
```
********************
Failed Tests (2):
  ompd-test :: api_tests/test_ompd_finalize.c
  ompd-test :: api_tests/test_ompd_get_curr_parallel_handle.c
```

Further checks (by running the commands manually etc.) shows that the failing ones appear to be depending on `imp` [which has been removed since Python 3.12](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-removed-imp):
```
Traceback (most recent call last):
  File "/home/k/llvm-debug/src/llvm-project/out/runtimes/runtimes-bins/openmp/libompd/test/../gdb-plugin/python-module/ompd/__init__.py", line 9, in <module>
    import ompd
  File "/home/k/llvm-debug/src/llvm-project/out/runtimes/runtimes-bins/openmp/libompd/test/../gdb-plugin/python-module/ompd/ompd.py", line 5, in <module>
    from ompd_address_space import ompd_address_space
 File "/home/k/llvm-debug/src/llvm-project/out/runtimes/runtimes-bins/openmp/libompd/test/../gdb-plugin/python-module/ompd/ompd_address_space.py", line 3, in <module>
    from ompd_handles import ompd_thread, ompd_task, ompd_parallel
  File "/home/k/llvm-debug/src/llvm-project/out/runtimes/runtimes-bins/openmp/libompd/test/../gdb-plugin/python-module/ompd/ompd_handles.py", line 2, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
```

I'm on Arch Linux with Python 3.13.1.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzUVcGO2zYQ_RrqMrAgk5IcHXRwshEQoEkDNECPAkXOmqwpUiCpdd2vLyjJib1B0Ra9pIBhieSM-N6bwRsegj5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