Skip to content

Fix deprecations of v12#48

Open
Xardvor wants to merge 4 commits intopfirsich:masterfrom
Xardvor:fix-deprecations-of-v12
Open

Fix deprecations of v12#48
Xardvor wants to merge 4 commits intopfirsich:masterfrom
Xardvor:fix-deprecations-of-v12

Conversation

@Xardvor
Copy link

@Xardvor Xardvor commented Apr 7, 2025

This PR fixes compatibility issues for Python v3.12. Namely, it removes deprecated import for distutils and replaces related code with the closest alternative. I'm not the right person to fix that, so if you have comments or suggestions, I'm totally open for fixes.

The default installation from PyPi wasn't working for me, and I went to GH to figure out the issue. Ended up fixing it :)

I don't know how widespread the problem is across platforms, but I had it in my nobrainer install on Win11.

The repository looks a bit lonely and abandoned to me, so to anyone having the same problem as me:

  1. Uninstall your current version of makelove.
  2. Clone this repository.
  3. Merge PR locally (or just copy-paste changes).
  4. Merge whatever other PRs from this repo you need.
  5. pip install <path/to/you/fixed/local/repository>.
  6. Profit, you have a working version of 'makelove' locally.

@pfirsich
Copy link
Owner

pfirsich commented Apr 8, 2025

I actually tried to pass over maintenance to someone else twice, but it didn't really work out. I thought about putting this repo in maintenance mode, but I figured I would only do so, if someone complains. Anyways, this doesn't belong here.

I would prefer if you included a full implementation of strtobool, not just y/n, because I don't want to break anyone's workflows or scripts for no good reason. see here: https://docs.python.org/2/distutils/apiref.html#distutils.util.strtobool

And I am very skeptical of those versioning changes. I can't believe parsing a Python file with regexes is the canonical new way to handle this. I'll have to research later today.

@Xardvor
Copy link
Author

Xardvor commented Apr 8, 2025

I would prefer if you included a full implementation of strtobool

No problems, I will do that!

@Xardvor
Copy link
Author

Xardvor commented Apr 8, 2025

And I am very skeptical of those versioning changes.

Same here, but other methods I found were looking even worse, so I decided to go with that. My knowledge of Python is kinda limited though, so I’m open to ideas.

@pfirsich
Copy link
Owner

pfirsich commented Apr 8, 2025

I think I revamp the package as a whole and start using pyproject.toml. While setuptools will be supported indefinitely, that seems to be the future-proof way. I only had 45min to work on this today, but I might get a couple hours tomorrow. So please just replace strtobool, if you want and I'll try to attend to the rest.

@Xardvor
Copy link
Author

Xardvor commented Apr 8, 2025

Confirmed! I probably will have some time today to fix it.
I guess, I can revert version handling commit also?

@Xardvor
Copy link
Author

Xardvor commented Apr 8, 2025

Done!
I ran some syntetic tests on inlined function, and it seem to work fine.
Reverted the version parsing as well.

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.

2 participants