All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <eduardo@habkost.net>,
	Kevin Wolf <kwolf@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	Daniel Berrange <berrange@redhat.com>,
	Beraldo Leal <bleal@redhat.com>,
	qemu-block@nongnu.org, Andrea Bolognani <abologna@redhat.com>,
	Wainer Moschetta <wainersm@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Hanna Reitz <hreitz@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>, Cleber Rosa <crosa@redhat.com>,
	John Snow <jsnow@redhat.com>
Subject: [PATCH v2 05/25] python/aqmp: rename AQMPError to QMPError
Date: Wed, 15 Dec 2021 14:39:19 -0500	[thread overview]
Message-ID: <20211215193939.3768033-6-jsnow@redhat.com> (raw)
In-Reply-To: <20211215193939.3768033-1-jsnow@redhat.com>

This is in preparation for renaming qemu.aqmp to qemu.qmp. I should have
done this from this from the very beginning, but it's a convenient time
to make sure this churn is taken care of.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/qemu/aqmp/__init__.py   |  6 +++---
 python/qemu/aqmp/error.py      | 12 ++++++------
 python/qemu/aqmp/events.py     |  4 ++--
 python/qemu/aqmp/legacy.py     |  4 ++--
 python/qemu/aqmp/protocol.py   |  8 ++++----
 python/qemu/aqmp/qmp_client.py |  8 ++++----
 6 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/python/qemu/aqmp/__init__.py b/python/qemu/aqmp/__init__.py
index c6fa2dda58..e1efab00af 100644
--- a/python/qemu/aqmp/__init__.py
+++ b/python/qemu/aqmp/__init__.py
@@ -6,7 +6,7 @@
 QEMU Guest Agent, and the QEMU Storage Daemon.
 
 `QMPClient` provides the main functionality of this package. All errors
-raised by this library dervive from `AQMPError`, see `aqmp.error` for
+raised by this library dervive from `QMPError`, see `aqmp.error` for
 additional detail. See `aqmp.events` for an in-depth tutorial on
 managing QMP events.
 """
@@ -23,7 +23,7 @@
 
 import logging
 
-from .error import AQMPError
+from .error import QMPError
 from .events import EventListener
 from .message import Message
 from .protocol import (
@@ -48,7 +48,7 @@
     'Runstate',
 
     # Exceptions, most generic to most explicit
-    'AQMPError',
+    'QMPError',
     'StateError',
     'ConnectError',
     'ExecuteError',
diff --git a/python/qemu/aqmp/error.py b/python/qemu/aqmp/error.py
index 781f49b008..24ba4d5054 100644
--- a/python/qemu/aqmp/error.py
+++ b/python/qemu/aqmp/error.py
@@ -1,21 +1,21 @@
 """
-AQMP Error Classes
+QMP Error Classes
 
 This package seeks to provide semantic error classes that are intended
 to be used directly by clients when they would like to handle particular
 semantic failures (e.g. "failed to connect") without needing to know the
 enumeration of possible reasons for that failure.
 
-AQMPError serves as the ancestor for all exceptions raised by this
+QMPError serves as the ancestor for all exceptions raised by this
 package, and is suitable for use in handling semantic errors from this
 library. In most cases, individual public methods will attempt to catch
 and re-encapsulate various exceptions to provide a semantic
 error-handling interface.
 
-.. admonition:: AQMP Exception Hierarchy Reference
+.. admonition:: QMP Exception Hierarchy Reference
 
  |   `Exception`
- |    +-- `AQMPError`
+ |    +-- `QMPError`
  |         +-- `ConnectError`
  |         +-- `StateError`
  |         +-- `ExecInterruptedError`
@@ -31,11 +31,11 @@
 """
 
 
-class AQMPError(Exception):
+class QMPError(Exception):
     """Abstract error class for all errors originating from this package."""
 
 
-class ProtocolError(AQMPError):
+class ProtocolError(QMPError):
     """
     Abstract error class for protocol failures.
 
diff --git a/python/qemu/aqmp/events.py b/python/qemu/aqmp/events.py
index 5f7150c78d..f3d4e2b5e8 100644
--- a/python/qemu/aqmp/events.py
+++ b/python/qemu/aqmp/events.py
@@ -443,7 +443,7 @@ def accept(self, event) -> bool:
     Union,
 )
 
-from .error import AQMPError
+from .error import QMPError
 from .message import Message
 
 
@@ -451,7 +451,7 @@ def accept(self, event) -> bool:
 EventFilter = Callable[[Message], bool]
 
 
-class ListenerError(AQMPError):
+class ListenerError(QMPError):
     """
     Generic error class for `EventListener`-related problems.
     """
diff --git a/python/qemu/aqmp/legacy.py b/python/qemu/aqmp/legacy.py
index 9431fe9330..27df22818a 100644
--- a/python/qemu/aqmp/legacy.py
+++ b/python/qemu/aqmp/legacy.py
@@ -17,7 +17,7 @@
 
 import qemu.qmp
 
-from .error import AQMPError
+from .error import QMPError
 from .protocol import Runstate, SocketAddrT
 from .qmp_client import QMPClient
 
@@ -168,7 +168,7 @@ def __del__(self) -> None:
             # Nothing we can do about it now, but if we don't raise our
             # own error, the user will be treated to a lot of traceback
             # they might not understand.
-            raise AQMPError(
+            raise QMPError(
                 "QEMUMonitorProtocol.close()"
                 " was not called before object was garbage collected"
             )
diff --git a/python/qemu/aqmp/protocol.py b/python/qemu/aqmp/protocol.py
index 42a897e2fe..9ee6fe4ae2 100644
--- a/python/qemu/aqmp/protocol.py
+++ b/python/qemu/aqmp/protocol.py
@@ -29,7 +29,7 @@
     cast,
 )
 
-from .error import AQMPError
+from .error import QMPError
 from .util import (
     bottom_half,
     create_task,
@@ -65,7 +65,7 @@ class Runstate(Enum):
     DISCONNECTING = 3
 
 
-class ConnectError(AQMPError):
+class ConnectError(QMPError):
     """
     Raised when the initial connection process has failed.
 
@@ -90,7 +90,7 @@ def __str__(self) -> str:
         return f"{self.error_message}: {cause}"
 
 
-class StateError(AQMPError):
+class StateError(QMPError):
     """
     An API command (connect, execute, etc) was issued at an inappropriate time.
 
@@ -363,7 +363,7 @@ async def _new_session(self,
             This exception will wrap a more concrete one. In most cases,
             the wrapped exception will be `OSError` or `EOFError`. If a
             protocol-level failure occurs while establishing a new
-            session, the wrapped error may also be an `AQMPError`.
+            session, the wrapped error may also be an `QMPError`.
         """
         assert self.runstate == Runstate.IDLE
 
diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py
index 6a985ffe30..f1a845cc82 100644
--- a/python/qemu/aqmp/qmp_client.py
+++ b/python/qemu/aqmp/qmp_client.py
@@ -20,7 +20,7 @@
     cast,
 )
 
-from .error import AQMPError, ProtocolError
+from .error import ProtocolError, QMPError
 from .events import Events
 from .message import Message
 from .models import ErrorResponse, Greeting
@@ -66,7 +66,7 @@ class NegotiationError(_WrappedProtocolError):
     """
 
 
-class ExecuteError(AQMPError):
+class ExecuteError(QMPError):
     """
     Exception raised by `QMPClient.execute()` on RPC failure.
 
@@ -87,7 +87,7 @@ def __init__(self, error_response: ErrorResponse,
         self.error_class: str = error_response.error.class_
 
 
-class ExecInterruptedError(AQMPError):
+class ExecInterruptedError(QMPError):
     """
     Exception raised by `execute()` (et al) when an RPC is interrupted.
 
@@ -641,7 +641,7 @@ def send_fd_scm(self, fd: int) -> None:
         sock = self._writer.transport.get_extra_info('socket')
 
         if sock.family != socket.AF_UNIX:
-            raise AQMPError("Sending file descriptors requires a UNIX socket.")
+            raise QMPError("Sending file descriptors requires a UNIX socket.")
 
         if not hasattr(sock, 'sendmsg'):
             # We need to void the warranty sticker.
-- 
2.31.1



  parent reply	other threads:[~2021-12-15 19:47 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 19:39 [PATCH v2 00/25] Python: delete synchronous qemu.qmp package John Snow
2021-12-15 19:39 ` [PATCH v2 01/25] python/aqmp: add __del__ method to legacy interface John Snow
2021-12-16  9:31   ` Vladimir Sementsov-Ogievskiy
2021-12-16 17:09     ` John Snow
2021-12-16 12:26   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 02/25] python/aqmp: handle asyncio.TimeoutError on execute() John Snow
2021-12-16  9:51   ` Vladimir Sementsov-Ogievskiy
2021-12-16 17:22     ` John Snow
2021-12-16 17:59       ` Vladimir Sementsov-Ogievskiy
2021-12-16 12:39   ` Beraldo Leal
2021-12-16 17:26     ` John Snow
2021-12-15 19:39 ` [PATCH v2 03/25] python/aqmp: copy type definitions from qmp John Snow
2021-12-16 10:00   ` Vladimir Sementsov-Ogievskiy
2021-12-16 10:19   ` Daniel P. Berrangé
2021-12-16 17:31     ` John Snow
2021-12-15 19:39 ` [PATCH v2 04/25] python/aqmp: add SocketAddrT to package root John Snow
2021-12-16 10:01   ` Vladimir Sementsov-Ogievskiy
2021-12-16 13:16   ` Beraldo Leal
2021-12-15 19:39 ` John Snow [this message]
2021-12-16 10:08   ` [PATCH v2 05/25] python/aqmp: rename AQMPError to QMPError Vladimir Sementsov-Ogievskiy
2021-12-16 17:01     ` John Snow
2021-12-15 19:39 ` [PATCH v2 06/25] python/qemu-ga-client: update instructions to newer CLI syntax John Snow
2021-12-16 10:14   ` Vladimir Sementsov-Ogievskiy
2021-12-16 17:36     ` John Snow
2021-12-16 10:16   ` Daniel P. Berrangé
2021-12-15 19:39 ` [PATCH v2 07/25] python/qmp: switch qemu-ga-client to AQMP John Snow
2021-12-16 10:31   ` Vladimir Sementsov-Ogievskiy
2021-12-16 17:43     ` John Snow
2021-12-16 13:21   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 08/25] python/qmp: switch qom tools " John Snow
2021-12-16 10:43   ` Vladimir Sementsov-Ogievskiy
2021-12-16 13:26   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 09/25] python/qmp: switch qmp-shell " John Snow
2021-12-16 10:45   ` Vladimir Sementsov-Ogievskiy
2021-12-15 19:39 ` [PATCH v2 10/25] python: move qmp utilities to python/qemu/utils John Snow
2021-12-16 10:48   ` Vladimir Sementsov-Ogievskiy
2021-12-15 19:39 ` [PATCH v2 11/25] python: move qmp-shell under the AQMP package John Snow
2021-12-16 10:49   ` Vladimir Sementsov-Ogievskiy
2021-12-16 13:31   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 12/25] python/machine: permanently switch to AQMP John Snow
2021-12-16 10:51   ` Vladimir Sementsov-Ogievskiy
2021-12-16 17:49     ` John Snow
2021-12-16 13:33   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 13/25] scripts/cpu-x86-uarch-abi: fix CLI parsing John Snow
2021-12-16 10:13   ` Daniel P. Berrangé
2021-12-16 10:55   ` Vladimir Sementsov-Ogievskiy
2021-12-15 19:39 ` [PATCH v2 14/25] scripts/cpu-x86-uarch-abi: switch to AQMP John Snow
2021-12-16 10:14   ` Daniel P. Berrangé
2021-12-16 10:56   ` Vladimir Sementsov-Ogievskiy
2021-12-16 13:46   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 15/25] scripts/render-block-graph: " John Snow
2021-12-16 10:57   ` Vladimir Sementsov-Ogievskiy
2021-12-16 20:48     ` John Snow
2021-12-16 13:47   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 16/25] scripts/bench-block-job: " John Snow
2021-12-16 10:58   ` Vladimir Sementsov-Ogievskiy
2021-12-16 13:49   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 17/25] iotests/mirror-top-perms: " John Snow
2021-12-16 11:01   ` Vladimir Sementsov-Ogievskiy
2021-12-16 13:50   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 18/25] iotests: " John Snow
2021-12-16 11:02   ` Vladimir Sementsov-Ogievskiy
2021-12-16 13:55   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 19/25] python: temporarily silence pylint duplicate-code warnings John Snow
2021-12-16 11:02   ` Vladimir Sementsov-Ogievskiy
2021-12-15 19:39 ` [PATCH v2 20/25] python/aqmp: take QMPBadPortError and parse_address from qemu.qmp John Snow
2021-12-16 11:05   ` Vladimir Sementsov-Ogievskiy
2021-12-16 14:03   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 21/25] python/aqmp: fully separate from qmp.QEMUMonitorProtocol John Snow
2021-12-16 11:11   ` Vladimir Sementsov-Ogievskiy
2021-12-16 14:11   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 22/25] python/aqmp: copy qmp docstrings to qemu.aqmp.legacy John Snow
2021-12-16 11:28   ` Vladimir Sementsov-Ogievskiy
2021-12-16 14:15   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 23/25] python: remove the old QMP package John Snow
2021-12-16 11:30   ` Vladimir Sementsov-Ogievskiy
2021-12-16 14:17   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 24/25] python: re-enable pylint duplicate-code warnings John Snow
2021-12-16 11:31   ` Vladimir Sementsov-Ogievskiy
2021-12-16 14:18   ` Beraldo Leal
2021-12-15 19:39 ` [PATCH v2 25/25] python: rename qemu.aqmp to qemu.qmp John Snow
2021-12-16 11:41   ` Vladimir Sementsov-Ogievskiy
2021-12-16 21:10     ` John Snow
2021-12-17  7:39       ` Vladimir Sementsov-Ogievskiy
2021-12-17 16:28         ` John Snow
2021-12-16 10:50 ` [PATCH v2 00/25] Python: delete synchronous qemu.qmp package Daniel P. Berrangé
2021-12-16 16:27   ` John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211215193939.3768033-6-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=abologna@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=hreitz@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.