Follow-up to #772 (review) and #732 (comment).
It'd be nice to remove the dependency on importlib_metadata in Python 3.10+, but Twine will still need it for as long as it supports older versions of Python. So, I think it's worth weighing the complexity of conditional imports vs. an additional dependency.
I think this should at least wait until 3.10 is officially released and is added to Twine's testing matrix. If we do decide to use importlib.metadata, then I think the version check should be done in one place, as suggested in #772 (comment).
Follow-up to #772 (review) and #732 (comment).
It'd be nice to remove the dependency on
importlib_metadatain Python 3.10+, but Twine will still need it for as long as it supports older versions of Python. So, I think it's worth weighing the complexity of conditional imports vs. an additional dependency.I think this should at least wait until 3.10 is officially released and is added to Twine's testing matrix. If we do decide to use
importlib.metadata, then I think the version check should be done in one place, as suggested in #772 (comment).