Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install no longer works with python 3.12 #17

Open
SanderRonde opened this issue May 13, 2024 · 1 comment
Open

Install no longer works with python 3.12 #17

SanderRonde opened this issue May 13, 2024 · 1 comment

Comments

@SanderRonde
Copy link

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:

  • Look at what octoprint itself did and maybe try to make that work with this plugin (see their commit)
  • Just replace those two lines and wrap them in a bunch of if-not-defined-then-other-thing try-catches. Would be happy to create a PR for the latter.
@SanderRonde SanderRonde changed the title Install no longer works with a recent version of configparser Install no longer works with python 3.12 May 13, 2024
@cp2004
Copy link
Owner

cp2004 commented May 13, 2024

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.

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

No branches or pull requests

2 participants