Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tweepy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zahra Rajabi
tweepy
Commits
0494119f
Commit
0494119f
authored
May 14, 2018
by
Hugo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant Python 2.6 and 3.3 code
parent
29e32cdf
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
12 additions
and
65 deletions
+12
-65
README.md
README.md
+1
-1
setup.py
setup.py
+0
-2
test_requirements.txt
test_requirements.txt
+0
-1
tests/config.py
tests/config.py
+1
-6
tests/test_auth.py
tests/test_auth.py
+1
-5
tests/test_cursors.py
tests/test_cursors.py
+1
-8
tests/test_rate_limit.py
tests/test_rate_limit.py
+2
-7
tests/test_streaming.py
tests/test_streaming.py
+2
-8
tests/test_utils.py
tests/test_utils.py
+2
-6
tox.ini
tox.ini
+1
-12
tweepy/utils.py
tweepy/utils.py
+1
-9
No files found.
README.md
View file @
0494119f
...
...
@@ -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
---------
...
...
setup.py
View file @
0494119f
...
...
@@ -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'
,
...
...
test_requirements.txt
View file @
0494119f
tox
>=1.7.2
vcrpy
==1.10.3
mock
==1.0.1
unittest2
# Comment this line out if using Python 3.
tests/config.py
View file @
0494119f
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'
,
''
)
...
...
tests/test_auth.py
View file @
0494119f
...
...
@@ -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
):
...
...
tests/test_cursors.py
View file @
0494119f
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
):
...
...
tests/test_rate_limit.py
View file @
0494119f
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
...
...
tests/test_streaming.py
View file @
0494119f
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
...
...
tests/test_utils.py
View file @
0494119f
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."""
...
...
tox.ini
View file @
0494119f
...
...
@@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist
=
py2
6, py27, py33
, py34, py35, py36
envlist
=
py2
7
, 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
=
...
...
tweepy/utils.py
View file @
0494119f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment