8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7316ab commit 7606626Copy full SHA for 7606626
src/http/client.py
@@ -70,12 +70,22 @@
70
NOT_EXTENDED,
71
72
MAXAMOUNT,
73
- _MAXLINE,
74
- _MAXHEADERS,
75
- _is_legal_header_name,
76
- _is_illegal_header_value,
77
- _METHODS_EXPECTING_BODY,
78
-
79
- LineTooLong,
80
- LineAndFileWrapper,
81
)
+
+# These are not available on Python 2.6.x:
+try:
+ from httplib import LineTooLong, LineAndFileWrapper
+except ImportError:
+ pass
+# These may not be available on all versions of Python 2.6.x or 2.7.x
82
83
+ from httplib import (
84
+ _MAXLINE,
85
+ _MAXHEADERS,
86
+ _is_legal_header_name,
87
+ _is_illegal_header_value,
88
+ _METHODS_EXPECTING_BODY
89
+ )
90
91
0 commit comments