Skip to content

Commit 97ce684

Browse files
committed
Add comments about supported anypy python versions
Help clarify which code paths will be used within the anypy shims.
1 parent b6ebad8 commit 97ce684

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

roundup/anypy/cookie_.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11

22
try:
3+
# Python 3+
34
from http import cookies as Cookie
45
from http.cookies import CookieError, BaseCookie, SimpleCookie
56
from http.cookies import _getdate as get_cookie_date
67
except:
8+
# Python 2.5-2.7
79
from Cookie import CookieError, BaseCookie, SimpleCookie
810
from Cookie import _getdate as get_cookie_date

roundup/anypy/http_.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
try:
2+
# Python 3+
23
from http import client
34
except:
5+
# Python 2.5-2.7
46
import httplib as client
57

roundup/anypy/io_.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
try:
3+
# Python 2.6+, 3+
34
from io import StringIO, BytesIO
45
except:
6+
# Python 2.5
57
from StringIO import StringIO
68
BytesIO = StringIO
79

roundup/anypy/urllib_.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
try:
3+
# Python 3+
34
from urllib.parse import quote, urlparse
45
except:
6+
# Python 2.5-2.7
57
from urllib import quote
68
from urlparse import urlparse

0 commit comments

Comments
 (0)