Firefox/Python 3 Migration: Difference between revisions

Jump to navigation Jump to search
(→‎Porting examples: add an example of fixing subprocess.check_output() binary data errors under Py3)
Line 58: Line 58:
See what breaks, then fix it!
See what breaks, then fix it!


==== Help port mach-core to Python 3 ([https://bugzilla.mozilla.org/show_bug.cgi?id=1473498 bug 1473498]) ====
==== Port a Mach Command ====


# Edit python/mach/mach/test/python.ini to remove the skip-if
The mach driver (toplevel `mach` file) contains a whitelist of commands that still run with Python 2. Pick the command that you'd like to convert and then:
# Run: ./mach python-test --python 3 python/mach
# Fix the errors until all tests pass


See the [[#References]] for links to other ideas and tracking bugs.
# Remove it from the whitelist
# Run: ./mach <command>
# See what breaks and fix it!
# Repeat with a variety of different flags and arguments
# Make sure any Python unittests running in CI have Python 3 enabled (see above)


== How to Port the Code ==
== How to Port the Code ==
Confirmed users
656

edits

Navigation menu