Python 2.x is legacy; it has an end-of-life set for 2020.
Python 3.x is the present and future of the language. Version 3.0 was released on (9 years, 10 months ago).
Python 3 has many new exciting features, for example:
WeeChat supports Python 3 since version 0.3.7, which was released on (6 years, 7 months ago).
The support of Python 3 is optional: the WeeChat python plugin can be compiled with Python 2.7 or Python 3.x, but not both at same time.
As of , it is recommended to compile with Python 2.7 because many scripts won't work at all with Python 3.x, while all scripts should run fine with Python 2.7.
To compile with Python 3 support, you must enable this CMake flag:
Here is the roadmap for the transition to Python 3 in WeeChat:
Transition to Python 3 starts.
All scripts that are not yet compatible with both Python 2.7 and Python 3.x can be updated to support both versions (see the status below).
You can help by converting existing scripts (see how to help below).
An e-mail is sent to the authors of Python scripts which are not compatible with Python 3 (at least they are not marked as compatible in database).
All authors are encouraged to make their scripts compatible with Python 3.x as soon as possible. Help from other people is welcome as well.
All new scripts must be compatible with both Python 2.7 and Python 3.x.
Script updates are still allowed to be compatible with Python 2.7 only.
All new scripts as well as script updates must be compatible with both Python 2.7 and Python 3.x.
Scripts must be properly tested with Python 2.7 and a Python 3.x version (if possible the latest stable).
New versions of WeeChat are compiled with Python 3 by default, which becomes the recommended Python version to use in WeeChat.
All new scripts as well as script updates must still be compatible with Python 2.7 and Python 3.x, time for the users to upgrade to the latest version of WeeChat which is Python 3 only.
Hopefully, at this date, most scripts should be compatible with Python 3.
All new scripts as well as script updates must be compatible with Python 3.x. Extra support of Python 2.x is optional.
Hopefully, at this date, all scripts should be compatible with Python 3.
Important: at this date, all scripts that are not compatible with Python 3 are removed from repository and moved to unofficial scripts.
The scripts which are compatible with Python 3 have tag "py3k-ok".
Transition status at various dates:
|Date||Scripts||Python scripts||Compatible with Python 3||Not yet compatible||Notes|
|347||216 (62%)||43 (19%)||173 (81%)|
|(today)||357 [ list ]||222 (62%) [ list ]||65 (29%) [ list ]||157 (71%) [ list ]|
|395 *||246 (62%) *||246 (100%) *||0 (0%) *||* Estimates|
If possible, the author of script should make the necessary changes to make the script compatible with both Python 2.7 and 3.x.
Here's a list of some resources that can help to port scripts to Python 3: