Firefox/Python 3 Migration: Difference between revisions

→‎How to Port the Code: Initial porting guide
(Created page with "== Why This is Important == In mozilla-central there are over 3500 Python files (excluding third party files), comprising roughly 230k lines of code. Most of it is Python 2.[...")
 
(→‎How to Port the Code: Initial porting guide)
Line 16: Line 16:


== How to Port the Code ==
== How to Port the Code ==
 
* Make sure you can test the code you're working on with python3!
 
** If using `tox`, then adding `py35`, and `py36` to the list of environments should be sufficient
* [http://python-future.org/futurize.html#stage-1-safe-fixes `futurize`]` can be used to transform code into code that's compatible with both python2.7 and python3
* The `six` module is available in-tree, feel free to use it as a dependency


== References ==
== References ==
Confirmed users
2,456

edits