python: fork qemu.qmp python lib into independent repo
cover python: fork qemu.qmp python lib into independent repo
GitLab: https://gitlab.com/jsnow/qemu.qmp/-/commits/pt2a
Hi, this series is part of an effort to publish the qemu.qmp package on PyPI. It is the second of three phases to complete this work:
(1) Switch the new Async QMP library in to python/qemu/qmp
(2) Fork python/qemu/qmp out into its own repository.
--> (2a) Do the bare minimum to be consistent.
(2b) Add most GitLab CI/CD targets.
(2c) Add Sphinx doc builds, update docs, and publish to GitLab pages. (2d) Add dynamic git versioning and GitLab package builds.
(3) Update qemu.git to install qemu.qmp from PyPI,
and then delete python/qemu/qmp.
This series is not meant to apply to qemu.git, rather -- it's the series that performs the split and would apply to a brand new repository.
I am submitting it to the QEMU mailing list because:
(1) To more broadly announce my intentions, and as reference alongside series #1 and #3 detailed above. It'll be catalogued in the ML archives this way, too.
(2) To ask for permission to become the maintainer of a 'qemu-project/py-qemu.qmp' repository, where I would like to host this subproject.
(3) To ask for review on the README.rst file which details my intended contribution guidelines for this subproject.
(4) To see if there's any feedback on the mechanics of how I forked this subproject.
Review notes / points of interest:
- I use jsnow/qemu.qmp as the repo name throughout the series; that will have to be changed eventually, but for the purposes of prototyping, it was nicer to have a fully working series.
- I'm planning on using gitlab issues and MRs for the subproject.
- The intended versioning paradigm is recorded in patch #10.
- GitLab integration, automatic package builds, and other fancy features are saved for another series. It was getting extremely long, so let's stick to the basics, then add on each feature one at a time.
John Snow (13):
pylint hotfix
fork qemu.qmp from qemu.git
update VERSION to 0.0.0a1
update maintainer metadata
update project description
[FIXME] update project URLs
add a couple new trove classifiers
move README.rst to FILES.rst and update [FIXME] move PACKAGE.rst to README.rst and update
docs: add versioning policy to README
add LGPLv2+ and GPLv2 LICENSE files update Pipfile
remove sub-dependency pins from Pipfile
.gitignore | 2 +- FILES.rst | 67 ++++++ LICENSE | 481 ++++++++++++++++++++++++++++++++++++++++++ LICENSE_GPL2 | 339 +++++++++++++++++++++++++++++ MANIFEST.in | 3 +- Makefile | 16 +- PACKAGE.rst | 43 ---- Pipfile | 4 +- Pipfile.lock | 288 ++++++++++++++----------- README.rst | 268 +++++++++++++++-------- VERSION | 2 +- qemu/qmp/__init__.py | 2 +- qemu/qmp/legacy.py | 4 +- qemu/qmp/qmp_shell.py | 2 +- qemu/qmp/qmp_tui.py | 2 +- setup.cfg | 43 ++-- setup.py | 2 +- 17 files changed, 1260 insertions(+), 308 deletions(-) create mode 100644 FILES.rst create mode 100644 LICENSE create mode 100644 LICENSE_GPL2 delete mode 100644 PACKAGE.rst
Signature · 1 line
2.34.1
PATCH 1/13 pylint hotfix
Pylint released a new version and it broke tests. I've folded this patch into patches pending for qemu.git, but for my own sanity, I'm not going to rebase this series yet because it's... annoying to rebase a git-filter-branch fork. I'll get it next time, sorry.
--- qemu/qmp/legacy.py | 2 -- 1 file changed, 2 deletions(-)
qemu/qmp/legacy.py +0 -2
@@ -106,8 +106,6 @@ class QEMUMonitorProtocol: return self def __exit__(self, - # pylint: disable=duplicate-code - # see https://github.com/PyCQA/pylint/issues/3619 exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None:
Signature · 1 line
2.34.1
PATCH 2/13 fork qemu.qmp from qemu.git
In reply to John SnowSplit python/ from qemu.git, using these commands:
Quoted 6 lines
git subtree split -P python/ -b python-split-v3
mkdir ~/src/tmp
cd ~/src/tmp
git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu cd qemu
git filter-repo --path qemu/machine/ \
--path qemu/utils/ \
--path tests/iotests-mypy.sh \
--path tests/iotests-pylint.sh \
--invert-pathsThis commit, however, only performs some minimum cleanup to reflect the deletion of the other subpackages. It is not intended to be exhaustive, and further edits are made in forthcoming commits.
These fixes are broken apart into micro-changes to facilitate mailing list review subject-by-subject. They *could* be squashed into a single larger commit on merge if desired, but due to the nature of the fork, bisectability across the fork boundary is going to be challenging anyway. It may be better value to just leave these initial commits as-is.
--- .gitignore | 2 +- Makefile | 16 ++++++++-------- setup.cfg | 24 +----------------------- setup.py | 2 +- 4 files changed, 11 insertions(+), 33 deletions(-)
.gitignore +1 -1
@@ -5,7 +5,7 @@ # python packaging build/ dist/ -qemu.egg-info/ +qemu.qmp.egg-info/ # editor config .idea/
Makefile +8 -8
@@ -30,7 +30,7 @@ help: @echo "" @echo "make develop:" @echo " Install deps needed for for 'make check'," - @echo " and install the qemu package in editable mode." + @echo " and install the qemu.qmp package in editable mode." @echo " (Can be used in or outside of a venv.)" @echo "" @echo "make pipenv"
@@ -43,7 +43,7 @@ help: @echo " Remove package build output." @echo "" @echo "make distclean:" - @echo " remove pipenv/venv files, qemu package forwarder," + @echo " remove pipenv/venv files, qemu.qmp package forwarder," @echo " built distribution files, and everything from 'make clean'." @echo "" @echo -e "Have a nice day ^_^\n"
@@ -64,11 +64,11 @@ dev-venv: $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate: setup.cfg @echo "VENV $(QEMU_VENV_DIR)" @python3 -m venv $(QEMU_VENV_DIR) - @( \ - echo "ACTIVATE $(QEMU_VENV_DIR)"; \ - . $(QEMU_VENV_DIR)/bin/activate; \ - echo "INSTALL qemu[devel] $(QEMU_VENV_DIR)"; \ - make develop 1>/dev/null; \ + @( \ + echo "ACTIVATE $(QEMU_VENV_DIR)"; \ + . $(QEMU_VENV_DIR)/bin/activate; \ + echo "INSTALL qemu.qmp[devel] $(QEMU_VENV_DIR)"; \ + make develop 1>/dev/null; \ ) @touch $(QEMU_VENV_DIR)
@@ -106,6 +106,6 @@ clean: .PHONY: distclean distclean: clean - rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ + rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ rm -f .coverage .coverage.* rm -rf htmlcov/
setup.cfg +1 -23
@@ -1,5 +1,5 @@ [metadata] -name = qemu +name = qemu.qmp version = file:VERSION maintainer = QEMU Developer Team maintainer_email = [email protected]
@@ -25,8 +25,6 @@ classifiers = python_requires = >= 3.6 packages = qemu.qmp - qemu.machine - qemu.utils [options.package_data] * = py.typed
@@ -38,7 +36,6 @@ packages = devel = avocado-framework >= 90.0 flake8 >= 3.6.0 - fusepy >= 2.0.4 isort >= 5.1.2 mypy >= 0.780 pylint >= 2.8.0
@@ -47,10 +44,6 @@ devel = urwid-readline >= 0.13 Pygments >= 2.9.0 -# Provides qom-fuse functionality -fuse = - fusepy >= 2.0.4 - # QMP TUI dependencies tui = urwid >= 2.1.2
@@ -59,13 +52,6 @@ tui = [options.entry_points] console_scripts = - qom = qemu.utils.qom:main - qom-set = qemu.utils.qom:QOMSet.entry_point - qom-get = qemu.utils.qom:QOMGet.entry_point - qom-list = qemu.utils.qom:QOMList.entry_point - qom-tree = qemu.utils.qom:QOMTree.entry_point - qom-fuse = qemu.utils.qom_fuse:QOMFuse.entry_point [fuse] - qemu-ga-client = qemu.utils.qemu_ga_client:main qmp-shell = qemu.qmp.qmp_shell:main qmp-shell-wrap = qemu.qmp.qmp_shell:main_wrap qmp-tui = qemu.qmp.qmp_tui:main [tui]
@@ -80,19 +66,12 @@ python_version = 3.6 warn_unused_configs = True namespace_packages = True -[mypy-qemu.utils.qom_fuse] -# fusepy has no type stubs: -allow_subclassing_any = True - [mypy-qemu.qmp.qmp_tui] # urwid and urwid_readline have no type stubs: allow_subclassing_any = True # The following missing import directives are because these libraries do not # provide type stubs. Allow them on an as-needed basis for mypy. -[mypy-fuse] -ignore_missing_imports = True - [mypy-urwid] ignore_missing_imports = True
@@ -164,7 +143,6 @@ skip_missing_interpreters = true allowlist_externals = make deps = .[devel] - .[fuse] # Workaround to trigger tox venv rebuild .[tui] # Workaround to trigger tox venv rebuild commands = make check
setup.py +1 -1
@@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -QEMU tooling installer script +QEMU QMP library installer script Copyright (c) 2020-2021 John Snow for Red Hat, Inc. """
Signature · 1 line
2.34.1
Re: [qemu.qmp PATCH 02/13] fork qemu.qmp from qemu.git
Quoted 24 lines · John Snow
Split python/ from qemu.git, using these commands:
Quoted 6 lines
git subtree split -P python/ -b python-split-v3
mkdir ~/src/tmp
cd ~/src/tmp
git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu cd qemu
git filter-repo --path qemu/machine/ \--path qemu/utils/ \ --path tests/iotests-mypy.sh \ --path tests/iotests-pylint.sh \ --invert-pathsThis commit, however, only performs some minimum cleanup to reflect the deletion of the other subpackages. It is not intended to be exhaustive, and further edits are made in forthcoming commits.
These fixes are broken apart into micro-changes to facilitate mailing list review subject-by-subject. They *could* be squashed into a single larger commit on merge if desired, but due to the nature of the fork, bisectability across the fork boundary is going to be challenging anyway. It may be better value to just leave these initial commits as-is.
Quoted 7 lines
Signed-off-by John Snow <[email protected]>--- .gitignore | 2 +- Makefile | 16 ++++++++-------- setup.cfg | 24 +----------------------- setup.py | 2 +- 4 files changed, 11 insertions(+), 33 deletions(-)
The changes here look fine to me (and thanks for making it a "micro change"). I'll let sharper eyes than mine to give a closer look at the git filter-repo surgery. Although, that looks fine to me too.
[...]
Quoted 11 lines
.PHONY: distclean
distclean: cleanMakefile +1
-1- rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ + rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ rm -f .coverage .coverage.* rm -rf htmlcov/setup.cfg +0
-0
setup.cfg line 4
Quoted 5 lines
setup.cfg +1
-1@@ -1,5 +1,5 @@ [metadata] -name = qemu +name = qemu.qmp version = file:VERSION maintainer = QEMU Developer Team
In the spirit of patch 04 ("update maintainer metadata"), do you also want to update here too? s/QEMU Developer Team/QEMU Project?
FWIW:
[...]
Signature · 1 line
/kashyap
Re: [qemu.qmp PATCH 02/13] fork qemu.qmp from qemu.git
Quoted 51 lines · Kashyap Chamarthy
Quoted 24 lines · John Snow
Split python/ from qemu.git, using these commands:
Quoted 6 lines
git subtree split -P python/ -b python-split-v3
mkdir ~/src/tmp
cd ~/src/tmp
git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu cd qemu
git filter-repo --path qemu/machine/ \--path qemu/utils/ \ --path tests/iotests-mypy.sh \ --path tests/iotests-pylint.sh \ --invert-pathsThis commit, however, only performs some minimum cleanup to reflect the deletion of the other subpackages. It is not intended to be exhaustive, and further edits are made in forthcoming commits.
These fixes are broken apart into micro-changes to facilitate mailing list review subject-by-subject. They *could* be squashed into a single larger commit on merge if desired, but due to the nature of the fork, bisectability across the fork boundary is going to be challenging anyway. It may be better value to just leave these initial commits as-is.
Quoted 7 lines
Signed-off-by John Snow <[email protected]>--- .gitignore | 2 +- Makefile | 16 ++++++++-------- setup.cfg | 24 +----------------------- setup.py | 2 +- 4 files changed, 11 insertions(+), 33 deletions(-)The changes here look fine to me (and thanks for making it a "micro change"). I'll let sharper eyes than mine to give a closer look at the
git filter-reposurgery. Although, that looks fine to me too.[...]
Quoted 11 lines
.PHONY: distclean
distclean: cleanMakefile +1
-1- rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ + rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ rm -f .coverage .coverage.* rm -rf htmlcov/setup.cfg +0
-0@@ -1,5 +1,5 @@
Quoted 9 lines
setup.cfg line 4
Quoted 5 lines
setup.cfg +1
-1[metadata] -name = qemu +name = qemu.qmp version = file:VERSION maintainer = QEMU Developer TeamIn the spirit of patch 04 ("update maintainer metadata"), do you also want to update here too? s/QEMU Developer Team/QEMU Project?
Good spot.
Quoted 9 lines
FWIW:
Reviewed-by Kashyap Chamarthy <[email protected]>[...]
--
/kashyap
Re: [qemu.qmp PATCH 02/13] fork qemu.qmp from qemu.git
Quoted 63 lines · John Snow
Quoted 51 lines · Kashyap Chamarthy
Quoted 24 lines · John Snow
Split python/ from qemu.git, using these commands:
Quoted 6 lines
git subtree split -P python/ -b python-split-v3
mkdir ~/src/tmp
cd ~/src/tmp
git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu cd qemu
git filter-repo --path qemu/machine/ \--path qemu/utils/ \ --path tests/iotests-mypy.sh \ --path tests/iotests-pylint.sh \ --invert-pathsThis commit, however, only performs some minimum cleanup to reflect the deletion of the other subpackages. It is not intended to be exhaustive, and further edits are made in forthcoming commits.
These fixes are broken apart into micro-changes to facilitate mailing list review subject-by-subject. They *could* be squashed into a single larger commit on merge if desired, but due to the nature of the fork, bisectability across the fork boundary is going to be challenging anyway. It may be better value to just leave these initial commits as-is.
Quoted 7 lines
Signed-off-by John Snow <[email protected]>--- .gitignore | 2 +- Makefile | 16 ++++++++-------- setup.cfg | 24 +----------------------- setup.py | 2 +- 4 files changed, 11 insertions(+), 33 deletions(-)The changes here look fine to me (and thanks for making it a "micro change"). I'll let sharper eyes than mine to give a closer look at the
git filter-reposurgery. Although, that looks fine to me too.[...]
Quoted 11 lines
.PHONY: distclean
distclean: cleanMakefile +1
-1- rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ + rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ rm -f .coverage .coverage.* rm -rf htmlcov/setup.cfg +0
-0@@ -1,5 +1,5 @@Quoted 9 lines
setup.cfg line 4
Quoted 5 lines
setup.cfg +1
-1[metadata] -name = qemu +name = qemu.qmp version = file:VERSION maintainer = QEMU Developer TeamIn the spirit of patch 04 ("update maintainer metadata"), do you also want to update here too? s/QEMU Developer Team/QEMU Project?
Quoted 1 line
Good spot.
...Or, uh. That's exactly what I update in patch 04. Are you asking me to fold in that change earlier? I'm confused now.
--js
Re: [qemu.qmp PATCH 02/13] fork qemu.qmp from qemu.git
Quoted 1 line · John Snow
On Mon, Apr 4, 2022 at 2:54 PM John Snow <[email protected]> wrote:
[...]
Quoted 33 lines
Quoted 33 lines
Quoted 32 lines
Quoted 5 lines
.gitignore | 2 +- Makefile | 16 ++++++++-------- setup.cfg | 24 +----------------------- setup.py | 2 +- 4 files changed, 11 insertions(+), 33 deletions(-)The changes here look fine to me (and thanks for making it a "micro change"). I'll let sharper eyes than mine to give a closer look at the
git filter-reposurgery. Although, that looks fine to me too.[...]
Quoted 11 lines
.PHONY: distclean
distclean: cleanMakefile +1
-1- rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ + rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ rm -f .coverage .coverage.* rm -rf htmlcov/setup.cfg +0
-0setup.cfg line 4
Quoted 5 lines
setup.cfg +1
-1@@ -1,5 +1,5 @@ [metadata] -name = qemu +name = qemu.qmp version = file:VERSION maintainer = QEMU Developer TeamIn the spirit of patch 04 ("update maintainer metadata"), do you also want to update here too? s/QEMU Developer Team/QEMU Project?
Quoted 4 lines
Quoted 1 line
Good spot.
...Or, uh. That's exactly what I update in patch 04. Are you asking me to fold in that change earlier? I'm confused now.
Oops, perils of reviewing late in the day. I missed to notice it's the same file. You're right; please ignore my remark. Sorry for the noise.
Signature · 1 line
/kashyap
Re: [qemu.qmp PATCH 02/13] fork qemu.qmp from qemu.git
Quoted 39 lines · Kashyap Chamarthy
Quoted 1 line · John Snow
On Mon, Apr 4, 2022 at 2:54 PM John Snow <[email protected]> wrote:
[...]
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
.gitignore | 2 +- Makefile | 16 ++++++++-------- setup.cfg | 24 +----------------------- setup.py | 2 +- 4 files changed, 11 insertions(+), 33 deletions(-)The changes here look fine to me (and thanks for making it a "micro change"). I'll let sharper eyes than mine to give a closer look at
the
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
git filter-reposurgery. Although, that looks fine to me too.[...]
Quoted 11 lines
.PHONY: distclean
distclean: cleanMakefile +1
-1- rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ + rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ rm -f .coverage .coverage.* rm -rf htmlcov/setup.cfg +0
-0setup.cfg line 4
Quoted 5 lines
setup.cfg +1
-1@@ -1,5 +1,5 @@ [metadata] -name = qemu +name = qemu.qmp version = file:VERSION maintainer = QEMU Developer TeamIn the spirit of patch 04 ("update maintainer metadata"), do you also want to update here too? s/QEMU Developer Team/QEMU Project?
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Good spot.
...Or, uh. That's exactly what I update in patch 04. Are you asking me to fold in that change earlier? I'm confused now.
Oops, perils of reviewing late in the day. I missed to notice it's the same file. You're right; please ignore my remark. Sorry for the noise.
I made the same mistake upon reading the feedback, so we're both guilty 😅
Thanks Kashyap, I appreciate the review.
There's three more series here to apply to the new forked package (not yet re-sent to the ML):
(2) Adding GitLab CI configuration. Not relevant for you, probably.
(3) Adding Sphinx documentation. This builds jsnow.gitlab.io/qemu.qmp/ - I'd be appreciative of your feedback on this. I'm interested both in proofreading and in design feedback here. All comments welcome.
[Though more rigorous changes to the design might be a "later" thing, but the feedback is welcomed all the same.]
(4) Adding automatic package builds and git-based versioning to GitLab. Maybe also not too relevant for you. 🙂
Quoted 5 lines
--
/kashyap
Thanks for your time!
PATCH 3/13 update VERSION to 0.0.0a1
In reply to John Snowqemu.qmp will be independently versioned, without regard to QEMU version. While the repo is being established here, set the version to something impossibly low.
Later, I intend to introduce automatic versioning based on git tags. While the repo is being established it's going to be easier to have a static version while we get bootstrapped.
(Note: PyPI already has a 0.0.0a0 version which I uploaded without prior review to aid in developing and testing this series. This version, and all alpha versions, will naturally be buried after the first real non-alpha release.)
--- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
VERSION +1 -1
@@ -1 +1 @@ -0.6.1.0a1 +0.0.0a1
Signature · 1 line
2.34.1
PATCH 4/13 update maintainer metadata
In reply to John SnowModify "QEMU Developer Team" to "QEMU Project", as this matches the spelling we use for the collective on gitlab.com/qemu-project.
Add myself as the principal maintainer contact.
--- setup.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
setup.cfg +4 -2
@@ -1,8 +1,10 @@ [metadata] name = qemu.qmp version = file:VERSION -maintainer = QEMU Developer Team -maintainer_email = [email protected] +author = QEMU Project +author_email = [email protected] +maintainer = John Snow +maintainer_email = [email protected] url = https://www.qemu.org/ download_url = https://www.qemu.org/download/ description = QEMU Python Build, Debug and SDK tooling.
Signature · 1 line
2.34.1
PATCH 5/13 update project description
In reply to John Snow--- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
setup.cfg +1 -1
@@ -7,7 +7,7 @@ maintainer = John Snow maintainer_email = [email protected] url = https://www.qemu.org/ download_url = https://www.qemu.org/download/ -description = QEMU Python Build, Debug and SDK tooling. +description = QEMU Monitor Protocol library long_description = file:PACKAGE.rst long_description_content_type = text/x-rst classifiers =
Signature · 1 line
2.34.1
Re: [qemu.qmp PATCH 05/13] update project description
Quoted 10 lines · John Snow
Signed-off-by John Snow <[email protected]>--- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)setup.cfg +0
-0
setup.cfg maintainer = John Snow · line 13
Quoted 8 lines
setup.cfg +1
-1@@ -7,7 +7,7 @@ maintainer = John Snow maintainer_email = [email protected] url = https://www.qemu.org/ download_url = https://www.qemu.org/download/ -description = QEMU Python Build, Debug and SDK tooling. +description = QEMU Monitor Protocol library long_description = file:PACKAGE.rst long_description_content_type = text/x-rst classifiers =
--
Beraldo
PATCH 6/13 update project URLs
In reply to John SnowPoint to this library's URLs instead of the entire project's.
FIXME: In development, the URLs here reference jsnow/qemu.qmp. It is intended that the production version gets pushed to qemu-project/python-qemu.qmp and will use URLs that reflect that repository appropriately. This is being done so that I can easily iterate and test on this patch series and make sure everything works exactly as expected.
--- setup.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
setup.cfg +4 -2
@@ -5,8 +5,10 @@ author = QEMU Project author_email = [email protected] maintainer = John Snow maintainer_email = [email protected] -url = https://www.qemu.org/ -download_url = https://www.qemu.org/download/ +# NOTE: Remember to update the commit message when changing these URLs. +url = https://gitlab.com/jsnow/qemu.qmp +# NOTE: Remember to update the commit message when changing these URLs. +download_url = https://gitlab.com/jsnow/qemu.qmp/-/packages description = QEMU Monitor Protocol library long_description = file:PACKAGE.rst long_description_content_type = text/x-rst
Signature · 1 line
2.34.1
PATCH 7/13 add a couple new trove classifiers
In reply to John Snow--- setup.cfg | 2 ++ 1 file changed, 2 insertions(+)
setup.cfg +2 -0
@@ -14,6 +14,7 @@ long_description = file:PACKAGE.rst long_description_content_type = text/x-rst classifiers = Development Status :: 3 - Alpha + Intended Audience :: Developers License :: OSI Approved :: GNU General Public License v2 (GPLv2) Natural Language :: English Operating System :: OS Independent
@@ -23,6 +24,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Topic :: System :: Emulators Typing :: Typed [options]
Signature · 1 line
2.34.1
Re: [qemu.qmp PATCH 07/13] add a couple new trove classifiers
Quoted 28 lines · John Snow
Signed-off-by John Snow <[email protected]>--- setup.cfg | 2 ++ 1 file changed, 2 insertions(+)setup.cfg +2
-0@@ -14,6 +14,7 @@ long_description = file:PACKAGE.rst long_description_content_type = text/x-rst classifiers = Development Status :: 3 - Alpha + Intended Audience :: Developers License :: OSI Approved :: GNU General Public License v2 (GPLv2) Natural Language :: English Operating System :: OS Independent@@ -23,6 +24,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Topic :: System :: Emulators Typing :: Typed [options]Signature · 1 line
2.34.1
--
Beraldo
PATCH 8/13 move README.rst to FILES.rst and update
In reply to John SnowThe intent is to use README.rst as the new package-level readme that will be bundled with the source and be displayed on the GitLab landing page; so move the old "git level readme" over to FILES.rst instead, and update it accordingly.
This is primarily here to just document and explain what all the little bits and pieces of files in the root are and what they do. I find this stuff helpful when I wander over into other projects, so I'd like to extend the same courtesy.
--- README.rst => FILES.rst | 49 +++++++++++------------------------------ MANIFEST.in | 1 - 2 files changed, 13 insertions(+), 37 deletions(-) rename README.rst => FILES.rst (64%)
FILES.rst renamed from README.rst +13 -36
@@ -1,9 +1,14 @@ -QEMU Python Tooling +qemu.qmp File Index =================== -This directory houses Python tooling used by the QEMU project to build, -configure, and test QEMU. It is organized by namespace (``qemu``), and -then by package (e.g. ``qemu/machine``, ``qemu/qmp``, etc). +This file is here to explain the purpose of all the little bits and +pieces of project files in the root directory and how they are +used. It's useful info for those contributing to this project, but not +so much for those who just want to use the library. + + +Much ado about packaging +------------------------ ``setup.py`` is used by ``pip`` to install this tooling to the current environment. ``setup.cfg`` provides the packaging configuration used by
@@ -20,7 +25,7 @@ environment. ``setup.cfg`` provides the packaging configuration used by If you append the ``--editable`` or ``-e`` argument to either invocation above, pip will install in "editable" mode. This installs the package as -a forwarder ("qemu.egg-link") that points to the source tree. In so +a forwarder ("qemu.qmp.egg-link") that points to the source tree. In so doing, the installed package always reflects the latest version in your source tree.
@@ -37,34 +42,6 @@ See `Installing packages using pip and virtual environments for more information. -Using these packages without installing them --------------------------------------------- - -These packages may be used without installing them first, by using one -of two tricks: - -1. Set your PYTHONPATH environment variable to include this source - directory, e.g. ``~/src/qemu/python``. See - https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH - -2. Inside a Python script, use ``sys.path`` to forcibly include a search - path prior to importing the ``qemu`` namespace. See - https://docs.python.org/3/library/sys.html#sys.path - -A strong downside to both approaches is that they generally interfere -with static analysis tools being able to locate and analyze the code -being imported. - -Package installation also normally provides executable console scripts, -so that tools like ``qmp-shell`` are always available via $PATH. To -invoke them without installation, you can invoke e.g.: - -``> PYTHONPATH=~/src/qemu/python python3 -m qemu.qmp.qmp_shell`` - -The mappings between console script name and python module path can be -found in ``setup.cfg``. - - Files in this directory -----------------------
@@ -72,6 +49,7 @@ Files in this directory - ``tests/`` Python package tests directory. - ``avocado.cfg`` Configuration for the Avocado test-runner. Used by ``make check`` et al. +- ``FILES.rst`` you are here! - ``Makefile`` provides some common testing/installation invocations. Try ``make help`` to see available targets. - ``MANIFEST.in`` is read by python setuptools, it specifies additional files
@@ -80,8 +58,7 @@ Files in this directory - ``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``. - ``setup.cfg`` houses setuptools package configuration. - ``setup.py`` is the setuptools installer used by pip; See above. +- ``VERSION`` contains the PEP-440 compliant version used to describe + this package; it is referenced by ``setup.cfg``.
MANIFEST.in +0 -1
@@ -1,3 +1,2 @@ include VERSION include PACKAGE.rst -exclude README.rst
Signature · 1 line
2.34.1
PATCH 9/13 move PACKAGE.rst to README.rst and update
In reply to John SnowThe README here will reflect both what is shown on GitLab and on the PyPI landing page. Update it accordingly, and freshen it up.
FIXME: Update URLs when pushing to the production repo.
--- FILES.rst | 2 +- MANIFEST.in | 2 +- PACKAGE.rst | 43 -------------- README.rst | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 2 +- 5 files changed, 163 insertions(+), 46 deletions(-) delete mode 100644 PACKAGE.rst create mode 100644 README.rst
FILES.rst +1 -1
@@ -54,10 +54,10 @@ Files in this directory Try ``make help`` to see available targets. - ``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`` is used as the README file that is visible on PyPI.org. - ``setup.cfg`` houses setuptools package configuration. - ``setup.py`` is the setuptools installer used by pip; See above. - ``VERSION`` contains the PEP-440 compliant version used to describe
MANIFEST.in +1 -1
@@ -1,2 +1,2 @@ include VERSION -include PACKAGE.rst +include README.rst
PACKAGE.rst deleted +0 -43
43 lines not on this page · raw message
README.rst new file +160 -0
160 lines not on this page · raw message
setup.cfg +1 -1
@@ -10,7 +10,7 @@ url = https://gitlab.com/jsnow/qemu.qmp # NOTE: Remember to update the commit message when changing these URLs. download_url = https://gitlab.com/jsnow/qemu.qmp/-/packages description = QEMU Monitor Protocol library -long_description = file:PACKAGE.rst +long_description = file:README.rst long_description_content_type = text/x-rst classifiers = Development Status :: 3 - Alpha
Signature · 1 line
2.34.1
Re: [qemu.qmp PATCH 09/13] [FIXME] move PACKAGE.rst to README.rst and update
Quoted 8 lines · John Snow
The README here will reflect both what is shown on GitLab and on the PyPI landing page. Update it accordingly, and freshen it up.
FIXME: Update URLs when pushing to the production repo.
Suggested-by Kashyap Chamarthy <[email protected]>Signed-off-by John Snow <[email protected]>---
Hi,
This version reads good to me. :)
[...]
Quoted 33 lines
README.rst new file +32
-0+ +Who isn't this library for? +--------------------------- + +It is not designed for anyone looking for a turn-key solution for VM +management. QEMU is a low-level component that resembles a particularly +impressive Swiss Army knife. This library does not manage that +complexity and is largely "VM-ignorant". It's not a replacement for +projects like `libvirt <https://libvirt.org/>`_, `virt-manager +<https://virt-manager.org/>`_, `GNOME Boxes +<https://wiki.gnome.org/Apps/Boxes>`_, etc. + + +Installing +---------- + +This package can be installed from PyPI with pip: ``> pip3 install +qemu.qmp``. + +Usage +----- + +Launch QEMU with a monitor, e.g.:: + + > qemu-system-x86_64 -qmp unix:qmp.sock,server=on,wait=off + + +Then, at its simplest, script-style usage looks like this:: + + import asyncio + from qemu.qmp import QMPClient +
README.rst line 95
Quoted 10 lines
README.rst new file +10
-0+ async def main(): + qmp = QMPClient('my-vm-nickname') + await qmp.connect('qmp.sock') + + res = await qmp.execute('query-status') + print(f"VM status: {res['status']}") + + await qmp.disconnect() + + asyncio.run(main())
Tested the exmaple; this works!
Quoted 26 lines
README.rst new file +26
-0+The above script will connect to the UNIX socket located at +``qmp.sock``, query the VM's runstate, then print it out +to the terminal:: + + > python3 example.py + VM status: running + + +For more complex usages, especially those that make full advantage of +monitoring asynchronous events, refer to the `online documentation +<https://jsnow.gitlab.io/qemu.qmp/>`_ or type ``import qemu.qmp; +help(qemu.qmp)`` in your Python terminal of choice. + + +Contributing +------------ + +Contributions are quite welcome! Please file bugs using the `GitLab +issue tracker <https://gitlab.com/jsnow/qemu.qmp/-/issues>`_. This +project will accept GitLab merge requests, but due to the close +association with the QEMU project, there are some additional guidelines: + +1. Please use the "Signed-off-by" tag in your commit messages. See + https://wiki.linuxfoundation.org/dco for more information on this + requirement. +
README.rst line 133
Quoted 10 lines
README.rst new file +10
-0+2. This repository won't squash merge requests into a single commit on + pull; each commit should seek to be self-contained (within reason). + +3. Owing to the above, each commit sent as part of a merge request + should not introduce any temporary regressions, even if fixed later + in the same merge request. This is done to preserve bisectability. + +4. Please associate every merge request with at least one `GitLab issue + <https://gitlab.com/jsnow/qemu.qmp/-/issues>`_. This helps with + generating Changelog text and staying organized. Thank you 🙇
/me didn't miss the Japanese bow.
Quoted 9 lines
README.rst new file +9
-0+Developing +^^^^^^^^^^ + +Optional packages necessary for running code quality analysis for this +package can be installed with the optional dependency group "devel": +``pip install qemu.qmp[devel]``. + +``make develop`` can be used to install this package in editable mode +(to the current environment) *and* bring in testing dependencies in one
README.rst line 154
Quoted 10 lines
README.rst new file +10
-0+command. + +``make check`` can be used to run the available tests. Consult ``make +help`` for other targets and tests that make sense for different +occasions. + +Before submitting a pull request, consider running ``make check-tox && +make check-pipenv`` locally to spot any issues that will cause the CI to +fail. These checks use their own virtual environments and won't pollute +your working space.
Nit: Consider hyper-linking "virtual environments" to:
https://docs.python.org/3/library/venv.html#module-venv
(I realize, within context people will recognize the term "virtual environment" is not a virtual guest environment, but a Python venv. I have a mild preference for being explicit here.)
FWIW:
[...]
Signature · 1 line
/kashyap
Re: [qemu.qmp PATCH 09/13] [FIXME] move PACKAGE.rst to README.rst and update
Quoted 124 lines · Kashyap Chamarthy
Quoted 8 lines · John Snow
The README here will reflect both what is shown on GitLab and on the PyPI landing page. Update it accordingly, and freshen it up.
FIXME: Update URLs when pushing to the production repo.
Suggested-by Kashyap Chamarthy <[email protected]>Signed-off-by John Snow <[email protected]>---
Hi,
This version reads good to me. :)
[...]
Quoted 33 lines
README.rst new file +32
-0+ +Who isn't this library for? +--------------------------- + +It is not designed for anyone looking for a turn-key solution for VM +management. QEMU is a low-level component that resembles a particularly +impressive Swiss Army knife. This library does not manage that +complexity and is largely "VM-ignorant". It's not a replacement for +projects like `libvirt <https://libvirt.org/>`_, `virt-manager +<https://virt-manager.org/>`_, `GNOME Boxes +<https://wiki.gnome.org/Apps/Boxes>`_, etc. + + +Installing +---------- + +This package can be installed from PyPI with pip: ``> pip3 install +qemu.qmp``. + +Usage +----- + +Launch QEMU with a monitor, e.g.:: + + > qemu-system-x86_64 -qmp unix:qmp.sock,server=on,wait=off + + +Then, at its simplest, script-style usage looks like this:: + + import asyncio + from qemu.qmp import QMPClient +README.rst line 95
Quoted 10 lines
README.rst new file +10
-0+ async def main(): + qmp = QMPClient('my-vm-nickname') + await qmp.connect('qmp.sock') + + res = await qmp.execute('query-status') + print(f"VM status: {res['status']}") + + await qmp.disconnect() + + asyncio.run(main())Tested the exmaple; this works!
Quoted 26 lines
README.rst new file +26
-0+The above script will connect to the UNIX socket located at +``qmp.sock``, query the VM's runstate, then print it out +to the terminal:: + + > python3 example.py + VM status: running + + +For more complex usages, especially those that make full advantage of +monitoring asynchronous events, refer to the `online documentation +<https://jsnow.gitlab.io/qemu.qmp/>`_ or type ``import qemu.qmp; +help(qemu.qmp)`` in your Python terminal of choice. + + +Contributing +------------ + +Contributions are quite welcome! Please file bugs using the `GitLab +issue tracker <https://gitlab.com/jsnow/qemu.qmp/-/issues>`_. This +project will accept GitLab merge requests, but due to the close +association with the QEMU project, there are some additional guidelines: + +1. Please use the "Signed-off-by" tag in your commit messages. See + https://wiki.linuxfoundation.org/dco for more information on this + requirement. +README.rst line 133
Quoted 10 lines
README.rst new file +10
-0+2. This repository won't squash merge requests into a single commit on + pull; each commit should seek to be self-contained (within reason). + +3. Owing to the above, each commit sent as part of a merge request + should not introduce any temporary regressions, even if fixed later + in the same merge request. This is done to preserve bisectability. + +4. Please associate every merge request with at least one `GitLab issue + <https://gitlab.com/jsnow/qemu.qmp/-/issues>`_. This helps with + generating Changelog text and staying organized. Thank you 🙇/me didn't miss the Japanese bow.
Quoted 9 lines
README.rst new file +9
-0+Developing +^^^^^^^^^^ + +Optional packages necessary for running code quality analysis for this +package can be installed with the optional dependency group "devel": +``pip install qemu.qmp[devel]``. + +``make develop`` can be used to install this package in editable mode +(to the current environment) *and* bring in testing dependencies in oneREADME.rst line 154
Quoted 10 lines
README.rst new file +10
-0+command. + +``make check`` can be used to run the available tests. Consult ``make +help`` for other targets and tests that make sense for different +occasions. + +Before submitting a pull request, consider running ``make check-tox && +make check-pipenv`` locally to spot any issues that will cause the CI to +fail. These checks use their own virtual environments and won't pollute +your working space.Nit: Consider hyper-linking "virtual environments" to:
https://docs.python.org/3/library/venv.html#module-venv
Quoted 4 lines
(I realize, within context people will recognize the term "virtual environment" is not a virtual guest environment, but a Python venv. I have a mild preference for being explicit here.)
OK. it's tough: there's a dual audience in mind here. People who are familiar with Python development and QEMU devs who are not!
A link would suffice, but how to install, develop, and use python packages can get a little complex. Longer than a paragraph, anyway.
Hard to know which complexities to omit and which to front-load.
¯\_(ツ)_/¯
Quoted 3 lines
FWIW:
Reviewed-by Kashyap Chamarthy <[email protected]>
Thanks for your review prior to sending, and thanks for your re-review here 🙂
Quoted 8 lines
[...]
--
/kashyap
PATCH 10/13 docs: add versioning policy to README
In reply to John SnowThe package is in an alpha state, but there's a method to the madness.
--- README.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
README.rst +21 -0
@@ -154,6 +154,27 @@ fail. These checks use their own virtual environments and won't pollute your working space. +Stability and Versioning +------------------------ + +This package uses a major.minor.micro SemVer versioning, with the +following additional semantics during the alpha/beta period (Major +version 0): + +This package treats 0.0.z versions as "alpha" versions. Each micro +version update may change the API incompatibly. Early users are advised +to pin against explicit versions, but check for updates often. + +A planned 0.1.z version will introduce the first "beta", whereafter each +micro update will be backwards compatible, but each minor update will +not be. The first beta version will be released after legacy.py is +removed, and the API is tentatively "stable". + +Thereafter, normal SemVer/PEP440 rules will apply; micro updates will +always be bugfixes, and minor updates will be reserved for backwards +compatible feature changes. + + Changelog ---------
Signature · 1 line
2.34.1
Re: [qemu.qmp PATCH 10/13] docs: add versioning policy to README
Quoted 29 lines · John Snow
The package is in an alpha state, but there's a method to the madness.
Signed-off-by John Snow <[email protected]>--- README.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)README.rst +14
-0@@ -154,6 +154,27 @@ fail. These checks use their own virtual environments and won't pollute your working space. +Stability and Versioning +------------------------ + +This package uses a major.minor.micro SemVer versioning, with the +following additional semantics during the alpha/beta period (Major +version 0): + +This package treats 0.0.z versions as "alpha" versions. Each micro +version update may change the API incompatibly. Early users are advised +to pin against explicit versions, but check for updates often. + +A planned 0.1.z version will introduce the first "beta", whereafter each +micro update will be backwards compatible, but each minor update will +not be. The first beta version will be released after legacy.py is
README.rst fail. These checks use their own virtual environments and won't pollute · line 180
Quoted 10 lines
README.rst +7
-0+removed, and the API is tentatively "stable". + +Thereafter, normal SemVer/PEP440 rules will apply; micro updates will +always be bugfixes, and minor updates will be reserved for backwards +compatible feature changes. + + Changelog ---------
Looks reasonable to me.
Re: [qemu.qmp PATCH 10/13] docs: add versioning policy to README
Quoted 45 lines · Damien Hedde
README.rst fail. These checks use their own virtual
Quoted 12 lines · John Snow
The package is in an alpha state, but there's a method to the madness.
Signed-off-by John Snow <[email protected]>--- README.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)README.rst +0
-0@@ -154,6 +154,27 @@ fail. These checks use their own virtualenvironments and won't pollute
Quoted 17 lines
README.rst +14
-0your working space. +Stability and Versioning +------------------------ + +This package uses a major.minor.micro SemVer versioning, with the +following additional semantics during the alpha/beta period (Major +version 0): + +This package treats 0.0.z versions as "alpha" versions. Each micro +version update may change the API incompatibly. Early users are advised +to pin against explicit versions, but check for updates often. + +A planned 0.1.z version will introduce the first "beta", whereafter each +micro update will be backwards compatible, but each minor update will +not be. The first beta version will be released after legacy.py isREADME.rst fail. These checks use their own virtual environments and won't pollute · line 180
Quoted 10 lines
README.rst +7
-0+removed, and the API is tentatively "stable". + +Thereafter, normal SemVer/PEP440 rules will apply; micro updates will +always be bugfixes, and minor updates will be reserved for backwards +compatible feature changes. + + Changelog ---------Looks reasonable to me.
Quoted 2 lines
Reviewed-by Damien Hedde <[email protected]>
Thanks! I'm hoping to make it easier to spin up more dev tooling outside of the qemu tree. If you've got any wishlist items, feel free to let me know.
It's still early days for Python packages outside of the qemu tree, so nearly everything is on the table still.
(the jsnow/python staging branch has some 17 patches in it that will be checked in to QEMU when development re-opens. The forked qemu.qmp repo will be based off of qemu.git after those patches go in. There's a bit of shakeup where I delete the old qmp lib and replace it with what's currently aqmp. It should hopefully not be a huge nuisance to your work, but if there's issues, let me know.)
Thanks,
--John Snow
PATCH 11/13 add LGPLv2+ and GPLv2 LICENSE files
In reply to John SnowThis clarifies that the majority of this package is LGPLv2+. Copyright blurbs that pointed to QEMU's "COPYING" file are amended to point to this repository's "LICENSE" file instead.
The only file that is not already licensed as LGPLv2+ is legacy.py, which is GPLv2 only. Amend the copyright blurb here to point to LICENSE_GPL2, which is a copy of qemu.git's COPYING file.
legacy.py is scheduled for removal, at which point the license of this library will become exclusively LGPLv2+. As the package currently contains a mixture of LGPLv2+ and GPLv2 code, the trove classifiers will reflect this mixture until such time as the remaining GPLv2 code is removed.
--- FILES.rst | 3 + LICENSE | 481 ++++++++++++++++++++++++++++++++++++++++++ LICENSE_GPL2 | 339 +++++++++++++++++++++++++++++ qemu/qmp/__init__.py | 2 +- qemu/qmp/legacy.py | 2 +- qemu/qmp/qmp_shell.py | 2 +- qemu/qmp/qmp_tui.py | 2 +- setup.cfg | 1 + 8 files changed, 828 insertions(+), 4 deletions(-) create mode 100644 LICENSE create mode 100644 LICENSE_GPL2
FILES.rst +3 -0
@@ -50,6 +50,9 @@ Files in this directory - ``avocado.cfg`` Configuration for the Avocado test-runner. Used by ``make check`` et al. - ``FILES.rst`` you are here! +- ``LICENSE`` This project is licensed as LGPLv2+; except for + ``legacy.py``. +- ``LICENSE_GPL2`` This is the license for ``legacy.py``. - ``Makefile`` provides some common testing/installation invocations. Try ``make help`` to see available targets. - ``MANIFEST.in`` is read by python setuptools, it specifies additional files
LICENSE new file +481 -0
481 lines not on this page · raw message
LICENSE_GPL2 new file +339 -0
339 lines not on this page · raw message
qemu/qmp/__init__.py +1 -1
@@ -19,7 +19,7 @@ managing QMP events. # Based on earlier work by Luiz Capitulino <[email protected]>. # # This work is licensed under the terms of the GNU LGPL, version 2 or -# later. See the COPYING file in the top-level directory. +# later. See the LICENSE file in the top-level directory. import logging
qemu/qmp/legacy.py +1 -1
@@ -18,7 +18,7 @@ old interface. # John Snow <[email protected]> # # This work is licensed under the terms of the GNU GPL, version 2. See -# the COPYING file in the top-level directory. +# the LICENSE_GPL2 file in the top-level directory. # import asyncio
qemu/qmp/qmp_shell.py +1 -1
@@ -6,7 +6,7 @@ # John Snow <[email protected]> # # This work is licensed under the terms of the GNU LGPL, version 2 or -# later. See the COPYING file in the top-level directory. +# later. See the LICENSE file in the top-level directory. # """
qemu/qmp/qmp_tui.py +1 -1
@@ -4,7 +4,7 @@ # Niteesh Babu G S <[email protected]> # # This work is licensed under the terms of the GNU LGPL, version 2 or -# later. See the COPYING file in the top-level directory. +# later. See the LICENSE file in the top-level directory. """ QMP TUI
setup.cfg +1 -0
@@ -15,6 +15,7 @@ long_description_content_type = text/x-rst classifiers = Development Status :: 3 - Alpha Intended Audience :: Developers + License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+) License :: OSI Approved :: GNU General Public License v2 (GPLv2) Natural Language :: English Operating System :: OS Independent
Signature · 1 line
2.34.1
PATCH 12/13 update Pipfile
In reply to John SnowThe name of the package has changed and the dependencies are different, so the Pipfile needs to be updated.
This is a little annoying, but Python doesn't offer any tool (to my knowledge) that behaves in a manner that gives you the *oldest*, but still adequate, versions of dependencies. So testing minimum version requirements is actually kind of challenging.
So, do it manually: pin every version at the minimum that still allows the tests to succeed. This is the best way to experimentally determine what precisely our development minimum criteria actually are.
Most of these follow from just observing the minimum stated requirements for each package, manually, recursively. However, I observed that toml's stated dependency of >= 0.9.4 in pylint actually needs to be >= 0.10.0.
(If you're new to pipenv, it's a tool separate from packaging metadata that is used to provide a precise specification for a virtual environment. In this repository, I am using it to pin a testing environment against the very oldest packages we support in order to test that we do not break compatibility with older versions of python, pylint, mypy, etc.)
--- Pipfile | 37 ++++++- Pipfile.lock | 288 ++++++++++++++++++++++++++++----------------------- 2 files changed, 195 insertions(+), 130 deletions(-)
Pipfile +35 -2
@@ -4,10 +4,43 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] -qemu = {editable = true, extras = ["devel"], path = "."} +avocado-framework = "==90.0" +isort = "==5.1.2" +tox = "==3.18.0" +toml = "==0.10.0" +six = "==1.14.0" +filelock = "==3.0.0" +virtualenv = "==16.0.0" +py = "==1.4.17" +pluggy = "==0.12.0" +pyparsing = "==2.0.2" +"backports.entry-points-selectable" = "==1.0.4" +platformdirs = "==2.0.0" +distlib = "==0.3.1" +importlib-metadata = "==0.12" +zipp = "==0.5" +pylint = "==2.8.0" +astroid = "==2.5.4" +mccabe = "==0.6" +lazy-object-proxy = "==1.4.0" +wrapt = "==1.11" +flake8 = "==3.6.0" +pycodestyle = "==2.4.0" +pyflakes = "==2.0.0" +mypy = "==0.780" +typed-ast = "==1.4.0" +typing-extensions = "==3.7.4" +mypy-extensions = "==0.4.3" +urwid = "==2.1.2" +urwid-readline = "==0.13" +Pygments = "==2.9.0" +"qemu.qmp" = {editable = true, extras = ["devel"], path = "."} [packages] -qemu = {editable = true,path = "."} +urwid = "==2.1.2" +urwid-readline = "==0.13" +Pygments = "==2.9.0" +"qemu.qmp" = {editable = true, extras = ["tui"], path = "."} [requires] python_version = "3.6"
Pipfile.lock +160 -128
430 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 13/13 remove sub-dependency pins from Pipfile
In reply to John SnowNow that we've got a Pipfile.lock generated that works, we can remove the static pins from the Pipfile to allow various dependencies to be added or removed as necessary when updating our direct dependencies in the future.
So long as --keep-outdated is always passed to Pipenv, items that aren't absolutely necessary to update will not be, which will help keep our requirements more at the very oldest possible versions that still work.
--- Pipfile | 33 --------------------------------- 1 file changed, 33 deletions(-)
Pipfile +0 -33
@@ -4,42 +4,9 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] -avocado-framework = "==90.0" -isort = "==5.1.2" -tox = "==3.18.0" -toml = "==0.10.0" -six = "==1.14.0" -filelock = "==3.0.0" -virtualenv = "==16.0.0" -py = "==1.4.17" -pluggy = "==0.12.0" -pyparsing = "==2.0.2" -"backports.entry-points-selectable" = "==1.0.4" -platformdirs = "==2.0.0" -distlib = "==0.3.1" -importlib-metadata = "==0.12" -zipp = "==0.5" -pylint = "==2.8.0" -astroid = "==2.5.4" -mccabe = "==0.6" -lazy-object-proxy = "==1.4.0" -wrapt = "==1.11" -flake8 = "==3.6.0" -pycodestyle = "==2.4.0" -pyflakes = "==2.0.0" -mypy = "==0.780" -typed-ast = "==1.4.0" -typing-extensions = "==3.7.4" -mypy-extensions = "==0.4.3" -urwid = "==2.1.2" -urwid-readline = "==0.13" -Pygments = "==2.9.0" "qemu.qmp" = {editable = true, extras = ["devel"], path = "."} [packages] -urwid = "==2.1.2" -urwid-readline = "==0.13" -Pygments = "==2.9.0" "qemu.qmp" = {editable = true, extras = ["tui"], path = "."} [requires]
Signature · 1 line
2.34.1