cp2004 / OctoPrint-GCodeMacros

Configure custom gcode macros you can use anywhere!
https://plugins.octoprint.org/plugins/gcode_macro
GNU Affero General Public License v3.0
7 stars 2 forks source link

Install no longer works with python 3.12 #17

Open SanderRonde opened 3 months ago

SanderRonde commented 3 months ago

The configparser package bundled with python 3.12 no longer contains a SafeConfigParser export that your plugin depends on. Because of that it (along with a few other plugins) can no longer get installed on python 3.12.

The issue occurs in versioneer.py (which I'm sure you copied from the template) which contains this reference to the now-removed export. Replacing that with configparser.ConfigParser() partially solved the issue for me. After that one more pops up. On the line after a file is opened and readfp is called. readfp doesn't exist anymore. Instead, simply parser.read(setup_cfg) is enough and fixes the issue.

I think there's maybe 2 ways to fix this:

cp2004 commented 3 months ago

This is something that is on my radar to fix for a while - all my plugins used the same template I just copied it between them.

I'll be able to look at it ASAP hopefully from mid June time - will work out the best solution.