[Imported from Trac: page Python3, version 7]

itamarst 2020-07-16 18:26:16 +00:00
parent 1c56295d4f
commit c018ca7388

@ -1,7 +1,5 @@
# Porting to Python 3 # Porting to Python 3
This is still a proposal at this stage.
## Motivation ## Motivation
* Make code behave the same on Python 2 and Python 3, insofar as one can, so e.g. `map()` is the same on Python 2 and Python 3 (i.e. lazy). * Make code behave the same on Python 2 and Python 3, insofar as one can, so e.g. `map()` is the same on Python 2 and Python 3 (i.e. lazy).
@ -12,7 +10,7 @@ This is still a proposal at this stage.
TBD, something involving core abstractions first, then dependency graph topological traversal. TBD, something involving core abstractions first, then dependency graph topological traversal.
Assume for now we've picked a module. At the moment we're focusing on just porting `allmydata.util`, since it's necessary for other packages.
## The porting process, big picture ## The porting process, big picture
@ -73,3 +71,7 @@ In particular:
* `dict.keys()` and friends now return a view of the underlying data, rather than a list with a copy. * `dict.keys()` and friends now return a view of the underlying data, rather than a list with a copy.
**Fifth**, add a note to the module docstring saying it was ported to Python 3. **Fifth**, add a note to the module docstring saying it was ported to Python 3.
### Other notes
If you just want to run the tests from the explicitly ported test modules, you can do `python -m allmydata.util._python3`.