Skip to content

Commit 5240410

Browse files
authored
Drop py2 support (#117)
Fixes #113
1 parent f81f4a6 commit 5240410

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- 2.7
43
- 3.4
54
- 3.5
65
- 3.6
@@ -21,6 +20,6 @@ script:
2120
- echo $STREAM_KEY
2221
- py.test -lv --cov=./
2322
after_script:
24-
- "pep8 --exclude=migrations --ignore=E501,E225,W293 stream"
25-
- "python setup.py install"
26-
- "codecov"
23+
- 'pep8 --exclude=migrations --ignore=E501,E225,W293 stream'
24+
- 'python setup.py install'
25+
- 'codecov'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You can sign up for a Stream account at https://getstream.io/get_started.
1313

1414
stream-python supports:
1515

16-
- Python (2.7, 3.4, 3.5, 3.6, 3.7, 3.8)
16+
- Python (3.4, 3.5, 3.6, 3.7, 3.8)
1717

1818
#### Install from Pypi
1919

setup.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,16 @@
66
from stream import __version__, __maintainer__, __email__, __license__
77
import sys
88

9-
unit = "unittest2py3k" if sys.version_info > (3, 0, 0) else "unittest2"
10-
tests_require = [unit, "pytest==3.2.5", "unittest2", "pytest-cov", "python-dateutil"]
9+
tests_require = ["pytest==3.2.5", "unittest2", "pytest-cov", "python-dateutil"]
1110

1211
long_description = open("README.md", "r").read()
1312

14-
requests = "requests>=2.3.0,<3"
15-
16-
if sys.version_info < (2, 7, 9):
17-
requests = "requests[security]>=2.4.1,<3"
18-
19-
install_requires = ["pycryptodomex>=3.4.7,<4", requests, "six>=1.8.0", "pytz>=2019.3"]
20-
21-
if sys.version_info < (2, 7, 0):
22-
install_requires.append("pyOpenSSL<18.0.0")
23-
install_requires.append("pyjwt>=1.3.0,<1.6.0")
24-
install_requires.append("pycparser<2.19")
25-
else:
26-
install_requires.append("pyjwt>=1.3.0,<1.8.0")
13+
install_requires = [
14+
"pycryptodomex>=3.4.7,<4",
15+
"requests>=2.3.0,<3",
16+
"pyjwt>=1.3.0,<1.8.0",
17+
"pytz>=2019.3",
18+
]
2719

2820

2921
class PyTest(TestCommand):
@@ -65,7 +57,6 @@ def run_tests(self):
6557
"Development Status :: 5 - Production/Stable",
6658
"License :: OSI Approved :: BSD License",
6759
"Natural Language :: English",
68-
"Programming Language :: Python :: 2.7",
6960
"Programming Language :: Python :: 3",
7061
"Programming Language :: Python :: 3.4",
7162
"Programming Language :: Python :: 3.5",

stream/serializer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import datetime
22
import json
3-
import six
43
import pytz
54

65
"""
@@ -30,7 +29,7 @@ def _datetime_decoder(dict_):
3029
dict_[key] = ""
3130
continue
3231

33-
if value is not None and isinstance(value, six.string_types):
32+
if value is not None and isinstance(value, str):
3433
try:
3534
# The api always returns times like this
3635
# 2014-07-25T09:12:24.735

0 commit comments

Comments
 (0)