diff --git a/setup.py b/setup.py index 628f6e0b6..5c6cbbf01 100644 --- a/setup.py +++ b/setup.py @@ -64,10 +64,6 @@ MOD_NAMES = [ 'spacy.symbols'] -if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[0:2] < (3, 4): - raise RuntimeError('Python version 2.7 or >= 3.4 required.') - - # By subclassing build_extensions we have the actual compiler that will be used # which is really known only after finalize_options # http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used diff --git a/spacy/tests/serialize/test_huffman.py b/spacy/tests/serialize/test_huffman.py index 0a4953c08..34623bd98 100644 --- a/spacy/tests/serialize/test_huffman.py +++ b/spacy/tests/serialize/test_huffman.py @@ -58,7 +58,7 @@ def test_round_trip(): message = ['the', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'the', 'lazy', 'dog', '.'] strings = list(codec.strings) - codes = {codec.leaves[i]: strings[i] for i in range(len(codec.leaves))} + codes = dict([(codec.leaves[i], strings[i]) for i in range(len(codec.leaves))]) bits = codec.encode(message) string = ''.join('{0:b}'.format(c).rjust(8, '0')[::-1] for c in bits.as_bytes()) for word in message: @@ -83,7 +83,7 @@ def test_rosetta(): codec = HuffmanCodec(symb2freq.items()) py_codec = py_encode(symb2freq) - codes = {codec.leaves[i]: codec.strings[i] for i in range(len(codec.leaves))} + codes = dict([(codec.leaves[i], codec.strings[i]) for i in range(len(codec.leaves))]) my_lengths = defaultdict(int) py_lengths = defaultdict(int)