* [PATCH 01/10] python: support pylint 2.16
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 14:37 ` [PATCH 02/10] python: drop pipenv Paolo Bonzini
` (9 subsequent siblings)
10 siblings, 0 replies; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel
Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange,
Philippe Mathieu-Daudé, Beraldo Leal
From: John Snow <jsnow@redhat.com>
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.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
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(-)
diff --git a/python/qemu/qmp/protocol.py b/python/qemu/qmp/protocol.py
index 6d3d739daa76..22e60298d280 100644
--- a/python/qemu/qmp/protocol.py
+++ b/python/qemu/qmp/protocol.py
@@ -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
diff --git a/python/qemu/qmp/qmp_client.py b/python/qemu/qmp/qmp_client.py
index b5772e7f32b3..9d73ae6e7ada 100644
--- a/python/qemu/qmp/qmp_client.py
+++ b/python/qemu/qmp/qmp_client.py
@@ -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]
diff --git a/python/qemu/utils/qemu_ga_client.py b/python/qemu/utils/qemu_ga_client.py
index 8c38a7ac9c0e..d8411bb2d0b5 100644
--- a/python/qemu/utils/qemu_ga_client.py
+++ b/python/qemu/utils/qemu_ga_client.py
@@ -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)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 94aeb3f3b200..3e82c634cfef 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -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://%s@127.0.0.1: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'''
diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
index fc9c4b4ef411..dda55fad2840 100755
--- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
+++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
@@ -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'],
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 02/10] python: drop pipenv
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
2023-02-22 14:37 ` [PATCH 01/10] python: support pylint 2.16 Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-03-15 21:16 ` Philippe Mathieu-Daudé
2023-02-22 14:37 ` [PATCH 03/10] meson: prefer 'sphinx-build' to 'sphinx-build-3' Paolo Bonzini
` (8 subsequent siblings)
10 siblings, 1 reply; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
From: John Snow <jsnow@redhat.com>
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 <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitlab-ci.d/static_checks.yml | 4 +-
python/.gitignore | 4 +-
python/Makefile | 53 ++--
python/Pipfile | 13 -
python/Pipfile.lock | 347 -------------------------
python/README.rst | 3 -
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
diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
index 289ad1359e3a..b4cbdbce2abf 100644
--- a/.gitlab-ci.d/static_checks.yml
+++ b/.gitlab-ci.d/static_checks.yml
@@ -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:
diff --git a/python/.gitignore b/python/.gitignore
index 904f324bb11a..c3ceb1ca0ab1 100644
--- a/python/.gitignore
+++ b/python/.gitignore
@@ -11,8 +11,8 @@ qemu.egg-info/
.idea/
.vscode/
-# virtual environments (pipenv et al)
-.venv/
+# virtual environments
+.min-venv/
.tox/
.dev-venv/
diff --git a/python/Makefile b/python/Makefile
index b170708398ab..c5bd6ff83ac9 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -1,15 +1,16 @@
QEMU_VENV_DIR=.dev-venv
+QEMU_MINVENV_DIR=.min-venv
QEMU_TOX_EXTRA_ARGS ?=
.PHONY: help
help:
@echo "python packaging help:"
@echo ""
- @echo "make check-pipenv:"
- @echo " Run tests in pipenv's virtual environment."
+ @echo "make check-minreqs:"
+ @echo " Run tests in the minreqs virtual environment."
@echo " These tests use the oldest dependencies."
- @echo " Requires: Python 3.6 and pipenv."
- @echo " Hint (Fedora): 'sudo dnf install python3.6 pipenv'"
+ @echo " Requires: Python 3.6"
+ @echo " Hint (Fedora): 'sudo dnf install python3.6'"
@echo ""
@echo "make check-tox:"
@echo " Run tests against multiple python versions."
@@ -33,8 +34,8 @@ help:
@echo " and install the qemu package in editable mode."
@echo " (Can be used in or outside of a venv.)"
@echo ""
- @echo "make pipenv"
- @echo " Creates pipenv's virtual environment (.venv)"
+ @echo "make min-venv"
+ @echo " Creates the minreqs virtual environment ($(QEMU_MINVENV_DIR))"
@echo ""
@echo "make dev-venv"
@echo " Creates a simple venv for check-dev. ($(QEMU_VENV_DIR))"
@@ -43,21 +44,38 @@ help:
@echo " Remove package build output."
@echo ""
@echo "make distclean:"
- @echo " remove pipenv/venv files, qemu package forwarder,"
+ @echo " remove venv files, qemu package forwarder,"
@echo " built distribution files, and everything from 'make clean'."
@echo ""
@echo -e "Have a nice day ^_^\n"
-.PHONY: pipenv
-pipenv: .venv
-.venv: Pipfile.lock
- @PIPENV_VENV_IN_PROJECT=1 pipenv sync --dev --keep-outdated
- rm -f pyproject.toml
- @touch .venv
+.PHONY: pipenv check-pipenv
+pipenv check-pipenv:
+ @echo "pipenv was dropped; try 'make check-minreqs' or 'make min-venv'"
+ @exit 1
-.PHONY: check-pipenv
-check-pipenv: pipenv
- @pipenv run make check
+.PHONY: min-venv
+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)
+ @( \
+ echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
+ . $(QEMU_MINVENV_DIR)/bin/activate; \
+ echo "INSTALL -r tests/minreqs.txt $(QEMU_MINVENV_DIR)";\
+ pip install -r tests/minreqs.txt 1>/dev/null; \
+ echo "INSTALL -e qemu $(QEMU_MINVENV_DIR)"; \
+ pip install -e . 1>/dev/null; \
+ )
+ @touch $(QEMU_MINVENV_DIR)
+
+.PHONY: check-minreqs
+check-minreqs: min-venv
+ @( \
+ echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
+ . $(QEMU_MINVENV_DIR)/bin/activate; \
+ make check; \
+ )
.PHONY: dev-venv
dev-venv: $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate
@@ -106,6 +124,7 @@ clean:
.PHONY: distclean
distclean: clean
- rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
+ rm -rf qemu.egg-info/ .eggs/ dist/
+ rm -rf $(QEMU_VENV_DIR) $(QEMU_MINVENV_DIR) .tox/
rm -f .coverage .coverage.*
rm -rf htmlcov/
diff --git a/python/Pipfile b/python/Pipfile
deleted file mode 100644
index e7acb8cefa4d..000000000000
--- a/python/Pipfile
+++ /dev/null
@@ -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"
diff --git a/python/Pipfile.lock b/python/Pipfile.lock
deleted file mode 100644
index ce46404ce084..000000000000
--- a/python/Pipfile.lock
+++ /dev/null
@@ -1,347 +0,0 @@
-{
- "_meta": {
- "hash": {
- "sha256": "f1a25654d884a5b450e38d78b1f2e3ebb9073e421cc4358d4bbb83ac251a5670"
- },
- "pipfile-spec": 6,
- "requires": {
- "python_version": "3.6"
- },
- "sources": [
- {
- "name": "pypi",
- "url": "https://pypi.org/simple",
- "verify_ssl": true
- }
- ]
- },
- "default": {
- "qemu": {
- "editable": true,
- "path": "."
- }
- },
- "develop": {
- "appdirs": {
- "hashes": [
- "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41",
- "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"
- ],
- "version": "==1.4.4"
- },
- "astroid": {
- "hashes": [
- "sha256:09bdb456e02564731f8b5957cdd0c98a7f01d2db5e90eb1d794c353c28bfd705",
- "sha256:6a8a51f64dae307f6e0c9db752b66a7951e282389d8362cc1d39a56f3feeb31d"
- ],
- "index": "pypi",
- "version": "==2.6.0"
- },
- "avocado-framework": {
- "hashes": [
- "sha256:244cb569f8eb4e50a22ac82e1a2b2bba2458999f4281efbe2651bd415d59c65b",
- "sha256:6f15998b67ecd0e7dde790c4de4dd249d6df52dfe6d5cc4e2dd6596df51c3583"
- ],
- "index": "pypi",
- "version": "==90.0"
- },
- "distlib": {
- "hashes": [
- "sha256:106fef6dc37dd8c0e2c0a60d3fca3e77460a48907f335fa28420463a6f799736",
- "sha256:23e223426b28491b1ced97dc3bbe183027419dfc7982b4fa2f05d5f3ff10711c"
- ],
- "index": "pypi",
- "version": "==0.3.2"
- },
- "filelock": {
- "hashes": [
- "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59",
- "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"
- ],
- "index": "pypi",
- "version": "==3.0.12"
- },
- "flake8": {
- "hashes": [
- "sha256:6a35f5b8761f45c5513e3405f110a86bea57982c3b75b766ce7b65217abe1670",
- "sha256:c01f8a3963b3571a8e6bd7a4063359aff90749e160778e03817cd9b71c9e07d2"
- ],
- "index": "pypi",
- "version": "==3.6.0"
- },
- "fusepy": {
- "hashes": [
- "sha256:10f5c7f5414241bffecdc333c4d3a725f1d6605cae6b4eaf86a838ff49cdaf6c",
- "sha256:a9f3a3699080ddcf0919fd1eb2cf743e1f5859ca54c2018632f939bdfac269ee"
- ],
- "index": "pypi",
- "version": "==2.0.4"
- },
- "importlib-metadata": {
- "hashes": [
- "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83",
- "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"
- ],
- "markers": "python_version < '3.8'",
- "version": "==1.7.0"
- },
- "importlib-resources": {
- "hashes": [
- "sha256:54161657e8ffc76596c4ede7080ca68cb02962a2e074a2586b695a93a925d36e",
- "sha256:e962bff7440364183203d179d7ae9ad90cb1f2b74dcb84300e88ecc42dca3351"
- ],
- "index": "pypi",
- "version": "==5.1.4"
- },
- "isort": {
- "hashes": [
- "sha256:408e4d75d84f51b64d0824894afee44469eba34a4caee621dc53799f80d71ccc",
- "sha256:64022dea6a06badfa09b300b4dfe8ba968114a737919e8ed50aea1c288f078aa"
- ],
- "index": "pypi",
- "version": "==5.1.2"
- },
- "lazy-object-proxy": {
- "hashes": [
- "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653",
- "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61",
- "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2",
- "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837",
- "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3",
- "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43",
- "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726",
- "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3",
- "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587",
- "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8",
- "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a",
- "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd",
- "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f",
- "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad",
- "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4",
- "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b",
- "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf",
- "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981",
- "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741",
- "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e",
- "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93",
- "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"
- ],
- "index": "pypi",
- "version": "==1.6.0"
- },
- "mccabe": {
- "hashes": [
- "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
- "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
- ],
- "version": "==0.6.1"
- },
- "mypy": {
- "hashes": [
- "sha256:00cb1964a7476e871d6108341ac9c1a857d6bd20bf5877f4773ac5e9d92cd3cd",
- "sha256:127de5a9b817a03a98c5ae8a0c46a20dc44442af6dcfa2ae7f96cb519b312efa",
- "sha256:1f3976a945ad7f0a0727aafdc5651c2d3278e3c88dee94e2bf75cd3386b7b2f4",
- "sha256:2f8c098f12b402c19b735aec724cc9105cc1a9eea405d08814eb4b14a6fb1a41",
- "sha256:4ef13b619a289aa025f2273e05e755f8049bb4eaba6d703a425de37d495d178d",
- "sha256:5d142f219bf8c7894dfa79ebfb7d352c4c63a325e75f10dfb4c3db9417dcd135",
- "sha256:62eb5dd4ea86bda8ce386f26684f7f26e4bfe6283c9f2b6ca6d17faf704dcfad",
- "sha256:64c36eb0936d0bfb7d8da49f92c18e312ad2e3ed46e5548ae4ca997b0d33bd59",
- "sha256:75eed74d2faf2759f79c5f56f17388defd2fc994222312ec54ee921e37b31ad4",
- "sha256:974bebe3699b9b46278a7f076635d219183da26e1a675c1f8243a69221758273",
- "sha256:a5e5bb12b7982b179af513dddb06fca12285f0316d74f3964078acbfcf4c68f2",
- "sha256:d31291df31bafb997952dc0a17ebb2737f802c754aed31dd155a8bfe75112c57",
- "sha256:d3b4941de44341227ece1caaf5b08b23e42ad4eeb8b603219afb11e9d4cfb437",
- "sha256:eadb865126da4e3c4c95bdb47fe1bb087a3e3ea14d39a3b13224b8a4d9f9a102"
- ],
- "index": "pypi",
- "version": "==0.780"
- },
- "mypy-extensions": {
- "hashes": [
- "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d",
- "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"
- ],
- "version": "==0.4.3"
- },
- "packaging": {
- "hashes": [
- "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5",
- "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"
- ],
- "index": "pypi",
- "version": "==20.9"
- },
- "pluggy": {
- "hashes": [
- "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0",
- "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"
- ],
- "index": "pypi",
- "version": "==0.13.1"
- },
- "py": {
- "hashes": [
- "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3",
- "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"
- ],
- "index": "pypi",
- "version": "==1.10.0"
- },
- "pycodestyle": {
- "hashes": [
- "sha256:74abc4e221d393ea5ce1f129ea6903209940c1ecd29e002e8c6933c2b21026e0",
- "sha256:cbc619d09254895b0d12c2c691e237b2e91e9b2ecf5e84c26b35400f93dcfb83",
- "sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a2658de47ed261e3a"
- ],
- "version": "==2.4.0"
- },
- "pyflakes": {
- "hashes": [
- "sha256:9a7662ec724d0120012f6e29d6248ae3727d821bba522a0e6b356eff19126a49",
- "sha256:f661252913bc1dbe7fcfcbf0af0db3f42ab65aabd1a6ca68fe5d466bace94dae"
- ],
- "version": "==2.0.0"
- },
- "pygments": {
- "hashes": [
- "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f",
- "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"
- ],
- "index": "pypi",
- "version": "==2.9.0"
- },
- "pylint": {
- "hashes": [
- "sha256:082a6d461b54f90eea49ca90fff4ee8b6e45e8029e5dbd72f6107ef84f3779c0",
- "sha256:a01cd675eccf6e25b3bdb42be184eb46aaf89187d612ba0fb5f93328ed6b0fd5"
- ],
- "index": "pypi",
- "version": "==2.8.0"
- },
- "pyparsing": {
- "hashes": [
- "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
- "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
- ],
- "index": "pypi",
- "version": "==2.4.7"
- },
- "qemu": {
- "editable": true,
- "path": "."
- },
- "setuptools": {
- "hashes": [
- "sha256:22c7348c6d2976a52632c67f7ab0cdf40147db7789f9aed18734643fe9cf3373",
- "sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e"
- ],
- "markers": "python_version >= '3.6'",
- "version": "==59.6.0"
- },
- "six": {
- "hashes": [
- "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
- "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.16.0"
- },
- "toml": {
- "hashes": [
- "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b",
- "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"
- ],
- "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.10.2"
- },
- "tox": {
- "hashes": [
- "sha256:c60692d92fe759f46c610ac04c03cf0169432d1ff8e981e8ae63e068d0954fc3",
- "sha256:f179cb4043d7dc1339425dd49ab1dd8c916246b0d9173143c1b0af7498a03ab0"
- ],
- "index": "pypi",
- "version": "==3.18.0"
- },
- "typed-ast": {
- "hashes": [
- "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace",
- "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff",
- "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266",
- "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528",
- "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6",
- "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808",
- "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4",
- "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363",
- "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341",
- "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04",
- "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41",
- "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e",
- "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3",
- "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899",
- "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805",
- "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c",
- "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c",
- "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39",
- "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a",
- "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3",
- "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7",
- "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f",
- "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075",
- "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0",
- "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40",
- "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428",
- "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927",
- "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3",
- "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f",
- "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"
- ],
- "markers": "python_version < '3.8' and implementation_name == 'cpython'",
- "version": "==1.4.3"
- },
- "typing-extensions": {
- "hashes": [
- "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497",
- "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342",
- "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"
- ],
- "index": "pypi",
- "version": "==3.10.0.0"
- },
- "urwid": {
- "hashes": [
- "sha256:588bee9c1cb208d0906a9f73c613d2bd32c3ed3702012f51efe318a3f2127eae"
- ],
- "index": "pypi",
- "version": "==2.1.2"
- },
- "urwid-readline": {
- "hashes": [
- "sha256:018020cbc864bb5ed87be17dc26b069eae2755cb29f3a9c569aac3bded1efaf4"
- ],
- "index": "pypi",
- "version": "==0.13"
- },
- "virtualenv": {
- "hashes": [
- "sha256:14fdf849f80dbb29a4eb6caa9875d476ee2a5cf76a5f5415fa2f1606010ab467",
- "sha256:2b0126166ea7c9c3661f5b8e06773d28f83322de7a3ff7d06f0aed18c9de6a76"
- ],
- "index": "pypi",
- "version": "==20.4.7"
- },
- "wrapt": {
- "hashes": [
- "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"
- ],
- "version": "==1.12.1"
- },
- "zipp": {
- "hashes": [
- "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76",
- "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"
- ],
- "index": "pypi",
- "version": "==3.4.1"
- }
- }
-}
diff --git a/python/README.rst b/python/README.rst
index 9c1fceaee73b..d62e71528d24 100644
--- a/python/README.rst
+++ b/python/README.rst
@@ -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``.
diff --git a/python/setup.cfg b/python/setup.cfg
index 564181570654..9e923d97628f 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -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
diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
new file mode 100644
index 000000000000..dfb8abb155f4
--- /dev/null
+++ b/python/tests/minreqs.txt
@@ -0,0 +1,45 @@
+# This file lists the ***oldest possible dependencies*** needed to run
+# "make check" successfully under ***Python 3.6***. It is used primarily
+# by GitLab CI to ensure that our stated minimum versions in setup.cfg
+# are truthful and regularly validated.
+#
+# This file should not contain any dependencies that are not expressed
+# by the [devel] section of setup.cfg, except for transitive
+# dependencies which must be enumerated here explicitly to eliminate
+# dependency resolution ambiguity.
+#
+# When adding new dependencies, pin the very oldest non-yanked version
+# on PyPI that allows the test suite to pass.
+
+# Dependencies for the TUI addon (Required for successful linting)
+urwid==2.1.2
+urwid-readline==0.13
+Pygments==2.9.0
+
+# Dependencies for FUSE support for qom-fuse
+fusepy==2.0.4
+
+# Test-runners, utilities, etc.
+avocado-framework==90.0
+
+# Linters
+flake8==3.6.0
+isort==5.1.2
+mypy==0.780
+pylint==2.8.0
+
+# Transitive flake8 dependencies
+mccabe==0.6.0
+pycodestyle==2.4.0
+pyflakes==2.0.0
+
+# Transitive mypy dependencies
+mypy-extensions==0.4.3
+typed-ast==1.4.0
+typing-extensions==3.7.4
+
+# Transitive pylint dependencies
+astroid==2.5.4
+lazy-object-proxy==1.4.0
+toml==0.10.0
+wrapt==1.12.1
diff --git a/tests/docker/dockerfiles/python.docker b/tests/docker/dockerfiles/python.docker
index 56d88417df4d..175c10a34e89 100644
--- a/tests/docker/dockerfiles/python.docker
+++ b/tests/docker/dockerfiles/python.docker
@@ -7,7 +7,6 @@ MAINTAINER John Snow <jsnow@redhat.com>
ENV PACKAGES \
gcc \
make \
- pipenv \
python3 \
python3-pip \
python3-tox \
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 02/10] python: drop pipenv
2023-02-22 14:37 ` [PATCH 02/10] python: drop pipenv Paolo Bonzini
@ 2023-03-15 21:16 ` Philippe Mathieu-Daudé
2023-03-15 23:02 ` John Snow
0 siblings, 1 reply; 31+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-15 21:16 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel, Jan Richter
Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange,
Beraldo Leal
+Jan
On 22/2/23 15:37, Paolo Bonzini wrote:
> From: John Snow <jsnow@redhat.com>
>
> 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 <jsnow@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> .gitlab-ci.d/static_checks.yml | 4 +-
> python/.gitignore | 4 +-
> python/Makefile | 53 ++--
> python/Pipfile | 13 -
> python/Pipfile.lock | 347 -------------------------
> python/README.rst | 3 -
> 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
>
> diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
> index 289ad1359e3a..b4cbdbce2abf 100644
> --- a/.gitlab-ci.d/static_checks.yml
> +++ b/.gitlab-ci.d/static_checks.yml
> @@ -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:
> diff --git a/python/.gitignore b/python/.gitignore
> index 904f324bb11a..c3ceb1ca0ab1 100644
> --- a/python/.gitignore
> +++ b/python/.gitignore
> @@ -11,8 +11,8 @@ qemu.egg-info/
> .idea/
> .vscode/
>
> -# virtual environments (pipenv et al)
> -.venv/
> +# virtual environments
> +.min-venv/
> .tox/
> .dev-venv/
>
> diff --git a/python/Makefile b/python/Makefile
> index b170708398ab..c5bd6ff83ac9 100644
> --- a/python/Makefile
> +++ b/python/Makefile
> @@ -1,15 +1,16 @@
> QEMU_VENV_DIR=.dev-venv
> +QEMU_MINVENV_DIR=.min-venv
> QEMU_TOX_EXTRA_ARGS ?=
>
> .PHONY: help
> help:
> @echo "python packaging help:"
> @echo ""
> - @echo "make check-pipenv:"
> - @echo " Run tests in pipenv's virtual environment."
> + @echo "make check-minreqs:"
> + @echo " Run tests in the minreqs virtual environment."
> @echo " These tests use the oldest dependencies."
> - @echo " Requires: Python 3.6 and pipenv."
> - @echo " Hint (Fedora): 'sudo dnf install python3.6 pipenv'"
> + @echo " Requires: Python 3.6"
> + @echo " Hint (Fedora): 'sudo dnf install python3.6'"
> @echo ""
> @echo "make check-tox:"
> @echo " Run tests against multiple python versions."
> @@ -33,8 +34,8 @@ help:
> @echo " and install the qemu package in editable mode."
> @echo " (Can be used in or outside of a venv.)"
> @echo ""
> - @echo "make pipenv"
> - @echo " Creates pipenv's virtual environment (.venv)"
> + @echo "make min-venv"
> + @echo " Creates the minreqs virtual environment ($(QEMU_MINVENV_DIR))"
> @echo ""
> @echo "make dev-venv"
> @echo " Creates a simple venv for check-dev. ($(QEMU_VENV_DIR))"
> @@ -43,21 +44,38 @@ help:
> @echo " Remove package build output."
> @echo ""
> @echo "make distclean:"
> - @echo " remove pipenv/venv files, qemu package forwarder,"
> + @echo " remove venv files, qemu package forwarder,"
> @echo " built distribution files, and everything from 'make clean'."
> @echo ""
> @echo -e "Have a nice day ^_^\n"
>
> -.PHONY: pipenv
> -pipenv: .venv
> -.venv: Pipfile.lock
> - @PIPENV_VENV_IN_PROJECT=1 pipenv sync --dev --keep-outdated
> - rm -f pyproject.toml
> - @touch .venv
> +.PHONY: pipenv check-pipenv
> +pipenv check-pipenv:
> + @echo "pipenv was dropped; try 'make check-minreqs' or 'make min-venv'"
> + @exit 1
>
> -.PHONY: check-pipenv
> -check-pipenv: pipenv
> - @pipenv run make check
> +.PHONY: min-venv
> +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)
> + @( \
> + echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
> + . $(QEMU_MINVENV_DIR)/bin/activate; \
> + echo "INSTALL -r tests/minreqs.txt $(QEMU_MINVENV_DIR)";\
> + pip install -r tests/minreqs.txt 1>/dev/null; \
> + echo "INSTALL -e qemu $(QEMU_MINVENV_DIR)"; \
> + pip install -e . 1>/dev/null; \
> + )
> + @touch $(QEMU_MINVENV_DIR)
> +
> +.PHONY: check-minreqs
> +check-minreqs: min-venv
> + @( \
> + echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
> + . $(QEMU_MINVENV_DIR)/bin/activate; \
> + make check; \
> + )
>
> .PHONY: dev-venv
> dev-venv: $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate
> @@ -106,6 +124,7 @@ clean:
>
> .PHONY: distclean
> distclean: clean
> - rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> + rm -rf qemu.egg-info/ .eggs/ dist/
> + rm -rf $(QEMU_VENV_DIR) $(QEMU_MINVENV_DIR) .tox/
> rm -f .coverage .coverage.*
> rm -rf htmlcov/
> diff --git a/python/Pipfile b/python/Pipfile
> deleted file mode 100644
> index e7acb8cefa4d..000000000000
> --- a/python/Pipfile
> +++ /dev/null
> @@ -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"
> diff --git a/python/Pipfile.lock b/python/Pipfile.lock
> deleted file mode 100644
> index ce46404ce084..000000000000
> --- a/python/Pipfile.lock
> +++ /dev/null
> @@ -1,347 +0,0 @@
> -{
> - "_meta": {
> - "hash": {
> - "sha256": "f1a25654d884a5b450e38d78b1f2e3ebb9073e421cc4358d4bbb83ac251a5670"
> - },
> - "pipfile-spec": 6,
> - "requires": {
> - "python_version": "3.6"
> - },
> - "sources": [
> - {
> - "name": "pypi",
> - "url": "https://pypi.org/simple",
> - "verify_ssl": true
> - }
> - ]
> - },
> - "default": {
> - "qemu": {
> - "editable": true,
> - "path": "."
> - }
> - },
> - "develop": {
> - "appdirs": {
> - "hashes": [
> - "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41",
> - "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"
> - ],
> - "version": "==1.4.4"
> - },
> - "astroid": {
> - "hashes": [
> - "sha256:09bdb456e02564731f8b5957cdd0c98a7f01d2db5e90eb1d794c353c28bfd705",
> - "sha256:6a8a51f64dae307f6e0c9db752b66a7951e282389d8362cc1d39a56f3feeb31d"
> - ],
> - "index": "pypi",
> - "version": "==2.6.0"
> - },
> - "avocado-framework": {
> - "hashes": [
> - "sha256:244cb569f8eb4e50a22ac82e1a2b2bba2458999f4281efbe2651bd415d59c65b",
> - "sha256:6f15998b67ecd0e7dde790c4de4dd249d6df52dfe6d5cc4e2dd6596df51c3583"
> - ],
> - "index": "pypi",
> - "version": "==90.0"
> - },
> - "distlib": {
> - "hashes": [
> - "sha256:106fef6dc37dd8c0e2c0a60d3fca3e77460a48907f335fa28420463a6f799736",
> - "sha256:23e223426b28491b1ced97dc3bbe183027419dfc7982b4fa2f05d5f3ff10711c"
> - ],
> - "index": "pypi",
> - "version": "==0.3.2"
> - },
> - "filelock": {
> - "hashes": [
> - "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59",
> - "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"
> - ],
> - "index": "pypi",
> - "version": "==3.0.12"
> - },
> - "flake8": {
> - "hashes": [
> - "sha256:6a35f5b8761f45c5513e3405f110a86bea57982c3b75b766ce7b65217abe1670",
> - "sha256:c01f8a3963b3571a8e6bd7a4063359aff90749e160778e03817cd9b71c9e07d2"
> - ],
> - "index": "pypi",
> - "version": "==3.6.0"
> - },
> - "fusepy": {
> - "hashes": [
> - "sha256:10f5c7f5414241bffecdc333c4d3a725f1d6605cae6b4eaf86a838ff49cdaf6c",
> - "sha256:a9f3a3699080ddcf0919fd1eb2cf743e1f5859ca54c2018632f939bdfac269ee"
> - ],
> - "index": "pypi",
> - "version": "==2.0.4"
> - },
> - "importlib-metadata": {
> - "hashes": [
> - "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83",
> - "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"
> - ],
> - "markers": "python_version < '3.8'",
> - "version": "==1.7.0"
> - },
> - "importlib-resources": {
> - "hashes": [
> - "sha256:54161657e8ffc76596c4ede7080ca68cb02962a2e074a2586b695a93a925d36e",
> - "sha256:e962bff7440364183203d179d7ae9ad90cb1f2b74dcb84300e88ecc42dca3351"
> - ],
> - "index": "pypi",
> - "version": "==5.1.4"
> - },
> - "isort": {
> - "hashes": [
> - "sha256:408e4d75d84f51b64d0824894afee44469eba34a4caee621dc53799f80d71ccc",
> - "sha256:64022dea6a06badfa09b300b4dfe8ba968114a737919e8ed50aea1c288f078aa"
> - ],
> - "index": "pypi",
> - "version": "==5.1.2"
> - },
> - "lazy-object-proxy": {
> - "hashes": [
> - "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653",
> - "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61",
> - "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2",
> - "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837",
> - "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3",
> - "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43",
> - "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726",
> - "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3",
> - "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587",
> - "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8",
> - "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a",
> - "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd",
> - "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f",
> - "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad",
> - "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4",
> - "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b",
> - "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf",
> - "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981",
> - "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741",
> - "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e",
> - "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93",
> - "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"
> - ],
> - "index": "pypi",
> - "version": "==1.6.0"
> - },
> - "mccabe": {
> - "hashes": [
> - "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
> - "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
> - ],
> - "version": "==0.6.1"
> - },
> - "mypy": {
> - "hashes": [
> - "sha256:00cb1964a7476e871d6108341ac9c1a857d6bd20bf5877f4773ac5e9d92cd3cd",
> - "sha256:127de5a9b817a03a98c5ae8a0c46a20dc44442af6dcfa2ae7f96cb519b312efa",
> - "sha256:1f3976a945ad7f0a0727aafdc5651c2d3278e3c88dee94e2bf75cd3386b7b2f4",
> - "sha256:2f8c098f12b402c19b735aec724cc9105cc1a9eea405d08814eb4b14a6fb1a41",
> - "sha256:4ef13b619a289aa025f2273e05e755f8049bb4eaba6d703a425de37d495d178d",
> - "sha256:5d142f219bf8c7894dfa79ebfb7d352c4c63a325e75f10dfb4c3db9417dcd135",
> - "sha256:62eb5dd4ea86bda8ce386f26684f7f26e4bfe6283c9f2b6ca6d17faf704dcfad",
> - "sha256:64c36eb0936d0bfb7d8da49f92c18e312ad2e3ed46e5548ae4ca997b0d33bd59",
> - "sha256:75eed74d2faf2759f79c5f56f17388defd2fc994222312ec54ee921e37b31ad4",
> - "sha256:974bebe3699b9b46278a7f076635d219183da26e1a675c1f8243a69221758273",
> - "sha256:a5e5bb12b7982b179af513dddb06fca12285f0316d74f3964078acbfcf4c68f2",
> - "sha256:d31291df31bafb997952dc0a17ebb2737f802c754aed31dd155a8bfe75112c57",
> - "sha256:d3b4941de44341227ece1caaf5b08b23e42ad4eeb8b603219afb11e9d4cfb437",
> - "sha256:eadb865126da4e3c4c95bdb47fe1bb087a3e3ea14d39a3b13224b8a4d9f9a102"
> - ],
> - "index": "pypi",
> - "version": "==0.780"
> - },
> - "mypy-extensions": {
> - "hashes": [
> - "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d",
> - "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"
> - ],
> - "version": "==0.4.3"
> - },
> - "packaging": {
> - "hashes": [
> - "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5",
> - "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"
> - ],
> - "index": "pypi",
> - "version": "==20.9"
> - },
> - "pluggy": {
> - "hashes": [
> - "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0",
> - "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"
> - ],
> - "index": "pypi",
> - "version": "==0.13.1"
> - },
> - "py": {
> - "hashes": [
> - "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3",
> - "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"
> - ],
> - "index": "pypi",
> - "version": "==1.10.0"
> - },
> - "pycodestyle": {
> - "hashes": [
> - "sha256:74abc4e221d393ea5ce1f129ea6903209940c1ecd29e002e8c6933c2b21026e0",
> - "sha256:cbc619d09254895b0d12c2c691e237b2e91e9b2ecf5e84c26b35400f93dcfb83",
> - "sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a2658de47ed261e3a"
> - ],
> - "version": "==2.4.0"
> - },
> - "pyflakes": {
> - "hashes": [
> - "sha256:9a7662ec724d0120012f6e29d6248ae3727d821bba522a0e6b356eff19126a49",
> - "sha256:f661252913bc1dbe7fcfcbf0af0db3f42ab65aabd1a6ca68fe5d466bace94dae"
> - ],
> - "version": "==2.0.0"
> - },
> - "pygments": {
> - "hashes": [
> - "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f",
> - "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"
> - ],
> - "index": "pypi",
> - "version": "==2.9.0"
> - },
> - "pylint": {
> - "hashes": [
> - "sha256:082a6d461b54f90eea49ca90fff4ee8b6e45e8029e5dbd72f6107ef84f3779c0",
> - "sha256:a01cd675eccf6e25b3bdb42be184eb46aaf89187d612ba0fb5f93328ed6b0fd5"
> - ],
> - "index": "pypi",
> - "version": "==2.8.0"
> - },
> - "pyparsing": {
> - "hashes": [
> - "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
> - "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
> - ],
> - "index": "pypi",
> - "version": "==2.4.7"
> - },
> - "qemu": {
> - "editable": true,
> - "path": "."
> - },
> - "setuptools": {
> - "hashes": [
> - "sha256:22c7348c6d2976a52632c67f7ab0cdf40147db7789f9aed18734643fe9cf3373",
> - "sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e"
> - ],
> - "markers": "python_version >= '3.6'",
> - "version": "==59.6.0"
> - },
> - "six": {
> - "hashes": [
> - "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
> - "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
> - ],
> - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
> - "version": "==1.16.0"
> - },
> - "toml": {
> - "hashes": [
> - "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b",
> - "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"
> - ],
> - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
> - "version": "==0.10.2"
> - },
> - "tox": {
> - "hashes": [
> - "sha256:c60692d92fe759f46c610ac04c03cf0169432d1ff8e981e8ae63e068d0954fc3",
> - "sha256:f179cb4043d7dc1339425dd49ab1dd8c916246b0d9173143c1b0af7498a03ab0"
> - ],
> - "index": "pypi",
> - "version": "==3.18.0"
> - },
> - "typed-ast": {
> - "hashes": [
> - "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace",
> - "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff",
> - "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266",
> - "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528",
> - "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6",
> - "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808",
> - "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4",
> - "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363",
> - "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341",
> - "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04",
> - "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41",
> - "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e",
> - "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3",
> - "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899",
> - "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805",
> - "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c",
> - "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c",
> - "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39",
> - "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a",
> - "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3",
> - "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7",
> - "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f",
> - "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075",
> - "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0",
> - "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40",
> - "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428",
> - "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927",
> - "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3",
> - "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f",
> - "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"
> - ],
> - "markers": "python_version < '3.8' and implementation_name == 'cpython'",
> - "version": "==1.4.3"
> - },
> - "typing-extensions": {
> - "hashes": [
> - "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497",
> - "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342",
> - "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"
> - ],
> - "index": "pypi",
> - "version": "==3.10.0.0"
> - },
> - "urwid": {
> - "hashes": [
> - "sha256:588bee9c1cb208d0906a9f73c613d2bd32c3ed3702012f51efe318a3f2127eae"
> - ],
> - "index": "pypi",
> - "version": "==2.1.2"
> - },
> - "urwid-readline": {
> - "hashes": [
> - "sha256:018020cbc864bb5ed87be17dc26b069eae2755cb29f3a9c569aac3bded1efaf4"
> - ],
> - "index": "pypi",
> - "version": "==0.13"
> - },
> - "virtualenv": {
> - "hashes": [
> - "sha256:14fdf849f80dbb29a4eb6caa9875d476ee2a5cf76a5f5415fa2f1606010ab467",
> - "sha256:2b0126166ea7c9c3661f5b8e06773d28f83322de7a3ff7d06f0aed18c9de6a76"
> - ],
> - "index": "pypi",
> - "version": "==20.4.7"
> - },
> - "wrapt": {
> - "hashes": [
> - "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"
> - ],
> - "version": "==1.12.1"
> - },
> - "zipp": {
> - "hashes": [
> - "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76",
> - "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"
> - ],
> - "index": "pypi",
> - "version": "==3.4.1"
> - }
> - }
> -}
> diff --git a/python/README.rst b/python/README.rst
> index 9c1fceaee73b..d62e71528d24 100644
> --- a/python/README.rst
> +++ b/python/README.rst
> @@ -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``.
> diff --git a/python/setup.cfg b/python/setup.cfg
> index 564181570654..9e923d97628f 100644
> --- a/python/setup.cfg
> +++ b/python/setup.cfg
> @@ -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
Here >= 90,
> flake8 >= 3.6.0
> diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
> new file mode 100644
> index 000000000000..dfb8abb155f4
> --- /dev/null
> +++ b/python/tests/minreqs.txt
> @@ -0,0 +1,45 @@
> +# This file lists the ***oldest possible dependencies*** needed to run
> +# "make check" successfully under ***Python 3.6***. It is used primarily
> +# by GitLab CI to ensure that our stated minimum versions in setup.cfg
> +# are truthful and regularly validated.
> +#
> +# This file should not contain any dependencies that are not expressed
> +# by the [devel] section of setup.cfg, except for transitive
> +# dependencies which must be enumerated here explicitly to eliminate
> +# dependency resolution ambiguity.
> +#
> +# When adding new dependencies, pin the very oldest non-yanked version
> +# on PyPI that allows the test suite to pass.
> +
> +# Dependencies for the TUI addon (Required for successful linting)
> +urwid==2.1.2
> +urwid-readline==0.13
> +Pygments==2.9.0
> +
> +# Dependencies for FUSE support for qom-fuse
> +fusepy==2.0.4
> +
> +# Test-runners, utilities, etc.
> +avocado-framework==90.0
... and here == 90.
Anyhow I'm surprised by unreviewed commit 4320f7172f
("python: bump avocado to v90.0") and we still have:
tests/requirements.txt:5:avocado-framework==88.1
1/ How do you run Avocado tests out of tests/ ?
2/ Can we use Avocado on Darwin/macOS now? I thought we
needed one series from Cleber [*] for that, which is why
QEMU is the last project using the 'old' runner (as opposed
to the 'new' runner which is the upstream /current/ one).
Anyhow this doesn't invalidate your patch, so:
Acked-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[*] https://gitlab.com/cleber.gnu/qemu/-/compare/master...WIP%2Ftests_fixes
> +# Linters
> +flake8==3.6.0
> +isort==5.1.2
> +mypy==0.780
> +pylint==2.8.0
> +
> +# Transitive flake8 dependencies
> +mccabe==0.6.0
> +pycodestyle==2.4.0
> +pyflakes==2.0.0
> +
> +# Transitive mypy dependencies
> +mypy-extensions==0.4.3
> +typed-ast==1.4.0
> +typing-extensions==3.7.4
> +
> +# Transitive pylint dependencies
> +astroid==2.5.4
> +lazy-object-proxy==1.4.0
> +toml==0.10.0
> +wrapt==1.12.1
> diff --git a/tests/docker/dockerfiles/python.docker b/tests/docker/dockerfiles/python.docker
> index 56d88417df4d..175c10a34e89 100644
> --- a/tests/docker/dockerfiles/python.docker
> +++ b/tests/docker/dockerfiles/python.docker
> @@ -7,7 +7,6 @@ MAINTAINER John Snow <jsnow@redhat.com>
> ENV PACKAGES \
> gcc \
> make \
> - pipenv \
> python3 \
> python3-pip \
> python3-tox \
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 02/10] python: drop pipenv
2023-03-15 21:16 ` Philippe Mathieu-Daudé
@ 2023-03-15 23:02 ` John Snow
2023-03-16 8:54 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2023-03-15 23:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Paolo Bonzini, qemu-devel, Jan Richter, peter.maydell, thuth,
alex.bennee, armbru, berrange, Beraldo Leal
On Wed, Mar 15, 2023 at 5:17 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> +Jan
>
> On 22/2/23 15:37, Paolo Bonzini wrote:
> > From: John Snow <jsnow@redhat.com>
> >
> > 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 <jsnow@redhat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> > .gitlab-ci.d/static_checks.yml | 4 +-
> > python/.gitignore | 4 +-
> > python/Makefile | 53 ++--
> > python/Pipfile | 13 -
> > python/Pipfile.lock | 347 -------------------------
> > python/README.rst | 3 -
> > 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
> >
> > diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
> > index 289ad1359e3a..b4cbdbce2abf 100644
> > --- a/.gitlab-ci.d/static_checks.yml
> > +++ b/.gitlab-ci.d/static_checks.yml
> > @@ -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:
> > diff --git a/python/.gitignore b/python/.gitignore
> > index 904f324bb11a..c3ceb1ca0ab1 100644
> > --- a/python/.gitignore
> > +++ b/python/.gitignore
> > @@ -11,8 +11,8 @@ qemu.egg-info/
> > .idea/
> > .vscode/
> >
> > -# virtual environments (pipenv et al)
> > -.venv/
> > +# virtual environments
> > +.min-venv/
> > .tox/
> > .dev-venv/
> >
> > diff --git a/python/Makefile b/python/Makefile
> > index b170708398ab..c5bd6ff83ac9 100644
> > --- a/python/Makefile
> > +++ b/python/Makefile
> > @@ -1,15 +1,16 @@
> > QEMU_VENV_DIR=.dev-venv
> > +QEMU_MINVENV_DIR=.min-venv
> > QEMU_TOX_EXTRA_ARGS ?=
> >
> > .PHONY: help
> > help:
> > @echo "python packaging help:"
> > @echo ""
> > - @echo "make check-pipenv:"
> > - @echo " Run tests in pipenv's virtual environment."
> > + @echo "make check-minreqs:"
> > + @echo " Run tests in the minreqs virtual environment."
> > @echo " These tests use the oldest dependencies."
> > - @echo " Requires: Python 3.6 and pipenv."
> > - @echo " Hint (Fedora): 'sudo dnf install python3.6 pipenv'"
> > + @echo " Requires: Python 3.6"
> > + @echo " Hint (Fedora): 'sudo dnf install python3.6'"
> > @echo ""
> > @echo "make check-tox:"
> > @echo " Run tests against multiple python versions."
> > @@ -33,8 +34,8 @@ help:
> > @echo " and install the qemu package in editable mode."
> > @echo " (Can be used in or outside of a venv.)"
> > @echo ""
> > - @echo "make pipenv"
> > - @echo " Creates pipenv's virtual environment (.venv)"
> > + @echo "make min-venv"
> > + @echo " Creates the minreqs virtual environment ($(QEMU_MINVENV_DIR))"
> > @echo ""
> > @echo "make dev-venv"
> > @echo " Creates a simple venv for check-dev. ($(QEMU_VENV_DIR))"
> > @@ -43,21 +44,38 @@ help:
> > @echo " Remove package build output."
> > @echo ""
> > @echo "make distclean:"
> > - @echo " remove pipenv/venv files, qemu package forwarder,"
> > + @echo " remove venv files, qemu package forwarder,"
> > @echo " built distribution files, and everything from 'make clean'."
> > @echo ""
> > @echo -e "Have a nice day ^_^\n"
> >
> > -.PHONY: pipenv
> > -pipenv: .venv
> > -.venv: Pipfile.lock
> > - @PIPENV_VENV_IN_PROJECT=1 pipenv sync --dev --keep-outdated
> > - rm -f pyproject.toml
> > - @touch .venv
> > +.PHONY: pipenv check-pipenv
> > +pipenv check-pipenv:
> > + @echo "pipenv was dropped; try 'make check-minreqs' or 'make min-venv'"
> > + @exit 1
> >
> > -.PHONY: check-pipenv
> > -check-pipenv: pipenv
> > - @pipenv run make check
> > +.PHONY: min-venv
> > +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)
> > + @( \
> > + echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
> > + . $(QEMU_MINVENV_DIR)/bin/activate; \
> > + echo "INSTALL -r tests/minreqs.txt $(QEMU_MINVENV_DIR)";\
> > + pip install -r tests/minreqs.txt 1>/dev/null; \
> > + echo "INSTALL -e qemu $(QEMU_MINVENV_DIR)"; \
> > + pip install -e . 1>/dev/null; \
> > + )
> > + @touch $(QEMU_MINVENV_DIR)
> > +
> > +.PHONY: check-minreqs
> > +check-minreqs: min-venv
> > + @( \
> > + echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
> > + . $(QEMU_MINVENV_DIR)/bin/activate; \
> > + make check; \
> > + )
> >
> > .PHONY: dev-venv
> > dev-venv: $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate
> > @@ -106,6 +124,7 @@ clean:
> >
> > .PHONY: distclean
> > distclean: clean
> > - rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > + rm -rf qemu.egg-info/ .eggs/ dist/
> > + rm -rf $(QEMU_VENV_DIR) $(QEMU_MINVENV_DIR) .tox/
> > rm -f .coverage .coverage.*
> > rm -rf htmlcov/
> > diff --git a/python/Pipfile b/python/Pipfile
> > deleted file mode 100644
> > index e7acb8cefa4d..000000000000
> > --- a/python/Pipfile
> > +++ /dev/null
> > @@ -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"
> > diff --git a/python/Pipfile.lock b/python/Pipfile.lock
> > deleted file mode 100644
> > index ce46404ce084..000000000000
> > --- a/python/Pipfile.lock
> > +++ /dev/null
> > @@ -1,347 +0,0 @@
> > -{
> > - "_meta": {
> > - "hash": {
> > - "sha256": "f1a25654d884a5b450e38d78b1f2e3ebb9073e421cc4358d4bbb83ac251a5670"
> > - },
> > - "pipfile-spec": 6,
> > - "requires": {
> > - "python_version": "3.6"
> > - },
> > - "sources": [
> > - {
> > - "name": "pypi",
> > - "url": "https://pypi.org/simple",
> > - "verify_ssl": true
> > - }
> > - ]
> > - },
> > - "default": {
> > - "qemu": {
> > - "editable": true,
> > - "path": "."
> > - }
> > - },
> > - "develop": {
> > - "appdirs": {
> > - "hashes": [
> > - "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41",
> > - "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"
> > - ],
> > - "version": "==1.4.4"
> > - },
> > - "astroid": {
> > - "hashes": [
> > - "sha256:09bdb456e02564731f8b5957cdd0c98a7f01d2db5e90eb1d794c353c28bfd705",
> > - "sha256:6a8a51f64dae307f6e0c9db752b66a7951e282389d8362cc1d39a56f3feeb31d"
> > - ],
> > - "index": "pypi",
> > - "version": "==2.6.0"
> > - },
> > - "avocado-framework": {
> > - "hashes": [
> > - "sha256:244cb569f8eb4e50a22ac82e1a2b2bba2458999f4281efbe2651bd415d59c65b",
> > - "sha256:6f15998b67ecd0e7dde790c4de4dd249d6df52dfe6d5cc4e2dd6596df51c3583"
> > - ],
> > - "index": "pypi",
> > - "version": "==90.0"
> > - },
> > - "distlib": {
> > - "hashes": [
> > - "sha256:106fef6dc37dd8c0e2c0a60d3fca3e77460a48907f335fa28420463a6f799736",
> > - "sha256:23e223426b28491b1ced97dc3bbe183027419dfc7982b4fa2f05d5f3ff10711c"
> > - ],
> > - "index": "pypi",
> > - "version": "==0.3.2"
> > - },
> > - "filelock": {
> > - "hashes": [
> > - "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59",
> > - "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"
> > - ],
> > - "index": "pypi",
> > - "version": "==3.0.12"
> > - },
> > - "flake8": {
> > - "hashes": [
> > - "sha256:6a35f5b8761f45c5513e3405f110a86bea57982c3b75b766ce7b65217abe1670",
> > - "sha256:c01f8a3963b3571a8e6bd7a4063359aff90749e160778e03817cd9b71c9e07d2"
> > - ],
> > - "index": "pypi",
> > - "version": "==3.6.0"
> > - },
> > - "fusepy": {
> > - "hashes": [
> > - "sha256:10f5c7f5414241bffecdc333c4d3a725f1d6605cae6b4eaf86a838ff49cdaf6c",
> > - "sha256:a9f3a3699080ddcf0919fd1eb2cf743e1f5859ca54c2018632f939bdfac269ee"
> > - ],
> > - "index": "pypi",
> > - "version": "==2.0.4"
> > - },
> > - "importlib-metadata": {
> > - "hashes": [
> > - "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83",
> > - "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"
> > - ],
> > - "markers": "python_version < '3.8'",
> > - "version": "==1.7.0"
> > - },
> > - "importlib-resources": {
> > - "hashes": [
> > - "sha256:54161657e8ffc76596c4ede7080ca68cb02962a2e074a2586b695a93a925d36e",
> > - "sha256:e962bff7440364183203d179d7ae9ad90cb1f2b74dcb84300e88ecc42dca3351"
> > - ],
> > - "index": "pypi",
> > - "version": "==5.1.4"
> > - },
> > - "isort": {
> > - "hashes": [
> > - "sha256:408e4d75d84f51b64d0824894afee44469eba34a4caee621dc53799f80d71ccc",
> > - "sha256:64022dea6a06badfa09b300b4dfe8ba968114a737919e8ed50aea1c288f078aa"
> > - ],
> > - "index": "pypi",
> > - "version": "==5.1.2"
> > - },
> > - "lazy-object-proxy": {
> > - "hashes": [
> > - "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653",
> > - "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61",
> > - "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2",
> > - "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837",
> > - "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3",
> > - "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43",
> > - "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726",
> > - "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3",
> > - "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587",
> > - "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8",
> > - "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a",
> > - "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd",
> > - "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f",
> > - "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad",
> > - "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4",
> > - "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b",
> > - "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf",
> > - "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981",
> > - "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741",
> > - "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e",
> > - "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93",
> > - "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"
> > - ],
> > - "index": "pypi",
> > - "version": "==1.6.0"
> > - },
> > - "mccabe": {
> > - "hashes": [
> > - "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
> > - "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
> > - ],
> > - "version": "==0.6.1"
> > - },
> > - "mypy": {
> > - "hashes": [
> > - "sha256:00cb1964a7476e871d6108341ac9c1a857d6bd20bf5877f4773ac5e9d92cd3cd",
> > - "sha256:127de5a9b817a03a98c5ae8a0c46a20dc44442af6dcfa2ae7f96cb519b312efa",
> > - "sha256:1f3976a945ad7f0a0727aafdc5651c2d3278e3c88dee94e2bf75cd3386b7b2f4",
> > - "sha256:2f8c098f12b402c19b735aec724cc9105cc1a9eea405d08814eb4b14a6fb1a41",
> > - "sha256:4ef13b619a289aa025f2273e05e755f8049bb4eaba6d703a425de37d495d178d",
> > - "sha256:5d142f219bf8c7894dfa79ebfb7d352c4c63a325e75f10dfb4c3db9417dcd135",
> > - "sha256:62eb5dd4ea86bda8ce386f26684f7f26e4bfe6283c9f2b6ca6d17faf704dcfad",
> > - "sha256:64c36eb0936d0bfb7d8da49f92c18e312ad2e3ed46e5548ae4ca997b0d33bd59",
> > - "sha256:75eed74d2faf2759f79c5f56f17388defd2fc994222312ec54ee921e37b31ad4",
> > - "sha256:974bebe3699b9b46278a7f076635d219183da26e1a675c1f8243a69221758273",
> > - "sha256:a5e5bb12b7982b179af513dddb06fca12285f0316d74f3964078acbfcf4c68f2",
> > - "sha256:d31291df31bafb997952dc0a17ebb2737f802c754aed31dd155a8bfe75112c57",
> > - "sha256:d3b4941de44341227ece1caaf5b08b23e42ad4eeb8b603219afb11e9d4cfb437",
> > - "sha256:eadb865126da4e3c4c95bdb47fe1bb087a3e3ea14d39a3b13224b8a4d9f9a102"
> > - ],
> > - "index": "pypi",
> > - "version": "==0.780"
> > - },
> > - "mypy-extensions": {
> > - "hashes": [
> > - "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d",
> > - "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"
> > - ],
> > - "version": "==0.4.3"
> > - },
> > - "packaging": {
> > - "hashes": [
> > - "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5",
> > - "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"
> > - ],
> > - "index": "pypi",
> > - "version": "==20.9"
> > - },
> > - "pluggy": {
> > - "hashes": [
> > - "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0",
> > - "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"
> > - ],
> > - "index": "pypi",
> > - "version": "==0.13.1"
> > - },
> > - "py": {
> > - "hashes": [
> > - "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3",
> > - "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"
> > - ],
> > - "index": "pypi",
> > - "version": "==1.10.0"
> > - },
> > - "pycodestyle": {
> > - "hashes": [
> > - "sha256:74abc4e221d393ea5ce1f129ea6903209940c1ecd29e002e8c6933c2b21026e0",
> > - "sha256:cbc619d09254895b0d12c2c691e237b2e91e9b2ecf5e84c26b35400f93dcfb83",
> > - "sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a2658de47ed261e3a"
> > - ],
> > - "version": "==2.4.0"
> > - },
> > - "pyflakes": {
> > - "hashes": [
> > - "sha256:9a7662ec724d0120012f6e29d6248ae3727d821bba522a0e6b356eff19126a49",
> > - "sha256:f661252913bc1dbe7fcfcbf0af0db3f42ab65aabd1a6ca68fe5d466bace94dae"
> > - ],
> > - "version": "==2.0.0"
> > - },
> > - "pygments": {
> > - "hashes": [
> > - "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f",
> > - "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"
> > - ],
> > - "index": "pypi",
> > - "version": "==2.9.0"
> > - },
> > - "pylint": {
> > - "hashes": [
> > - "sha256:082a6d461b54f90eea49ca90fff4ee8b6e45e8029e5dbd72f6107ef84f3779c0",
> > - "sha256:a01cd675eccf6e25b3bdb42be184eb46aaf89187d612ba0fb5f93328ed6b0fd5"
> > - ],
> > - "index": "pypi",
> > - "version": "==2.8.0"
> > - },
> > - "pyparsing": {
> > - "hashes": [
> > - "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
> > - "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
> > - ],
> > - "index": "pypi",
> > - "version": "==2.4.7"
> > - },
> > - "qemu": {
> > - "editable": true,
> > - "path": "."
> > - },
> > - "setuptools": {
> > - "hashes": [
> > - "sha256:22c7348c6d2976a52632c67f7ab0cdf40147db7789f9aed18734643fe9cf3373",
> > - "sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e"
> > - ],
> > - "markers": "python_version >= '3.6'",
> > - "version": "==59.6.0"
> > - },
> > - "six": {
> > - "hashes": [
> > - "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
> > - "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
> > - ],
> > - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
> > - "version": "==1.16.0"
> > - },
> > - "toml": {
> > - "hashes": [
> > - "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b",
> > - "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"
> > - ],
> > - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
> > - "version": "==0.10.2"
> > - },
> > - "tox": {
> > - "hashes": [
> > - "sha256:c60692d92fe759f46c610ac04c03cf0169432d1ff8e981e8ae63e068d0954fc3",
> > - "sha256:f179cb4043d7dc1339425dd49ab1dd8c916246b0d9173143c1b0af7498a03ab0"
> > - ],
> > - "index": "pypi",
> > - "version": "==3.18.0"
> > - },
> > - "typed-ast": {
> > - "hashes": [
> > - "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace",
> > - "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff",
> > - "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266",
> > - "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528",
> > - "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6",
> > - "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808",
> > - "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4",
> > - "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363",
> > - "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341",
> > - "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04",
> > - "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41",
> > - "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e",
> > - "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3",
> > - "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899",
> > - "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805",
> > - "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c",
> > - "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c",
> > - "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39",
> > - "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a",
> > - "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3",
> > - "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7",
> > - "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f",
> > - "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075",
> > - "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0",
> > - "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40",
> > - "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428",
> > - "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927",
> > - "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3",
> > - "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f",
> > - "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"
> > - ],
> > - "markers": "python_version < '3.8' and implementation_name == 'cpython'",
> > - "version": "==1.4.3"
> > - },
> > - "typing-extensions": {
> > - "hashes": [
> > - "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497",
> > - "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342",
> > - "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"
> > - ],
> > - "index": "pypi",
> > - "version": "==3.10.0.0"
> > - },
> > - "urwid": {
> > - "hashes": [
> > - "sha256:588bee9c1cb208d0906a9f73c613d2bd32c3ed3702012f51efe318a3f2127eae"
> > - ],
> > - "index": "pypi",
> > - "version": "==2.1.2"
> > - },
> > - "urwid-readline": {
> > - "hashes": [
> > - "sha256:018020cbc864bb5ed87be17dc26b069eae2755cb29f3a9c569aac3bded1efaf4"
> > - ],
> > - "index": "pypi",
> > - "version": "==0.13"
> > - },
> > - "virtualenv": {
> > - "hashes": [
> > - "sha256:14fdf849f80dbb29a4eb6caa9875d476ee2a5cf76a5f5415fa2f1606010ab467",
> > - "sha256:2b0126166ea7c9c3661f5b8e06773d28f83322de7a3ff7d06f0aed18c9de6a76"
> > - ],
> > - "index": "pypi",
> > - "version": "==20.4.7"
> > - },
> > - "wrapt": {
> > - "hashes": [
> > - "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"
> > - ],
> > - "version": "==1.12.1"
> > - },
> > - "zipp": {
> > - "hashes": [
> > - "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76",
> > - "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"
> > - ],
> > - "index": "pypi",
> > - "version": "==3.4.1"
> > - }
> > - }
> > -}
> > diff --git a/python/README.rst b/python/README.rst
> > index 9c1fceaee73b..d62e71528d24 100644
> > --- a/python/README.rst
> > +++ b/python/README.rst
> > @@ -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``.
> > diff --git a/python/setup.cfg b/python/setup.cfg
> > index 564181570654..9e923d97628f 100644
> > --- a/python/setup.cfg
> > +++ b/python/setup.cfg
> > @@ -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
>
> Here >= 90,
Yes. The "devel" group for the python packages here requires
avocado-framework 90.0 or better... to run the tests *on the python
package*.
>
> > flake8 >= 3.6.0
> > diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
> > new file mode 100644
> > index 000000000000..dfb8abb155f4
> > --- /dev/null
> > +++ b/python/tests/minreqs.txt
> > @@ -0,0 +1,45 @@
> > +# This file lists the ***oldest possible dependencies*** needed to run
> > +# "make check" successfully under ***Python 3.6***. It is used primarily
> > +# by GitLab CI to ensure that our stated minimum versions in setup.cfg
> > +# are truthful and regularly validated.
> > +#
> > +# This file should not contain any dependencies that are not expressed
> > +# by the [devel] section of setup.cfg, except for transitive
> > +# dependencies which must be enumerated here explicitly to eliminate
> > +# dependency resolution ambiguity.
> > +#
> > +# When adding new dependencies, pin the very oldest non-yanked version
> > +# on PyPI that allows the test suite to pass.
> > +
> > +# Dependencies for the TUI addon (Required for successful linting)
> > +urwid==2.1.2
> > +urwid-readline==0.13
> > +Pygments==2.9.0
> > +
> > +# Dependencies for FUSE support for qom-fuse
> > +fusepy==2.0.4
> > +
> > +# Test-runners, utilities, etc.
> > +avocado-framework==90.0
>
> ... and here == 90.
Yes. This is the minimum requirements file for the purposes of testing
the python code via CI ("python-check-minreqs").
It installs *exactly* version 90.0 to ensure that there are no
avocado-framework features used in later versions that have
accidentally slipped in.
>
> Anyhow I'm surprised by unreviewed commit 4320f7172f
> ("python: bump avocado to v90.0") and we still have:
The implication being that it wouldn't have passed review?
>
> tests/requirements.txt:5:avocado-framework==88.1
Developing the python code needs avocado >= 90,
running the avocado tests needs avocado==88.1.
>
> 1/ How do you run Avocado tests out of tests/ ?
"make check-avocado", the same as anyone else, I assume.
>
> 2/ Can we use Avocado on Darwin/macOS now? I thought we
> needed one series from Cleber [*] for that, which is why
> QEMU is the last project using the 'old' runner (as opposed
> to the 'new' runner which is the upstream /current/ one).
I have no idea. I'm going to guess that you're wondering if you can
run the avocado *qemu* tests on Darwin/macOS, and I wouldn't know - I
don't develop avocado or those tests, and I don't have a mac.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 02/10] python: drop pipenv
2023-03-15 23:02 ` John Snow
@ 2023-03-16 8:54 ` Philippe Mathieu-Daudé
2023-03-16 10:49 ` Jan Richter
2023-03-16 14:26 ` John Snow
0 siblings, 2 replies; 31+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-16 8:54 UTC (permalink / raw)
To: John Snow
Cc: Paolo Bonzini, qemu-devel, Jan Richter, peter.maydell, thuth,
alex.bennee, armbru, berrange, Beraldo Leal
On 16/3/23 00:02, John Snow wrote:
> On Wed, Mar 15, 2023 at 5:17 PM Philippe Mathieu-Daudé
> <philmd@linaro.org> wrote:
>>
>> +Jan
>>
>> On 22/2/23 15:37, Paolo Bonzini wrote:
>>> From: John Snow <jsnow@redhat.com>
>>>
>>> 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 <jsnow@redhat.com>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>> .gitlab-ci.d/static_checks.yml | 4 +-
>>> python/.gitignore | 4 +-
>>> python/Makefile | 53 ++--
>>> python/Pipfile | 13 -
>>> python/Pipfile.lock | 347 -------------------------
>>> python/README.rst | 3 -
>>> 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
>>> diff --git a/python/setup.cfg b/python/setup.cfg
>>> index 564181570654..9e923d97628f 100644
>>> --- a/python/setup.cfg
>>> +++ b/python/setup.cfg
>>> @@ -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
>>
>> Here >= 90,
>
> Yes. The "devel" group for the python packages here requires
> avocado-framework 90.0 or better... to run the tests *on the python
> package*.
>
>>
>>> flake8 >= 3.6.0
>>> diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
>>> new file mode 100644
>>> index 000000000000..dfb8abb155f4
>>> --- /dev/null
>>> +++ b/python/tests/minreqs.txt
>>> @@ -0,0 +1,45 @@
>>> +# This file lists the ***oldest possible dependencies*** needed to run
>>> +# "make check" successfully under ***Python 3.6***. It is used primarily
>>> +# by GitLab CI to ensure that our stated minimum versions in setup.cfg
>>> +# are truthful and regularly validated.
>>> +#
>>> +# This file should not contain any dependencies that are not expressed
>>> +# by the [devel] section of setup.cfg, except for transitive
>>> +# dependencies which must be enumerated here explicitly to eliminate
>>> +# dependency resolution ambiguity.
>>> +#
>>> +# When adding new dependencies, pin the very oldest non-yanked version
>>> +# on PyPI that allows the test suite to pass.
>>> +
>>> +# Dependencies for the TUI addon (Required for successful linting)
>>> +urwid==2.1.2
>>> +urwid-readline==0.13
>>> +Pygments==2.9.0
>>> +
>>> +# Dependencies for FUSE support for qom-fuse
>>> +fusepy==2.0.4
>>> +
>>> +# Test-runners, utilities, etc.
>>> +avocado-framework==90.0
>>
>> ... and here == 90.
>
> Yes. This is the minimum requirements file for the purposes of testing
> the python code via CI ("python-check-minreqs").
> It installs *exactly* version 90.0 to ensure that there are no
> avocado-framework features used in later versions that have
> accidentally slipped in.
>
>>
>> Anyhow I'm surprised by unreviewed commit 4320f7172f
>> ("python: bump avocado to v90.0") and we still have:
>
> The implication being that it wouldn't have passed review?
I want to use Avocado 90+ since more than 1 year now as this
would make my maintainer life easier, but "something" was missing
and Cleber said he'd address that, then we could move to v90.
I suppose the qemu.qmp package is not tested on Darwin/macOS,
or is not tested with Avocado.
>> tests/requirements.txt:5:avocado-framework==88.1
>
> Developing the python code needs avocado >= 90,
What do you mean by "Developing the python code"?
> running the avocado tests needs avocado==88.1.
>
>>
>> 1/ How do you run Avocado tests out of tests/ ?
>
> "make check-avocado", the same as anyone else, I assume.
>
>>
>> 2/ Can we use Avocado on Darwin/macOS now? I thought we
>> needed one series from Cleber [*] for that, which is why
>> QEMU is the last project using the 'old' runner (as opposed
>> to the 'new' runner which is the upstream /current/ one).
>
> I have no idea. I'm going to guess that you're wondering if you can
> run the avocado *qemu* tests on Darwin/macOS, and I wouldn't know - I
> don't develop avocado or those tests, and I don't have a mac.
Well currently we can not run Avocado on Darwin/macOS (at least since
macOS Big Sur which is where I started).
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 02/10] python: drop pipenv
2023-03-16 8:54 ` Philippe Mathieu-Daudé
@ 2023-03-16 10:49 ` Jan Richter
2023-03-16 14:26 ` John Snow
1 sibling, 0 replies; 31+ messages in thread
From: Jan Richter @ 2023-03-16 10:49 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, John Snow
Cc: Paolo Bonzini, qemu-devel, peter.maydell, thuth, alex.bennee,
armbru, berrange, Beraldo Leal
On 3/16/23 09:54, Philippe Mathieu-Daudé wrote:
> On 16/3/23 00:02, John Snow wrote:
>> On Wed, Mar 15, 2023 at 5:17 PM Philippe Mathieu-Daudé
>> <philmd@linaro.org> wrote:
>>>
>>> +Jan
>>>
>>> On 22/2/23 15:37, Paolo Bonzini wrote:
>>>> From: John Snow <jsnow@redhat.com>
>>>>
>>>> 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 <jsnow@redhat.com>
>>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>> ---
>>>> .gitlab-ci.d/static_checks.yml | 4 +-
>>>> python/.gitignore | 4 +-
>>>> python/Makefile | 53 ++--
>>>> python/Pipfile | 13 -
>>>> python/Pipfile.lock | 347
>>>> -------------------------
>>>> python/README.rst | 3 -
>>>> 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
>
>
>>>> diff --git a/python/setup.cfg b/python/setup.cfg
>>>> index 564181570654..9e923d97628f 100644
>>>> --- a/python/setup.cfg
>>>> +++ b/python/setup.cfg
>>>> @@ -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
>>>
>>> Here >= 90,
>>
>> Yes. The "devel" group for the python packages here requires
>> avocado-framework 90.0 or better... to run the tests *on the python
>> package*.
>>
>>>
>>>> flake8 >= 3.6.0
>>>> diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
>>>> new file mode 100644
>>>> index 000000000000..dfb8abb155f4
>>>> --- /dev/null
>>>> +++ b/python/tests/minreqs.txt
>>>> @@ -0,0 +1,45 @@
>>>> +# This file lists the ***oldest possible dependencies*** needed to run
>>>> +# "make check" successfully under ***Python 3.6***. It is used
>>>> primarily
>>>> +# by GitLab CI to ensure that our stated minimum versions in setup.cfg
>>>> +# are truthful and regularly validated.
>>>> +#
>>>> +# This file should not contain any dependencies that are not expressed
>>>> +# by the [devel] section of setup.cfg, except for transitive
>>>> +# dependencies which must be enumerated here explicitly to eliminate
>>>> +# dependency resolution ambiguity.
>>>> +#
>>>> +# When adding new dependencies, pin the very oldest non-yanked version
>>>> +# on PyPI that allows the test suite to pass.
>>>> +
>>>> +# Dependencies for the TUI addon (Required for successful linting)
>>>> +urwid==2.1.2
>>>> +urwid-readline==0.13
>>>> +Pygments==2.9.0
>>>> +
>>>> +# Dependencies for FUSE support for qom-fuse
>>>> +fusepy==2.0.4
>>>> +
>>>> +# Test-runners, utilities, etc.
>>>> +avocado-framework==90.0
>>>
>>> ... and here == 90.
>>
>> Yes. This is the minimum requirements file for the purposes of testing
>> the python code via CI ("python-check-minreqs").
>> It installs *exactly* version 90.0 to ensure that there are no
>> avocado-framework features used in later versions that have
>> accidentally slipped in.
>>
>>>
>>> Anyhow I'm surprised by unreviewed commit 4320f7172f
>>> ("python: bump avocado to v90.0") and we still have:
>>
>> The implication being that it wouldn't have passed review?
>
> I want to use Avocado 90+ since more than 1 year now as this
> would make my maintainer life easier, but "something" was missing
> and Cleber said he'd address that, then we could move to v90.
Right now in avocado team, we are working on preparations for avocado
103LTS version which will be released in three months and AFAIK Cleber
is preparing patch to enable the avocado nrunner and smooth migration of
tests to avocado 103LTS.
>
> I suppose the qemu.qmp package is not tested on Darwin/macOS,
> or is not tested with Avocado.
>
>>> tests/requirements.txt:5:avocado-framework==88.1
>>
>> Developing the python code needs avocado >= 90,
>
> What do you mean by "Developing the python code"?
>
>> running the avocado tests needs avocado==88.1.
>>
>>>
>>> 1/ How do you run Avocado tests out of tests/ ?
>>
>> "make check-avocado", the same as anyone else, I assume.
>>
>>>
>>> 2/ Can we use Avocado on Darwin/macOS now? I thought we
>>> needed one series from Cleber [*] for that, which is why
>>> QEMU is the last project using the 'old' runner (as opposed
>>> to the 'new' runner which is the upstream /current/ one).
>>
>> I have no idea. I'm going to guess that you're wondering if you can
>> run the avocado *qemu* tests on Darwin/macOS, and I wouldn't know - I
>> don't develop avocado or those tests, and I don't have a mac.
>
> Well currently we can not run Avocado on Darwin/macOS (at least since
> macOS Big Sur which is where I started).
Avocado doesn't official support macOS, but Cleber just have created a
patch [1] which might make avocado tests available on macOS in the
future. But unfortunately still without official support.
[1] https://github.com/avocado-framework/avocado/pull/5622
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 02/10] python: drop pipenv
2023-03-16 8:54 ` Philippe Mathieu-Daudé
2023-03-16 10:49 ` Jan Richter
@ 2023-03-16 14:26 ` John Snow
1 sibling, 0 replies; 31+ messages in thread
From: John Snow @ 2023-03-16 14:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Paolo Bonzini, qemu-devel, Jan Richter, peter.maydell, thuth,
alex.bennee, armbru, berrange, Beraldo Leal
On Thu, Mar 16, 2023 at 4:54 AM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> On 16/3/23 00:02, John Snow wrote:
> > On Wed, Mar 15, 2023 at 5:17 PM Philippe Mathieu-Daudé
> > <philmd@linaro.org> wrote:
> >>
> >> +Jan
> >>
> >> On 22/2/23 15:37, Paolo Bonzini wrote:
> >>> From: John Snow <jsnow@redhat.com>
> >>>
> >>> 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 <jsnow@redhat.com>
> >>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >>> ---
> >>> .gitlab-ci.d/static_checks.yml | 4 +-
> >>> python/.gitignore | 4 +-
> >>> python/Makefile | 53 ++--
> >>> python/Pipfile | 13 -
> >>> python/Pipfile.lock | 347 -------------------------
> >>> python/README.rst | 3 -
> >>> 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
>
>
> >>> diff --git a/python/setup.cfg b/python/setup.cfg
> >>> index 564181570654..9e923d97628f 100644
> >>> --- a/python/setup.cfg
> >>> +++ b/python/setup.cfg
> >>> @@ -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
> >>
> >> Here >= 90,
> >
> > Yes. The "devel" group for the python packages here requires
> > avocado-framework 90.0 or better... to run the tests *on the python
> > package*.
> >
> >>
> >>> flake8 >= 3.6.0
> >>> diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
> >>> new file mode 100644
> >>> index 000000000000..dfb8abb155f4
> >>> --- /dev/null
> >>> +++ b/python/tests/minreqs.txt
> >>> @@ -0,0 +1,45 @@
> >>> +# This file lists the ***oldest possible dependencies*** needed to run
> >>> +# "make check" successfully under ***Python 3.6***. It is used primarily
> >>> +# by GitLab CI to ensure that our stated minimum versions in setup.cfg
> >>> +# are truthful and regularly validated.
> >>> +#
> >>> +# This file should not contain any dependencies that are not expressed
> >>> +# by the [devel] section of setup.cfg, except for transitive
> >>> +# dependencies which must be enumerated here explicitly to eliminate
> >>> +# dependency resolution ambiguity.
> >>> +#
> >>> +# When adding new dependencies, pin the very oldest non-yanked version
> >>> +# on PyPI that allows the test suite to pass.
> >>> +
> >>> +# Dependencies for the TUI addon (Required for successful linting)
> >>> +urwid==2.1.2
> >>> +urwid-readline==0.13
> >>> +Pygments==2.9.0
> >>> +
> >>> +# Dependencies for FUSE support for qom-fuse
> >>> +fusepy==2.0.4
> >>> +
> >>> +# Test-runners, utilities, etc.
> >>> +avocado-framework==90.0
> >>
> >> ... and here == 90.
> >
> > Yes. This is the minimum requirements file for the purposes of testing
> > the python code via CI ("python-check-minreqs").
> > It installs *exactly* version 90.0 to ensure that there are no
> > avocado-framework features used in later versions that have
> > accidentally slipped in.
> >
> >>
> >> Anyhow I'm surprised by unreviewed commit 4320f7172f
> >> ("python: bump avocado to v90.0") and we still have:
> >
> > The implication being that it wouldn't have passed review?
>
> I want to use Avocado 90+ since more than 1 year now as this
> would make my maintainer life easier, but "something" was missing
> and Cleber said he'd address that, then we could move to v90.
>
> I suppose the qemu.qmp package is not tested on Darwin/macOS,
> or is not tested with Avocado.
>
Ah, that's true. I don't have a mac and the CI tests *on* the qemu.qmp
code run under Fedora. I don't know what stops us from running them on
mac at all, but I haven't tried.
> >> tests/requirements.txt:5:avocado-framework==88.1
> >
> > Developing the python code needs avocado >= 90,
>
> What do you mean by "Developing the python code"?
>
cd qemu.git/python && make check-dev
The [devel] group of requisites are used to install requisites for
linting and running various tools on the python code itself. It's also
used for "check-tox" or "check-minreqs" which all behave slightly
differently, but ultimately do the same thing. Try "make help" to see
a nice summary.
> > running the avocado tests needs avocado==88.1.
> >
> >>
> >> 1/ How do you run Avocado tests out of tests/ ?
> >
> > "make check-avocado", the same as anyone else, I assume.
> >
> >>
> >> 2/ Can we use Avocado on Darwin/macOS now? I thought we
> >> needed one series from Cleber [*] for that, which is why
> >> QEMU is the last project using the 'old' runner (as opposed
> >> to the 'new' runner which is the upstream /current/ one).
> >
> > I have no idea. I'm going to guess that you're wondering if you can
> > run the avocado *qemu* tests on Darwin/macOS, and I wouldn't know - I
> > don't develop avocado or those tests, and I don't have a mac.
>
> Well currently we can not run Avocado on Darwin/macOS (at least since
> macOS Big Sur which is where I started).
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 03/10] meson: prefer 'sphinx-build' to 'sphinx-build-3'
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
2023-02-22 14:37 ` [PATCH 01/10] python: support pylint 2.16 Paolo Bonzini
2023-02-22 14:37 ` [PATCH 02/10] python: drop pipenv Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 16:26 ` Markus Armbruster
2023-02-22 14:37 ` [PATCH 04/10] configure: protect against escaping venv when running Meson Paolo Bonzini
` (7 subsequent siblings)
10 siblings, 1 reply; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
From: John Snow <jsnow@redhat.com>
Once upon a time, "sphinx-build" on certain RPM platforms invoked
specifically a Python 2.x version, while "sphinx-build-3" was a distro
shim for the Python 3.x version.
These days, none of our supported platforms utilize a 2.x version, so it
should be safe to search for 'sphinx-build' prior to 'sphinx-build-3',
which will prefer pip/venv installed versions of sphinx if they're
available.
This adds an extremely convenient ability to test document building
ability in QEMU across multiple versions of Sphinx for the purposes of
compatibility testing.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230221012456.2607692-6-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/meson.build b/docs/meson.build
index 9136fed3b730..906034f9a87f 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -1,5 +1,5 @@
if get_option('sphinx_build') == ''
- sphinx_build = find_program(['sphinx-build-3', 'sphinx-build'],
+ sphinx_build = find_program(['sphinx-build', 'sphinx-build-3'],
required: get_option('docs'))
else
sphinx_build = find_program(get_option('sphinx_build'),
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 03/10] meson: prefer 'sphinx-build' to 'sphinx-build-3'
2023-02-22 14:37 ` [PATCH 03/10] meson: prefer 'sphinx-build' to 'sphinx-build-3' Paolo Bonzini
@ 2023-02-22 16:26 ` Markus Armbruster
2023-02-22 16:53 ` Paolo Bonzini
0 siblings, 1 reply; 31+ messages in thread
From: Markus Armbruster @ 2023-02-22 16:26 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, berrange
Paolo Bonzini <pbonzini@redhat.com> writes:
> From: John Snow <jsnow@redhat.com>
>
> Once upon a time, "sphinx-build" on certain RPM platforms invoked
> specifically a Python 2.x version, while "sphinx-build-3" was a distro
> shim for the Python 3.x version.
>
> These days, none of our supported platforms utilize a 2.x version, so it
> should be safe to search for 'sphinx-build' prior to 'sphinx-build-3',
> which will prefer pip/venv installed versions of sphinx if they're
> available.
>
> This adds an extremely convenient ability to test document building
> ability in QEMU across multiple versions of Sphinx for the purposes of
> compatibility testing.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Message-Id: <20230221012456.2607692-6-jsnow@redhat.com>
Accident?
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> docs/meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/docs/meson.build b/docs/meson.build
> index 9136fed3b730..906034f9a87f 100644
> --- a/docs/meson.build
> +++ b/docs/meson.build
> @@ -1,5 +1,5 @@
> if get_option('sphinx_build') == ''
> - sphinx_build = find_program(['sphinx-build-3', 'sphinx-build'],
> + sphinx_build = find_program(['sphinx-build', 'sphinx-build-3'],
> required: get_option('docs'))
> else
> sphinx_build = find_program(get_option('sphinx_build'),
In review of the original "[PATCH v3 5/6] meson: prefer 'sphinx-build'
to 'sphinx-build-3'", I challenged the check for sphinx-build-3.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 03/10] meson: prefer 'sphinx-build' to 'sphinx-build-3'
2023-02-22 16:26 ` Markus Armbruster
@ 2023-02-22 16:53 ` Paolo Bonzini
0 siblings, 0 replies; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 16:53 UTC (permalink / raw)
To: Markus Armbruster
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, berrange
On 2/22/23 17:26, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> From: John Snow <jsnow@redhat.com>
>>
>> Once upon a time, "sphinx-build" on certain RPM platforms invoked
>> specifically a Python 2.x version, while "sphinx-build-3" was a distro
>> shim for the Python 3.x version.
>>
>> These days, none of our supported platforms utilize a 2.x version, so it
>> should be safe to search for 'sphinx-build' prior to 'sphinx-build-3',
>> which will prefer pip/venv installed versions of sphinx if they're
>> available.
>>
>> This adds an extremely convenient ability to test document building
>> ability in QEMU across multiple versions of Sphinx for the purposes of
>> compatibility testing.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> Message-Id: <20230221012456.2607692-6-jsnow@redhat.com>
>
> Accident?
No but I can remove it.
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> docs/meson.build | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/docs/meson.build b/docs/meson.build
>> index 9136fed3b730..906034f9a87f 100644
>> --- a/docs/meson.build
>> +++ b/docs/meson.build
>> @@ -1,5 +1,5 @@
>> if get_option('sphinx_build') == ''
>> - sphinx_build = find_program(['sphinx-build-3', 'sphinx-build'],
>> + sphinx_build = find_program(['sphinx-build', 'sphinx-build-3'],
>> required: get_option('docs'))
>> else
>> sphinx_build = find_program(get_option('sphinx_build'),
>
> In review of the original "[PATCH v3 5/6] meson: prefer 'sphinx-build'
> to 'sphinx-build-3'", I challenged the check for sphinx-build-3.
I missed your message from this morning. I can remove this.
Paolo
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 04/10] configure: protect against escaping venv when running Meson
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (2 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 03/10] meson: prefer 'sphinx-build' to 'sphinx-build-3' Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 15:04 ` Daniel P. Berrangé
2023-02-22 14:37 ` [PATCH 05/10] configure: Look for auxiliary Python installations Paolo Bonzini
` (6 subsequent siblings)
10 siblings, 1 reply; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
If neither --python nor --meson are specified, Meson's generated
build.ninja will invoke Python script using the interpreter *that Meson
itself is running under*; not the one identified by configure.
This is only an issue if Meson's Python interpreter is not "the first
one in the path", which is the one that is used if --python is not
specified. A common case where this happen is when the "python3" binary
comes from a virtual environment but Meson is not installed (with pip)
in the virtual environment. In this case (presumably) whoever set up
the venv wanted to use the venv's Python interpreter to build QEMU,
while Meson might use a different one, for example an enterprise
distro's older runtime.
So, detect whether a virtual environment is setup, and if the virtual
environment does not have Meson, use the meson submodule. Meson will
then run under the virtual environment's Python interpreter.
Reported-by: John Snow <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 00415f0b48d7..4d66a958023e 100755
--- a/configure
+++ b/configure
@@ -1047,8 +1047,18 @@ fi
# Suppress writing compiled files
python="$python -B"
+has_meson() {
+ if test "${VIRTUAL_ENV:+set}" = set; then
+ # Ensure that Meson and Python come from the same virtual environment
+ test -x "${VIRTUAL_ENV}/bin/meson" &&
+ test "$(command -v meson)" -ef "${VIRTUAL_ENV}/bin/meson"
+ else
+ has meson
+ fi
+}
+
if test -z "$meson"; then
- if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.61.5; then
+ if test "$explicit_python" = no && has_meson && version_ge "$(meson --version)" 0.61.5; then
meson=meson
elif test "$git_submodules_action" != 'ignore' ; then
meson=git
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 04/10] configure: protect against escaping venv when running Meson
2023-02-22 14:37 ` [PATCH 04/10] configure: protect against escaping venv when running Meson Paolo Bonzini
@ 2023-02-22 15:04 ` Daniel P. Berrangé
2023-02-22 15:25 ` Paolo Bonzini
0 siblings, 1 reply; 31+ messages in thread
From: Daniel P. Berrangé @ 2023-02-22 15:04 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 03:37:46PM +0100, Paolo Bonzini wrote:
> If neither --python nor --meson are specified, Meson's generated
> build.ninja will invoke Python script using the interpreter *that Meson
> itself is running under*; not the one identified by configure.
>
> This is only an issue if Meson's Python interpreter is not "the first
> one in the path", which is the one that is used if --python is not
> specified. A common case where this happen is when the "python3" binary
> comes from a virtual environment but Meson is not installed (with pip)
> in the virtual environment. In this case (presumably) whoever set up
> the venv wanted to use the venv's Python interpreter to build QEMU,
> while Meson might use a different one, for example an enterprise
> distro's older runtime.
>
> So, detect whether a virtual environment is setup, and if the virtual
> environment does not have Meson, use the meson submodule. Meson will
> then run under the virtual environment's Python interpreter.
I fear this could be somewhat confusing to contributors. If I have
meson in my $PATH, at a sufficient version, it would be surprising
to find QEMU had been using a different version instead.
I can understand wanting to make it "just work", but should we
perhaps issue a warning from configure when we're intentionally
ignoring an otherwise valid meson installation ?
>
> Reported-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 00415f0b48d7..4d66a958023e 100755
> --- a/configure
> +++ b/configure
> @@ -1047,8 +1047,18 @@ fi
> # Suppress writing compiled files
> python="$python -B"
>
> +has_meson() {
> + if test "${VIRTUAL_ENV:+set}" = set; then
> + # Ensure that Meson and Python come from the same virtual environment
> + test -x "${VIRTUAL_ENV}/bin/meson" &&
> + test "$(command -v meson)" -ef "${VIRTUAL_ENV}/bin/meson"
> + else
> + has meson
> + fi
> +}
> +
> if test -z "$meson"; then
> - if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.61.5; then
> + if test "$explicit_python" = no && has_meson && version_ge "$(meson --version)" 0.61.5; then
> meson=meson
> elif test "$git_submodules_action" != 'ignore' ; then
> meson=git
> --
> 2.39.1
>
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 :|
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 04/10] configure: protect against escaping venv when running Meson
2023-02-22 15:04 ` Daniel P. Berrangé
@ 2023-02-22 15:25 ` Paolo Bonzini
0 siblings, 0 replies; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 15:25 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 4:04 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > So, detect whether a virtual environment is setup, and if the virtual
> > environment does not have Meson, use the meson submodule. Meson will
> > then run under the virtual environment's Python interpreter.
>
> I fear this could be somewhat confusing to contributors. If I have
> meson in my $PATH, at a sufficient version, it would be surprising
> to find QEMU had been using a different version instead.
>
> I can understand wanting to make it "just work", but should we
> perhaps issue a warning from configure when we're intentionally
> ignoring an otherwise valid meson installation ?
I don't think a warning is needed. First, the exact Meson version
should be pretty much neutral to the rest of the build system, and
QEMU should ship a good one (Meson's .0 releases aren't of the best
quality). Second, after all the user has _not_ specified --meson at
all in this scenario.
FWIW I think --sphinx-build and --meson should go away, and the single
way to invoke Python packages should be through $python. This means
that sphinx-build would have to be installed in $python's search path
or, in the future, installed via pip (same for meson once we decide
that it's okay to remove the bundled copy).
Overall, the result will be much more intuitive even if it may seem to
be a "less standard" setup. Both sphinx-build's and meson's
interpreters influence which interpreter is used during the build, and
it's confusing if it is anything but --python.
Paolo
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 05/10] configure: Look for auxiliary Python installations
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (3 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 04/10] configure: protect against escaping venv when running Meson Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 15:19 ` Daniel P. Berrangé
2023-02-22 14:37 ` [PATCH 06/10] lcitool: update submodule Paolo Bonzini
` (5 subsequent siblings)
10 siblings, 1 reply; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
From: John Snow <jsnow@redhat.com>
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 use whatever is specified in $PYTHON or, if
empty, will try the following in order:
1. python3
2. python
3. 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.
Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 63 ++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 17 deletions(-)
diff --git a/configure b/configure
index 4d66a958023e..762b8397a7b7 100755
--- a/configure
+++ b/configure
@@ -592,20 +592,43 @@ 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
-python=
-explicit_python=no
-for binary in "${PYTHON-python3}" python
-do
- if has "$binary"
- then
- python=$(command -v "$binary")
- break
- fi
-done
+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=
+if test -z "${PYTHON}"; then
+ 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 python3 python python3.11 python3.10 python3.9 python3.8 python3.7 python3.6; do
+ if has "$binary"; then
+ python=$(command -v "$binary")
+ if check_py_version "$python"; then
+ # This one is good.
+ first_python=
+ break
+ else
+ first_python=$python
+ fi
+ fi
+ done
+else
+ # Same as above, but only check the environment variable.
+ has "${PYTHON}" || error_exit "The PYTHON environment variable does not point to an executable"
+ python=$(command -v "$PYTHON")
+ explicit_python=yes
+ if check_py_version "$python"; then
+ # This one is good.
+ first_python=
+ else
+ first_python=$first_python
+ fi
+fi
# Check for ancillary tools used in testing
genisoimage=
@@ -1030,16 +1053,22 @@ rm -f ./*/config-devices.mak.d
if test -z "$python"
then
- error_exit "Python not found. Use --python=/path/to/python"
+ # If first_python is set, there was a binary somewhere even though
+ # it was not suitable. Use it for the error message.
+ if test -n "$first_python"; then
+ error_exit "Cannot use '$first_python', Python >= 3.6 is required." \
+ "Use --python=/path/to/python to specify a supported Python."
+ else
+ error_exit "Python not found. Use --python=/path/to/python"
+ fi
fi
+
if ! has "$make"
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
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 05/10] configure: Look for auxiliary Python installations
2023-02-22 14:37 ` [PATCH 05/10] configure: Look for auxiliary Python installations Paolo Bonzini
@ 2023-02-22 15:19 ` Daniel P. Berrangé
0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2023-02-22 15:19 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 03:37:47PM +0100, Paolo Bonzini wrote:
> From: John Snow <jsnow@redhat.com>
>
> 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 use whatever is specified in $PYTHON or, if
> empty, will try the following in order:
>
> 1. python3
> 2. python
> 3. 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.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 63 ++++++++++++++++++++++++++++++++++++++++---------------
> 1 file changed, 46 insertions(+), 17 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 06/10] lcitool: update submodule
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (4 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 05/10] configure: Look for auxiliary Python installations Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 15:07 ` Daniel P. Berrangé
2023-02-22 14:37 ` [PATCH 07/10] docs/devel: update and clarify lcitool instructions Paolo Bonzini
` (4 subsequent siblings)
10 siblings, 1 reply; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/docker/dockerfiles/alpine.docker | 2 +-
tests/docker/dockerfiles/fedora-win32-cross.docker | 1 +
tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
tests/lcitool/libvirt-ci | 2 +-
4 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
index 4a569d82f64f..66c499c097ab 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -61,7 +61,7 @@ RUN apk update && \
liburing-dev \
libusb-dev \
linux-pam-dev \
- llvm11 \
+ llvm \
lttng-ust-dev \
lzo-dev \
make \
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index b659c0b8a89d..41769fc94a8e 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -79,6 +79,7 @@ RUN nosync dnf install -y \
mingw32-glib2 \
mingw32-gnutls \
mingw32-gtk3 \
+ mingw32-libepoxy \
mingw32-libgcrypt \
mingw32-libjpeg-turbo \
mingw32-libpng \
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index 0a404c15bfe4..46d5d05763a6 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -80,6 +80,7 @@ RUN nosync dnf install -y \
mingw64-glib2 \
mingw64-gnutls \
mingw64-gtk3 \
+ mingw64-libepoxy \
mingw64-libgcrypt \
mingw64-libjpeg-turbo \
mingw64-libpng \
diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci
index 319a534c220f..1c3e16cae384 160000
--- a/tests/lcitool/libvirt-ci
+++ b/tests/lcitool/libvirt-ci
@@ -1 +1 @@
-Subproject commit 319a534c220f53fc8670254cac25d6f662c82112
+Subproject commit 1c3e16cae38407d0782dc94080d1104106456fa4
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 06/10] lcitool: update submodule
2023-02-22 14:37 ` [PATCH 06/10] lcitool: update submodule Paolo Bonzini
@ 2023-02-22 15:07 ` Daniel P. Berrangé
0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2023-02-22 15:07 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 03:37:48PM +0100, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> tests/docker/dockerfiles/alpine.docker | 2 +-
> tests/docker/dockerfiles/fedora-win32-cross.docker | 1 +
> tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
> tests/lcitool/libvirt-ci | 2 +-
> 4 files changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 07/10] docs/devel: update and clarify lcitool instructions
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (5 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 06/10] lcitool: update submodule Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 15:11 ` Daniel P. Berrangé
2023-02-22 14:37 ` [PATCH 08/10] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions Paolo Bonzini
` (3 subsequent siblings)
10 siblings, 1 reply; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
Shorten a bit the description of what libvirt-ci does, the name of the
data files is not relevant at that point. However, the procedures to add
new build prerequisites are lacking some information, particularly with
respect to regenerating the output test files for lcitool's unit tests.
While at it, also update the paths in the libvirt-ci repository.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/devel/testing.rst | 72 ++++++++++++++++++++++++------------------
1 file changed, 41 insertions(+), 31 deletions(-)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index e10c47b5a7ca..648b7aa09137 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -429,49 +429,57 @@ using the ``lcitool`` program provided by the ``libvirt-ci`` project:
https://gitlab.com/libvirt/libvirt-ci
-In that project, there is a ``mappings.yml`` file defining the distro native
-package names for a wide variety of third party projects. This is processed
-in combination with a project defined list of build pre-requisites to determine
-the list of native packages to install on each distribution. This can be used
-to generate dockerfiles, VM package lists and Cirrus CI variables needed to
-setup build environments across OS distributions with a consistent set of
-packages present.
-
-When preparing a patch series that adds a new build pre-requisite to QEMU,
-updates to various lcitool data files may be required.
+``libvirt-ci`` contains an ``lcitool`` program as well as a list of
+mappings to distribution package names for a wide variety of third
+party projects. ``lcitool`` applies the mappings to a list of build
+pre-requisites in ``tests/lcitool/projects/qemu.yml``, determines the
+list of native packages to install on each distribution, and uses them
+to generate build environments (dockerfiles and Cirrus CI variable files)
+that are consistent across OS distribution.
Adding new build pre-requisites
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+When preparing a patch series that adds a new build
+pre-requisite to QEMU, the prerequisites should to be added to
+``tests/lcitool/projects/qemu.yml`` in order to make the dependency
+available in the CI build environments.
+
In the simple case where the pre-requisite is already known to ``libvirt-ci``
-the following steps are needed
+the following steps are needed:
* Edit ``tests/lcitool/projects/qemu.yml`` and add the pre-requisite
* Run ``make lcitool-refresh`` to re-generate all relevant build environment
manifests
-In some cases ``libvirt-ci`` will not know about the build pre-requisite and
-thus some extra preparation steps will be required first
+In some cases ``libvirt-ci`` will not know about the build
+pre-requisite and thus some extra preparation steps will be required
+first. Even though you can add the mappings for testing purposes to
+``tests/lcitool/mappings.yml`` in the QEMU repository, please contribute
+the mapping to the ``libvirt-ci`` project as well:
* Fork the ``libvirt-ci`` project on gitlab
- * Edit the ``mappings.yml`` change to add an entry for the new build
- prerequisite, listing its native package name on as many OS distros
- as practical.
+ * Add an entry for the new build prerequisite to
+ ``lcitool/facts/mappings.yml``, listing its native package name on as
+ many OS distros as practical. Run ``python -m pytest --regenerate-output``
+ and check that the changes are correct.
- * Commit the ``mappings.yml`` change and submit a merge request to
- the ``libvirt-ci`` project, noting in the description that this
- is a new build pre-requisite desired for use with QEMU
+ * Commit the ``mappings.yml`` change together with the regenerated test
+ files, and submit a merge request to the ``libvirt-ci`` project.
+ Please note in the description that this is a new build pre-requisite
+ desired for use with QEMU
* CI pipeline will run to validate that the changes to ``mappings.yml``
are correct, by attempting to install the newly listed package on
all OS distributions supported by ``libvirt-ci``.
* Once the merge request is accepted, go back to QEMU and update
- the ``libvirt-ci`` submodule to point to a commit that contains
- the ``mappings.yml`` update.
+ the ``tests/lcitool/libvirt-ci`` submodule to point to a commit that
+ contains the ``mappings.yml`` update. Then add the prerequisite and
+ run ``make lcitool-refresh``.
Adding new OS distros
@@ -498,18 +506,20 @@ Assuming there is agreement to add a new OS distro then
* Fork the ``libvirt-ci`` project on gitlab
- * Add metadata under ``guests/lcitool/lcitool/ansible/group_vars/``
- for the new OS distro. There might be code changes required if
- the OS distro uses a package format not currently known. The
- ``libvirt-ci`` maintainers can advise on this when the issue
- is file.
+ * Add metadata under ``lcitool/facts/targets/`` for the new OS
+ distro. There might be code changes required if the OS distro
+ uses a package format not currently known. The ``libvirt-ci``
+ maintainers can advise on this when the issue is filed.
- * Edit the ``mappings.yml`` change to update all the existing package
- entries, providing details of the new OS distro
+ * Edit the ``lcitool/facts/mappings.yml`` change to add entries for
+ the new OS, listing the native package names for as many packages
+ as practical. Run ``python -m pytest --regenerate-output`` and
+ check that the changes are correct.
- * Commit the ``mappings.yml`` change and submit a merge request to
- the ``libvirt-ci`` project, noting in the description that this
- is a new build pre-requisite desired for use with QEMU
+ * Commit the changes to ``lcitool/facts`` and the regenerated test
+ files, and submit a merge request to the ``libvirt-ci`` project.
+ Please note in the description that this is a new build pre-requisite
+ desired for use with QEMU
* CI pipeline will run to validate that the changes to ``mappings.yml``
are correct, by attempting to install the newly listed package on
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 07/10] docs/devel: update and clarify lcitool instructions
2023-02-22 14:37 ` [PATCH 07/10] docs/devel: update and clarify lcitool instructions Paolo Bonzini
@ 2023-02-22 15:11 ` Daniel P. Berrangé
0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2023-02-22 15:11 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 03:37:49PM +0100, Paolo Bonzini wrote:
> Shorten a bit the description of what libvirt-ci does, the name of the
> data files is not relevant at that point. However, the procedures to add
> new build prerequisites are lacking some information, particularly with
> respect to regenerating the output test files for lcitool's unit tests.
> While at it, also update the paths in the libvirt-ci repository.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> docs/devel/testing.rst | 72 ++++++++++++++++++++++++------------------
> 1 file changed, 41 insertions(+), 31 deletions(-)
>
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index e10c47b5a7ca..648b7aa09137 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
>
> -In some cases ``libvirt-ci`` will not know about the build pre-requisite and
> -thus some extra preparation steps will be required first
> +In some cases ``libvirt-ci`` will not know about the build
> +pre-requisite and thus some extra preparation steps will be required
> +first. Even though you can add the mappings for testing purposes to
> +``tests/lcitool/mappings.yml`` in the QEMU repository, please contribute
> +the mapping to the ``libvirt-ci`` project as well:
I'd have a mild preference for not mentioning the qemu local
tests/lcitool/mappings.yml here, as that's for special purpose
use and thus not relevant the majority if the time. I worry
this might mislead people into including changes in the
local tests/lcitool/mappings.yml file, instead of, or in
addition to the libvirt-ci.git submodule.
None the less, its a minor concern so
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>
> * Fork the ``libvirt-ci`` project on gitlab
>
> - * Edit the ``mappings.yml`` change to add an entry for the new build
> - prerequisite, listing its native package name on as many OS distros
> - as practical.
> + * Add an entry for the new build prerequisite to
> + ``lcitool/facts/mappings.yml``, listing its native package name on as
> + many OS distros as practical. Run ``python -m pytest --regenerate-output``
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 :|
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 08/10] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (6 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 07/10] docs/devel: update and clarify lcitool instructions Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 15:14 ` Daniel P. Berrangé
2023-02-22 14:37 ` [PATCH 09/10] Python: Drop support for Python 3.6 Paolo Bonzini
` (2 subsequent siblings)
10 siblings, 1 reply; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
Python 3.6 is at end-of-life. libvirt-ci now supports overrides for
targets and package mappings, therefore QEMU can use newer versions
provided by CentOS 8 (Python 3.8) and OpenSUSE 15.3 (Python 3.9).
Packages that the distro does not provide are included in the image
via PyPI; lcitool knows how to do that whenever the rpm mapping
is empty.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/devel/testing.rst | 6 ++
tests/docker/dockerfiles/centos8.docker | 22 +++---
tests/docker/dockerfiles/opensuse-leap.docker | 22 +++---
tests/docker/dockerfiles/ubuntu2004.docker | 2 +-
tests/lcitool/mappings.yml | 77 +++++++++++++++++++
tests/lcitool/targets/centos-stream-8.yml | 3 +
tests/lcitool/targets/opensuse-leap-153.yml | 3 +
7 files changed, 113 insertions(+), 22 deletions(-)
create mode 100644 tests/lcitool/mappings.yml
create mode 100644 tests/lcitool/targets/centos-stream-8.yml
create mode 100644 tests/lcitool/targets/opensuse-leap-153.yml
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 648b7aa09137..67798dc63def 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -481,6 +481,12 @@ the mapping to the ``libvirt-ci`` project as well:
contains the ``mappings.yml`` update. Then add the prerequisite and
run ``make lcitool-refresh``.
+For enterprise distros that default to old, end-of-life versions of the
+Python runtime, QEMU uses a separate set of mappings that work with more
+recent versions. These can be found in ``tests/lcitool/mappings.yml``.
+These should not be a problem unless the dependencies you are adding
+is a Python library.
+
Adding new OS distros
^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index fbc953c6dccc..3c74be09a693 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -82,7 +82,6 @@ RUN dnf distro-sync -y && \
lzo-devel \
make \
mesa-libgbm-devel \
- meson \
ncurses-devel \
nettle-devel \
ninja-build \
@@ -94,13 +93,12 @@ RUN dnf distro-sync -y && \
pixman-devel \
pkgconfig \
pulseaudio-libs-devel \
- python3 \
- python3-PyYAML \
- python3-numpy \
- python3-pillow \
- python3-pip \
- python3-sphinx \
- python3-sphinx_rtd_theme \
+ python38 \
+ python38-PyYAML \
+ python38-numpy \
+ python38-pip \
+ python38-setuptools \
+ python38-wheel \
rdma-core-devel \
rpm \
sed \
@@ -128,8 +126,14 @@ RUN dnf distro-sync -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+RUN /usr/bin/pip3.8 install \
+ meson==0.63.2 \
+ pillow \
+ sphinx \
+ sphinx-rtd-theme
+
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
-ENV PYTHON "/usr/bin/python3"
+ENV PYTHON "/usr/bin/python3.8"
diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index 4b2c02d6abfb..5b8dbf2b83dd 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -89,16 +89,9 @@ RUN zypper update -y && \
pam-devel \
pcre-devel-static \
pkgconfig \
- python3-Pillow \
- python3-PyYAML \
- python3-Sphinx \
- python3-base \
- python3-numpy \
- python3-opencv \
- python3-pip \
- python3-setuptools \
- python3-sphinx_rtd_theme \
- python3-wheel \
+ python39-base \
+ python39-pip \
+ python39-setuptools \
rdma-core-devel \
rpm \
sed \
@@ -129,10 +122,15 @@ RUN zypper update -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
-RUN /usr/bin/pip3 install meson==0.56.0
+RUN /usr/bin/pip3.9 install \
+ PyYAML \
+ meson==0.63.2 \
+ pillow \
+ sphinx \
+ sphinx-rtd-theme
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
-ENV PYTHON "/usr/bin/python3"
+ENV PYTHON "/usr/bin/python3.9"
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 13ab0b688726..5b27b89f1c72 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -138,7 +138,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
-RUN /usr/bin/pip3 install meson==0.56.0
+RUN /usr/bin/pip3 install meson==0.63.2
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
diff --git a/tests/lcitool/mappings.yml b/tests/lcitool/mappings.yml
new file mode 100644
index 000000000000..e4719e45516c
--- /dev/null
+++ b/tests/lcitool/mappings.yml
@@ -0,0 +1,77 @@
+mappings:
+ flake8:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ meson:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3:
+ CentOSStream8: python38
+ OpenSUSELeap153: python39-base
+
+ python3-PyYAML:
+ CentOSStream8: python38-PyYAML
+ OpenSUSELeap153:
+
+ python3-devel:
+ CentOSStream8: python38-devel
+ OpenSUSELeap153: python39-devel
+
+ python3-docutils:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3-numpy:
+ CentOSStream8: python38-numpy
+ OpenSUSELeap153:
+
+ python3-opencv:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3-pillow:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3-pip:
+ CentOSStream8: python38-pip
+ OpenSUSELeap153: python39-pip
+
+ python3-pillow:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3-selinux:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3-setuptools:
+ CentOSStream8: python38-setuptools
+ OpenSUSELeap153: python39-setuptools
+
+ python3-sphinx:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3-sphinx-rtd-theme:
+ CentOSStream8:
+ OpenSUSELeap153:
+
+ python3-venv:
+ CentOSStream8: python38
+ OpenSUSELeap153: python39-base
+
+ python3-wheel:
+ CentOSStream8: python38-wheel
+ OpenSUSELeap153: python39-pip
+
+pypi_mappings:
+ # Request more recent version
+ meson:
+ default: meson==0.63.2
+
+ # Drop packages that need devel headers
+ python3-numpy:
+ OpenSUSELeap153:
diff --git a/tests/lcitool/targets/centos-stream-8.yml b/tests/lcitool/targets/centos-stream-8.yml
new file mode 100644
index 000000000000..6b11160fd1dc
--- /dev/null
+++ b/tests/lcitool/targets/centos-stream-8.yml
@@ -0,0 +1,3 @@
+paths:
+ pip3: /usr/bin/pip3.8
+ python: /usr/bin/python3.8
diff --git a/tests/lcitool/targets/opensuse-leap-153.yml b/tests/lcitool/targets/opensuse-leap-153.yml
new file mode 100644
index 000000000000..683016e0077a
--- /dev/null
+++ b/tests/lcitool/targets/opensuse-leap-153.yml
@@ -0,0 +1,3 @@
+paths:
+ pip3: /usr/bin/pip3.9
+ python: /usr/bin/python3.9
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 08/10] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions
2023-02-22 14:37 ` [PATCH 08/10] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions Paolo Bonzini
@ 2023-02-22 15:14 ` Daniel P. Berrangé
0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2023-02-22 15:14 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 03:37:50PM +0100, Paolo Bonzini wrote:
> Python 3.6 is at end-of-life. libvirt-ci now supports overrides for
> targets and package mappings, therefore QEMU can use newer versions
> provided by CentOS 8 (Python 3.8) and OpenSUSE 15.3 (Python 3.9).
>
> Packages that the distro does not provide are included in the image
> via PyPI; lcitool knows how to do that whenever the rpm mapping
> is empty.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> docs/devel/testing.rst | 6 ++
> tests/docker/dockerfiles/centos8.docker | 22 +++---
> tests/docker/dockerfiles/opensuse-leap.docker | 22 +++---
> tests/docker/dockerfiles/ubuntu2004.docker | 2 +-
> tests/lcitool/mappings.yml | 77 +++++++++++++++++++
> tests/lcitool/targets/centos-stream-8.yml | 3 +
> tests/lcitool/targets/opensuse-leap-153.yml | 3 +
> 7 files changed, 113 insertions(+), 22 deletions(-)
> create mode 100644 tests/lcitool/mappings.yml
> create mode 100644 tests/lcitool/targets/centos-stream-8.yml
> create mode 100644 tests/lcitool/targets/opensuse-leap-153.yml
>
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index 648b7aa09137..67798dc63def 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
> @@ -481,6 +481,12 @@ the mapping to the ``libvirt-ci`` project as well:
> contains the ``mappings.yml`` update. Then add the prerequisite and
> run ``make lcitool-refresh``.
>
> +For enterprise distros that default to old, end-of-life versions of the
> +Python runtime, QEMU uses a separate set of mappings that work with more
> +recent versions. These can be found in ``tests/lcitool/mappings.yml``.
> +These should not be a problem unless the dependencies you are adding
> +is a Python library.
I'd suggest changing this last sentence to
It should not be required to modify this file unless the new
dependency being added is a Python library.
Either way,
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 09/10] Python: Drop support for Python 3.6
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (7 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 08/10] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-02-22 15:16 ` Daniel P. Berrangé
` (2 more replies)
2023-02-22 14:37 ` [PATCH 10/10] configure: Add courtesy hint to Python version failure message Paolo Bonzini
2023-03-21 14:11 ` [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Philippe Mathieu-Daudé
10 siblings, 3 replies; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel; +Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
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.7 specifically for freebsd and 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.
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 <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 8 ++++----
python/Makefile | 10 +++++-----
python/setup.cfg | 7 +++----
python/tests/minreqs.txt | 2 +-
scripts/qapi/mypy.ini | 2 +-
5 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/configure b/configure
index 762b8397a7b7..476d8a38b900 100755
--- a/configure
+++ b/configure
@@ -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=
@@ -605,7 +605,7 @@ if test -z "${PYTHON}"; then
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 python3 python python3.11 python3.10 python3.9 python3.8 python3.7 python3.6; do
+ for binary in python3 python python3.11 python3.10 python3.9 python3.8 python3.7; do
if has "$binary"; then
python=$(command -v "$binary")
if check_py_version "$python"; then
@@ -1069,7 +1069,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."
fi
diff --git a/python/Makefile b/python/Makefile
index c5bd6ff83ac9..f660d9991437 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -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; \
diff --git a/python/setup.cfg b/python/setup.cfg
index 9e923d97628f..1e8392a045c3 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -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]
diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
index dfb8abb155f4..55cc6b41d85b 100644
--- a/python/tests/minreqs.txt
+++ b/python/tests/minreqs.txt
@@ -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.
#
diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini
index 662535642974..3463307ddc72 100644
--- a/scripts/qapi/mypy.ini
+++ b/scripts/qapi/mypy.ini
@@ -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
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 09/10] Python: Drop support for Python 3.6
2023-02-22 14:37 ` [PATCH 09/10] Python: Drop support for Python 3.6 Paolo Bonzini
@ 2023-02-22 15:16 ` Daniel P. Berrangé
2023-02-22 15:28 ` Paolo Bonzini
2023-02-22 16:31 ` Markus Armbruster
2023-03-13 17:05 ` Daniel P. Berrangé
2 siblings, 1 reply; 31+ messages in thread
From: Daniel P. Berrangé @ 2023-02-22 15:16 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 03:37:51PM +0100, Paolo Bonzini wrote:
> 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.7 specifically for freebsd and 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.
>
> Since it is safe to under our supported platform policy, bump our
> minimum supported version of Python to 3.7.
Your updated support policy doc patch could be included in
this series perhaps.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 8 ++++----
> python/Makefile | 10 +++++-----
> python/setup.cfg | 7 +++----
> python/tests/minreqs.txt | 2 +-
> scripts/qapi/mypy.ini | 2 +-
> 5 files changed, 14 insertions(+), 15 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 09/10] Python: Drop support for Python 3.6
2023-02-22 14:37 ` [PATCH 09/10] Python: Drop support for Python 3.6 Paolo Bonzini
2023-02-22 15:16 ` Daniel P. Berrangé
@ 2023-02-22 16:31 ` Markus Armbruster
2023-02-22 17:02 ` Paolo Bonzini
2023-03-13 17:05 ` Daniel P. Berrangé
2 siblings, 1 reply; 31+ messages in thread
From: Markus Armbruster @ 2023-02-22 16:31 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, berrange
Paolo Bonzini <pbonzini@redhat.com> writes:
> 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.
In review of the original "[PATCH v3 6/6] Python: Drop support for
Python 3.6", I volunteered to rework the rationale. Second thoughts: if
y'all think this is good enough, let's leave it there.
> 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.7 specifically for freebsd and 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.
>
> 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 <jsnow@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 09/10] Python: Drop support for Python 3.6
2023-02-22 16:31 ` Markus Armbruster
@ 2023-02-22 17:02 ` Paolo Bonzini
0 siblings, 0 replies; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 17:02 UTC (permalink / raw)
To: Markus Armbruster
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, berrange
On Wed, Feb 22, 2023 at 5:31 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> Paolo Bonzini <pbonzini@redhat.com> writes:
>
> > 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.
>
> In review of the original "[PATCH v3 6/6] Python: Drop support for
> Python 3.6", I volunteered to rework the rationale. Second thoughts: if
> y'all think this is good enough, let's leave it there.
As you prefer; "docs: build-platforms: refine requirements on Python
build dependencies" already provides a fairly lengthy rationale
distilled from the same discussions, so I think we can leave it at
that, but I can merge whatever change you prefer.
Paolo
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 09/10] Python: Drop support for Python 3.6
2023-02-22 14:37 ` [PATCH 09/10] Python: Drop support for Python 3.6 Paolo Bonzini
2023-02-22 15:16 ` Daniel P. Berrangé
2023-02-22 16:31 ` Markus Armbruster
@ 2023-03-13 17:05 ` Daniel P. Berrangé
2023-03-15 12:53 ` Thomas Huth
2 siblings, 1 reply; 31+ messages in thread
From: Daniel P. Berrangé @ 2023-03-13 17:05 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, thuth, alex.bennee, armbru
On Wed, Feb 22, 2023 at 03:37:51PM +0100, Paolo Bonzini wrote:
> 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.7 specifically for freebsd and 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.
>
> Since it is safe to under our supported platform policy, bump our
> minimum supported version of Python to 3.7.
In the above list of versions, there's no platform which actually
has 3.7 as a limiting factor. THe only mention of 3.7 comes from
our own VM scripts, which for freebsd is outdated compared to
their default, and for netbsd the 3.7 choice appears arbitrary
on our side given their lack of default.
Ubuntu 20.04 on 3.8 would be the hard constraint out of the above
list of distros.
Our normal practice wrt the support policy would be to go to the
baseline from the above distro list. IOW, if we're dropping 3.6,
then going to 3.8 would be the normal course of action, rather
than stopping at 3.7 which doesn't appear needed by our targetted
distros.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 8 ++++----
> python/Makefile | 10 +++++-----
> python/setup.cfg | 7 +++----
> python/tests/minreqs.txt | 2 +-
> scripts/qapi/mypy.ini | 2 +-
> 5 files changed, 14 insertions(+), 15 deletions(-)
>
> diff --git a/configure b/configure
> index 762b8397a7b7..476d8a38b900 100755
> --- a/configure
> +++ b/configure
> @@ -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=
> @@ -605,7 +605,7 @@ if test -z "${PYTHON}"; then
> 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 python3 python python3.11 python3.10 python3.9 python3.8 python3.7 python3.6; do
> + for binary in python3 python python3.11 python3.10 python3.9 python3.8 python3.7; do
> if has "$binary"; then
> python=$(command -v "$binary")
> if check_py_version "$python"; then
> @@ -1069,7 +1069,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."
> fi
>
> diff --git a/python/Makefile b/python/Makefile
> index c5bd6ff83ac9..f660d9991437 100644
> --- a/python/Makefile
> +++ b/python/Makefile
> @@ -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; \
> diff --git a/python/setup.cfg b/python/setup.cfg
> index 9e923d97628f..1e8392a045c3 100644
> --- a/python/setup.cfg
> +++ b/python/setup.cfg
> @@ -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]
> diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
> index dfb8abb155f4..55cc6b41d85b 100644
> --- a/python/tests/minreqs.txt
> +++ b/python/tests/minreqs.txt
> @@ -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.
> #
> diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini
> index 662535642974..3463307ddc72 100644
> --- a/scripts/qapi/mypy.ini
> +++ b/scripts/qapi/mypy.ini
> @@ -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
> --
> 2.39.1
>
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 :|
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 09/10] Python: Drop support for Python 3.6
2023-03-13 17:05 ` Daniel P. Berrangé
@ 2023-03-15 12:53 ` Thomas Huth
0 siblings, 0 replies; 31+ messages in thread
From: Thomas Huth @ 2023-03-15 12:53 UTC (permalink / raw)
To: Daniel P. Berrangé, Paolo Bonzini
Cc: qemu-devel, jsnow, peter.maydell, alex.bennee, armbru
On 13/03/2023 18.05, Daniel P. Berrangé wrote:
> On Wed, Feb 22, 2023 at 03:37:51PM +0100, Paolo Bonzini wrote:
>> 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.7 specifically for freebsd and 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.
>>
>> Since it is safe to under our supported platform policy, bump our
>> minimum supported version of Python to 3.7.
>
> In the above list of versions, there's no platform which actually
> has 3.7 as a limiting factor. THe only mention of 3.7 comes from
> our own VM scripts, which for freebsd is outdated compared to
> their default, and for netbsd the 3.7 choice appears arbitrary
> on our side given their lack of default.
>
> Ubuntu 20.04 on 3.8 would be the hard constraint out of the above
> list of distros.
>
> Our normal practice wrt the support policy would be to go to the
> baseline from the above distro list. IOW, if we're dropping 3.6,
> then going to 3.8 would be the normal course of action, rather
> than stopping at 3.7 which doesn't appear needed by our targetted
> distros.
Additionally, Python 3.7 will be EOL by upstream in June 2023, if I've got
that right ... so when QEMU 8.1 will be released, it will already be out of
service...
Thomas
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 10/10] configure: Add courtesy hint to Python version failure message
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (8 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 09/10] Python: Drop support for Python 3.6 Paolo Bonzini
@ 2023-02-22 14:37 ` Paolo Bonzini
2023-03-21 14:11 ` [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Philippe Mathieu-Daudé
10 siblings, 0 replies; 31+ messages in thread
From: Paolo Bonzini @ 2023-02-22 14:37 UTC (permalink / raw)
To: qemu-devel
Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange,
Philippe Mathieu-Daudé
From: John Snow <jsnow@redhat.com>
If we begin requiring Python 3.7+, a few platforms are going to need to
install an additional Python interpreter package.
As a courtesy to the user, suggest the optional package they might need
to install. This will hopefully minimize any downtime caused by the
change in Python dependency.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230221012456.2607692-3-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 476d8a38b900..87d0b3ee817c 100755
--- a/configure
+++ b/configure
@@ -1070,7 +1070,10 @@ fi
if ! check_py_version "$python"; then
error_exit "Cannot use '$python', Python >= 3.7 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
--
2.39.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6
2023-02-22 14:37 [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6 Paolo Bonzini
` (9 preceding siblings ...)
2023-02-22 14:37 ` [PATCH 10/10] configure: Add courtesy hint to Python version failure message Paolo Bonzini
@ 2023-03-21 14:11 ` Philippe Mathieu-Daudé
10 siblings, 0 replies; 31+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-21 14:11 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
Cc: jsnow, peter.maydell, thuth, alex.bennee, armbru, berrange
On 22/2/23 15:37, Paolo Bonzini wrote:
> This is my take on John's patches to improve Python detection and to
> prepare for dropping Python 3.6 support.
>
> The main change with respect to John's work is that lcitool is updated
> and the container images for CI can install Sphinx via pip; this
> way documentation is still built on the CentOS 8 jobs.
>
> A smaller change is that patch "configure: Look for auxiliary Python
> installations" will only look at the $PYTHON variable if it is set,
> without falling back to a PATH search.
>
> This series includes the final patch to drop support for Python 3.6,
> but it makes sense even without it.
>
> Paolo
>
> Supersedes: <20230221012456.2607692-1-jsnow@redhat.com>
FWIW:
Different patches 1 & 2 have been merged 2 days after you posted
this series (merge commit c3aeccc0ab):
- commit aef633e765 ("python: support pylint 2.16")
- commit 6832189fd7 ("python: drop pipenv")
Patch 3 clashes with commit 1b1be8d3cc ("meson: stop
looking for 'sphinx-build-3'")
> John Snow (5):
> python: support pylint 2.16
> python: drop pipenv
> meson: prefer 'sphinx-build' to 'sphinx-build-3'
> configure: Look for auxiliary Python installations
> configure: Add courtesy hint to Python version failure message
>
> Paolo Bonzini (5):
> configure: protect against escaping venv when running Meson
> lcitool: update submodule
> docs/devel: update and clarify lcitool instructions
> ci, docker: update CentOS and OpenSUSE Python to non-EOL versions
> Python: Drop support for Python 3.6
^ permalink raw reply [flat|nested] 31+ messages in thread