66 | | === When things get complicated === |
67 | | |
68 | | In practice, the methodology above is somewhat idealized: a sufficiently important module might have multiple test files, and might not be easily splittable. |
69 | | |
70 | | This is where the test ratchet comes in. |
71 | | The test ratchet ensures that once a specific test is marked as passing in Python 3, it can't stop passing on Python 3. |
72 | | As a result, progress in porting need not involve a module being fully ported in one PR, or all tests being made to pass. |
73 | | |
74 | | Thus, complex modules can be ported over multiple PRs by just increasing the list of passing tests in each PR, and then only marking the module as fully ported in the final PR. |
| 92 | == When ports get harder due to spaghetti dependencies == |
| 93 | |
| 94 | As the port progresses, the simple "port module + its test module" gets difficult, since everything ends up depending on everything else. |
| 95 | Here's on way to approach this: |
| 96 | |
| 97 | 1. Port _only_ the test module. This involves many fixes to lots of other modules, but they are not officially ported, they're just inched along just enough to make the tests pass. Since the test module is officially ported, regressions to the Python 3 port still are prevented. |
| 98 | 2. Then, port the corresponding module. |
| 99 | |