Skip to content

Latest commit

 

History

History
98 lines (68 loc) · 3.28 KB

supported-versions.rst

File metadata and controls

98 lines (68 loc) · 3.28 KB

Supported software

Alfred-Workflow works with all versions of Alfred 2 and 3, but you must own the Powerpack to use Alfred's workflow feature.

All Script Filter features provided by Alfred 2 as of v2.8.3 are supported in the latest version of Alfred-Workflow.

The :class:`~workflow.workflow.Workflow` class is compatible with both Alfred 2 and Alfred 3. The :class:`~workflow.workflow3.Workflow3` class is only compatible with Alfred 3.

:class:`~workflow.workflow3.Workflow3` uses Alfred 3's JSON feedback format. It supports :ref:`workflow variables <workflow-variables>` and more advanced modifiers than :class:`~workflow.workflow.Workflow`/Alfred 2.

Alfred-Workflow supports the same OS X versions as Alfred 2, namely 10.6 (Snow Leopard) and later.

Note

:ref:`Notifications`, added in version 1.15 of Alfred-Workflow, are only available on Mountain Lion (10.8) and above.

Alfred-Workflow supports the 2.6 and 2.7 system Pythons installed on OS X 10.6 (Snow Leopard) and newer (i.e. /usr/bin/python).

Python 3 is not supported and does not work.

Other, non-Apple, non-system versions of Python 2.x (e.g. Homebrew, conda, pyenv etc.) are also not supported and may or may not work.

Here is the full list of new features in Python 2.7, but the most important things if you want your workflow to run on Snow Leopard/Python 2.6 are:

  • :mod:`argparse` is not available in 2.6. Use :mod:`getopt` or include argparse in your workflow. Personally, I'm a big fan of docopt for parsing command-line arguments, but :mod:`argparse` is better for certain use cases.
  • No dictionary views in 2.6.
  • No set literals.
  • No dictionary or set comprehensions.
  • You must specify field numbers for :meth:`str.format`, i.e. '{0}.{1}'.format(first, second) not just '{}.{}'.format(first, second).
  • No :class:`~collections.Counter` or :class:`~collections.OrderedDict` in :mod:`collections`.

Python 2.6 is still included in later versions of OS X (up to and including Yosemite), so run your Python scripts with /usr/bin/python2.6 in addition to /usr/bin/python (2.7) to make sure they will run on Snow Leopard.

Three-and-a-half big reasons:

  1. Python 3 isn't installed by default on any version of OS X.
  2. Python 3 doesn't get along well with Alfred 2.
  3. Alfred-Workflow is precisely the kind of project that's hard to make 2- and 3-compatible.
  4. Python 2.6 compatiblity is a hard requirement, and writing 2.6- and 3-compatible code is even harder.

Now that Alfred 3 is available and has some significant new features, there is no chance of this version (1.x.x) of Alfred-Workflow getting Python 3 support, as development has effectively stopped in favour of version 2.

When Python 3 support comes, it will be in version 2 or 3 of the library, which are targeted at Alfred 3, which eliminates problems 2 and 4.