Merge ~cjwatson/launchpad:six-moves-http-cookiejar into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: b654a723d10d8a5c18ad3316dae36a801d4e5ee1
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:six-moves-http-cookiejar
Merge into: launchpad:master
Diff against target: 60 lines (+6/-7)
3 files modified
lib/lp/scripts/utilities/importpedant.py (+1/-1)
lib/lp/services/webapp/session.py (+1/-2)
utilities/paste (+4/-4)
Reviewer Review Type Date Requested Status
Thiago F. Pappacena (community) Approve
Review via email: mp+380386@code.launchpad.net

Commit message

Import from six.moves.http_cookiejar rather than cookielib

To post a comment you must log in.
Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/scripts/utilities/importpedant.py b/lib/lp/scripts/utilities/importpedant.py
2index c7859a4..fa583fe 100644
3--- a/lib/lp/scripts/utilities/importpedant.py
4+++ b/lib/lp/scripts/utilities/importpedant.py
5@@ -29,7 +29,6 @@ def text_lines_to_set(text):
6 valid_imports_not_in_all = {
7 # Exported in Python 3, but missing and so not exported in Python 2.
8 'contextlib': set(['ExitStack']),
9- 'cookielib': set(['domain_match']),
10 # Exported in Python 3, but missing and so not exported in Python 2.
11 'json.decoder': set(['JSONDecodeError']),
12 'openid.fetchers': set(['Urllib2Fetcher']),
13@@ -38,6 +37,7 @@ valid_imports_not_in_all = {
14 'pipes': set(['quote']),
15 # Exported in Python 3, but missing and so not exported in Python 2.
16 'shlex': set(['quote']),
17+ 'six.moves.http_cookiejar': set(['domain_match']),
18 'storm.database': set(['STATE_DISCONNECTED']),
19 'textwrap': set(['dedent']),
20 'testtools.testresult.real': set(['_details_to_str']),
21diff --git a/lib/lp/services/webapp/session.py b/lib/lp/services/webapp/session.py
22index 2861dec..6bd4212 100644
23--- a/lib/lp/services/webapp/session.py
24+++ b/lib/lp/services/webapp/session.py
25@@ -5,9 +5,8 @@
26
27 __metaclass__ = type
28
29-from cookielib import domain_match
30-
31 from lazr.uri import URI
32+from six.moves.http_cookiejar import domain_match
33 from zope.session.http import CookieClientIdManager
34
35 from lp.services.config import config
36diff --git a/utilities/paste b/utilities/paste
37index e2c630e..df1099b 100755
38--- a/utilities/paste
39+++ b/utilities/paste
40@@ -6,10 +6,6 @@
41 import _pythonpath
42
43 import base64
44-from cookielib import (
45- Cookie,
46- CookieJar,
47- )
48 from optparse import OptionParser
49 import os
50 import pwd
51@@ -17,6 +13,10 @@ import sys
52 import webbrowser
53
54 from fixtures import MonkeyPatch
55+from six.moves.http_cookiejar import (
56+ Cookie,
57+ CookieJar,
58+ )
59 from six.moves.urllib.parse import urljoin
60 from zope.testbrowser.browser import Browser
61

Subscribers

People subscribed via source and target branches

to status/vote changes: