Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit cec7aa5

Browse files
committed
compatibility fixes
1 parent c8a25dc commit cec7aa5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/test_twitter_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# encoding: utf-8
22
from __future__ import unicode_literals
33

4+
import sys
45
import unittest
56

67
import twitter
@@ -11,6 +12,9 @@
1112

1213
from twitter import twitter_utils as utils
1314

15+
if sys.version_info > (3,):
16+
unicode = str
17+
1418

1519
class ApiTest(unittest.TestCase):
1620

twitter/twitter_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
if sys.version_info < (3,):
2121
range = xrange
2222

23+
if sys.version_info > (3,):
24+
unicode = str
25+
2326
CHAR_RANGES = [
2427
range(0, 4351),
2528
range(8192, 8205),

0 commit comments

Comments
 (0)