master_doc = 'index'
# General information about the project.
-project = u'tweepy'
-copyright = u'2009-2020, Joshua Roesslein'
+project = 'tweepy'
+copyright = '2009-2020, Joshua Roesslein'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'tweepy.tex', u'tweepy Documentation',
- u'Joshua Roesslein', 'manual'),
+ ('index', 'tweepy.tex', 'tweepy Documentation',
+ 'Joshua Roesslein', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
def test_track_encoding(self):
s = Stream(None, None)
s._start = lambda is_async: None
- s.filter(track=[u'Caf\xe9'])
+ s.filter(track=['Caf\xe9'])
# Should be UTF-8 encoded
- self.assertEqual(u'Caf\xe9'.encode('utf8'), s.body['track'])
+ self.assertEqual('Caf\xe9'.encode('utf8'), s.body['track'])
def test_follow_encoding(self):
s = Stream(None, None)
s._start = lambda is_async: None
- s.filter(follow=[u'Caf\xe9'])
+ s.filter(follow=['Caf\xe9'])
# Should be UTF-8 encoded
- self.assertEqual(u'Caf\xe9'.encode('utf8'), s.body['follow'])
+ self.assertEqual('Caf\xe9'.encode('utf8'), s.body['follow'])
class TweepyStreamReadBufferTests(unittest.TestCase):
self.assertEqual('{id:12345}\n', buf.read_len(11))
self.assertEqual('\n', buf.read_line())
self.assertEqual('23\n', buf.read_line())
- self.assertEqual(u'{id:23456, test:"\u3053"}\n', buf.read_len(23))
+ self.assertEqual('{id:23456, test:"\u3053"}\n', buf.read_len(23))
class TweepyStreamBackoffTests(unittest.TestCase):
"it has to be a multiple of 4")
self.session.params['locations'] = ','.join(['%.2f' % l for l in locations])
if track:
- self.session.params['track'] = u','.join(track).encode(encoding)
+ self.session.params['track'] = ','.join(track).encode(encoding)
self._start(is_async)
raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/filter.json' % STREAM_VERSION
if follow:
- self.body['follow'] = u','.join(follow).encode(encoding)
+ self.body['follow'] = ','.join(follow).encode(encoding)
if track:
- self.body['track'] = u','.join(track).encode(encoding)
+ self.body['track'] = ','.join(track).encode(encoding)
if locations and len(locations) > 0:
if len(locations) % 4 != 0:
raise TweepError("Wrong number of locations points, "
"it has to be a multiple of 4")
- self.body['locations'] = u','.join(['%.4f' % l for l in locations])
+ self.body['locations'] = ','.join(['%.4f' % l for l in locations])
if stall_warnings:
self.body['stall_warnings'] = stall_warnings
if languages:
- self.body['language'] = u','.join(map(str, languages))
+ self.body['language'] = ','.join(map(str, languages))
if filter_level:
self.body['filter_level'] = filter_level.encode(encoding)
self.session.params = {'delimited': 'length'}
if self.running:
raise TweepError('Stream object already connected!')
self.url = '/%s/site.json' % STREAM_VERSION
- self.body['follow'] = u','.join(map(six.text_type, follow))
+ self.body['follow'] = ','.join(map(six.text_type, follow))
self.body['delimited'] = 'length'
if stall_warnings:
self.body['stall_warnings'] = stall_warnings