Changeset 96fd186 in trunk


Ignore:
Timestamp:
2020-12-09T19:58:54Z (5 years ago)
Author:
Itamar Turner-Trauring <itamar@…>
Branches:
master
Children:
66cd68d, 995f271
Parents:
ba42483
Message:

Port to Python 3.

Location:
src/allmydata
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/dirnode.py

    rba42483 r96fd186  
    1010from future.utils import PY2
    1111if PY2:
    12     from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min  # noqa: F401
     12    # Skip dict so it doesn't break things.
     13    from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, list, object, range, str, max, min  # noqa: F401
    1314from past.builtins import unicode
    1415
     
    269270        child.raise_error()
    270271        if deep_immutable and not child.is_allowed_in_immutable_directory():
    271             raise MustBeDeepImmutableError("child %s is not allowed in an immutable directory" %
    272                                            quote_output(name, encoding='utf-8'), name)
     272            raise MustBeDeepImmutableError(
     273                "child %r is not allowed in an immutable directory" % (name,),
     274                name)
    273275        if has_aux:
    274276            entry = children.get_aux(name)
  • TabularUnified src/allmydata/nodemaker.py

    rba42483 r96fd186  
     1"""
     2Ported to Python 3.
     3"""
     4from __future__ import absolute_import
     5from __future__ import division
     6from __future__ import print_function
     7from __future__ import unicode_literals
     8
     9from future.utils import PY2
     10if PY2:
     11    from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min  # noqa: F401
     12
    113import weakref
    214from zope.interface import implementer
  • TabularUnified src/allmydata/test/test_dirnode.py

    rba42483 r96fd186  
    1515    from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, object, range, str, max, min  # noqa: F401
    1616
    17 import six
    1817import time
    1918import unicodedata
     
    4645from hypothesis import given
    4746from hypothesis.strategies import text
    48 
    49 if six.PY3:
    50     long = int
    5147
    5248
  • TabularUnified src/allmydata/util/_python3.py

    rba42483 r96fd186  
    6767    "allmydata.mutable.servermap",
    6868    "allmydata.node",
     69    "allmydata.nodemaker",
    6970    "allmydata.storage_client",
    7071    "allmydata.storage.common",
Note: See TracChangeset for help on using the changeset viewer.