In https://github.com/Ultimaker/Uranium/blob/main/UM/Math/Polygon.py#L175 the numpy function numpy.lib.pad is used, but the numpy.lib namespace has been deprecated in numpy 2.0.
numpy.pad has existed in the main namespace since a very long time, and I believe there never was any reason to import it from numpy.lib.