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

Version for Python 3.8 at https://github.com/galou/chezmoi_modify_manager/tree/python3.8 #6

Closed
galou opened this issue Sep 16, 2022 · 3 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@galou
Copy link

galou commented Sep 16, 2022

Is your feature request related to a problem? Please describe.

This repo looked very cool. I don't have Python 3.10 but tried out my luck with Python 3.8. It seems to work. If you wish, you can create a branch from it.

@galou galou added the enhancement New feature or request label Sep 16, 2022
@VorpalBlade VorpalBlade added the wontfix This will not be worked on label Sep 16, 2022
@VorpalBlade
Copy link
Owner

I really have no interest in rewriting the code without match statements, it makes the code cleaner in my opinion. Eventually older distros will catch up with modern python versions and this will cease to be a problem.

I am however surprised to find after a quick google that Ubuntu 22.04 is on 3.9 and not 3.10. There might be a PPA for this. For other distros I do not know. Arch Linux (which I use) does have 3.10 already, as you would expect from a rolling release distro.

As such I consider this a won't fix, but you are welcome to maintain your own branch.

Your handling of LineState is incorrect, it should be possible to replace the more modern definition with a typing.Union for older versions (assuming Literal is supported, though I believe that one has been around for a while).

@galou
Copy link
Author

galou commented Sep 19, 2022

Thanks you for you quick answer. I didn't expect you to rewrite your code and I totally agree with you that match makes things much clearer. I just wanted people in the same situation as me to be aware that there now exists a version that is working with Python 3.8. You're also right with the handling of LineState but was lazy to analyze the syntax.

@VorpalBlade
Copy link
Owner

VorpalBlade commented Jun 21, 2023

I'd thought I'd let you know (in case you haven't kept up) that a few months ago I rewrote this in rust. It is much faster, and the binary doesn't depend on anything outside. You might want to have a look at the migration guide.

It does however require a fairly recent Rust version to build the binary (which can then be used anywhere, especially if you build against musl instead of glibc). I haven't tested exactly what is needed, but I set the CI to test for 1.69.0 (the latest at the time, now the previous version), and I don't plan on changing that until I have a need to do so.

There are however prebuilt binaries for all common (and several uncommon) OSes and architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants