frej / fast-export

A mercurial to git converter using git-fast-import
http://repo.or.cz/w/fast-export.git
808 stars 255 forks source link

Make pluginloader use importlib instead imp #311

Closed onlined closed 9 months ago

onlined commented 10 months ago

Python 3.12 has removed imp and it's recommended to use importlib instead.

Closes #310.

frej commented 10 months ago

Thanks for the patch @onlined, but as importlib.util.find_spec and friends were introduced in Python 3.4 this patch breaks Python 2.7 compatibility. As far as I can tell, there isn't a simple and elegant way to stay compatible with 2.7.

As I no longer run a machine with 2.7, Github doesn't support it in the CI and 2.7 has been EOL since more than three years, I'm inclined to stop supporting 2.7. Do you want to update the documentation to no longer claim Python 2.7 compatibility in this patch (and also remove the 2.7 compatibility code we have in the tree in a separate commit)? Or do you want me to do that, and then rebase your commit?

onlined commented 10 months ago

I added the documentation update, I think we can merge this as-is and I can remove the compatibility code in a separate PR.

onlined commented 10 months ago

I opened #312 for removing the compatibility code. It is still draft, I'll change its status after this PR is merged and I rebase it on top of new master

frej commented 9 months ago

Thank you for your contribution @onlined. Feel free to un-draft #312, I have reviewed it and will merge it as soon as it is refreshed.

onlined commented 9 months ago

Thanks! Un-drafted #312.