changeset 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 b2478a996a82
children 566cb89050b7
files mercurial/pycompat.py mercurial/util.py
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pycompat.py	Thu Apr 06 11:28:25 2017 +0200
+++ b/mercurial/pycompat.py	Thu Mar 09 21:35:21 2017 -0800
@@ -18,12 +18,14 @@
 ispy3 = (sys.version_info[0] >= 3)
 
 if not ispy3:
+    import cookielib
     import cPickle as pickle
     import httplib
     import Queue as _queue
     import SocketServer as socketserver
     import xmlrpclib
 else:
+    import http.cookielib as cookielib
     import http.client as httplib
     import pickle
     import queue as _queue
--- a/mercurial/util.py	Thu Apr 06 11:28:25 2017 +0200
+++ b/mercurial/util.py	Thu Mar 09 21:35:21 2017 -0800
@@ -49,6 +49,7 @@
     pycompat,
 )
 
+cookielib = pycompat.cookielib
 empty = pycompat.empty
 httplib = pycompat.httplib
 httpserver = pycompat.httpserver