<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/python/Makefile, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/python/Makefile?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/python/Makefile?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2023-09-07T11:32:37Z</updated>
<entry>
<title>Python: Drop support for Python 3.7</title>
<updated>2023-09-07T11:32:37Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-05-03T10:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=ca056f4499c259c0de68ed7cefad7ee7b62bfa43'/>
<id>urn:sha1:ca056f4499c259c0de68ed7cefad7ee7b62bfa43</id>
<content type='text'>
Debian 10 is not anymore a supported distro, since Debian 12 was
released on June 10, 2023.  Our supported build platforms as of today
all support at least 3.8 (and all of them except for Ubuntu 20.04
support 3.9):

openSUSE Leap 15.5: 3.6.15 (3.11.2)
CentOS Stream 8:    3.6.8  (3.8.13, 3.9.16, 3.11.4)
CentOS Stream 9:    3.9.17 (3.11.4)
Fedora 37:          3.11.4
Fedora 38:          3.11.4
Debian 11:          3.9.2
Debian 12:          3.11.2
Alpine 3.14, 3.15:  3.9.16
Alpine 3.16, 3.17:  3.10.10
Ubuntu 20.04 LTS:   3.8.10
Ubuntu 22.04 LTS:   3.10.12
NetBSD 9.3:         3.9.13*
FreeBSD 12.4:       3.9.16
FreeBSD 13.1:       3.9.18
OpenBSD 7.2:        3.9.17

Note: NetBSD does not appear to have a default meta-package, but offers
several options, the lowest of which is 3.7.15. However, "python39"
appears to be a pre-requisite to one of the other packages we request
in tests/vm/netbsd.

Since it is safe under our supported platform policy, bump our
minimum supported version of Python to 3.8.  The two most interesting
features to have by default include:

- the importlib.metadata module, whose lack is responsible for over 100
  lines of code in mkvenv.py

- improvements to asyncio, for example asyncio.CancelledError
  inherits from BaseException rather than Exception

In addition, code can now use the assignment operator ':='

Because mypy now learns about importlib.metadata, a small change to
mkvenv.py is needed to pass type checking.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Python: Drop support for Python 3.6</title>
<updated>2023-05-18T06:53:51Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-05-11T03:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=5591b74511ab370b2b7705c5ce97116030038990'/>
<id>urn:sha1:5591b74511ab370b2b7705c5ce97116030038990</id>
<content type='text'>
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, but won't until QEMU does.

Versions of Python available in our supported build platforms as of today,
with optional versions available in parentheses:

openSUSE Leap 15.4: 3.6.15 (3.9.10, 3.10.2)
CentOS Stream 8:    3.6.8  (3.8.13, 3.9.16)
CentOS Stream 9:    3.9.13
Fedora 36:          3.10
Fedora 37:          3.11
Debian 11:          3.9.2
Alpine 3.14, 3.15:  3.9.16
Alpine 3.16, 3.17:  3.10.10
Ubuntu 20.04 LTS:   3.8.10
Ubuntu 22.04 LTS:   3.10.4
NetBSD 9.3:         3.9.13*
FreeBSD 12.4:       3.9.16
FreeBSD 13.1:       3.9.16
OpenBSD 7.2:        3.9.16

Note: Our VM tests install 3.9 explicitly for FreeBSD and 3.10 for
NetBSD; the default for "python" or "python3" in FreeBSD is
3.9.16. NetBSD does not appear to have a default meta-package, but
offers several options, the lowest of which is 3.7.15. "python39"
appears to be a pre-requisite to one of the other packages we request in
tests/vm/netbsd. pip, ensurepip and other Python essentials are
currently only available for Python 3.10 for NetBSD.

CentOS and OpenSUSE support parallel installation of multiple Python
interpreters, and binaries in /usr/bin will always use Python 3.6.  However,
the newly introduced support for virtual environments ensures that all build
steps that execute QEMU Python code use a single interpreter.

Since it is safe to under our supported platform policy, bump our
minimum supported version of Python to 3.7.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20230511035435.734312-24-jsnow@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: shut up "pip install" during "make check-minreqs"</title>
<updated>2023-05-18T06:53:51Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-05-11T03:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0b15c42b81ff1e66ccbab3c2f2cef1535cbb9d24'/>
<id>urn:sha1:0b15c42b81ff1e66ccbab3c2f2cef1535cbb9d24</id>
<content type='text'>
"make check-minreqs" runs pip without the --disable-pip-version-check
option, which causes the obnoxious "A new release of pip available"
message.

Recent versions of pip also complain that some of the dependencies in
our virtual environment rely on "setup.py install" instead of providing
a pyproject.toml file; apparently it is deprecated to install them
directly from pip instead of letting the "wheel" package take care
of them.  So, install "wheel" in the virtual environment.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-Id: &lt;20230511035435.734312-2-jsnow@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: drop pipenv</title>
<updated>2023-02-23T04:35:03Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2023-02-10T00:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=6832189fd791622c30e7bbe3a12b76be14dc1158'/>
<id>urn:sha1:6832189fd791622c30e7bbe3a12b76be14dc1158</id>
<content type='text'>
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.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20230210003147.1309376-3-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>misc: fix commonly doubled up words</title>
<updated>2022-08-01T09:58:02Z</updated>
<author>
<name>Daniel P. Berrangé</name>
<email>berrange@redhat.com</email>
</author>
<published>2022-07-07T16:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=7a21bee2aa52fc95b25e38372678986ee94f05f1'/>
<id>urn:sha1:7a21bee2aa52fc95b25e38372678986ee94f05f1</id>
<content type='text'>
Signed-off-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-Id: &lt;20220707163720.1421716-5-berrange@redhat.com&gt;
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "python: pin setuptools below v60.0.0"</title>
<updated>2022-02-23T22:07:26Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2022-02-04T22:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=43a1119ef132ce23624046babbd08d9d0708dc46'/>
<id>urn:sha1:43a1119ef132ce23624046babbd08d9d0708dc46</id>
<content type='text'>
This reverts commit 1e4d8b31be35e54b6429fea54f5ecaa0083f91e7.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20220204221804.2047468-3-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: pin setuptools below v60.0.0</title>
<updated>2022-01-21T21:01:09Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2022-01-21T00:52:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=1e4d8b31be35e54b6429fea54f5ecaa0083f91e7'/>
<id>urn:sha1:1e4d8b31be35e54b6429fea54f5ecaa0083f91e7</id>
<content type='text'>
setuptools is a package that replaces the python stdlib 'distutils'. It
is generally installed by all venv-creating tools "by default". It isn't
actually needed at runtime for the qemu package, so our own setup.cfg
does not mention it as a dependency.

However, tox will create virtual environments that include it, and will
upgrade it to the very latest version. the 'venv' tool will also include
whichever version your host system happens to have.

Unfortunately, setuptools version 60.0.0 and above include a hack to
forcibly overwrite python's built-in distutils. The pylint tool that we
use to run code analysis checks on this package relies on distutils and
suffers regressions when setuptools &gt;= 60.0.0 is present at all, see
https://github.com/PyCQA/pylint/issues/5704

Instruct tox and the 'check-dev' targets to avoid setuptools packages
that are too new, for now. Pipenv is unaffected, because setuptools 60
does not offer Python 3.6 support, and our pipenv config is pinned
against Python 3.6.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Beraldo Leal &lt;bleal@redhat.com&gt;
Reviewed-by: Cleber Rosa &lt;crosa@redhat.com&gt;
Tested-by: Cleber Rosa &lt;crosa@redhat.com&gt;
Message-id: 20220121005221.142236-1-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python/aqmp: Add Coverage.py support</title>
<updated>2021-09-27T16:10:29Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2021-09-15T16:29:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=a4ffaecd5726433f01b0ff857054acad9dc9df12'/>
<id>urn:sha1:a4ffaecd5726433f01b0ff857054acad9dc9df12</id>
<content type='text'>
I'm not exposing this via the Makefile help, it's not likely to be
useful to passersby. Switch the avocado runner to the 'legacy' runner
for now, as the new runner seems to obscure coverage reports, again.

Usage is to enter your venv of choice and then:
`make check-coverage &amp;&amp; xdg-open htmlcov/index.html`.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20210915162955.333025-28-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: Configure tox to skip missing interpreters</title>
<updated>2021-07-13T19:44:16Z</updated>
<author>
<name>Wainer dos Santos Moschetta</name>
<email>wainersm@redhat.com</email>
</author>
<published>2021-06-30T18:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=6f651a6d84b64060aa77373a72ba02ff61ad9911'/>
<id>urn:sha1:6f651a6d84b64060aa77373a72ba02ff61ad9911</id>
<content type='text'>
Currently tox tests against the installed interpreters, however if any
supported interpreter is absent then it will return fail. It seems not
reasonable to expect developers to have all supported interpreters
installed on their systems. Luckily tox can be configured to skip
missing interpreters.

This changed the tox setup so that missing interpreters are skipped by
default. On the CI, however, we still want to enforce it tests
against all supported. This way on CI the
--skip-missing-interpreters=false option is passed to tox.

Signed-off-by: Wainer dos Santos Moschetta &lt;wainersm@redhat.com&gt;
Message-Id: &lt;20210630184546.456582-1-wainersm@redhat.com&gt;
Reviewed-by: Willian Rampazzo &lt;willianr@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Signed-off-by: Cleber Rosa &lt;crosa@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: remove auto-generated pyproject.toml file</title>
<updated>2021-07-01T01:57:08Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2021-06-29T21:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=19cf0031e438374045aab8e5db0a03fb3b3070e4'/>
<id>urn:sha1:19cf0031e438374045aab8e5db0a03fb3b3070e4</id>
<content type='text'>
For reasons that at-present escape me, pipenv insists on creating a stub
pyproject.toml file. This file is a nuisance, because its mere presence
changes the behavior of various tools.

For instance, this stub file will cause "pip install --user -e ." to
fail in spectacular fashion with misleading errors. "pip install -e ."
works okay, but for some reason pip does not support editable installs
to the user directory when using PEP517.

References:
  https://github.com/pypa/pip/pull/9990
  https://github.com/pypa/pip/issues/7953

As outlined in ea1213b7ccc, it is still too early for us to consider
moving to a PEP-517 exclusive package. We must support older
distributions, so squash the annoyance for now. (Python 3.6 shipped Dec
2016, PEP517 support showed up in pip sometime in 2019 or so.)

Add 'pyproject.toml' to the 'make clean' target, and also delete it
after every pipenv invocation issued by the Makefile.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Willian Rampazzo &lt;willianr@redhat.com&gt;
Reviewed-by: Wainer dos Santos Moschetta &lt;wainersm@redhat.com&gt;
Message-id: 20210629214323.1329806-15-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
</feed>
