Mercurial > hg
comparison mercurial/pycompat.py @ 31934:12aca6770046
util: make cookielib module available
In preparation for supporting sending cookies on HTTP requests.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 09 Mar 2017 21:35:21 -0800 |
parents | 526e4597cca5 |
children | bc0579a25f82 |
comparison
equal
deleted
inserted
replaced
31933:b2478a996a82 | 31934:12aca6770046 |
---|---|
16 import sys | 16 import sys |
17 | 17 |
18 ispy3 = (sys.version_info[0] >= 3) | 18 ispy3 = (sys.version_info[0] >= 3) |
19 | 19 |
20 if not ispy3: | 20 if not ispy3: |
21 import cookielib | |
21 import cPickle as pickle | 22 import cPickle as pickle |
22 import httplib | 23 import httplib |
23 import Queue as _queue | 24 import Queue as _queue |
24 import SocketServer as socketserver | 25 import SocketServer as socketserver |
25 import xmlrpclib | 26 import xmlrpclib |
26 else: | 27 else: |
28 import http.cookielib as cookielib | |
27 import http.client as httplib | 29 import http.client as httplib |
28 import pickle | 30 import pickle |
29 import queue as _queue | 31 import queue as _queue |
30 import socketserver | 32 import socketserver |
31 import xmlrpc.client as xmlrpclib | 33 import xmlrpc.client as xmlrpclib |