Skip to contentSkip to conversation

Require Python >= 3.5 to build QEMU

GIT PULL Applied Eduardo Habkost 4 participants 8 messages Dec 20, 2019 – Jan 6, 2020

lore
Share & tools
lore
#0 lore raw

Differences from the previous Python 3.5 pull request that was rejected:

* Now tests/vm/netbsd was fixed
* .travis.yml is being updated to replace Python 3.4 job with 3.5

The following changes since commit f59b31e6d0c69792b5d817c5aa0a6ed64fba42e0:

Merge remote-tracking branch 'remotes/stsquad/tags/pull-tesing-and-misc-191219-1' into staging (2019-12-20 14:00:49 +0000)

are available in the Git repository at:

git://github.com/ehabkost/qemu.git tags/python-next-pull-request

for you to fetch changes up to ddf90699631db53c981b6a5a63d31c08e0eaeec7:

configure: Require Python >= 3.5 (2019-12-20 13:45:59 -0300)

----------------------------------------------------------------
Require Python >= 3.5 to build QEMU

Python 2 EOL is 11 days away, we will stop supporting it in QEMU 5.0.

----------------------------------------------------------------

Eduardo Habkost (2):
travis: Replace Python 3.4 build with 3.5
configure: Require Python >= 3.5

 .travis.yml            |  2 +-
 configure              | 18 ++++--------------
 tests/Makefile.include |  5 -----
 3 files changed, 5 insertions(+), 20 deletions(-)
Signature · 1 line
2.23.0
#1 lore raw

[PULL 1/2] travis: Replace Python 3.4 build with 3.5

We'll start requiring Python 3.5 to build QEMU.

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +1 -1
index 376b7d6dfa..638fba4799 100644
@@ -247,7 +247,7 @@ matrix:
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
       language: python
       python:
-        - "3.4"
+        - "3.5"
 
 
     - env:
Signature · 1 line
2.23.0
#2 lore raw

[PULL 2/2] configure: Require Python >= 3.5

In reply to Eduardo Habkost

Python 3.5 is the oldest Python version available on our supported build platforms, and Python 2 end of life will be 3 weeks after the planned release date of QEMU 4.2.0. Drop Python 2 support from configure completely, and require Python 3.5 or newer.

Message-Id: <[email protected]>

---
 configure              | 18 ++++--------------
 tests/Makefile.include |  5 -----
 2 files changed, 4 insertions(+), 19 deletions(-)
configure +4 -14
index 940bf9e87a..747d3b4120 100755
@@ -903,9 +903,9 @@ fi
 : ${install=${INSTALL-install}}
 # We prefer python 3.x. A bare 'python' is traditionally
 # python 2.x, but some distros have it as python 3.x, so
-# we check that before python2
+# we check that too
 python=
-for binary in "${PYTHON-python3}" python python2
+for binary in "${PYTHON-python3}" python
 do
     if has "$binary"
     then
@@ -1842,8 +1842,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,7))'; then
-  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 is required." \
+if ! $python -c 'import sys; sys.exit(sys.version_info < (3,5))'; then
+  error_exit "Cannot use '$python', Python >= 3.5 is required." \
       "Use --python=/path/to/python to specify a supported Python."
 fi
 
@@ -6594,15 +6594,6 @@ 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
-  python2="y"
-fi
-
 config_host_mak="config-host.mak"
 
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
@@ -7447,7 +7438,6 @@ echo "INSTALL_DATA=$install -c -m 0644" >> $config_host_mak
 echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
 echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
 echo "PYTHON=$python" >> $config_host_mak
-echo "PYTHON2=$python2" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
   echo "IASL=$iasl" >> $config_host_mak
tests/Makefile.include +0 -5
index 31b86674e5..9146e1bdee 100644
@@ -1157,7 +1157,6 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
 AVOCADO_SHOW=app
 AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS)))
 
-ifneq ($(PYTHON2),y)
 $(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
 	$(call quiet-command, \
             $(PYTHON) -m venv --system-site-packages $@, \
@@ -1166,10 +1165,6 @@ $(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
             $(TESTS_VENV_DIR)/bin/python -m pip -q install -r $(TESTS_VENV_REQ), \
             PIP, $(TESTS_VENV_REQ))
 	$(call quiet-command, touch $@)
-else
-$(TESTS_VENV_DIR):
-	$(error "venv directory for tests requires Python 3")
-endif
 
 $(TESTS_RESULTS_DIR):
 	$(call quiet-command, mkdir -p $@, \
Signature · 1 line
2.23.0
Reviewed-by
#3 lore raw

Re: [PULL 2/2] configure: Require Python >= 3.5

Quoted 10 lines · Eduardo Habkost

Python 3.5 is the oldest Python version available on our supported build platforms, and Python 2 end of life will be 3 weeks after the planned release date of QEMU 4.2.0. Drop Python 2 support from configure completely, and require Python 3.5 or newer.

Message-Id: <[email protected]>

But once here, a comment telling why we want 3.5, not 3.4 or 3.6 will have been helpful.

Later, Juan.

#4 lore raw

Re: [PULL 2/2] configure: Require Python >= 3.5

Quoted 7 lines · Juan Quintela
Quoted 6 lines · Eduardo Habkost

Python 3.5 is the oldest Python version available on our supported build platforms, and Python 2 end of life will be 3 weeks after the planned release date of QEMU 4.2.0. Drop Python 2 support from configure completely, and require Python 3.5 or newer.

Quoted 6 lines
Quoted 4 lines

Message-Id: <[email protected]>

Thanks!

Quoted 3 lines

But once here, a comment telling why we want 3.5, not 3.4 or 3.6 will have been helpful.

Is "Python 3.5 is the oldest Python version available on our supported build platforms" a good explanation why we want 3.5?

Signature · 1 line
Eduardo
#5 lore raw

Re: [PULL 2/2] configure: Require Python >= 3.5

Quoted 15 lines · Eduardo Habkost
Quoted 7 lines · Juan Quintela
Quoted 6 lines · Eduardo Habkost

Python 3.5 is the oldest Python version available on our supported build platforms, and Python 2 end of life will be 3 weeks after the planned release date of QEMU 4.2.0. Drop Python 2 support from configure completely, and require Python 3.5 or newer.

Quoted 6 lines
Quoted 4 lines

Message-Id: <[email protected]>

Quoted 8 lines

Thanks!

Quoted 3 lines

But once here, a comment telling why we want 3.5, not 3.4 or 3.6 will have been helpful.

Is "Python 3.5 is the oldest Python version available on our supported build platforms" a good explanation why we want 3.5?

You have a point here O:-)

Later, Juan.

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

Differences from the previous Python 3.5 pull request that was rejected:

* Now tests/vm/netbsd was fixed
* .travis.yml is being updated to replace Python 3.4 job with 3.5

The following changes since commit f59b31e6d0c69792b5d817c5aa0a6ed64fba42e0:

   Merge remote-tracking branch 'remotes/stsquad/tags/pull-tesing-and-misc-191219-1' into staging (2019-12-20 14:00:49 +0000)

are available in the Git repository at:

git://github.com/ehabkost/qemu.git tags/python-next-pull-request

for you to fetch changes up to ddf90699631db53c981b6a5a63d31c08e0eaeec7:

Quoted 7 lines
   configure: Require Python >= 3.5 (2019-12-20 13:45:59 -0300)

----------------------------------------------------------------
Require Python >= 3.5 to build QEMU

Python 2 EOL is 11 days away, we will stop supporting it in QEMU 5.0.

That was quick! Thanks for sending it again today :)

Quoted 11 lines

----------------------------------------------------------------

Eduardo Habkost (2):
travis: Replace Python 3.4 build with 3.5
configure: Require Python >= 3.5

  .travis.yml            |  2 +-
  configure              | 18 ++++--------------
  tests/Makefile.include |  5 -----
  3 files changed, 5 insertions(+), 20 deletions(-)
#7 lore raw
In reply to Eduardo Habkost
Quoted 19 lines · Eduardo Habkost

Differences from the previous Python 3.5 pull request that was rejected:

* Now tests/vm/netbsd was fixed
* .travis.yml is being updated to replace Python 3.4 job with 3.5

The following changes since commit f59b31e6d0c69792b5d817c5aa0a6ed64fba42e0:

Merge remote-tracking branch 'remotes/stsquad/tags/pull-tesing-and-misc-191219-1' into staging (2019-12-20 14:00:49 +0000)

are available in the Git repository at:

git://github.com/ehabkost/qemu.git tags/python-next-pull-request

for you to fetch changes up to ddf90699631db53c981b6a5a63d31c08e0eaeec7:

configure: Require Python >= 3.5 (2019-12-20 13:45:59 -0300)

Quoted 7 lines

----------------------------------------------------------------
Require Python >= 3.5 to build QEMU

Python 2 EOL is 11 days away, we will stop supporting it in QEMU 5.0.

---------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM