We’re glad to announce that we’re soon porting from developing Frappe Applications (Frappe, ERPNext, etc.) with Python 3 (3.5+ and above, it was time we did) and drop our support for Python 2 (soon). This decision comes after a call made out by the PEP team to support Python 2.7 until 2020. We’re also witnessing a large number of popular Python libs porting to Python 3.
Complete support shall be provided for Frappe Apps published by the team at Frappe. We do not provide extended support to any apps published beyond Frappe. In case of your custom applications, here’s an excellent cheat sheet to have your apps ported to. By default, Frappe will use
six for compatibility ports.
All development for this port will continue on our “develop” branch. You can raise bugs and issues (and assign it to me ) in case there’s errors.
To switch to Python 3, ensure you have Python 3 installed.
For macOS, if you’re using brew, simply install on the command-line as follows:
$ brew install python3
$ sudo apt-get install python3-dev
Next, update your bench (should be on the latest commit published on the “master” branch) simply with a git pull. (
bench although being P3 compat, wouldn’t matter for migration).
Finally, to create a New Bench Instance on a Python 3 environment, simply
$ bench init [BENCH_NAME] --python python3
--python is the path to your python executable.
To migrate a current
bench instance to Python 3, simply run within your bench instance:
$ bench migrate-env python3
where your 3rd parameter is the path to your python executable (mostly
$PYTHONPATH). By default, this ensures a backup of your current environment within
archived_envs in your bench instance. You can also be brave to use the
NOTE: PLEASE DO NOT USE THIS FOR PRODUCTION UNTIL FURTHER NOTICE.
- Available only on 10-develop version.
- For our next major version, we’ll be supporting both - Python 2.7 and Python 3.5+
- After that, our next major version will drop Python 2.7 support.
Mess up your development workspace, help us raise issues and testing.