Commit 0494119f authored by Hugo's avatar Hugo

Remove redundant Python 2.6 and 3.3 code

parent 29e32cdf
......@@ -21,7 +21,7 @@ GitHub and install it manually:
cd tweepy
python setup.py install
Python 2.6 and 2.7, 3.3, 3.4, 3.5 & 3.6 are supported.
Python 2.7, 3.4, 3.5 & 3.6 are supported.
Community
---------
......
......@@ -35,10 +35,8 @@ setup(name="tweepy",
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
......
tox>=1.7.2
vcrpy==1.10.3
mock==1.0.1
unittest2 # Comment this line out if using Python 3.
import os
import unittest
import vcr
from tweepy.auth import OAuthHandler
from tweepy.api import API
import six
if six.PY3:
import unittest
else:
import unittest2 as unittest
username = os.environ.get('TWITTER_USERNAME', 'tweepytest')
oauth_consumer_key = os.environ.get('CONSUMER_KEY', '')
......
......@@ -3,13 +3,9 @@ from __future__ import absolute_import
from .config import *
from tweepy import API, OAuthHandler
import six
import random
import unittest
if six.PY3:
import unittest
else:
import unittest2 as unittest
class TweepyAuthTests(unittest.TestCase):
......
from tweepy import Cursor
from .config import create_auth
from .config import TweepyTestCase, username, use_replay, tape
import six
if six.PY3:
import unittest
else:
import unittest2 as unittest
from .config import TweepyTestCase, username, tape
class TweepyCursorTests(TweepyTestCase):
......
import unittest
import os
import unittest
from tweepy import API, Cursor
from tweepy import API
from tweepy.error import TweepError
import six
if six.PY3:
import unittest
else:
import unittest2 as unittest
from .config import create_auth
testratelimit = 'TEST_RATE_LIMIT' in os.environ
......
from __future__ import absolute_import, print_function
from .config import tape
import six
if six.PY3:
import unittest
from unittest.case import skip
else:
import unittest2 as unittest
from unittest2.case import skip
import unittest
from unittest.case import skip
from tweepy.api import API
from tweepy.auth import OAuthHandler
......
import six
if six.PY3:
import unittest
else:
import unittest2 as unittest
from tweepy.utils import *
import random
import string
import unittest
def mock_tweet():
"""Generate some random tweet text."""
......
......@@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist = py26, py27, py33, py34, py35, py36
envlist = py27, py34, py35, py36
[base]
deps =
......@@ -12,17 +12,6 @@ deps =
vcrpy==1.0.2
mock==1.0.1
[py2]
deps =
{[base]deps}
unittest2==0.5.1
[testenv:py27]
deps = {[py2]deps}
[testenv:py26]
deps = {[py2]deps}
[testenv]
commands = nosetests -v tests.test_cursors tests.test_api tests.test_utils
deps =
......
......@@ -7,7 +7,6 @@ from __future__ import print_function
from datetime import datetime
import six
from six.moves.urllib.parse import quote
from email.utils import parsedate
......@@ -41,14 +40,7 @@ def import_simplejson():
try:
import simplejson as json
except ImportError:
try:
import json # Python 2.6+
except ImportError:
try:
# Google App Engine
from django.utils import simplejson as json
except ImportError:
raise ImportError("Can't load a json library")
import json
return json
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment