Commit Graph
14 Commits
Author SHA1 Message Date
Roy Wellington Ⅳ 8046cdc26a Make uses of StringIO.StringIO Python 3 compatible. 2016-02-26 22:02:16 -08:00
Roy Wellington Ⅳ 74a31c737c The Queue module moved to queue in Python 3.
Use six.moves.queue to import the right module regardless.
2016-02-26 22:02:16 -08:00
Roy Wellington Ⅳ edf6d2db24 Make these print statements Python 3 compatible. 2016-02-26 22:02:16 -08:00
Roy Wellington Ⅳ af22467e07 Newline at end of tox.ini. 2016-02-26 21:53:31 -08:00
Roy Wellington Ⅳ 19b93ec025 Update this octal literal to be Python3 compatible.
The `"0" 1*digits` syntax is gone in Python 3. This syntax replaced it.
It was ported into Python 2 at 2.6[1].

[1]: https://docs.python.org/2/whatsnew/2.6.html
2016-02-26 21:18:20 -08:00
Roy Wellington Ⅳ b965e8349e Use six.iteritems instead of .iteritems for Python 3.
And in one place, `list(six.iterkeys(<obj>))`, as the values didn't
appear to be used.
2016-02-26 21:18:20 -08:00
Roy Wellington Ⅳ 3a303dbf40 Use six to make this list + list work in Python 3.
The RHS here in Python 3 is a set-like object over keys; it's
essentially the same as .iterkeys() in Python 2. Unfortunately, + is not
defined for list + <dict>.keys().

In Python 3, it's idiomatic to simply list(VERBS.keys()) here;
basically, take that and use six to make it Python 2 compatible.
2016-02-26 21:18:20 -08:00
Roy Wellington Ⅳ 9f372bfa38 Don't mix tabs & spaces in Python.
It's a bit silly, and might cause someone a lot of grief to debug.
2016-02-20 01:38:45 -08:00
Roy Wellington Ⅳ e9d981aceb Change zope's classProvides to be a class decorator.
When attempting to import any module that uses
zope.interface.classProvides in Python 3, a TypeError is raised; it
reads:

    TypeError: Class advice impossible in Python3.  Use the @provider
    class decorator instead.

Following the listed advice seems to function in Python 3.
2016-02-20 00:41:01 -08:00
Roy Wellington Ⅳ b6142c13d6 Change zope's implements to be a class decorator.
When attempting to import any module that uses zope.interface.implements
in Python 3, a TypeError is raised; it reads:

    TypeError: Class advice impossible in Python3.  Use the @implementer
    class decorator instead.

Following the listed advice seems to function in Python 3.
2016-02-20 00:37:40 -08:00
Roy Wellington Ⅳ 2369f1253b Fix import ordering s.t. future versions of pylint won't warn on it.
pylint gets more strict about import order in the future, so adjust it
now to make upgrading smoother. pylint is following the order from
PEP-8:

> Imports should be grouped in the following order:
>
> 1. standard library imports
> 2. related third party imports
> 3. local application/library specific imports
>
> You should put a blank line between each group of imports.
2016-02-07 12:58:35 -08:00
Roy Wellington Ⅳ f9327d5535 Make this use of urlparse.urlparse Python 3 compatible. 2016-02-07 12:56:07 -08:00
Roy Wellington Ⅳ 44585f3c4d Remove a double space before this URL. 2016-01-30 19:55:16 -08:00
Roy Wellington Ⅳ 9c28364477 Make exception syntax Python 3 compatible.
Translate all except and raise statements that are in the old form to
the Python 3 compatible format.
2016-01-30 19:53:50 -08:00