Changes between Version 26 and Version 27 of Python3
- Timestamp:
- 2020-10-06T10:38:41Z (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Python3
v26 v27 17 17 5. `deactivate` the virtualenv (or switch shells) and run `tox -e py36` to exercise the whole suite. 18 18 19 == How to choose a module to port ==19 == Who is doing what == 20 20 21 * We started by porting `allmydata.util`, since it's necessary for other packages. That's mostly done. 22 * Itamar is currently porting `allmydata.storage`. 21 || `allmydata.storage` || Itamar || 22 || `allmydata.node` || Ross || 23 || `allmydata.immutable`† || Chad || 24 || `allmydata.mutable`† || ? || 23 25 24 Some things you can take on: 25 26 * `allmydata.node` is pretty standalone. 27 * 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. 28 26 † Expect spaghetti (see below). 29 27 30 28 == The porting process, big picture == … … 44 42 8. Submit for code review. 45 43 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. 44 45 === When ports get harder due to spaghetti dependencies === 46 47 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: 48 49 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. 50 2. Then, port the corresponding module. 46 51 47 52 === Porting a specific Python file === … … 100 105 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. 101 106 102 == When ports get harder due to spaghetti dependencies ==103 104 As the port progresses, the simple "port module + its test module" gets difficult, since everything ends up depending on everything else.105 Here's one way to approach this:106 107 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.108 2. Then, port the corresponding module.109 110 107 == Other notes == 111 108