This note is for python extension developers.
With the introduction of setuptools==58 in the Slicer pull 5925 all dependencies that rely on 2to3 libraries are totally broken as discussed in several python packages like jsmin, simpleeval, etc.
This will lead to errors in CDash as this one that will prevent you from building your extensions. You will not be able to update anymore your extensions if you depend on some package that fall into this issue, as you will not control slicer setuptools package (you can’t downgrade it).
The ONLY solution is to remove all your dependencies to those obsolete packages and find alternative solutions. Some of those packages has been unmantained for a long time.
Yes you will need to begin using packages that have been appropriately ported to python 3 and don’t rely on lib2to3. I would encourage you to update to latest versions of packages that work with the latest setuptools. Including upgrading syntax or choosing a different package that has been maintained for the modern python future.
In the python documentation 2to3 - Automated Python 2 to 3 code translation — Python 3.10.0 documentation it details that lib2to3 is marked as fully deprecated with Python 3.11 and will be removed from the standard library in a few versions.
Slicer will be moving to the latest Python version soon as packages have already dropped python 3.6 and even 3.7 support.
Python 3.10 includes new language syntax that is not parsable by lib2to3’s LL(1) parser