-
Notifications
You must be signed in to change notification settings - Fork 61
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
Maybe not working on 3.12 #79
Comments
On Oct 25, wastemans ***@***.***> wrote:
Hi "J",
I've read you're not working on this anymore, but I do, and I just had an issue with it that I fixed without knowing any python.
It was this error:
```
$ dotfiles -l
Traceback (most recent call last):
File "/home/MYUSERNAME/projects/vpy/bin/dotfiles", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/MYUSERNAME/projects/vpy/lib/python3.12/site-packages/dotfiles/cli.py", line 224, in main
config_opts = parse_config(cli_opts.config_file or '~/%s' % CONFIG_FILE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/MYUSERNAME/projects/vpy/lib/python3.12/site-packages/dotfiles/cli.py", line 150, in parse_config
parser = configparser.SafeConfigParser()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
```
So I changed line 150
from:
` parser = configparser.SafeConfigParser()`
to:
` parser = configparser.RawConfigParser()`
Seemed to make it work again.
It looks like `SafeConfigParser` was renamed to `ConfigParser`, can you
try that instead of Raw? If that works and passes tests, I'm happy to
accept the change.
If you're not going to work on this would you or anyone else know what I might migrate to?
I love having the change register on github for this kinda stuff and I've made this project my main home folder backup everywhere!
It makes me happy to hear that, thanks!
…--
Jon
|
Yes mate, using just 'ConfigParser' also works :-) |
SafeConfigParser was deprecated in Python 3.2 and was recently removed. The documentation recommends using ConfigParser instead. Fixes #79
I uploaded version 0.6.5 to test.pypi.org, can you give that a try? If all is good I'll upload to pypi. Thanks! This command should do the trick: $ python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps dotfiles==0.6.5 |
Yes that worked, 'dotfiles -l' afterwards doesn't crash. |
Found this super helpful! Thanks to you both! I'm not sure why, but only 0.6.4 shows up on PyPi when searched though the provided pip install below does work.
Is there an alternative either of you have found that does the same basic job? I love what |
I don't think he uploaded the change to pypi. You can just edit line 150 dotfiles/cli.py as above. |
Hi "J",
I've read you're not working on this anymore, but I do, and I just had an issue with it that I fixed without knowing any python.
It was this error:
So I changed line 150
from:
parser = configparser.SafeConfigParser()
to:
parser = configparser.RawConfigParser()
Seemed to make it work again.
If you're not going to work on this would you or anyone else know what I might migrate to?
I love having the change register on github for this kinda stuff and I've made this project my main home folder backup everywhere!
Cheers
The text was updated successfully, but these errors were encountered: