Skip to content

Fix Python 3.12+ compatibility by replacing imp with importlib#213

Open
jalovisko wants to merge 1 commit intoSebKuzminsky:masterfrom
jalovisko:fix-python312-compatibility
Open

Fix Python 3.12+ compatibility by replacing imp with importlib#213
jalovisko wants to merge 1 commit intoSebKuzminsky:masterfrom
jalovisko:fix-python312-compatibility

Conversation

@jalovisko
Copy link

Looks like PyCAM was developed while Python 3.4 was around, but it reached end-of-life and is no longer supported. The changes needed for it to work, however, are minimal, and are introduced in this pull request.

Summary of changes:

  • Replaced deprecated imp module with importlib.util in plugin system. The imp module was deprecated in Python 3.4 and removed in Python 3.12. This PR updates the plugin loading system in pycam/Plugins/__init__.py to use the modern importlib.util API instead.
  • Added documentation for Python 3.12+ compatibility.
  • Added virtualenv setup instructions for GTK dependencies.
  • Added dependencies for Arch Linux installation.

Tested on Arch Linux with Python 3.13.7 in a virtualenv with --system-site-packages.

This solves issue #191, it was originally thought that requirements are incomplete, but in reality some dependencies of base Python are not around anymore in newer versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant