docker: Port to Python 3
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | docker: Use BytesIO instead of StringIOtests/ | +6 | 0 replies | |
| 2/6 | docker: Always return int on run()tests/ | +2 | 0 replies | |
| 3/6 | docker: Add type annotationstests/ | +37 | 0 replies | |
| 4/6 | docker: Use os.environ.items() instead of .iteritems()tests/ | +1 | 1 reply | |
| 5/6 | docker: Make _get_so_libs() work on Python 3tests/ | +12 | 0 replies | |
| 6/6 | docker: Open dockerfiles in text modetests/ | +26 | 2 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Philippe Mathieu-Daudé |
|---|---|
| 1/6 | |
| 2/6 | |
| 3/6 | |
| 4/6 | R-b |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 0/6] docker: Port to Python 3
This series makes tests/docker/docker.py compatible with both Python 2 and Python 3, and adds type annotation to make maintenance easier in the future.
A note about dockerfile encoding
--------------------------------
One decision I made while working on this was to open dockerfiles in text mode instead of binary mode, to make the code simpler and safer.
This means we won't support dockerfiles that are not valid utf-8 data, but I see that as a feature and not a bug. :)
Opening dockerfiles in binary mode and treating its contents as byte sequences instead of text is possible if we really want to, but I don't think it would be worth the extra code complexity.
Eduardo Habkost (6):
docker: Use BytesIO instead of StringIO
docker: Always return int on run()
docker: Add type annotations
docker: Use os.environ.items() instead of .iteritems()
docker: Make _get_so_libs() work on Python 3
docker: Open dockerfiles in text mode
tests/docker/docker.py | 115 ++++++++++++++++++++++++++++------------- 1 file changed, 79 insertions(+), 36 deletions(-)
base-commit: bd4e4a387aa733e40270a7406c7d111f2292de65
prerequisite-patch-id: 83051ebcf718afae38540902b60a0f8e9f91c174
prerequisite-patch-id: 1a35c71f2a58523de78e3ea2e44c5ef1f84bcc4a
prerequisite-patch-id: 5206b4c5a6797ea17eb763da6203e1881d379f2c
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140