* [PATCH] python/notmuch2: fix typo for ObjectDestroyedError
@ 2019-12-23 21:02 Daniel Kahn Gillmor
2019-12-23 21:06 ` [PATCH] python/notmuch2: fix typo for "destroyed" Daniel Kahn Gillmor
2019-12-23 22:14 ` [PATCH] python/notmuch2: fix typo for ObjectDestroyedError David Bremner
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Kahn Gillmor @ 2019-12-23 21:02 UTC (permalink / raw)
To: Notmuch Mail
There is no functional change here, just a fix to a typo in the
docstrings.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
---
bindings/python-cffi/notmuch2/__init__.py | 2 +-
bindings/python-cffi/notmuch2/_database.py | 4 ++--
bindings/python-cffi/notmuch2/_tags.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bindings/python-cffi/notmuch2/__init__.py b/bindings/python-cffi/notmuch2/__init__.py
index 4d76ec15..613317e0 100644
--- a/bindings/python-cffi/notmuch2/__init__.py
+++ b/bindings/python-cffi/notmuch2/__init__.py
@@ -13,7 +13,7 @@ Errors
All errors occuring due to errors from the underlying notmuch database
are subclasses of the :exc:`NotmuchError`. Due to memory management
it is possible to try and use an object after it has been freed. In
-this case a :exc:`ObjectDestoryedError` will be raised.
+this case a :exc:`ObjectDestroyedError` will be raised.
Memory Management
=================
diff --git a/bindings/python-cffi/notmuch2/_database.py b/bindings/python-cffi/notmuch2/_database.py
index a1c624a7..7ef4fe17 100644
--- a/bindings/python-cffi/notmuch2/_database.py
+++ b/bindings/python-cffi/notmuch2/_database.py
@@ -342,7 +342,7 @@ class Database(base.NotmuchObject):
def default_indexopts(self):
"""Returns default index options for the database.
- :raises ObjectDestoryedError: if used after destroyed.
+ :raises ObjectDestroyedError: if used after destroyed.
:returns: :class:`IndexOptions`.
"""
@@ -770,7 +770,7 @@ class IndexOptions(base.NotmuchObject):
You can change this policy by assigning a new
:class:`DecryptionPolicy` to this property.
- :raises ObjectDestoryedError: if used after destroyed.
+ :raises ObjectDestroyedError: if used after destroyed.
:returns: A :class:`DecryptionPolicy` enum instance.
"""
diff --git a/bindings/python-cffi/notmuch2/_tags.py b/bindings/python-cffi/notmuch2/_tags.py
index fe422a79..212852a8 100644
--- a/bindings/python-cffi/notmuch2/_tags.py
+++ b/bindings/python-cffi/notmuch2/_tags.py
@@ -277,7 +277,7 @@ class TagsIter(base.NotmuchObject, collections.abc.Iterator):
:param errors: If using a codec, this is the error handler.
See :func:`str.decode` to which this is passed on.
- :raises ObjectDestoryedError: if used after destroyed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
_tags_p = base.MemoryPointer()
--
2.24.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] python/notmuch2: fix typo for "destroyed"
2019-12-23 21:02 [PATCH] python/notmuch2: fix typo for ObjectDestroyedError Daniel Kahn Gillmor
@ 2019-12-23 21:06 ` Daniel Kahn Gillmor
2019-12-23 22:15 ` David Bremner
2019-12-23 22:14 ` [PATCH] python/notmuch2: fix typo for ObjectDestroyedError David Bremner
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Kahn Gillmor @ 2019-12-23 21:06 UTC (permalink / raw)
To: Notmuch Mail
Another fix to the docstrings, this time for the English part of the
docstrings, not the Python class name. No functional changes here.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
---
bindings/python-cffi/notmuch2/_database.py | 28 +++++++++++-----------
bindings/python-cffi/notmuch2/_errors.py | 2 +-
bindings/python-cffi/notmuch2/_message.py | 24 +++++++++----------
bindings/python-cffi/notmuch2/_thread.py | 20 ++++++++--------
4 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/bindings/python-cffi/notmuch2/_database.py b/bindings/python-cffi/notmuch2/_database.py
index 7ef4fe17..95f59ca0 100644
--- a/bindings/python-cffi/notmuch2/_database.py
+++ b/bindings/python-cffi/notmuch2/_database.py
@@ -262,7 +262,7 @@ class Database(base.NotmuchObject):
This is returned as a :class:`pathlib.Path` instance.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
try:
return self._cache_path
@@ -277,7 +277,7 @@ class Database(base.NotmuchObject):
This is a positive integer.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
try:
return self._cache_version
@@ -296,7 +296,7 @@ class Database(base.NotmuchObject):
A read-only database will never be upgradable.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_database_needs_upgrade(self._db_p)
return bool(ret)
@@ -320,7 +320,7 @@ class Database(base.NotmuchObject):
not imply durability, it only ensures the changes are
performed atomically.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ctx = AtomicContext(self, '_db_p')
return ctx
@@ -330,7 +330,7 @@ class Database(base.NotmuchObject):
Returned as a ``(revision, uuid)`` namedtuple.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
raw_uuid = capi.ffi.new('char**')
rev = capi.lib.notmuch_database_get_revision(self._db_p, raw_uuid)
@@ -387,7 +387,7 @@ class Database(base.NotmuchObject):
READ_ONLY mode.
:raises UpgradeRequiredError: The database must be upgraded
first.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
if not hasattr(os, 'PathLike') and isinstance(filename, pathlib.Path):
filename = bytes(filename)
@@ -426,7 +426,7 @@ class Database(base.NotmuchObject):
READ_ONLY mode.
:raises UpgradeRequiredError: The database must be upgraded
first.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
if not hasattr(os, 'PathLike') and isinstance(filename, pathlib.Path):
filename = bytes(filename)
@@ -458,7 +458,7 @@ class Database(base.NotmuchObject):
:raises OutOfMemoryError: When there is no memory to allocate
the message instance.
:raises XapianError: A Xapian exception ocurred.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
msg_pp = capi.ffi.new('notmuch_message_t **')
ret = capi.lib.notmuch_database_find_message(self._db_p,
@@ -489,7 +489,7 @@ class Database(base.NotmuchObject):
:raises OutOfMemoryError: When there is no memory to allocate
the message instance.
:raises XapianError: A Xapian exception ocurred.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
if not hasattr(os, 'PathLike') and isinstance(filename, pathlib.Path):
filename = bytes(filename)
@@ -522,7 +522,7 @@ class Database(base.NotmuchObject):
:rtype: ImmutableTagSet
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
try:
ref = self._cached_tagset
@@ -570,7 +570,7 @@ class Database(base.NotmuchObject):
:raises OutOfMemoryError: if no memory is available to
allocate the query.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
query = self._create_query(query,
omit_excluded=omit_excluded,
@@ -587,7 +587,7 @@ class Database(base.NotmuchObject):
:returns: An iterator over the messages found.
:rtype: MessageIter
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
query = self._create_query(query,
omit_excluded=omit_excluded,
@@ -635,7 +635,7 @@ class AtomicContext:
section is not active. When it is raised at exit time the
atomic section is still active and you may need to try using
:meth:`force_end`.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
def __init__(self, db, ptr_name):
@@ -675,7 +675,7 @@ class AtomicContext:
not ended.
:raises UnbalancedAtomicError: If the database was currently
not in an atomic section.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_database_end_atomic(self._ptr())
if ret != capi.lib.NOTMUCH_STATUS_SUCCESS:
diff --git a/bindings/python-cffi/notmuch2/_errors.py b/bindings/python-cffi/notmuch2/_errors.py
index 1c88763b..13369445 100644
--- a/bindings/python-cffi/notmuch2/_errors.py
+++ b/bindings/python-cffi/notmuch2/_errors.py
@@ -97,7 +97,7 @@ class IllegalArgumentError(NotmuchError): pass
class ObjectDestroyedError(NotmuchError):
- """The object has already been destoryed and it's memory freed.
+ """The object has already been destroyed and it's memory freed.
This occurs when :meth:`destroy` has been called on the object but
you still happen to have access to the object. This should not
diff --git a/bindings/python-cffi/notmuch2/_message.py b/bindings/python-cffi/notmuch2/_message.py
index bb561426..c5fdbf6d 100644
--- a/bindings/python-cffi/notmuch2/_message.py
+++ b/bindings/python-cffi/notmuch2/_message.py
@@ -98,7 +98,7 @@ class Message(base.NotmuchObject):
bytes() on it will return the original bytes used to create
it.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_message_get_message_id(self._msg_p)
return base.BinString(capi.ffi.string(ret))
@@ -116,7 +116,7 @@ class Message(base.NotmuchObject):
bytes() on it will return the original bytes used to create
it.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_message_get_thread_id(self._msg_p)
return base.BinString(capi.ffi.string(ret))
@@ -128,7 +128,7 @@ class Message(base.NotmuchObject):
If multiple files in the database contain the same message ID
this will be just one of the files, chosen at random.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_message_get_filename(self._msg_p)
return pathlib.Path(os.fsdecode(capi.ffi.string(ret)))
@@ -140,7 +140,7 @@ class Message(base.NotmuchObject):
See :attr:`path` for details, this is the same but does return
the path as a bytes object which is faster but less convenient.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_message_get_filename(self._msg_p)
return capi.ffi.string(ret)
@@ -155,7 +155,7 @@ class Message(base.NotmuchObject):
:returns: Iterator yielding :class:`pathlib.Path` instances.
:rtype: iter
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
fnames_p = capi.lib.notmuch_message_get_filenames(self._msg_p)
return PathIter(self, fnames_p)
@@ -169,7 +169,7 @@ class Message(base.NotmuchObject):
:returns: Iterator yielding :class:`bytes` instances.
:rtype: iter
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
fnames_p = capi.lib.notmuch_message_get_filenames(self._msg_p)
return FilenamesIter(self, fnames_p)
@@ -184,7 +184,7 @@ class Message(base.NotmuchObject):
:attr:`messageid` and :attr:`threadid` attributes are valid
for it.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_message_get_flag(
self._msg_p, capi.lib.NOTMUCH_MESSAGE_FLAG_GHOST)
@@ -201,7 +201,7 @@ class Message(base.NotmuchObject):
these messages to be flagged, which results in this property
being set to *True*.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_message_get_flag(
self._msg_p, capi.lib.NOTMUCH_MESSAGE_FLAG_EXCLUDED)
@@ -216,7 +216,7 @@ class Message(base.NotmuchObject):
message's header, you can get the original header value with
:meth:`header`.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_message_get_date(self._msg_p)
@@ -240,7 +240,7 @@ class Message(base.NotmuchObject):
:raises LookupError: if the header is not present.
:raises NullPointerError: For unexpected notmuch errors.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
# The returned is supposedly guaranteed to be UTF-8. Header
# names must be ASCII as per RFC x822.
@@ -263,7 +263,7 @@ class Message(base.NotmuchObject):
:raises ReadOnlyDatabaseError: When manipulating tags on a
database opened in read-only mode.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
try:
ref = self._cached_tagset
@@ -297,7 +297,7 @@ class Message(base.NotmuchObject):
:raises UnbalancedFreezeThawError: if you somehow managed to
call __exit__ of this context manager more than once. Why
did you do that?
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_message_freeze(self._msg_p)
if ret != capi.lib.NOTMUCH_STATUS_SUCCESS:
diff --git a/bindings/python-cffi/notmuch2/_thread.py b/bindings/python-cffi/notmuch2/_thread.py
index a754749f..bb76f2dc 100644
--- a/bindings/python-cffi/notmuch2/_thread.py
+++ b/bindings/python-cffi/notmuch2/_thread.py
@@ -42,7 +42,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
def threadid(self):
"""The thread ID as a :class:`BinString`.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_thread_get_thread_id(self._thread_p)
return base.BinString.from_cffi(ret)
@@ -50,7 +50,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
def __len__(self):
"""Return the number of messages in the thread.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_total_messages(self._thread_p)
@@ -59,7 +59,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
:returns: An iterator yielding :class:`Message` instances.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
msgs_p = capi.lib.notmuch_thread_get_toplevel_messages(self._thread_p)
return message.MessageIter(self, msgs_p, db=self._db)
@@ -69,7 +69,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
:returns: An iterator yielding :class:`Message` instances.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
msgs_p = capi.lib.notmuch_thread_get_messages(self._thread_p)
return message.MessageIter(self, msgs_p, db=self._db)
@@ -82,7 +82,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
which did directly match the search query which this thread
originates from.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_matched_messages(self._thread_p)
@@ -100,7 +100,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
:returns: The stringified list of authors.
:rtype: BinString
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_thread_get_authors(self._thread_p)
return base.BinString.from_cffi(ret)
@@ -115,7 +115,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
:returns: The thread's subject.
:rtype: BinString
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_thread_get_subject(self._thread_p)
return base.BinString.from_cffi(ret)
@@ -127,7 +127,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
The time the first message was sent as an integer number of
seconds since the *epoch*, 1 Jan 1970.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_oldest_date(self._thread_p)
@@ -138,7 +138,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
The time the last message was sent as an integer number of
seconds since the *epoch*, 1 Jan 1970.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_newest_date(self._thread_p)
@@ -160,7 +160,7 @@ class Thread(base.NotmuchObject, collections.abc.Iterable):
:rtype: ImmutableTagSet
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
try:
ref = self._cached_tagset
--
2.24.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] python/notmuch2: fix typo for ObjectDestroyedError
2019-12-23 21:02 [PATCH] python/notmuch2: fix typo for ObjectDestroyedError Daniel Kahn Gillmor
2019-12-23 21:06 ` [PATCH] python/notmuch2: fix typo for "destroyed" Daniel Kahn Gillmor
@ 2019-12-23 22:14 ` David Bremner
1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2019-12-23 22:14 UTC (permalink / raw)
To: Daniel Kahn Gillmor, Notmuch Mail
Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:
> There is no functional change here, just a fix to a typo in the
> docstrings.
>
> Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
pushed.
d
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] python/notmuch2: fix typo for "destroyed"
2019-12-23 21:06 ` [PATCH] python/notmuch2: fix typo for "destroyed" Daniel Kahn Gillmor
@ 2019-12-23 22:15 ` David Bremner
0 siblings, 0 replies; 4+ messages in thread
From: David Bremner @ 2019-12-23 22:15 UTC (permalink / raw)
To: Daniel Kahn Gillmor, Notmuch Mail
Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:
> Another fix to the docstrings, this time for the English part of the
> docstrings, not the Python class name. No functional changes here.
>
> Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
pushed,
d
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-23 22:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-23 21:02 [PATCH] python/notmuch2: fix typo for ObjectDestroyedError Daniel Kahn Gillmor
2019-12-23 21:06 ` [PATCH] python/notmuch2: fix typo for "destroyed" Daniel Kahn Gillmor
2019-12-23 22:15 ` David Bremner
2019-12-23 22:14 ` [PATCH] python/notmuch2: fix typo for ObjectDestroyedError David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).