SecurityInnovation / PGPy

Pretty Good Privacy for Python
BSD 3-Clause "New" or "Revised" License
314 stars 98 forks source link

tests: drop distutils #387

Closed dkg closed 2 years ago

dkg commented 2 years ago

distutils is going away in python 3.12. LooseVersion() wasn't really being used for anything particularly useful. The strings that were returned by the openssl backend for the cryptography module, or the GPGME "engine" version were both just being replayed later as strings anyway.

So, keep them in string form. If future work needs to do things like compare them, apparently packaging.version contains classes that might be better-maintained going forward.

Signed-off-by: Daniel Kahn Gillmor dkg@fifthhorseman.net

J-M0 commented 2 years ago

LGTM

eli-schwartz commented 1 year ago

This change was not thoroughly tested and if the optional/skippable "gpg" module is not installed, it causes the testsuite to immediately error out with a pytest INTERNALERROR> and a traceback.

See #406