diff --git a/Python3.md b/Python3.md index 4524a9c..0608054 100644 --- a/Python3.md +++ b/Python3.md @@ -16,16 +16,16 @@ We use [tox](https://tox.readthedocs.io/en/latest/) to standardize environments 4. Run `trial allmydata.test.test_python3` as a smoke test. 5. `deactivate` the virtualenv (or switch shells) and run `tox -e py36` to exercise the whole suite. -## How to choose a module to port +## Who is doing what -* We started by porting `allmydata.util`, since it's necessary for other packages. That's mostly done. -* Itamar is currently porting `allmydata.storage`. - -Some things you can take on: - -* `allmydata.node` is pretty standalone. -* Start the more complex process (see below re spaghetti dependencies) on `allmydata.mutable`. That is, pick a test module, and port just the test module, but making necessary changes elsewhere to make the tests pass. Repeat until all tests modules for `allmydata.immutable` are ported. +| | | +|---|---| +| `allmydata.storage` | Itamar | +| `allmydata.node` | Ross | +| `allmydata.immutable`† | Chad | +| `allmydata.mutable`† | ? | +† Expect spaghetti (see below). ## The porting process, big picture @@ -44,6 +44,13 @@ Then: 8. Submit for code review. 9. Check coverage report. If there are uncovered lines, see if you can add tests, or at least file a separate ticket for adding coverage. +### When ports get harder due to spaghetti dependencies + +As the port progresses, the simple "port module + its test module" gets difficult, since everything ends up depending on everything else. Here's one way to approach this: + +1. Port *only* the test module. This involves many Python 3 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. +2. Then, port the corresponding module. + ### Porting a specific Python file **Zeroth**, file a new ticket in milestone "Python 3", assign it to yourself. @@ -97,14 +104,6 @@ One of them is the `bytes` objects: Leaking Future objects (newints, new dicts, new bytes) in module API can break existing code on Python 2. So need to be careful not to do that. For that reason int isn't in the suggested `from builtins import ...` list above. -## When ports get harder due to spaghetti dependencies - -As the port progresses, the simple "port module + its test module" gets difficult, since everything ends up depending on everything else. -Here's one way to approach this: - -1. Port *only* the test module. This involves many Python 3 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. -2. Then, port the corresponding module. - ## Other notes If you just want to run the tests from the explicitly ported test modules, you can do `python -m allmydata.test.python3_tests`. \ No newline at end of file