The fix introduced in https://github.com/pydicom/pydicom/pulls/1814 and was released in pydicom 2.4.1. We should therefore exclude the specific problematic version of pydicom (2.4.0) in our setup.py.
Note that the issue is now fixed in pydicom and pydicom versions >= 2.4.1 should again be compatible with highdicom. So it's just this one version short-lived (2.4.0) that we need to exclude from highdicom's dependencies.
Pydicom 2.4.0 is essentially incompatible with highdicom, see #233 and https://github.com/pydicom/pydicom/issues/1813
The fix introduced in https://github.com/pydicom/pydicom/pulls/1814 and was released in pydicom 2.4.1. We should therefore exclude the specific problematic version of pydicom (2.4.0) in our setup.py.