summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-07-18 14:07:11 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-07-26 10:36:54 -0700
commit44ca6baf3cfe43abc23e7b6a317b40b92c60e06d (patch)
treee2a65abe10320f8f78b622a170f2f93078f94a11 /docs
parentaed160d035456fc0945a92e8db9b13eca2ad387e (diff)
docs: Remove references to twisted
Except for an FAQ entry about it.
Diffstat (limited to 'docs')
-rw-r--r--docs/source/api/conf.py4
-rw-r--r--docs/source/api/interface.rst17
-rw-r--r--docs/source/conf.py7
-rw-r--r--docs/source/faq.rst8
-rw-r--r--docs/source/installation.rst5
5 files changed, 15 insertions, 26 deletions
diff --git a/docs/source/api/conf.py b/docs/source/api/conf.py
index d43f2404..6277eb4e 100644
--- a/docs/source/api/conf.py
+++ b/docs/source/api/conf.py
@@ -30,10 +30,6 @@ class Mock(object):
return Mock() if name not in ('__file__', '__path__') else '/dev/null'
MOCK_MODULES = ['notmuch', 'notmuch.globals',
- 'twisted', 'twisted.internet',
- 'twisted.internet.defer',
- 'twisted.python',
- 'twisted.python.failure',
'urwid',
'magic',
'argparse']
diff --git a/docs/source/api/interface.rst b/docs/source/api/interface.rst
index 7babae93..50e8baec 100644
--- a/docs/source/api/interface.rst
+++ b/docs/source/api/interface.rst
@@ -15,22 +15,13 @@ key presses to the wrapped root widget and thereby accessing standard urwid
behaviour.
In order to keep the interface non-blocking and react to events like
-terminal size changes, alot makes use of twisted's deferred_ - a
-framework that makes it easy to deal with callbacks. Many commands in alot make use of
-`inline callbacks`_, which allow you to treat deferred-returning functions almost like
-syncronous functions. Consider the following example of a function that prompts for some
-input and acts on it:
-
-.. _deferred: http://twistedmatrix.com/documents/current/core/howto/defer.html
-.. _`inline callbacks`: http://twistedmatrix.com/documents/8.1.0/api/twisted.internet.defer.html#inlineCallbacks
+terminal size changes, alot makes use of asyncio - which allows asynchronous calls
+without the use of callbacks. Alot makes use of the python 3.5 async/await syntax
.. code-block:: python
- from twisted.internet import defer
-
- @defer.inlineCallbacks
- def greet(ui): # ui is instance of alot.ui.UI
- name = yield ui.prompt('pls enter your name')
+ async def greet(ui): # ui is instance of alot.ui.UI
+ name = await ui.prompt('pls enter your name')
ui.notify('your name is: ' + name)
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 19b0d183..d86ae419 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -23,12 +23,7 @@ class MockModule(object):
def __getattr__(cls, name):
return Mock if name not in ('__file__', '__path__') else '/dev/null'
-MOCK_MODULES = ['twisted', 'twisted.internet',
- 'twisted.internet.defer',
- 'twisted.python',
- 'twisted.python.failure',
- 'twisted.internet.protocol',
- 'urwid',
+MOCK_MODULES = ['urwid',
'urwidtrees',
'magic',
'gpg',
diff --git a/docs/source/faq.rst b/docs/source/faq.rst
index 9ad30a8b..17833a05 100644
--- a/docs/source/faq.rst
+++ b/docs/source/faq.rst
@@ -73,3 +73,11 @@ FAQ
Python 2 support. If you still need Python 2 support the 0.7 release is your
best bet.
+.. _faq_8:
+
+8. I thought alot used twisted?
+
+ It used to. After we switched to python 3 we decided to switch to asyncio,
+ which reduced the number of dependencies we have. Twisted is an especially
+ heavy dependency, when we only used their async mechanisms, and not any of
+ the other goodness that twisted has to offer.
diff --git a/docs/source/installation.rst b/docs/source/installation.rst
index 2d3fe44c..f5184f47 100644
--- a/docs/source/installation.rst
+++ b/docs/source/installation.rst
@@ -9,7 +9,6 @@ A full list of dependencies is below:
* `libmagic and python bindings <http://darwinsys.com/file/>`_, ≥ `5.04`
* `configobj <http://www.voidspace.org.uk/python/configobj.html>`_, ≥ `4.7.0`
-* `twisted <http://twistedmatrix.com/trac/>`_, ≥ `10.2.0`:
* `libnotmuch <http://notmuchmail.org/>`_ and it's python bindings, ≥ `0.13`
* `urwid <http://excess.org/urwid/>`_ toolkit, ≥ `1.3.0`
* `urwidtrees <https://github.com/pazz/urwidtrees>`_, ≥ `1.0`
@@ -26,11 +25,11 @@ A full list of dependencies is below:
On debian/ubuntu the rest are packaged as::
- python-setuptools python-magic python-configobj python-twisted python-notmuch python-urwid python-gpg
+ python-setuptools python-magic python-configobj python-notmuch python-urwid python-gpg
On fedora/redhat these are packaged as::
- python-setuptools python-magic python-configobj python-twisted python-notmuch python-urwid python-gpg
+ python-setuptools python-magic python-configobj python-notmuch python-urwid python-gpg
Alot uses `mailcap <http://en.wikipedia.org/wiki/Mailcap>`_ to look up mime-handler for inline
rendering and opening of attachments. For a full description of the maicap protocol consider the