Skip to contentSkip to conversation

configure: Require Python 2.7 or newer

PATCH In review Eduardo Habkost 6 participants 12 messages Jun 8, 2018 – Jun 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Require Python 2.7 or newer

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 14b11130a7..a8c4094c87 100755
@@ -1651,8 +1651,8 @@ 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 < (2,6))'; then
-  error_exit "Cannot use '$python', Python 2 >= 2.6 or Python 3 is required." \
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then
+  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 is required." \
       "Use --python=/path/to/python to specify a supported Python."
 fi
 
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
#1 lore raw

Cc'ing Eric

Quoted 2 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg05173.html

Quoted 7 lines · Peter Maydell

Our choices about our dependencies are generally driven by "what are the versions available on the oldest distros which we wish to support building QEMU on", which typically is whatever the long-term-support versions of Ubuntu, SUSE, Redhat, etc are.

Has somebody checked what that means for our Python version requirements?

At least this one:

RHEL/CentOS 6: Python-2.6.6

Quoted 32 lines

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 14b11130a7..a8c4094c87 100755
@@ -1651,8 +1651,8 @@ 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 < (2,6))'; then
-  error_exit "Cannot use '$python', Python 2 >= 2.6 or Python 3 is required." \
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then
+  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 is required." \
       "Use --python=/path/to/python to specify a supported Python."
 fi
 
#4 lore raw
In reply to Eduardo Habkost
Quoted 8 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Lets delete those in this patch then....

Quoted 4 lines

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

Agreed, there's no compelling reason for 2.6 to stay around

Quoted 24 lines
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 14b11130a7..a8c4094c87 100755
@@ -1651,8 +1651,8 @@ 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 < (2,6))'; then
-  error_exit "Cannot use '$python', Python 2 >= 2.6 or Python 3 is required." \
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then
+  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 is required." \
       "Use --python=/path/to/python to specify a supported Python."
 fi
 
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140

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 :|
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 14 lines · Philippe Mathieu-Daudé

Cc'ing Eric

Quoted 2 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg05173.html

Quoted 5 lines · Peter Maydell

Our choices about our dependencies are generally driven by "what are the versions available on the oldest distros which we wish to support building QEMU on", which typically is whatever the long-term-support versions of Ubuntu, SUSE, Redhat, etc are.

Quoted 6 lines
Quoted 2 lines

Has somebody checked what that means for our Python version requirements?

At least this one:

RHEL/CentOS 6: Python-2.6.6

RHEL6 is no longer a target we care about and is being explicitly broken as a result of the min glib bump:

https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg02104.html

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 :|
#5 lore raw
In reply to Daniel P. Berrangé
Quoted 11 lines · Daniel P. Berrangé
Quoted 8 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Lets delete those in this patch then....

I will do it, but I prefer to do this in a separate patch.

Signature · 1 line
Eduardo
#3 lore raw
In reply to Daniel P. Berrangé
Quoted 18 lines · Daniel P. Berrangé
Quoted 17 lines · Philippe Mathieu-Daudé

Cc'ing Eric

Quoted 2 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg05173.html

Quoted 7 lines · Peter Maydell

Our choices about our dependencies are generally driven by "what are the versions available on the oldest distros which we wish to support building QEMU on", which typically is whatever the long-term-support versions of Ubuntu, SUSE, Redhat, etc are.

Has somebody checked what that means for our Python version requirements?

Quoted 8 lines
Quoted 3 lines

At least this one:

RHEL/CentOS 6: Python-2.6.6

RHEL6 is no longer a target we care about and is being explicitly broken as a result of the min glib bump:

https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg02104.html

\o/

#7 lore raw
In reply to Eduardo Habkost
Quoted 6 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

Quoted 8 lines

* scripts/argparse.py
* scripts/ordereddict.py

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

For reference, this is has info on the Python 2 version on many popular software repositories:

https://repology.org/metapackage/python2/versions

I did this to check for repositories that don't have any 2.7 package:

  $ curl -s 'https://repology.org/api/v1/metapackage/python2' | \
    jq -r 'group_by(.repo) | .[] | "\(.[0].repo): \(map(.version))"' | \
    grep -v '"2\.7'
  centos_6: ["2.6.6"]
  maemo_fremantle: ["2.5.4","2.5.4","2.5.4","2.5.4"]
  rosa_server_6_9: ["2.6.6"]
Signature · 1 line
Eduardo
Reviewed-by on v1 1/1
#8 lore raw
In reply to Eduardo Habkost
Quoted 9 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Quoted 8 lines

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 :|
#6 lore raw
In reply to Eduardo Habkost
Quoted 8 lines · Eduardo Habkost
Quoted 7 lines · Daniel P. Berrangé
Quoted 6 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

* scripts/argparse.py
* scripts/ordereddict.py

Lets delete those in this patch then....

I will do it, but I prefer to do this in a separate patch.

Ok that's fine

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 :|
Reviewed-by on v1 1/1
#9 lore raw
In reply to Eduardo Habkost
Quoted 24 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +0 -0
index 14b11130a7..a8c4094c87 100755

configure fi · line 1658

Quoted 10 lines
configure +2 -2
@@ -1651,8 +1651,8 @@ 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 < (2,6))'; then
-  error_exit "Cannot use '$python', Python 2 >= 2.6 or Python 3 is required." \
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then
+  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 is required." \
       "Use --python=/path/to/python to specify a supported Python."
 fi
 

This is a memorable milestone for the Python code.

Reviewed-by on v1 1/1
#10 lore raw
In reply to Eduardo Habkost
Quoted 24 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +0 -0
index 14b11130a7..a8c4094c87 100755

configure fi · line 1658

Quoted 10 lines
configure +2 -2
@@ -1651,8 +1651,8 @@ 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 < (2,6))'; then
-  error_exit "Cannot use '$python', Python 2 >= 2.6 or Python 3 is required." \
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then
+  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 is required." \
       "Use --python=/path/to/python to specify a supported Python."
 fi
 

CHEERS.

Reviewed-by on v1 1/1
#11 lore raw
In reply to Eduardo Habkost
Quoted 9 lines · Eduardo Habkost

All of the supported build platforms documented in qemu-doc.texi should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Quoted 8 lines

Python 2.6 is also not receiving bug fixes upstream and is not supported by pylint, which makes it harder to keep the code compatible with both Python 2 and Python 3.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)