Patchwork pycompat: import correct cookie module on Python 3

login
register
mail settings
Submitter Gregory Szorc
Date April 13, 2017, 1:42 a.m.
Message ID <c5941562f2a6ead0503f.1492047747@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/20154/
State Accepted
Headers show

Comments

Gregory Szorc - April 13, 2017, 1:42 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@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.
Yuya Nishihara - April 13, 2017, 12:02 p.m.
On Wed, 12 Apr 2017 18:42:27 -0700, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@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

Queued, thanks.

Patch

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