Remove warning if NumPy failed to raise an error during conversion by radarhere · Pull Request #8326 · python-pillow/Pillow

If an error is raised when converting an image to a NumPy array, NumPy < 1.23 doesn't raise an error. So #6594 added a warning for that scenario.

if parse_version(numpy.__version__) < parse_version("1.23"):
warnings.warn(str(e))

NumPy < 1.23 is EOL, so this explicit warning can be removed.

A caveat to this is that Ubuntu 22.04 still has NumPy 1.21 packaged. However, that version carries its own warning - https://github.com/python-pillow/Pillow/actions/runs/10500106794/job/29087976733#step:6:5394

/Pillow/Tests/test_image_array.py:51: DeprecationWarning: An exception was ignored while fetching the attribute __array_interface__ from an object of type 'JpegImageFile'. With the exception of AttributeError NumPy will always raise this exception in the future. Raise this deprecation warning to see the original exception. (Warning added NumPy 1.21)

So it is also ok for our custom warning to be removed for that scenario.