qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] docker: Port to Python 3
@ 2018-06-27  2:14 Eduardo Habkost
  2018-06-27  2:14 ` [Qemu-devel] [PATCH 1/6] docker: Use BytesIO instead of StringIO Eduardo Habkost
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Eduardo Habkost @ 2018-06-27  2:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrange, Cleber Rosa, Fam Zheng, Stefan Hajnoczi,
	Philippe Mathieu-Daudé, Alex Bennée

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
-- 
2.18.0.rc1.1.g3f1ff2140

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-27 13:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-27  2:14 [Qemu-devel] [PATCH 0/6] docker: Port to Python 3 Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 1/6] docker: Use BytesIO instead of StringIO Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 2/6] docker: Always return int on run() Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 3/6] docker: Add type annotations Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 4/6] docker: Use os.environ.items() instead of .iteritems() Eduardo Habkost
2018-06-27  2:22   ` Philippe Mathieu-Daudé
2018-06-27  2:14 ` [Qemu-devel] [PATCH 5/6] docker: Make _get_so_libs() work on Python 3 Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 6/6] docker: Open dockerfiles in text mode Eduardo Habkost
2018-06-27 12:51   ` Eric Blake
2018-06-27 13:34     ` Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).