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

axolotl.py: is this python3? iteritems #549

Open
emdee-is opened this issue Feb 10, 2024 · 3 comments
Open

axolotl.py: is this python3? iteritems #549

emdee-is opened this issue Feb 10, 2024 · 3 comments
Labels
bug Unexpected problem or unintended behavior

Comments

@emdee-is
Copy link

Is axolotl.py python3 ? iteritems is python2 only.

        for option, default_value in script_options.iteritems():
            if not weechat.config_is_set_plugin(option):
                weechat.config_set_plugin(option, default_value)

My suggestion is:


        for option in script_options:
            if not weechat.config_is_set_plugin(option):
                weechat.config_set_plugin(option, script_options[option])
@emdee-is emdee-is added the bug Unexpected problem or unintended behavior label Feb 10, 2024
@flashcode
Copy link
Member

Hi,

This script is marked as Python 2 only and it not compatible with Python 3 (yet), that means you can not install it in WeeChat, see on https://weechat.org/scripts/:

image

A pull request with a port to Python 3 is welcome!

@emdee-is
Copy link
Author

Sorry - there's nothing on the file to say it's python2 only. I missed were it's marked as Python 2 only - where is that?

There's also the use of string.split in "axolotl.py", line 70, in decrypt

I think you should pull or port things that are python2 only at this point.

It would be nice if you ran pylint -E as a part of the commit process to get some minimal quality control into the repo.

@flashcode
Copy link
Member

It's mentioned on the WeeChat scripts page: https://weechat.org/scripts/.

This repository is a collection of scripts from external contributors.
There was a long period of transition from 2018 to 2022 to port all scripts to Python 3, all authors were contacted, and the scripts not yet compatible are now marked as "Python 2 only" and disabled (they can not be installed in WeeChat with /script command), see: https://weechat.org/scripts/python3/.

Unfortunately, I don't have enough time to port all scripts to Python 3, that's why pull requests are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants