Closed zapp42 closed 2 years ago
Thank you!!
@zapp42 This breaks Python2 support, see #68. It is all well and good to port to the new APIs to fix things like #65 but you should leave the old one as a fallback so it will still execute in old environments where the new API does not exist.
You can try something like ssh-ident/ssh-ident1@8215da9b7480483beb8771bcfa5cb2a445bf8734 but be wary as that was done in the wrong order. Write/port to the new APIs and provide fallbacks to the old when the new are not available. Old APIs are old and should not change so then you will never have to touch your fallback code in the future (except maybe to add more fallbacks when you port forward again).
@Uzume python2 is end-of-life as of January 1, 2020. I really don't think any effort should be made anymore to keep python2 support.
@cstich: I do not have a problem with jettisoning Python2 support but it should be a conscious decision and not just because software was poorly maintained.
If that is the end goal, I recommend someone make another pull request that "fixes" #68 by means to removing Python2 support, including documenting such and that it now only supports Python3+ (or even something later like a specific Python3.x+, e. g. Python3.8+, since Python3.7 will be end-of-life later this month on 2023-06-27).
Do not remove Python2 support, desüite being End-of-Life. Admins are stuck on machines with Python2 only due to special cases. Also Python2 does not disturb any functionality.
Replace all distutils.spawn.find_executable() calls by shutil.which() as suggested in PEP632.