Skip to content

Commit 6f03dbc

Browse files
committed
Hotfix, fix SNI issues with <python 2.7.9
1 parent c4e1595 commit 6f03dbc

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

setup.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,38 @@
1-
from distutils.core import setup
1+
import sys
2+
import warnings
3+
4+
try:
5+
from setuptools import setup
6+
except ImportError:
7+
from distutils.core import setup
8+
9+
install_requires = ['requests>=2.4.2', 'enum34']
10+
11+
if sys.version_info < (2, 7, 9):
12+
warnings.warn(
13+
'Users have reported issues with SNI / SSL by using Scale on '
14+
'versions of Python older than 2.7.9. If at all possible, you should '
15+
'upgrade your version of Python. '
16+
'If you have any questions, please file an issue on Github or '
17+
'contact us at support@scaleapi.com.',
18+
DeprecationWarning)
19+
install_requires.append('pyOpenSSL')
20+
install_requires.append('ndg-httpsclient')
21+
install_requires.append('pyasn1')
22+
install_requires.append('idna')
23+
install_requires.append('requests[security]')
24+
225
setup(
326
name = 'scaleapi',
427
packages = ['scaleapi'],
5-
version = '0.1.7',
28+
version = '0.1.8',
629
description = 'The official Python client library for the Scale API, the API for human labor.',
730
author = 'Calvin Huang',
831
author_email = 'c@lvin.me',
932
url = 'https://github.com/scaleapi/scaleapi-python-client',
1033
download_url = 'https://github.com/scaleapi/scaleapi-python-client/tarball/0.1.2',
1134
keywords = ['scale', 'scaleapi', 'humans', 'tasks', 'categorization', 'transcription', 'annotation', 'comparison', 'data collection', 'phone call', 'audio transcription'],
12-
install_requires = ['requests>=2.4.2', 'enum34'],
35+
install_requires = install_requires,
1336
classifiers = ['Programming Language :: Python :: 2.7',
1437
'Programming Language :: Python :: 3.5',
1538
'License :: OSI Approved :: MIT License',

tox.ini

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,14 @@ deps=
66
requests
77
enum34
88
pytest
9-
commands=py.test
9+
commands=
10+
py.test
11+
12+
[testenv:py27]
13+
passenv=SCALE_TEST_API_KEY
14+
deps=
15+
requests[security]
16+
enum34
17+
pytest
18+
commands=
19+
py.test

0 commit comments

Comments
 (0)