weechat / scripts

Official scripts for WeeChat.

Home Page:https://weechat.org/scripts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

listbuffer.py & weestats.py error under Python 3

Mikaela opened this issue · comments

  ___       __         ______________        _____ 
  __ |     / /___________  ____/__  /_______ __  /_
  __ | /| / /_  _ \  _ \  /    __  __ \  __ `/  __/
  __ |/ |/ / /  __/  __/ /___  _  / / / /_/ // /_  
  ____/|__/  \___/\___/\____/  /_/ /_/\__,_/ \__/  
WeeChat 2.6-dev [compiled on Jul  4 2019 23:06:30]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
python: stdout/stderr (?):   File "/home/mikaela/.weechat/python/autoload/listbuffer.py", line 135
python: stdout/stderr (?):     print "This script must be run under WeeChat."
python: stdout/stderr (?):                                                  ^
python: stdout/stderr (?): SyntaxError: Missing parentheses in call to 'print'. Did you mean print("This script must be run under WeeChat.")?
=!= python: unable to parse file "/home/mikaela/.weechat/python/autoload/listbuffer.py"
python: stdout/stderr (?):   File "/home/mikaela/.weechat/python/autoload/weestats.py", line 74
python: stdout/stderr (?):     print "This script must be run under WeeChat."
python: stdout/stderr (?):                                                  ^
python: stdout/stderr (?): SyntaxError: Missing parentheses in call to 'print'. Did you mean print("This script must be run under WeeChat.")?
=!= python: unable to parse file "/home/mikaela/.weechat/python/autoload/weestats.py"

@FiXato you seem to be the author of both. I think this is caused by 2.6-dev defaulting to Python 3.

Hi,

Many scripts are not yet compatible with Python 3, even if now it's the default Python used when compiling WeeChat, as scheduled by the transition to Python 3.

Please don't open an issue for each non-compatible script, as it's a known issue.
The scripts will be either fixed by authors, me (depending on my free time), or disabled in the repository (not installable any more).

If you want quick fix for Python 3 support (for now you must still keep Python 2 compatibility), you could send pull requests for these scripts.

Thanks.

Please don't open an issue for each non-compatible script, as it's a known issue
Scripts not yet compatible are listed here: https://weechat.org/scripts/stable/language/python2-only/

Could this be added to the news/releasenotes, IRC topic or somewhere else where it could be seen to be a known issue?

I had only seen scripts getting Python 3 support and when I saw the tracebacks in my core buffer, I checked !news and by only seeing that Python 3 is the new default I assumed this was a new iddue which should be reported.

Sorry if this was said somewhere obvious where I missed it from.

I just uploaded a new version of weestats.py (0.4) which is compatible with Python 3.

Python 3 being default is in the devel release notes, but I don't see note on not all scripts being compatible with it yet or request to not open issues about that there.

Thanks for the weestats update

I uploaded a new version of listbuffer.py (0.8.2) as well, compatible with Python 3.