[PULL,4/4] Deprecate Python 2 support
diff mbox series

Message ID 20190701222912.4703-5-ehabkost@redhat.com
State New
Headers show
  • [PULL,1/4] qmp: make qmp-shell work with python3
Related show

Commit Message

Eduardo Habkost July 1, 2019, 10:29 p.m. UTC
Python 2 will reach end of life in January 1 2020.  Declare it as

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190503193721.18459-1-ehabkost@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[ehabkost: print "warning:" in lowercase]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
 configure            | 8 ++++++++
 qemu-deprecated.texi | 8 ++++++++
 2 files changed, 16 insertions(+)

diff mbox series

diff --git a/configure b/configure
index f2cb9f3c66..d565ea4bb9 100755
--- a/configure
+++ b/configure
@@ -6502,6 +6502,14 @@  if test "$supported_os" = "no"; then
     echo "us upstream at qemu-devel@nongnu.org."
+# Note that if the Python conditional here evaluates True we will exit
+# with status 1 which is a shell 'false' value.
+if ! $python -c 'import sys; sys.exit(sys.version_info < (3,0))'; then
+  echo
+  echo "warning: Python 2 support is deprecated" >&2
+  echo "warning: Python 3 will be required for building future versions of QEMU" >&2
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index df04f2840b..241c978d2d 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -243,3 +243,11 @@  Note that if you are exposing the export via /dev/nbd0, it is easier
 to just export the entire image and then mount only /dev/nbd0p1 than
 it is to reinvoke @command{qemu-nbd -c /dev/nbd0} limited to just a
 subset of the image.
+@section Build system
+@subsection Python 2 support (since 4.1.0)
+In the future, QEMU will require Python 3 to be available at
+build time.  Support for Python 2 in scripts shipped with QEMU
+is deprecated.