Skip to contentSkip to conversation

Python: Drop support for Python 3.6

PATCH Superseded John Snow 7 participants 26 messages Feb 9, 2023 – Feb 15, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

John Snow

author
#0 lore raw

cover Python: Drop support for Python 3.6

Howdy, this series increases our minimum python version to 3.7.

CI: https://gitlab.com/jsnow/qemu/-/pipelines/771780626
(All green!)
GL: https://gitlab.com/jsnow/qemu/-/commits/python-require-37

Patches 1 and 2 are loose pre-requisites; I'd like to merge them into qemu.git within the week whether or not we take this series. I'd appreciate an "ACK" on those specifically. They're just riding along here because they make this series a bit nicer.

Patches 3-6 are the hard pre-requisites, and 7 does the dirty work.

The motivation for this series is that Python 3.6 was EOL at the end of 2021; upstream tools are beginning to drop support for it, including setuptools, pylint, mypy, etc. As time goes by, it becomes more difficult to support and test against the full range of Python versions that QEMU supports. The closer we get to Python 3.12, the harder it will be to cover that full spread of versions.

The qemu.qmp library and the avocado testing framework both have motivations for dropping 3.6 support, but are committed to not doing so until QEMU drops support.

So, I'd like to talk about doing it.

RFC:
- Patch 5 is just a proof-of-concept; it's not admissable as-is and I am aware of that.
- Cleber, I need to update your ansible scripts. How do I test them?
- Are we testing on CentOS 9 Stream yet? If so, we can move doc building from CentOS 8 to CentOS 9 to maintain that coverage. (See patch 6 for details.)

Thanks!
--js

John Snow (7):
python: support pylint 2.16
Python: drop pipenv
configure: Look for auxiliary Python installations
configure: Add nice hint to Python failure message
testing: Add Python >= 3.7 to Centos, OpenSuSE
CI: Stop building docs on centos8
Python: Drop support for Python 3.6

 docs/conf.py                                  |   4 +-
 python/README.rst                             |   3 -
 configure                                     |  40 +-
 .gitlab-ci.d/buildtest.yml                    |   2 +-
 .gitlab-ci.d/static_checks.yml                |   4 +-
 python/.gitignore                             |   4 +-
 python/Makefile                               |  57 ++-
 python/Pipfile                                |  13 -
 python/Pipfile.lock                           | 347 ------------------
 python/qemu/qmp/protocol.py                   |   2 +-
 python/qemu/qmp/qmp_client.py                 |   2 +-
 python/qemu/utils/qemu_ga_client.py           |   6 +-
 python/setup.cfg                              |  11 +-
 python/tests/minreqs.txt                      |  45 +++
 scripts/qapi/mypy.ini                         |   2 +-
 tests/docker/dockerfiles/centos8.docker       |   1 +
 tests/docker/dockerfiles/opensuse-leap.docker |   1 +
 tests/docker/dockerfiles/python.docker        |   1 -
 tests/qemu-iotests/iotests.py                 |   4 +-
 .../tests/migrate-bitmaps-postcopy-test       |   2 +-
 20 files changed, 135 insertions(+), 416 deletions(-)
 delete mode 100644 python/Pipfile
 delete mode 100644 python/Pipfile.lock
 create mode 100644 python/tests/minreqs.txt
Signature · 1 line
2.39.0
author
#1 lore raw

PATCH 1/7 python: support pylint 2.16

Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail.

1. The superfluous-parens check seems to be a bit more aggressive,
2. broad-exception-raised is new; it discourages "raise Exception".

Fix these minor issues and turn the lights green.

---
 python/qemu/qmp/protocol.py                            | 2 +-
 python/qemu/qmp/qmp_client.py                          | 2 +-
 python/qemu/utils/qemu_ga_client.py                    | 6 +++---
 tests/qemu-iotests/iotests.py                          | 4 ++--
 tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)
python/qemu/qmp/protocol.py +1 -1
index 6d3d739daa7..22e60298d28 100644
@@ -207,7 +207,7 @@ class AsyncProtocol(Generic[T]):
     logger = logging.getLogger(__name__)
 
     # Maximum allowable size of read buffer
-    _limit = (64 * 1024)
+    _limit = 64 * 1024
 
     # -------------------------
     # Section: Public interface
python/qemu/qmp/qmp_client.py +1 -1
index b5772e7f32b..9d73ae6e7ad 100644
@@ -198,7 +198,7 @@ async def run(self, address='/tmp/qemu.socket'):
     logger = logging.getLogger(__name__)
 
     # Read buffer limit; 10MB like libvirt default
-    _limit = (10 * 1024 * 1024)
+    _limit = 10 * 1024 * 1024
 
     # Type alias for pending execute() result items
     _PendingT = Union[Message, ExecInterruptedError]
python/qemu/utils/qemu_ga_client.py +3 -3
index 8c38a7ac9c0..d8411bb2d0b 100644
@@ -155,7 +155,7 @@ def ping(self, timeout: Optional[float]) -> bool:
 
     def fsfreeze(self, cmd: str) -> object:
         if cmd not in ['status', 'freeze', 'thaw']:
-            raise Exception('Invalid command: ' + cmd)
+            raise ValueError('Invalid command: ' + cmd)
         # Can be int (freeze, thaw) or GuestFsfreezeStatus (status)
         return getattr(self.qga, 'fsfreeze' + '_' + cmd)()
 
@@ -167,7 +167,7 @@ def fstrim(self, minimum: int) -> Dict[str, object]:
 
     def suspend(self, mode: str) -> None:
         if mode not in ['disk', 'ram', 'hybrid']:
-            raise Exception('Invalid mode: ' + mode)
+            raise ValueError('Invalid mode: ' + mode)
 
         try:
             getattr(self.qga, 'suspend' + '_' + mode)()
@@ -178,7 +178,7 @@ def suspend(self, mode: str) -> None:
 
     def shutdown(self, mode: str = 'powerdown') -> None:
         if mode not in ['powerdown', 'halt', 'reboot']:
-            raise Exception('Invalid mode: ' + mode)
+            raise ValueError('Invalid mode: ' + mode)
 
         try:
             self.qga.shutdown(mode=mode)
tests/qemu-iotests/iotests.py +2 -2
index 94aeb3f3b20..3e82c634cfe 100644
@@ -720,7 +720,7 @@ def __exit__(self, exc_type, value, traceback):
         signal.setitimer(signal.ITIMER_REAL, 0)
         return False
     def timeout(self, signum, frame):
-        raise Exception(self.errmsg)
+        raise TimeoutError(self.errmsg)
 
 def file_pattern(name):
     return "{0}-{1}".format(os.getpid(), name)
@@ -804,7 +804,7 @@ def remote_filename(path):
     elif imgproto == 'ssh':
         return "ssh://%[email protected]:22%s" % (os.environ.get('USER'), path)
     else:
-        raise Exception("Protocol %s not supported" % (imgproto))
+        raise ValueError("Protocol %s not supported" % (imgproto))
 
 class VM(qtest.QEMUQtestMachine):
     '''A QEMU VM'''
tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test +1 -1
index fc9c4b4ef41..dda55fad284 100755
@@ -84,7 +84,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
                 e['vm'] = 'SRC'
             for e in self.vm_b_events:
                 e['vm'] = 'DST'
-            events = (self.vm_a_events + self.vm_b_events)
+            events = self.vm_a_events + self.vm_b_events
             events = [(e['timestamp']['seconds'],
                        e['timestamp']['microseconds'],
                        e['vm'],
Signature · 1 line
2.39.0
Reviewed-by on v1 1/7
#2 lore raw

Re: [PATCH 1/7] python: support pylint 2.16

Quoted 8 lines · John Snow

Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail.

1. The superfluous-parens check seems to be a bit more aggressive,
2. broad-exception-raised is new; it discourages "raise Exception".

Fix these minor issues and turn the lights green.

Quoted 8 lines
---
  python/qemu/qmp/protocol.py                            | 2 +-
  python/qemu/qmp/qmp_client.py                          | 2 +-
  python/qemu/utils/qemu_ga_client.py                    | 6 +++---
  tests/qemu-iotests/iotests.py                          | 4 ++--
  tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 2 +-
  5 files changed, 8 insertions(+), 8 deletions(-)
Reviewed-by on v1 1/7
#3 lore raw

Re: [PATCH 1/7] python: support pylint 2.16

In reply to John Snow
Quoted 112 lines · John Snow

Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail.

1. The superfluous-parens check seems to be a bit more aggressive,
2. broad-exception-raised is new; it discourages "raise Exception".

Fix these minor issues and turn the lights green.

---
 python/qemu/qmp/protocol.py                            | 2 +-
 python/qemu/qmp/qmp_client.py                          | 2 +-
 python/qemu/utils/qemu_ga_client.py                    | 6 +++---
 tests/qemu-iotests/iotests.py                          | 4 ++--
 tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)
python/qemu/qmp/protocol.py +1 -1
index 6d3d739daa7..22e60298d28 100644
@@ -207,7 +207,7 @@ class AsyncProtocol(Generic[T]):
     logger = logging.getLogger(__name__)
 
     # Maximum allowable size of read buffer
-    _limit = (64 * 1024)
+    _limit = 64 * 1024
 
     # -------------------------
     # Section: Public interface
python/qemu/qmp/qmp_client.py +1 -1
index b5772e7f32b..9d73ae6e7ad 100644
@@ -198,7 +198,7 @@ async def run(self, address='/tmp/qemu.socket'):
     logger = logging.getLogger(__name__)
 
     # Read buffer limit; 10MB like libvirt default
-    _limit = (10 * 1024 * 1024)
+    _limit = 10 * 1024 * 1024
 
     # Type alias for pending execute() result items
     _PendingT = Union[Message, ExecInterruptedError]
python/qemu/utils/qemu_ga_client.py +3 -3
index 8c38a7ac9c0..d8411bb2d0b 100644
@@ -155,7 +155,7 @@ def ping(self, timeout: Optional[float]) -> bool:
 
     def fsfreeze(self, cmd: str) -> object:
         if cmd not in ['status', 'freeze', 'thaw']:
-            raise Exception('Invalid command: ' + cmd)
+            raise ValueError('Invalid command: ' + cmd)
         # Can be int (freeze, thaw) or GuestFsfreezeStatus (status)
         return getattr(self.qga, 'fsfreeze' + '_' + cmd)()
 
@@ -167,7 +167,7 @@ def fstrim(self, minimum: int) -> Dict[str, object]:
 
     def suspend(self, mode: str) -> None:
         if mode not in ['disk', 'ram', 'hybrid']:
-            raise Exception('Invalid mode: ' + mode)
+            raise ValueError('Invalid mode: ' + mode)
 
         try:
             getattr(self.qga, 'suspend' + '_' + mode)()
@@ -178,7 +178,7 @@ def suspend(self, mode: str) -> None:
 
     def shutdown(self, mode: str = 'powerdown') -> None:
         if mode not in ['powerdown', 'halt', 'reboot']:
-            raise Exception('Invalid mode: ' + mode)
+            raise ValueError('Invalid mode: ' + mode)
 
         try:
             self.qga.shutdown(mode=mode)
tests/qemu-iotests/iotests.py +2 -2
index 94aeb3f3b20..3e82c634cfe 100644
@@ -720,7 +720,7 @@ def __exit__(self, exc_type, value, traceback):
         signal.setitimer(signal.ITIMER_REAL, 0)
         return False
     def timeout(self, signum, frame):
-        raise Exception(self.errmsg)
+        raise TimeoutError(self.errmsg)
 
 def file_pattern(name):
     return "{0}-{1}".format(os.getpid(), name)
@@ -804,7 +804,7 @@ def remote_filename(path):
     elif imgproto == 'ssh':
         return "ssh://%[email protected]:22%s" % (os.environ.get('USER'), path)
     else:
-        raise Exception("Protocol %s not supported" % (imgproto))
+        raise ValueError("Protocol %s not supported" % (imgproto))
 
 class VM(qtest.QEMUQtestMachine):
     '''A QEMU VM'''
tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test +1 -1
index fc9c4b4ef41..dda55fad284 100755
@@ -84,7 +84,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
                 e['vm'] = 'SRC'
             for e in self.vm_b_events:
                 e['vm'] = 'DST'
-            events = (self.vm_a_events + self.vm_b_events)
+            events = self.vm_a_events + self.vm_b_events
             events = [(e['timestamp']['seconds'],
                        e['timestamp']['microseconds'],
                        e['vm'],
Signature · 1 line
2.39.0

--
Beraldo

author
#4 lore raw

PATCH 2/7 Python: drop pipenv

In reply to John Snow

The pipenv tool was nice in theory, but in practice it's just too hard to update selectively, and it makes using it a pain. The qemu.qmp repo dropped pipenv support a while back and it's been functioning just fine, so I'm backporting that change here to qemu.git.

---
 python/README.rst                      |   3 -
 .gitlab-ci.d/static_checks.yml         |   4 +-
 python/.gitignore                      |   4 +-
 python/Makefile                        |  53 ++--
 python/Pipfile                         |  13 -
 python/Pipfile.lock                    | 347 -------------------------
 python/setup.cfg                       |   4 +-
 python/tests/minreqs.txt               |  45 ++++
 tests/docker/dockerfiles/python.docker |   1 -
 9 files changed, 86 insertions(+), 388 deletions(-)
 delete mode 100644 python/Pipfile
 delete mode 100644 python/Pipfile.lock
 create mode 100644 python/tests/minreqs.txt
python/README.rst +0 -3
index 9c1fceaee73..d62e71528d2 100644
@@ -77,9 +77,6 @@ Files in this directory
 - ``MANIFEST.in`` is read by python setuptools, it specifies additional files
   that should be included by a source distribution.
 - ``PACKAGE.rst`` is used as the README file that is visible on PyPI.org.
-- ``Pipfile`` is used by Pipenv to generate ``Pipfile.lock``.
-- ``Pipfile.lock`` is a set of pinned package dependencies that this package
-  is tested under in our CI suite. It is used by ``make check-pipenv``.
 - ``README.rst`` you are here!
 - ``VERSION`` contains the PEP-440 compliant version used to describe
   this package; it is referenced by ``setup.cfg``.
.gitlab-ci.d/static_checks.yml +2 -2
index 289ad1359e3..b4cbdbce2ab 100644
@@ -23,12 +23,12 @@ check-dco:
   before_script:
     - apk -U add git
 
-check-python-pipenv:
+check-python-minreqs:
   extends: .base_job_template
   stage: test
   image: $CI_REGISTRY_IMAGE/qemu/python:latest
   script:
-    - make -C python check-pipenv
+    - make -C python check-minreqs
   variables:
     GIT_DEPTH: 1
   needs:
python/.gitignore +2 -2
index 904f324bb11..c3ceb1ca0ab 100644
@@ -11,8 +11,8 @@ qemu.egg-info/
 .idea/
 .vscode/
 
-# virtual environments (pipenv et al)
-.venv/
+# virtual environments
+.min-venv/
 .tox/
 .dev-venv/
 
python/Makefile +36 -17

86 lines not on this page · raw message

python/Pipfile deleted +0 -13
deleted file mode 100644
index e7acb8cefa4..00000000000
@@ -1,13 +0,0 @@
-[[source]]
-name = "pypi"
-url = "https://pypi.org/simple"
-verify_ssl = true
-
-[dev-packages]
-qemu = {editable = true, extras = ["devel"], path = "."}
-
-[packages]
-qemu = {editable = true,path = "."}
-
-[requires]
-python_version = "3.6"
python/Pipfile.lock deleted +0 -347

347 lines not on this page · raw message

python/setup.cfg +1 -3
index 56418157065..9e923d97628 100644
@@ -33,9 +33,7 @@ packages =
 * = py.typed
 
 [options.extras_require]
-# For the devel group, When adding new dependencies or bumping the minimum
-# version, use e.g. "pipenv install --dev pylint==3.0.0".
-# Subsequently, edit 'Pipfile' to remove e.g. 'pylint = "==3.0.0'.
+# Remember to update tests/minreqs.txt if changing anything below:
 devel =
     avocado-framework >= 90.0
     flake8 >= 3.6.0
python/tests/minreqs.txt new file +45 -0

45 lines not on this page · raw message

tests/docker/dockerfiles/python.docker +0 -1
index 56d88417df4..175c10a34e8 100644
@@ -7,7 +7,6 @@ MAINTAINER John Snow <[email protected]>
 ENV PACKAGES \
     gcc \
     make \
-    pipenv \
     python3 \
     python3-pip \
     python3-tox \
Signature · 1 line
2.39.0
author
#5 lore raw

PATCH 3/7 configure: Look for auxiliary Python installations

In reply to John Snow

At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify --python=/usr/bin/foo every time.

We can be kind and instead make a cursory attempt to locate a suitable Python binary ourselves, looking for the remaining well-known binaries.

This configure loop will prefer, in order:

1. Whatever is specified in $PYTHON
2. python3
3. python
4. python3.11 down through python3.6

Notes:

- Python virtual environment provides binaries for "python3", "python", and whichever version you used to create the venv,
e.g. "python3.8". If configure is invoked from inside of a venv, this configure loop will not "break out" of that venv unless that venv is created using an explicitly non-suitable version of Python that we cannot use.

- In the event that no suitable python is found, the first python found is the version used to generate the human-readable error message.

- The error message isn't printed right away to allow later configuration code to pick up an explicitly configured python.

---
 configure | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)
configure +25 -8
index 64960c6000f..ea8c973d13b 100755
@@ -592,20 +592,39 @@ esac
 
 : ${make=${MAKE-make}}
 
-# 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 too
+
+check_py_version() {
+    # We require python >= 3.6.
+    # NB: a True python conditional creates a non-zero return code (Failure)
+    "$1" -c 'import sys; sys.exit(sys.version_info < (3,6))'
+}
+
 python=
+first_python=
 explicit_python=no
-for binary in "${PYTHON-python3}" python
+# A bare 'python' is traditionally python 2.x, but some distros
+# have it as python 3.x, so check in both places.
+for binary in "${PYTHON-python3}" python python3.{11..6}
 do
     if has "$binary"
     then
         python=$(command -v "$binary")
-        break
+        if test -z "$first_python"; then
+           first_python=$python
+        fi
+        if check_py_version "$python"; then
+            # This one is good.
+            first_python=
+            break
+        fi
     fi
 done
 
+# If first_python is set, we didn't find a suitable binary.
+# Use this one for possible future error messages.
+if test -n "$first_python"; then
+    python="$first_python"
+fi
 
 # Check for ancillary tools used in testing
 genisoimage=
@@ -1037,9 +1056,7 @@ then
     error_exit "GNU make ($make) not found"
 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,6))'; then
+if ! check_py_version "$python"; then
   error_exit "Cannot use '$python', Python >= 3.6 is required." \
       "Use --python=/path/to/python to specify a supported Python."
 fi
Signature · 1 line
2.39.0
#6 lore raw

Re: [PATCH 3/7] configure: Look for auxiliary Python installations

Quoted 8 lines · John Snow

At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify --python=/usr/bin/foo every time.

We can be kind and instead make a cursory attempt to locate a suitable Python binary ourselves, looking for the remaining well-known binaries.

Quoted 6 lines

This configure loop will prefer, in order:

1. Whatever is specified in $PYTHON
2. python3
3. python
4. python3.11 down through python3.6

Makes sense.

configure esac · line 607

Quoted 7 lines

python=

configure +4 -1
+first_python=
 explicit_python=no
-for binary in "${PYTHON-python3}" python
+# A bare 'python' is traditionally python 2.x, but some distros
+# have it as python 3.x, so check in both places.
+for binary in "${PYTHON-python3}" python python3.{11..6}

This does not match your commit message. If $PYTHON is set but fails, you never check python3. Pre-existing, but now that you're calling it out as intended, it may be better to write the list prefix as:

for binary in $PYTHON python3 python ...

except that it mishandles $PYTHON containing space, so you want the quotes, but you don't want to test an empty binary or waste time testing python3 twice, so more precise could be:

for binary in "${PYTHON-python3}" ${PYTHON:+python3} python ...

Meanwhioe, your use of {11.6} is a bashism, but configure is /bin/sh. It would be nice if you could use $(seq -f python3.%g 11 -1 6), but that's probably too specific to GNU Coreutils and won't work on other platforms; and open-coding it in a shell loop isn't going to be any prettier. So you'll be safest if you just manually spell it out:

python3.11 python3.10 ...

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author
#7 lore raw

Re: [PATCH 3/7] configure: Look for auxiliary Python installations

Quoted 32 lines · Eric Blake
Quoted 8 lines · John Snow

At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify --python=/usr/bin/foo every time.

We can be kind and instead make a cursory attempt to locate a suitable Python binary ourselves, looking for the remaining well-known binaries.

Quoted 6 lines

This configure loop will prefer, in order:

1. Whatever is specified in $PYTHON
2. python3
3. python
4. python3.11 down through python3.6

Makes sense.

configure esac · line 607

Quoted 7 lines

python=

configure +4 -1
+first_python=
 explicit_python=no
-for binary in "${PYTHON-python3}" python
+# A bare 'python' is traditionally python 2.x, but some distros
+# have it as python 3.x, so check in both places.
+for binary in "${PYTHON-python3}" python python3.{11..6}

This does not match your commit message. If $PYTHON is set but fails, you never check python3. Pre-existing, but now that you're calling it out as intended, it may be better to write the list prefix as:

Quoted 7 lines

for binary in $PYTHON python3 python ...

except that it mishandles $PYTHON containing space, so you want the quotes, but you don't want to test an empty binary or waste time testing python3 twice, so more precise could be:

for binary in "${PYTHON-python3}" ${PYTHON:+python3} python ...

Yep. I wonder if it's worth helping people work around broken environment variables at all, but, eh, you already solved the more difficult case, so I can include it.

(Well, pending other discussions, I s'pose.)

Quoted 8 lines

Meanwhioe, your use of {11.6} is a bashism, but configure is /bin/sh. It would be nice if you could use $(seq -f python3.%g 11 -1 6), but that's probably too specific to GNU Coreutils and won't work on other platforms; and open-coding it in a shell loop isn't going to be any prettier. So you'll be safest if you just manually spell it out:

python3.11 python3.10 ...

Oh, icky. Well, OK. Thanks for pointing it out before it became a problem somewhere.

Quoted 6 lines

--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org

author
#8 lore raw

PATCH 4/7 configure: Add nice hint to Python failure message

In reply to John Snow

If we begin requiring Python 3.7+, a few platforms are going to need to install an additional package.

This is at least mildly annoying to the user (and I hate negative attention), so solve the user's problem for them before they get a chance to become irritated while searching on Google for how to install newer Python packages.

---
 configure | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
configure +4 -1
index ea8c973d13b..bf512273f44 100755
@@ -1058,7 +1058,10 @@ fi
 
 if ! check_py_version "$python"; then
   error_exit "Cannot use '$python', Python >= 3.6 is required." \
-      "Use --python=/path/to/python to specify a supported Python."
+             "Use --python=/path/to/python to specify a supported Python." \
+             "Maybe try:" \
+             "  openSUSE Leap 15.3+: zypper install python39" \
+             "  CentOS 8: dnf install python38"
 fi
 
 # Suppress writing compiled files
Signature · 1 line
2.39.0
author
#9 lore raw

PATCH 5/7 testing: Add Python >= 3.7 to Centos, OpenSuSE

In reply to John Snow

This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way.

Note that this requires OpenSuSE Leap 15.3; 15.2 won't cut it.

This is just to prove that bumping our dependency works.

---
 tests/docker/dockerfiles/centos8.docker       | 1 +
 tests/docker/dockerfiles/opensuse-leap.docker | 1 +
 2 files changed, 2 insertions(+)
tests/docker/dockerfiles/centos8.docker +1 -0
index fbc953c6dcc..a3bfddf382d 100644
@@ -95,6 +95,7 @@ RUN dnf distro-sync -y && \
         pkgconfig \
         pulseaudio-libs-devel \
         python3 \
+        python38 \
         python3-PyYAML \
         python3-numpy \
         python3-pillow \
tests/docker/dockerfiles/opensuse-leap.docker +1 -0
index 4b2c02d6abf..9e688c1d441 100644
@@ -89,6 +89,7 @@ RUN zypper update -y && \
            pam-devel \
            pcre-devel-static \
            pkgconfig \
+           python39 \
            python3-Pillow \
            python3-PyYAML \
            python3-Sphinx \
Signature · 1 line
2.39.0
#10 lore raw

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

Quoted 3 lines · John Snow

This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way.

I think it would be good to have a RFC or DONOTMERGE in the patch title, so that it is clear right from the start that this should not get merged.

Quoted 1 line

Note that this requires OpenSuSE Leap 15.3; 15.2 won't cut it.

Looking at https://en.wikipedia.org/wiki/OpenSUSE#Version_history it seems like even 15.3 is EOL already, so I think we can switch to 15.4 immediately.

Thomas

author
#11 lore raw

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

Quoted 8 lines · Thomas Huth
Quoted 3 lines · John Snow

This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way.

I think it would be good to have a RFC or DONOTMERGE in the patch title, so that it is clear right from the start that this should not get merged.

Apologies. I just assumed there'd be no risk of this passing review :) If there's any point in me respinning this with the proof-of-concept again, I'll add a DO-NOT-MERGE tag.

Quoted 6 lines
Quoted 2 lines

Note that this requires OpenSuSE Leap 15.3; 15.2 won't cut it.

Looking at https://en.wikipedia.org/wiki/OpenSUSE#Version_history it seems like even 15.3 is EOL already, so I think we can switch to 15.4 immediately.

Noted. Some of the patches in this series are a bit old, admittedly, so I'll re-review these requirements.

I'm hoping to hear from Dan/Alex on the subject of coverage, because I don't really know what our current strategy is or what our coverage ought to be. If CI minutes were infinitely free, I'd suggest we test both CentOS 8 and 9 simultaneously, alongside with every currently supported OpenSuSE version, but I imagine that's not really truly on the table.

I imagine we want to have a mixture of "cutting edge" with "oldest we still support" to try and cover the spread of likely scenarios, but I am not sure what the strategies for which to keep at which versions are.

Quoted 2 lines

Thomas

#12 lore raw

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

In reply to John Snow
Quoted 3 lines · John Snow

This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way.

Paolo has been working on this

https://lists.gnu.org/archive/html/qemu-devel/2023-01/msg03547.html

though I requested we adapt it a little:

https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02237.html
https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02239.html

With 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 :|
author
#13 lore raw

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

Quoted 10 lines · Daniel P. Berrangé
Quoted 3 lines · John Snow

This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way.

Paolo has been working on this

https://lists.gnu.org/archive/html/qemu-devel/2023-01/msg03547.html

Quoted 7 lines

though I requested we adapt it a little:

https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02237.html
https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02239.html

With regards,
Daniel

Ah, I had no idea that Paolo was specifically working on 3.7 as a minimum requisite; I hadn't actually seen this or talked with him about this in some time. With this series I was mostly occupied with the simpler question of "Is this even possible?"

... I'll just trust that the lcitool changes are in good hands with Paolo.

Thanks for the links to the relevant threads :~)

--js

author
#14 lore raw

PATCH 6/7 CI: Stop building docs on centos8

In reply to John Snow

CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian.

---
 .gitlab-ci.d/buildtest.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +1 -1
index 0aa149a3524..0eb7f6606d4 100644
@@ -166,7 +166,7 @@ build-system-centos:
   variables:
     IMAGE: centos8
     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
-      --enable-modules --enable-trace-backends=dtrace --enable-docs
+      --enable-modules --enable-trace-backends=dtrace
       --enable-vfio-user-server
     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
Signature · 1 line
2.39.0
Reviewed-by on v1 6/7
#15 lore raw

Re: [PATCH 6/7] CI: Stop building docs on centos8

Quoted 15 lines · John Snow

CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian.

---
  .gitlab-ci.d/buildtest.yml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +0 -0
index 0aa149a3524..0eb7f6606d4 100644

.gitlab-ci.d/buildtest.yml build-system-centos: · line 172

Quoted 8 lines
.gitlab-ci.d/buildtest.yml +1 -1
@@ -166,7 +166,7 @@ build-system-centos:
    variables:
      IMAGE: centos8
      CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
-      --enable-modules --enable-trace-backends=dtrace --enable-docs
+      --enable-modules --enable-trace-backends=dtrace
        --enable-vfio-user-server
      TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
        x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
#16 lore raw

Re: [PATCH 6/7] CI: Stop building docs on centos8

In reply to John Snow
Quoted 4 lines · John Snow

CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian.

I guess remember this wide collection is on purpose, since sphinx had different dependency versions and was failing differently on each distrib. Peter might remember.

.gitlab-ci.d/buildtest.yml build-system-centos: · line 167

Quoted 12 lines
---
  .gitlab-ci.d/buildtest.yml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +0 -0
index 0aa149a3524..0eb7f6606d4 100644
@@ -166,7 +166,7 @@ build-system-centos:
    variables:
      IMAGE: centos8

If so (wide distrib collection), a "Please add --enable-docs when upgrading to centos9" comment here.

Quoted 6 lines
.gitlab-ci.d/buildtest.yml +1 -1
      CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
-      --enable-modules --enable-trace-backends=dtrace --enable-docs
+      --enable-modules --enable-trace-backends=dtrace
        --enable-vfio-user-server
      TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
        x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
#17 lore raw

Re: [PATCH 6/7] CI: Stop building docs on centos8

In reply to John Snow

Il gio 9 feb 2023, 16:40 John Snow <[email protected]> ha scritto:

Quoted 7 lines

CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian.

It's possible to teach lcitool to use pip instead to install docutils, sphinx and sphinx-rtd-theme
Once we can drop the previous patch this one can go as well; as soon as the last lcitool prerequisite is in (
https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/341) I will pick the rest of this series, if that's okay for you.

Paolo

---

Quoted 20 lines
 .gitlab-ci.d/buildtest.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +1 -2
index 0aa149a3524..0eb7f6606d4 100644
@@ -166,7 +166,7 @@ build-system-centos:
   variables:
     IMAGE: centos8
     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
-      --enable-modules --enable-trace-backends=dtrace --enable-docs
+      --enable-modules --enable-trace-backends=dtrace
       --enable-vfio-user-server
     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
--

2.39.0

author
#18 lore raw

Re: [PATCH 6/7] CI: Stop building docs on centos8

Quoted 10 lines · Paolo Bonzini

Il gio 9 feb 2023, 16:40 John Snow <[email protected]> ha scritto:

Quoted 6 lines

CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian.

Quoted 5 lines
Quoted 1 line

It's possible to teach lcitool to use pip instead to install docutils, sphinx and sphinx-rtd-theme
Once we can drop the previous patch this one can go as well; as soon as the last lcitool prerequisite is in (https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/341) I will pick the rest of this series, if that's okay for you.

OK - Dan requested extra version information in the commit message to 7, which I am researching a bit more exhaustively now. I can reply to that patch with the requested info and if you'd like to pick 1-4 & 7, you can be my guest.

I will say that once upon a time, Peter Maydell expressed a preference to use the version(s) of sphinx managed by the distro instead of swallowing it into the python-managed parts of the codebase. It seemed like a reasonable request at the time. We can revisit it once I get the patches in to add a venv at configure time. (Which I was intending to visit next.)

Quoted 3 lines

Paolo

#19 lore raw

Re: [PATCH 6/7] CI: Stop building docs on centos8

Quoted 7 lines · John Snow
Quoted 2 lines

It's possible to teach lcitool to use pip instead to install docutils, sphinx and sphinx-rtd-theme

I will say that once upon a time, Peter Maydell expressed a preference to use the version(s) of sphinx managed by the distro instead of swallowing it into the python-managed parts of the codebase. It seemed like a reasonable request at the time.

Note that this is not about using pip in a venv set up by e.g. configure; simply, lcitool falls back to pip if a package is not available as an RPM/DEB/APK, so it's a matter of telling it that the python3.8 runtime in CentOS 8 does not have either docutils or sphinx.

In other words, since lcitool takes care of building the container dockerfile, this "pip install" would be done in the container phase and configure in general cannot care less whether sphinx comes from an RPM or a "pip install".

Paolo

Quoted 3 lines

We can
revisit it once I get the patches in to add a venv at configure time. (Which I was intending to visit next.)

author
#20 lore raw

Re: [PATCH 6/7] CI: Stop building docs on centos8

Quoted 15 lines · Paolo Bonzini
Quoted 7 lines · John Snow
Quoted 2 lines

It's possible to teach lcitool to use pip instead to install docutils, sphinx and sphinx-rtd-theme

I will say that once upon a time, Peter Maydell expressed a preference to use the version(s) of sphinx managed by the distro instead of swallowing it into the python-managed parts of the codebase. It seemed like a reasonable request at the time.

Note that this is not about using pip in a venv set up by e.g. configure; simply, lcitool falls back to pip if a package is not available as an RPM/DEB/APK, so it's a matter of telling it that the python3.8 runtime in CentOS 8 does not have either docutils or sphinx.

Quoted 7 lines

In other words, since lcitool takes care of building the container dockerfile, this "pip install" would be done in the container phase and configure in general cannot care less whether sphinx comes from an RPM or a "pip install".

Paolo

Understood - I am just recalling changes I proposed to 'configure' several years back to specifically allow it to find and utilize versions of sphinx installed via pip, but Peter Maydell wasn't as sure of the idea, believing that QEMU should stick to only the system packages. I wasn't talking about specifically *creating* the environments with pip, this time.

(But, I'd still like to, but realize that's a separate discussion.)

author
#21 lore raw

PATCH 7/7 Python: Drop support for Python 3.6

In reply to John Snow

Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6.

Since it is safe to under our supported platform policy, do so.

---
 docs/conf.py             |  4 ++--
 configure                |  8 ++++----
 python/Makefile          | 10 +++++-----
 python/setup.cfg         |  7 +++----
 python/tests/minreqs.txt |  2 +-
 scripts/qapi/mypy.ini    |  2 +-
 6 files changed, 16 insertions(+), 17 deletions(-)
docs/conf.py +2 -2
index 73a287a4f27..d40448f35d9 100644
@@ -37,9 +37,9 @@
 # In newer versions of Sphinx this will display nicely; in older versions
 # Sphinx will also produce a Python backtrace but at least the information
 # gets printed...
-if sys.version_info < (3,6):
+if sys.version_info < (3,7):
     raise ConfigError(
-        "QEMU requires a Sphinx that uses Python 3.6 or better\n")
+        "QEMU requires a Sphinx that uses Python 3.7 or better\n")
 
 # The per-manual conf.py will set qemu_docdir for a single-manual build;
 # otherwise set it here if this is an entire-manual-set build.
configure +4 -4
index bf512273f44..de27994ddc8 100755
@@ -594,9 +594,9 @@ esac
 
 
 check_py_version() {
-    # We require python >= 3.6.
+    # We require python >= 3.7.
     # NB: a True python conditional creates a non-zero return code (Failure)
-    "$1" -c 'import sys; sys.exit(sys.version_info < (3,6))'
+    "$1" -c 'import sys; sys.exit(sys.version_info < (3,7))'
 }
 
 python=
@@ -604,7 +604,7 @@ first_python=
 explicit_python=no
 # A bare 'python' is traditionally python 2.x, but some distros
 # have it as python 3.x, so check in both places.
-for binary in "${PYTHON-python3}" python python3.{11..6}
+for binary in "${PYTHON-python3}" python python3.{11..7}
 do
     if has "$binary"
     then
@@ -1057,7 +1057,7 @@ then
 fi
 
 if ! check_py_version "$python"; then
-  error_exit "Cannot use '$python', Python >= 3.6 is required." \
+  error_exit "Cannot use '$python', Python >= 3.7 is required." \
              "Use --python=/path/to/python to specify a supported Python." \
              "Maybe try:" \
              "  openSUSE Leap 15.3+: zypper install python39" \
python/Makefile +5 -5
index c5bd6ff83ac..f660d999143 100644
@@ -9,14 +9,14 @@ help:
 	@echo "make check-minreqs:"
 	@echo "    Run tests in the minreqs virtual environment."
 	@echo "    These tests use the oldest dependencies."
-	@echo "    Requires: Python 3.6"
-	@echo "    Hint (Fedora): 'sudo dnf install python3.6'"
+	@echo "    Requires: Python 3.7"
+	@echo "    Hint (Fedora): 'sudo dnf install python3.7'"
 	@echo ""
 	@echo "make check-tox:"
 	@echo "    Run tests against multiple python versions."
 	@echo "    These tests use the newest dependencies."
-	@echo "    Requires: Python 3.6 - 3.10, and tox."
-	@echo "    Hint (Fedora): 'sudo dnf install python3-tox python3.10'"
+	@echo "    Requires: Python 3.7 - 3.11, and tox."
+	@echo "    Hint (Fedora): 'sudo dnf install python3-tox python3.11'"
 	@echo "    The variable QEMU_TOX_EXTRA_ARGS can be use to pass extra"
 	@echo "    arguments to tox".
 	@echo ""
@@ -58,7 +58,7 @@ pipenv check-pipenv:
 min-venv: $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate
 $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate: setup.cfg tests/minreqs.txt
 	@echo "VENV $(QEMU_MINVENV_DIR)"
-	@python3.6 -m venv $(QEMU_MINVENV_DIR)
+	@python3.7 -m venv $(QEMU_MINVENV_DIR)
 	@(								\
 		echo "ACTIVATE $(QEMU_MINVENV_DIR)";			\
 		. $(QEMU_MINVENV_DIR)/bin/activate;			\
python/setup.cfg +3 -4
index 9e923d97628..1e8392a045c 100644
@@ -14,7 +14,6 @@ classifiers =
     Natural Language :: English
     Operating System :: OS Independent
     Programming Language :: Python :: 3 :: Only
-    Programming Language :: Python :: 3.6
     Programming Language :: Python :: 3.7
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9
@@ -23,7 +22,7 @@ classifiers =
     Typing :: Typed
 
 [options]
-python_requires = >= 3.6
+python_requires = >= 3.7
 packages =
     qemu.qmp
     qemu.machine
@@ -76,7 +75,7 @@ exclude = __pycache__,
 
 [mypy]
 strict = True
-python_version = 3.6
+python_version = 3.7
 warn_unused_configs = True
 namespace_packages = True
 warn_unused_ignores = False
@@ -158,7 +157,7 @@ multi_line_output=3
 # of python available on your system to run this test.
 
 [tox:tox]
-envlist = py36, py37, py38, py39, py310, py311
+envlist = py37, py38, py39, py310, py311
 skip_missing_interpreters = true
 
 [testenv]
python/tests/minreqs.txt +1 -1
index dfb8abb155f..55cc6b41d85 100644
@@ -1,5 +1,5 @@
 # This file lists the ***oldest possible dependencies*** needed to run
-# "make check" successfully under ***Python 3.6***. It is used primarily
+# "make check" successfully under ***Python 3.7***. It is used primarily
 # by GitLab CI to ensure that our stated minimum versions in setup.cfg
 # are truthful and regularly validated.
 #
scripts/qapi/mypy.ini +1 -1
index 66253564297..3463307ddc7 100644
@@ -1,7 +1,7 @@
 [mypy]
 strict = True
 disallow_untyped_calls = False
-python_version = 3.6
+python_version = 3.7
 
 [mypy-qapi.schema]
 disallow_untyped_defs = False
Signature · 1 line
2.39.0
#22 lore raw
Quoted 6 lines · John Snow

Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6.

Since it is safe to under our supported platform policy, do so.

Upstream EOL dates are essentially irrelevant from our platform support policy for deciding min versions

QEMU aims to target released OS distributions, and their vendors may choose to support software for arbitrarily longer periods of time than upstream. This extended support is one of the key value adds of OS distributions.

To justify dropping python 3.6, the commit message needs to illustrate that all our targetted distros are capable of supporting the new proposed new min version.

Quoted 10 lines
---
 docs/conf.py             |  4 ++--
 configure                |  8 ++++----
 python/Makefile          | 10 +++++-----
 python/setup.cfg         |  7 +++----
 python/tests/minreqs.txt |  2 +-
 scripts/qapi/mypy.ini    |  2 +-
 6 files changed, 16 insertions(+), 17 deletions(-)

With 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 :|
author
#23 lore raw
Quoted 7 lines · Daniel P. Berrangé
Quoted 5 lines · John Snow

Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6.

Quoted 5 lines
Quoted 1 line

Since it is safe to under our supported platform policy, do so.

Upstream EOL dates are essentially irrelevant from our platform support policy for deciding min versions

It's relevant because as other Python packages drop support, the burden of support is pushed onto Cleber and I, as explained in the cover letter. It is not a justification in and of itself, but it summarizes the ecosystem conditions that prompt the desire for the change.

Quoted 8 lines

QEMU aims to target released OS distributions, and their vendors may choose to support software for arbitrarily longer periods of time than upstream. This extended support is one of the key value adds of OS distributions.

To justify dropping python 3.6, the commit message needs to illustrate that all our targetted distros are capable of supporting the new proposed new min version.

That is the point of this series: illustrating that it is indeed safe to drop Python 3.6. I am not clear on what you are actually requesting as a change.

Quoted 19 lines
Quoted 10 lines
---
 docs/conf.py             |  4 ++--
 configure                |  8 ++++----
 python/Makefile          | 10 +++++-----
 python/setup.cfg         |  7 +++----
 python/tests/minreqs.txt |  2 +-
 scripts/qapi/mypy.ini    |  2 +-
 6 files changed, 16 insertions(+), 17 deletions(-)

With regards,
Daniel
--

|: 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 :|
#24 lore raw
Quoted 24 lines · John Snow
Quoted 7 lines · Daniel P. Berrangé
Quoted 5 lines · John Snow

Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6.

Quoted 5 lines
Quoted 1 line

Since it is safe to under our supported platform policy, do so.

Upstream EOL dates are essentially irrelevant from our platform support policy for deciding min versions

It's relevant because as other Python packages drop support, the burden of support is pushed onto Cleber and I, as explained in the cover letter. It is not a justification in and of itself, but it summarizes the ecosystem conditions that prompt the desire for the change.

Quoted 5 lines

QEMU aims to target released OS distributions, and their vendors may choose to support software for arbitrarily longer periods of time than upstream. This extended support is one of the key value adds of OS distributions.

Quoted 7 lines
Quoted 3 lines

To justify dropping python 3.6, the commit message needs to illustrate that all our targetted distros are capable of supporting the new proposed new min version.

That is the point of this series: illustrating that it is indeed safe to drop Python 3.6. I am not clear on what you are actually requesting as a change.

Essentially it should explain what versions are available in each distro. See for example commit 5890258aeeba303704ec1adca415e46067800777.

With 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 :|
author
#25 lore raw
Quoted 30 lines · Daniel P. Berrangé
Quoted 28 lines · John Snow
Quoted 7 lines · Daniel P. Berrangé
Quoted 5 lines · John Snow

Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6.

Quoted 5 lines
Quoted 1 line

Since it is safe to under our supported platform policy, do so.

Upstream EOL dates are essentially irrelevant from our platform support policy for deciding min versions

It's relevant because as other Python packages drop support, the burden of support is pushed onto Cleber and I, as explained in the cover letter. It is not a justification in and of itself, but it summarizes the ecosystem conditions that prompt the desire for the change.

Quoted 8 lines

QEMU aims to target released OS distributions, and their vendors may choose to support software for arbitrarily longer periods of time than upstream. This extended support is one of the key value adds of OS distributions.

To justify dropping python 3.6, the commit message needs to illustrate that all our targetted distros are capable of supporting the new proposed new min version.

Quoted 6 lines
Quoted 3 lines

That is the point of this series: illustrating that it is indeed safe to drop Python 3.6. I am not clear on what you are actually requesting as a change.

Essentially it should explain what versions are available in each distro. See for example commit 5890258aeeba303704ec1adca415e46067800777.

Ah, OK.

Fedora 36: 3.10.5
Ubuntu 20.04: 3.8.10
Debian 11: 3.9.2
OpenSUSE Leap 15.4 uses 3.6.15, but 3.9 and 3.10 are available with a simple zypper invocation.
CentOS Stream 8 uses 3.6.8, but 3.8 and 3.9 are available. CentOS Stream 9 uses 3.9.13.
Alpine: Not sure, but tests pass.
FreeBSD 12: 3.7 (tests/vm/freebsd already uses this version.)
OpenBSD: ?
NetBSD: ?

I can update the commit message, but I do have questions for you in patch 5 concerning the docker configurations and our test matrix that I want to work out before a respin.

Quoted 10 lines

With regards,
Daniel
--

|: 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 :|