Deprecate Python 2 support
PATCH 1/1 Deprecate Python 2 support
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)
configure +8 -0
@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi +# 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 +fi + config_host_mak="config-host.mak" echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
qemu-deprecated.texi +8 -0
@@ -206,3 +206,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.
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
Quoted 34 lines · Eduardo Habkost
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +8
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi +# 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 +fi + config_host_mak="config-host.mak" echo "# Automatically generated by configure - do not modify" >config-all-disas.makqemu-deprecated.texi +0
-0@@ -206,3 +206,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
qemu-deprecated.texi Note that if you are exposing the export via /dev/nbd0, it is easier · line 216
Quoted 10 lines
qemu-deprecated.texi +8
-0it 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.
Quoted 14 lines · Eduardo Habkost
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +0
-0
configure if test "$supported_os" = "no"; then · line 6469
Quoted 9 lines
configure +6
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi +# 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
Please don't shout "warning".
Quoted 11 lines
configure +2
-0+fi + config_host_mak="config-host.mak" echo "# Automatically generated by configure - do not modify" >config-all-disas.makqemu-deprecated.texi +0
-0@@ -206,3 +206,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
qemu-deprecated.texi Note that if you are exposing the export via /dev/nbd0, it is easier · line 216
Quoted 10 lines
qemu-deprecated.texi +8
-0it 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.
Quoted 28 lines · Markus Armbruster
Quoted 14 lines · Eduardo Habkost
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +0
-0configure if test "$supported_os" = "no"; then · line 6469
Quoted 9 lines
configure +6
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi +# 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" >&2Please don't shout "warning".
[...]
Quoted 2 lines
Reviewed-by Markus Armbruster <[email protected]>
Thanks! Queued after changing messages to "warning: ..."
Signature · 1 line
Eduardo
Quoted 8 lines · Eduardo Habkost
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Am 03.05.2019 um 21:37 hat Eduardo Habkost geschrieben:
Quoted 14 lines
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +0
-0
configure if test "$supported_os" = "no"; then · line 6470
Quoted 10 lines
configure +7
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi +# 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 +fi
While it's clear that we want to get rid of Python 2, did we actually discuss how to decide what the new minimum Python version is? I don't think any major distribution uses 3.0, which was released in 2008, so this doesn't seem to make a lot of sense to me as the new minimum.
Currently, 3.6 seems to be a commonly available version. It looks like Debian stable is at 3.5 still, though it might become oldstable before the next QEMU release. Do we need to support anything older than that?
Kevin
Quoted 31 lines · Kevin Wolf
Am 03.05.2019 um 21:37 hat Eduardo Habkost geschrieben:
Quoted 14 lines
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +0
-0configure if test "$supported_os" = "no"; then · line 6470
Quoted 10 lines
configure +7
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi +# 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 +fiWhile it's clear that we want to get rid of Python 2, did we actually discuss how to decide what the new minimum Python version is? I don't think any major distribution uses 3.0, which was released in 2008, so this doesn't seem to make a lot of sense to me as the new minimum.
Quoted 3 lines
Currently, 3.6 seems to be a commonly available version. It looks like Debian stable is at 3.5 still, though it might become oldstable before the next QEMU release. Do we need to support anything older than that?
Per our support build platform doc, the oldest distros we care about will be RHEL-7 and Debian Jessie. Except we can drop Jessie 2 years after Stretch was released. IOW, we can drop Jessie in June this year, which is before our next releasee. So we don't need to care about the 3.4 version in Jessie.
RHEL-7 doesn't have py3 at all in standard distros, but it can be obtained via software collections and this has 3.6
Debian Strech has 3.5.3, so 3.5 looks like our min viable version.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 19 lines · Daniel P. Berrangé
Quoted 18 lines · Kevin Wolf
Am 03.05.2019 um 21:37 hat Eduardo Habkost geschrieben:
Quoted 17 lines
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +0
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
configure +4
-0+# 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 + echoQuoted 8 lines
configure if test "$supported_os" = "no"; then · line 6470
Quoted 3 lines
configure +3
-0+ echo "WARNING: Python 2 support is deprecated" >&2 + echo "WARNING: Python 3 will be required for building future versions of QEMU" >&2 +fiWhile it's clear that we want to get rid of Python 2, did we actually discuss how to decide what the new minimum Python version is? I don't think any major distribution uses 3.0, which was released in 2008, so this doesn't seem to make a lot of sense to me as the new minimum.
Good point.
Quoted 10 lines
Quoted 3 lines
Currently, 3.6 seems to be a commonly available version. It looks like Debian stable is at 3.5 still, though it might become oldstable before the next QEMU release. Do we need to support anything older than that?
Per our support build platform doc, the oldest distros we care about will be RHEL-7 and Debian Jessie. Except we can drop Jessie 2 years after Stretch was released. IOW, we can drop Jessie in June this year, which is before our next releasee. So we don't need to care about the 3.4 version in Jessie.
Quoted 4 lines
RHEL-7 doesn't have py3 at all in standard distros, but it can be obtained via software collections and this has 3.6
Debian Strech has 3.5.3, so 3.5 looks like our min viable version.
Eduardo, care to update configure accordingly?
Quoted 46 lines · Markus Armbruster
Quoted 19 lines · Daniel P. Berrangé
Quoted 18 lines · Kevin Wolf
Am 03.05.2019 um 21:37 hat Eduardo Habkost geschrieben:
Quoted 17 lines
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +0
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fiQuoted 12 lines
Quoted 4 lines
Quoted 4 lines
configure +4
-0+# 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 + echoQuoted 8 lines
configure if test "$supported_os" = "no"; then · line 6470
Quoted 3 lines
configure +3
-0+ echo "WARNING: Python 2 support is deprecated" >&2 + echo "WARNING: Python 3 will be required for building future versions of QEMU" >&2 +fiWhile it's clear that we want to get rid of Python 2, did we actually discuss how to decide what the new minimum Python version is? I don't think any major distribution uses 3.0, which was released in 2008, so this doesn't seem to make a lot of sense to me as the new minimum.
Good point.
Quoted 10 lines
Quoted 3 lines
Currently, 3.6 seems to be a commonly available version. It looks like Debian stable is at 3.5 still, though it might become oldstable before the next QEMU release. Do we need to support anything older than that?
Per our support build platform doc, the oldest distros we care about will be RHEL-7 and Debian Jessie. Except we can drop Jessie 2 years after Stretch was released. IOW, we can drop Jessie in June this year, which is before our next releasee. So we don't need to care about the 3.4 version in Jessie.
Quoted 6 lines
Quoted 4 lines
RHEL-7 doesn't have py3 at all in standard distros, but it can be obtained via software collections and this has 3.6
Debian Strech has 3.5.3, so 3.5 looks like our min viable version.
Eduardo, care to update configure accordingly?
I'll do it as a separate patch, because updating the minimum Python 3.x version (which is 3.0 right now) is independent from Python 2 deprecation.
Signature · 1 line
Eduardo
Quoted 35 lines · Eduardo Habkost
Python 2 will reach end of life in January 1 2020. Declare it as deprecated.
Signed-off-by Eduardo Habkost <[email protected]>--- configure | 8 ++++++++ qemu-deprecated.texi | 8 ++++++++ 2 files changed, 16 insertions(+)configure +8
-0@@ -6461,6 +6461,14 @@ if test "$supported_os" = "no"; then echo "us upstream at [email protected]." fi +# 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 +fi + config_host_mak="config-host.mak" echo "# Automatically generated by configure - do not modify" >config-all-disas.makqemu-deprecated.texi +0
-0@@ -206,3 +206,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
qemu-deprecated.texi Note that if you are exposing the export via /dev/nbd0, it is easier · line 216
Quoted 10 lines
qemu-deprecated.texi +8
-0it 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.