Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit bf16208

Browse files
committed
Add code support for Python 2.7.9.
1 parent 8d1eb85 commit bf16208

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

hyper/compat.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
_ver = sys.version_info
1919
is_py2 = _ver[0] == 2
20+
is_py2_7_9_or_later = _ver[0] >= 2 and _ver[1] >= 7 and _ver[2] >= 9
2021
is_py3 = _ver[0] == 3
2122
is_py3_3 = is_py3 and _ver[1] == 3
2223

@@ -28,7 +29,11 @@ def ignore_missing():
2829
pass
2930

3031
if is_py2:
31-
ssl = ssl_compat
32+
if is_py2_7_9_or_later:
33+
import ssl
34+
else:
35+
ssl = ssl_compat
36+
3237
from urlparse import urlparse
3338

3439
def to_byte(char):

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@
2727
sys.exit()
2828

2929
py_version = sys.version_info[:2]
30+
py_long_version = sys.version_info[:3]
3031

3132
def resolve_install_requires():
32-
if py_version in [(2,7), (3,3)]:
33+
if py_version == (3,3):
34+
return ['pyOpenSSL>=0.14']
35+
elif py_version == (2,7) and py_long_version < (2,7,9):
3336
return ['pyOpenSSL>=0.14']
3437
return []
3538

0 commit comments

Comments
 (0)