[PATCH] pycompat: import correct cookie module on Python 3

Gregory Szorc gregory.szorc at gmail.com
Wed Apr 12 21:42:27 EDT 2017


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1492047740 25200
#      Wed Apr 12 18:42:20 2017 -0700
# Node ID c5941562f2a6ead0503f609386c53b6a919a7175
# Parent  6ce09d2cc2db6aeed0b46da1b26426798d91833c
pycompat: import correct cookie module on Python 3

http.cookielib doesn't exist. http.cookiejar does and it contains the
symbols we need. This fixes test failures on Python 3.

diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
--- a/mercurial/pycompat.py
+++ b/mercurial/pycompat.py
@@ -25,7 +25,7 @@ if not ispy3:
     import SocketServer as socketserver
     import xmlrpclib
 else:
-    import http.cookielib as cookielib
+    import http.cookiejar as cookielib
     import http.client as httplib
     import pickle
     import queue as _queue


More information about the Mercurial-devel mailing list