added unicode_literals import to all apropriate modules
bug in twisted serverFromString prevents test.common and transit from using unicode properly should revisit if twisted gets patched
This commit is contained in:
parent
33758abd18
commit
6a73d50fdd
|
@ -1,4 +1,4 @@
|
|||
|
||||
from __future__ import unicode_literals
|
||||
# This file helps to compute a version number in source trees obtained from
|
||||
# git-archive tarball (such as those provided by githubs download-from-tag
|
||||
# feature). Distribution tarballs (built by setup.py sdist) and build
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import sys
|
||||
from weakref import ref
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import os, six
|
||||
from .wordlist import (byte_to_even_word, byte_to_odd_word,
|
||||
even_words_lowercase, odd_words_lowercase)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
import functools
|
||||
|
||||
class ServerError(Exception):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
# no unicode_literals
|
||||
# Find all of our ip addresses. From tahoe's src/allmydata/util/iputil.py
|
||||
|
||||
import os, re, subprocess, errno
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import os, time
|
||||
from twisted.python import usage
|
||||
from twisted.scripts import twistd
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import os, time, json
|
||||
from collections import defaultdict
|
||||
from .database import get_db
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
from twisted.python import log
|
||||
from twisted.internet import defer
|
||||
from twisted.application import service
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import os, time, random, base64
|
||||
from collections import namedtuple
|
||||
from twisted.python import log
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
import time
|
||||
from twisted.internet import reactor
|
||||
from twisted.python import log
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import os, sys
|
||||
from .cli_args import parser
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
from twisted.python import log
|
||||
from twisted.internet import reactor, endpoints
|
||||
from twisted.application import service
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import re, time
|
||||
from twisted.python import log
|
||||
from twisted.internet import protocol
|
||||
|
|
|
@ -14,6 +14,8 @@ class ServerBase:
|
|||
self.sp.startService()
|
||||
relayport = allocate_tcp_port()
|
||||
transitport = allocate_tcp_port()
|
||||
# need to talk to twisted team about only using unicode in
|
||||
# endpoints.serverFromString
|
||||
s = RelayServer("tcp:%d:interface=127.0.0.1" % relayport,
|
||||
"tcp:%s:interface=127.0.0.1" % transitport,
|
||||
advertise_version=__version__,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
from __future__ import unicode_literals
|
||||
# This is a tiny helper module, to let "python -m wormhole.test.run_trial
|
||||
# ARGS" does the same thing as running "trial ARGS" (unfortunately
|
||||
# twisted/scripts/trial.py does not have a '__name__=="__main__"' clause).
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import unittest
|
||||
from binascii import unhexlify #, hexlify
|
||||
from hkdf import Hkdf
|
||||
|
@ -42,4 +42,3 @@ class TestKAT(unittest.TestCase):
|
|||
|
||||
#if __name__ == '__main__':
|
||||
# generate_KAT()
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import os, sys, re, io, zipfile, six, stat
|
||||
import mock
|
||||
from twisted.trial import unittest
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import json, itertools
|
||||
from binascii import hexlify
|
||||
import mock
|
||||
|
@ -377,7 +377,7 @@ class Prune(unittest.TestCase):
|
|||
|
||||
# def test_one(self):
|
||||
# # to debug specific problems found by test_lots
|
||||
# self.one(None, "old", True, None)
|
||||
# self.one(None, "old", False, 'new')
|
||||
|
||||
def one(self, nameplate, mailbox, has_listeners, messages):
|
||||
desc = ("nameplate=%s, mailbox=%s, has_listeners=%s,"
|
||||
|
@ -427,8 +427,8 @@ class Prune(unittest.TestCase):
|
|||
messages = None
|
||||
messages_survive = False
|
||||
|
||||
if (nameplate is NEW or mailbox is NEW
|
||||
or has_listeners or messages is NEW):
|
||||
if (nameplate == NEW or mailbox == NEW
|
||||
or has_listeners or messages == NEW):
|
||||
if nameplate is not None:
|
||||
nameplate_survives = True
|
||||
if mailbox is not None:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import io
|
||||
from binascii import hexlify, unhexlify
|
||||
from twisted.trial import unittest
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
import unicodedata
|
||||
from twisted.trial import unittest
|
||||
from .. import util
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import os, json, re, gc
|
||||
from binascii import hexlify, unhexlify
|
||||
import mock
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function, absolute_import
|
||||
from __future__ import print_function, absolute_import, unicode_literals
|
||||
import json, time
|
||||
|
||||
class Event:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
import time
|
||||
from twisted.internet.defer import inlineCallbacks, returnValue
|
||||
from twisted.internet.error import ConnectError
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# no unicode_literals, revisit after twisted patch
|
||||
from __future__ import print_function, absolute_import
|
||||
import re, sys, time, socket
|
||||
from collections import namedtuple, deque
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
from __future__ import unicode_literals
|
||||
# The PGP Word List, which maps bytes to phonetically-distinct words. There
|
||||
# are two lists, even and odd, and encodings should alternate between then to
|
||||
# detect dropped words. https://en.wikipedia.org/wiki/PGP_Words
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import print_function, absolute_import
|
||||
from __future__ import print_function, absolute_import, unicode_literals
|
||||
import os, sys, re
|
||||
from six.moves.urllib_parse import urlparse
|
||||
from twisted.internet import defer, endpoints, error
|
||||
|
|
Loading…
Reference in New Issue
Block a user