Merge ~cjwatson/launchpad:py3only-urllib-imports into launchpad:master
- Git
- lp:~cjwatson/launchpad
- py3only-urllib-imports
- Merge into master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 54cc9535296423a10fdbd497ee1053f79eb58675 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:py3only-urllib-imports |
Merge into: | launchpad:master |
Diff against target: |
2723 lines (+289/-279) 146 files modified
lib/launchpad_loggerhead/app.py (+4/-4) lib/launchpad_loggerhead/tests.py (+4/-3) lib/lp/answers/browser/faqcollection.py (+1/-1) lib/lp/answers/browser/questiontarget.py (+1/-1) lib/lp/answers/browser/tests/test_questiontarget.py (+1/-1) lib/lp/app/browser/launchpad.py (+2/-2) lib/lp/app/browser/tales.py (+1/-1) lib/lp/app/browser/tests/test_vocabulary.py (+1/-1) lib/lp/app/tests/test_services.py (+1/-1) lib/lp/app/validators/url.py (+1/-2) lib/lp/bugs/browser/buglisting.py (+6/-6) lib/lp/bugs/browser/bugtarget.py (+4/-4) lib/lp/bugs/browser/bugtask.py (+1/-1) lib/lp/bugs/browser/person.py (+1/-1) lib/lp/bugs/browser/tests/test_bugattachment_file_access.py (+3/-3) lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py (+1/-1) lib/lp/bugs/browser/tests/test_bugtask.py (+1/-1) lib/lp/bugs/browser/tests/test_structuralsubscription.py (+2/-1) lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt (+1/-1) lib/lp/bugs/doc/sourceforge-remote-products.txt (+1/-1) lib/lp/bugs/externalbugtracker/base.py (+3/-2) lib/lp/bugs/externalbugtracker/github.py (+4/-4) lib/lp/bugs/externalbugtracker/gitlab.py (+3/-3) lib/lp/bugs/externalbugtracker/mantis.py (+4/-4) lib/lp/bugs/externalbugtracker/roundup.py (+1/-1) lib/lp/bugs/externalbugtracker/tests/test_github.py (+4/-4) lib/lp/bugs/externalbugtracker/tests/test_gitlab.py (+4/-4) lib/lp/bugs/externalbugtracker/tests/test_mantis.py (+2/-1) lib/lp/bugs/externalbugtracker/xmlrpc.py (+4/-4) lib/lp/bugs/model/bugtracker.py (+5/-5) lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt (+1/-1) lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt (+1/-1) lib/lp/bugs/stories/bugtask-searches/xx-old-urls-still-work.txt (+1/-1) lib/lp/bugs/stories/webservice/xx-bug.txt (+1/-1) lib/lp/bugs/tests/externalbugtracker.py (+4/-4) lib/lp/bugs/tests/test_bugtracker.py (+1/-1) lib/lp/bugs/tests/test_bugwatch.py (+1/-1) lib/lp/buildmaster/interactor.py (+1/-1) lib/lp/buildmaster/tests/builderproxy.py (+1/-1) lib/lp/charms/tests/test_charmrecipebuildbehaviour.py (+1/-1) lib/lp/code/browser/branchlisting.py (+1/-1) lib/lp/code/browser/branchmergeproposal.py (+4/-4) lib/lp/code/browser/codeimport.py (+1/-1) lib/lp/code/browser/gitref.py (+4/-4) lib/lp/code/browser/gitrepository.py (+4/-4) lib/lp/code/browser/tests/test_gitsubscription.py (+2/-1) lib/lp/code/interfaces/codehosting.py (+1/-1) lib/lp/code/model/branch.py (+1/-1) lib/lp/code/model/branchhosting.py (+4/-4) lib/lp/code/model/githosting.py (+4/-4) lib/lp/code/model/gitref.py (+5/-5) lib/lp/code/model/gitrepository.py (+5/-5) lib/lp/code/model/tests/test_githosting.py (+4/-4) lib/lp/code/stories/branches/xx-private-branch-listings.txt (+1/-1) lib/lp/code/stories/branches/xx-subscribing-branches.txt (+1/-1) lib/lp/code/xmlrpc/git.py (+1/-1) lib/lp/code/xmlrpc/tests/test_git.py (+1/-1) lib/lp/codehosting/puller/tests/test_errors.py (+1/-1) lib/lp/codehosting/puller/worker.py (+2/-1) lib/lp/codehosting/scanner/buglinks.py (+2/-1) lib/lp/codehosting/sshserver/session.py (+1/-1) lib/lp/codehosting/tests/test_acceptance.py (+1/-1) lib/lp/oci/browser/tests/test_ocirecipe.py (+1/-1) lib/lp/oci/model/ociregistryclient.py (+1/-1) lib/lp/oci/tests/test_ocirecipebuild.py (+1/-1) lib/lp/oci/tests/test_ocirecipebuildbehaviour.py (+1/-1) lib/lp/oci/vocabularies.py (+2/-1) lib/lp/registry/browser/mailinglists.py (+1/-1) lib/lp/registry/browser/ociproject.py (+3/-2) lib/lp/registry/browser/person.py (+4/-4) lib/lp/registry/browser/product.py (+1/-1) lib/lp/registry/browser/sourcepackage.py (+1/-1) lib/lp/registry/browser/team.py (+1/-1) lib/lp/registry/browser/tests/test_distroseries.py (+4/-4) lib/lp/registry/browser/tests/test_person.py (+1/-1) lib/lp/registry/browser/tests/test_product.py (+4/-4) lib/lp/registry/browser/tests/test_sourcepackage_views.py (+2/-1) lib/lp/registry/scripts/distributionmirror_prober.py (+6/-6) lib/lp/registry/scripts/productreleasefinder/finder.py (+1/-1) lib/lp/registry/scripts/productreleasefinder/walker.py (+5/-5) lib/lp/registry/stories/product/xx-product-files.txt (+2/-2) lib/lp/services/feeds/feed.py (+1/-1) lib/lp/services/gpg/handler.py (+1/-1) lib/lp/services/librarian/client.py (+6/-6) lib/lp/services/librarian/doc/librarian.txt (+1/-1) lib/lp/services/librarian/model.py (+1/-1) lib/lp/services/librarian/smoketest.py (+1/-1) lib/lp/services/librarian/tests/test_client.py (+5/-5) lib/lp/services/librarianserver/db.py (+4/-4) lib/lp/services/librarianserver/swift.py (+1/-1) lib/lp/services/librarianserver/testing/fake.py (+1/-1) lib/lp/services/librarianserver/testing/tests/test_server_fixture.py (+1/-2) lib/lp/services/librarianserver/tests/test_db_outage.py (+2/-2) lib/lp/services/librarianserver/tests/test_gc.py (+1/-1) lib/lp/services/librarianserver/tests/test_web.py (+1/-1) lib/lp/services/librarianserver/web.py (+1/-1) lib/lp/services/oauth/stories/access-token.txt (+1/-1) lib/lp/services/oauth/stories/authorize-token.txt (+1/-1) lib/lp/services/oauth/stories/request-token.txt (+1/-1) lib/lp/services/openid/fetcher.py (+1/-1) lib/lp/services/scripts/base.py (+4/-4) lib/lp/services/signing/proxy.py (+1/-1) lib/lp/services/sitesearch/__init__.py (+5/-4) lib/lp/services/verification/browser/logintoken.py (+2/-1) lib/lp/services/webapp/doc/webapp-publication.txt (+1/-1) lib/lp/services/webapp/errorlog.py (+1/-1) lib/lp/services/webapp/login.py (+1/-1) lib/lp/services/webapp/publication.py (+1/-1) lib/lp/services/webapp/publisher.py (+1/-1) lib/lp/services/webapp/servers.py (+1/-1) lib/lp/services/webapp/tests/test_error.py (+1/-1) lib/lp/services/webapp/tests/test_login.py (+6/-6) lib/lp/services/webapp/tests/test_login_account.py (+1/-1) lib/lp/services/webapp/url.py (+2/-2) lib/lp/services/webhooks/model.py (+1/-1) lib/lp/services/webservice/wadl.py (+2/-2) lib/lp/snappy/browser/snap.py (+2/-1) lib/lp/snappy/browser/tests/test_snap.py (+4/-4) lib/lp/snappy/model/snap.py (+1/-1) lib/lp/snappy/model/snapstoreclient.py (+1/-1) lib/lp/snappy/tests/test_snap.py (+1/-1) lib/lp/snappy/tests/test_snapbuild.py (+1/-1) lib/lp/snappy/tests/test_snapbuildbehaviour.py (+1/-1) lib/lp/soyuz/browser/widgets/archive.py (+1/-1) lib/lp/soyuz/interfaces/archive.py (+1/-1) lib/lp/soyuz/scripts/ppa_apache_log_parser.py (+1/-2) lib/lp/soyuz/tests/test_archive.py (+1/-1) lib/lp/soyuz/tests/test_livefsbuild.py (+2/-2) lib/lp/soyuz/tests/test_packageupload.py (+1/-1) lib/lp/testing/keyserver/tests/test_harness.py (+1/-1) lib/lp/testing/layers.py (+6/-6) lib/lp/testing/pages.py (+1/-1) lib/lp/testing/publication.py (+2/-2) lib/lp/testing/tests/test_layers_functional.py (+2/-2) lib/lp/testing/tests/test_publication.py (+2/-1) lib/lp/testopenid/stories/basics.txt (+1/-1) lib/lp/testopenid/testing/helpers.py (+1/-1) lib/lp/translations/browser/person.py (+1/-1) lib/lp/translations/browser/pofile.py (+1/-1) lib/lp/translations/browser/tests/test_persontranslationview.py (+2/-1) lib/lp/translations/browser/translationmessage.py (+3/-3) lib/lp/translations/doc/poexport-request-productseries.txt (+1/-1) lib/lp/translations/doc/poexport-request.txt (+1/-1) lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt (+1/-1) utilities/paste (+2/-3) utilities/roundup-sniffer.py (+2/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guruprasad | Approve | ||
Review via email: mp+420569@code.launchpad.net |
Commit message
Stop using six.moves for urllib imports
Description of the change
Largely mechanical, aided by `isort`.
To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) : | # |
Revision history for this message
Guruprasad (lgp171188) : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/lib/launchpad_loggerhead/app.py b/lib/launchpad_loggerhead/app.py | |||
2 | index 3e693f2..7697cc9 100644 | |||
3 | --- a/lib/launchpad_loggerhead/app.py | |||
4 | +++ b/lib/launchpad_loggerhead/app.py | |||
5 | @@ -4,6 +4,10 @@ | |||
6 | 4 | import logging | 4 | import logging |
7 | 5 | import os | 5 | import os |
8 | 6 | import threading | 6 | import threading |
9 | 7 | from urllib.parse import ( | ||
10 | 8 | urlencode, | ||
11 | 9 | urljoin, | ||
12 | 10 | ) | ||
13 | 7 | import xmlrpc.client | 11 | import xmlrpc.client |
14 | 8 | 12 | ||
15 | 9 | from breezy import ( | 13 | from breezy import ( |
16 | @@ -40,10 +44,6 @@ from paste.request import ( | |||
17 | 40 | parse_querystring, | 44 | parse_querystring, |
18 | 41 | path_info_pop, | 45 | path_info_pop, |
19 | 42 | ) | 46 | ) |
20 | 43 | from six.moves.urllib.parse import ( | ||
21 | 44 | urlencode, | ||
22 | 45 | urljoin, | ||
23 | 46 | ) | ||
24 | 47 | 47 | ||
25 | 48 | from lp.code.interfaces.codehosting import ( | 48 | from lp.code.interfaces.codehosting import ( |
26 | 49 | BRANCH_TRANSPORT, | 49 | BRANCH_TRANSPORT, |
27 | diff --git a/lib/launchpad_loggerhead/tests.py b/lib/launchpad_loggerhead/tests.py | |||
28 | index cad2ec3..52cd884 100644 | |||
29 | --- a/lib/launchpad_loggerhead/tests.py | |||
30 | +++ b/lib/launchpad_loggerhead/tests.py | |||
31 | @@ -1,12 +1,13 @@ | |||
32 | 1 | # Copyright 2010-2018 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2010-2018 Canonical Ltd. This software is licensed under the |
33 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
34 | 3 | 3 | ||
38 | 4 | from paste.httpexceptions import HTTPExceptionHandler | 4 | from urllib.parse import ( |
36 | 5 | import requests | ||
37 | 6 | from six.moves.urllib_parse import ( | ||
39 | 7 | urlencode, | 5 | urlencode, |
40 | 8 | urlsplit, | 6 | urlsplit, |
41 | 9 | ) | 7 | ) |
42 | 8 | |||
43 | 9 | from paste.httpexceptions import HTTPExceptionHandler | ||
44 | 10 | import requests | ||
45 | 10 | import soupmatchers | 11 | import soupmatchers |
46 | 11 | from testtools.content import Content | 12 | from testtools.content import Content |
47 | 12 | from testtools.content_type import UTF8_TEXT | 13 | from testtools.content_type import UTF8_TEXT |
48 | diff --git a/lib/lp/answers/browser/faqcollection.py b/lib/lp/answers/browser/faqcollection.py | |||
49 | index a32ebca..a2fb420 100644 | |||
50 | --- a/lib/lp/answers/browser/faqcollection.py | |||
51 | +++ b/lib/lp/answers/browser/faqcollection.py | |||
52 | @@ -8,7 +8,7 @@ __all__ = [ | |||
53 | 8 | 'SearchFAQsView', | 8 | 'SearchFAQsView', |
54 | 9 | ] | 9 | ] |
55 | 10 | 10 | ||
57 | 11 | from six.moves.urllib.parse import urlencode | 11 | from urllib.parse import urlencode |
58 | 12 | 12 | ||
59 | 13 | from lp import _ | 13 | from lp import _ |
60 | 14 | from lp.answers.enums import ( | 14 | from lp.answers.enums import ( |
61 | diff --git a/lib/lp/answers/browser/questiontarget.py b/lib/lp/answers/browser/questiontarget.py | |||
62 | index 57d8caa..5eb0c08 100644 | |||
63 | --- a/lib/lp/answers/browser/questiontarget.py | |||
64 | +++ b/lib/lp/answers/browser/questiontarget.py | |||
65 | @@ -19,13 +19,13 @@ __all__ = [ | |||
66 | 19 | ] | 19 | ] |
67 | 20 | 20 | ||
68 | 21 | from operator import attrgetter | 21 | from operator import attrgetter |
69 | 22 | from urllib.parse import urlencode | ||
70 | 22 | 23 | ||
71 | 23 | from lazr.restful.interfaces import ( | 24 | from lazr.restful.interfaces import ( |
72 | 24 | IJSONRequestCache, | 25 | IJSONRequestCache, |
73 | 25 | IWebServiceClientRequest, | 26 | IWebServiceClientRequest, |
74 | 26 | ) | 27 | ) |
75 | 27 | from simplejson import dumps | 28 | from simplejson import dumps |
76 | 28 | from six.moves.urllib.parse import urlencode | ||
77 | 29 | from zope.browserpage import ViewPageTemplateFile | 29 | from zope.browserpage import ViewPageTemplateFile |
78 | 30 | from zope.component import ( | 30 | from zope.component import ( |
79 | 31 | getMultiAdapter, | 31 | getMultiAdapter, |
80 | diff --git a/lib/lp/answers/browser/tests/test_questiontarget.py b/lib/lp/answers/browser/tests/test_questiontarget.py | |||
81 | index 307d038..386846f 100644 | |||
82 | --- a/lib/lp/answers/browser/tests/test_questiontarget.py | |||
83 | +++ b/lib/lp/answers/browser/tests/test_questiontarget.py | |||
84 | @@ -5,12 +5,12 @@ | |||
85 | 5 | 5 | ||
86 | 6 | import json | 6 | import json |
87 | 7 | import os | 7 | import os |
88 | 8 | from urllib.parse import quote | ||
89 | 8 | 9 | ||
90 | 9 | from lazr.restful.interfaces import ( | 10 | from lazr.restful.interfaces import ( |
91 | 10 | IJSONRequestCache, | 11 | IJSONRequestCache, |
92 | 11 | IWebServiceClientRequest, | 12 | IWebServiceClientRequest, |
93 | 12 | ) | 13 | ) |
94 | 13 | from six.moves.urllib.parse import quote | ||
95 | 14 | from zope.component import getUtility | 14 | from zope.component import getUtility |
96 | 15 | from zope.security.proxy import removeSecurityProxy | 15 | from zope.security.proxy import removeSecurityProxy |
97 | 16 | from zope.traversing.browser import absoluteURL | 16 | from zope.traversing.browser import absoluteURL |
98 | diff --git a/lib/lp/app/browser/launchpad.py b/lib/lp/app/browser/launchpad.py | |||
99 | index 110a34a..c887a24 100644 | |||
100 | --- a/lib/lp/app/browser/launchpad.py | |||
101 | +++ b/lib/lp/app/browser/launchpad.py | |||
102 | @@ -26,11 +26,11 @@ import operator | |||
103 | 26 | import os | 26 | import os |
104 | 27 | import re | 27 | import re |
105 | 28 | import time | 28 | import time |
108 | 29 | 29 | from urllib.parse import ( | |
107 | 30 | from six.moves.urllib.parse import ( | ||
109 | 31 | parse_qs, | 30 | parse_qs, |
110 | 32 | urlencode, | 31 | urlencode, |
111 | 33 | ) | 32 | ) |
112 | 33 | |||
113 | 34 | from zope import i18n | 34 | from zope import i18n |
114 | 35 | from zope.component import ( | 35 | from zope.component import ( |
115 | 36 | getGlobalSiteManager, | 36 | getGlobalSiteManager, |
116 | diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py | |||
117 | index 304fb1b..cfe0af0 100644 | |||
118 | --- a/lib/lp/app/browser/tales.py | |||
119 | +++ b/lib/lp/app/browser/tales.py | |||
120 | @@ -16,12 +16,12 @@ import math | |||
121 | 16 | import os.path | 16 | import os.path |
122 | 17 | import sys | 17 | import sys |
123 | 18 | from textwrap import dedent | 18 | from textwrap import dedent |
124 | 19 | from urllib.parse import quote | ||
125 | 19 | 20 | ||
126 | 20 | from lazr.enum import enumerated_type_registry | 21 | from lazr.enum import enumerated_type_registry |
127 | 21 | from lazr.restful.utils import get_current_browser_request | 22 | from lazr.restful.utils import get_current_browser_request |
128 | 22 | from lazr.uri import URI | 23 | from lazr.uri import URI |
129 | 23 | import pytz | 24 | import pytz |
130 | 24 | from six.moves.urllib.parse import quote | ||
131 | 25 | from zope.browserpage import ViewPageTemplateFile | 25 | from zope.browserpage import ViewPageTemplateFile |
132 | 26 | from zope.component import ( | 26 | from zope.component import ( |
133 | 27 | adapter, | 27 | adapter, |
134 | diff --git a/lib/lp/app/browser/tests/test_vocabulary.py b/lib/lp/app/browser/tests/test_vocabulary.py | |||
135 | index 644c72d..8a04ba5 100644 | |||
136 | --- a/lib/lp/app/browser/tests/test_vocabulary.py | |||
137 | +++ b/lib/lp/app/browser/tests/test_vocabulary.py | |||
138 | @@ -4,10 +4,10 @@ | |||
139 | 4 | """Test vocabulary adapters.""" | 4 | """Test vocabulary adapters.""" |
140 | 5 | 5 | ||
141 | 6 | from datetime import datetime | 6 | from datetime import datetime |
142 | 7 | from urllib.parse import urlencode | ||
143 | 7 | 8 | ||
144 | 8 | import pytz | 9 | import pytz |
145 | 9 | import simplejson | 10 | import simplejson |
146 | 10 | from six.moves.urllib.parse import urlencode | ||
147 | 11 | from zope.component import ( | 11 | from zope.component import ( |
148 | 12 | getSiteManager, | 12 | getSiteManager, |
149 | 13 | getUtility, | 13 | getUtility, |
150 | diff --git a/lib/lp/app/tests/test_services.py b/lib/lp/app/tests/test_services.py | |||
151 | index 0cbaee4..20f1670 100644 | |||
152 | --- a/lib/lp/app/tests/test_services.py | |||
153 | +++ b/lib/lp/app/tests/test_services.py | |||
154 | @@ -4,10 +4,10 @@ | |||
155 | 4 | """Tests for core services infrastructure.""" | 4 | """Tests for core services infrastructure.""" |
156 | 5 | 5 | ||
157 | 6 | import json | 6 | import json |
158 | 7 | from urllib.parse import urlparse | ||
159 | 7 | 8 | ||
160 | 8 | from fixtures import FakeLogger | 9 | from fixtures import FakeLogger |
161 | 9 | from lazr.restful.interfaces._rest import IHTTPResource | 10 | from lazr.restful.interfaces._rest import IHTTPResource |
162 | 10 | from six.moves.urllib.parse import urlparse | ||
163 | 11 | from zope.component import getUtility | 11 | from zope.component import getUtility |
164 | 12 | from zope.interface import implementer | 12 | from zope.interface import implementer |
165 | 13 | from zope.interface.interfaces import ComponentLookupError | 13 | from zope.interface.interfaces import ComponentLookupError |
166 | diff --git a/lib/lp/app/validators/url.py b/lib/lp/app/validators/url.py | |||
167 | index dd29b7a..c90b4c9 100644 | |||
168 | --- a/lib/lp/app/validators/url.py | |||
169 | +++ b/lib/lp/app/validators/url.py | |||
170 | @@ -10,8 +10,7 @@ __all__ = [ | |||
171 | 10 | ] | 10 | ] |
172 | 11 | 11 | ||
173 | 12 | from textwrap import dedent | 12 | from textwrap import dedent |
176 | 13 | 13 | from urllib.parse import urlsplit | |
175 | 14 | from six.moves.urllib.parse import urlsplit | ||
177 | 15 | 14 | ||
178 | 16 | from lp import _ | 15 | from lp import _ |
179 | 17 | from lp.app.validators import LaunchpadValidationError | 16 | from lp.app.validators import LaunchpadValidationError |
180 | diff --git a/lib/lp/bugs/browser/buglisting.py b/lib/lp/bugs/browser/buglisting.py | |||
181 | index cbc365b..4fbb813 100644 | |||
182 | --- a/lib/lp/bugs/browser/buglisting.py | |||
183 | +++ b/lib/lp/bugs/browser/buglisting.py | |||
184 | @@ -20,6 +20,12 @@ __all__ = [ | |||
185 | 20 | ] | 20 | ] |
186 | 21 | 21 | ||
187 | 22 | import os.path | 22 | import os.path |
188 | 23 | from urllib.parse import ( | ||
189 | 24 | parse_qs, | ||
190 | 25 | parse_qsl, | ||
191 | 26 | quote, | ||
192 | 27 | urlencode, | ||
193 | 28 | ) | ||
194 | 23 | 29 | ||
195 | 24 | from lazr.delegates import delegate_to | 30 | from lazr.delegates import delegate_to |
196 | 25 | from lazr.restful.interfaces import IJSONRequestCache | 31 | from lazr.restful.interfaces import IJSONRequestCache |
197 | @@ -27,12 +33,6 @@ from lazr.uri import URI | |||
198 | 27 | import pystache | 33 | import pystache |
199 | 28 | from simplejson import dumps | 34 | from simplejson import dumps |
200 | 29 | from simplejson.encoder import JSONEncoderForHTML | 35 | from simplejson.encoder import JSONEncoderForHTML |
201 | 30 | from six.moves.urllib.parse import ( | ||
202 | 31 | parse_qs, | ||
203 | 32 | parse_qsl, | ||
204 | 33 | quote, | ||
205 | 34 | urlencode, | ||
206 | 35 | ) | ||
207 | 36 | from zope.authentication.interfaces import IUnauthenticatedPrincipal | 36 | from zope.authentication.interfaces import IUnauthenticatedPrincipal |
208 | 37 | from zope.browserpage import ViewPageTemplateFile | 37 | from zope.browserpage import ViewPageTemplateFile |
209 | 38 | from zope.component import ( | 38 | from zope.component import ( |
210 | diff --git a/lib/lp/bugs/browser/bugtarget.py b/lib/lp/bugs/browser/bugtarget.py | |||
211 | index cdceaea..1802a0e 100644 | |||
212 | --- a/lib/lp/bugs/browser/bugtarget.py | |||
213 | +++ b/lib/lp/bugs/browser/bugtarget.py | |||
214 | @@ -21,15 +21,15 @@ from datetime import datetime | |||
215 | 21 | from functools import partial | 21 | from functools import partial |
216 | 22 | import http.client | 22 | import http.client |
217 | 23 | from io import BytesIO | 23 | from io import BytesIO |
218 | 24 | from urllib.parse import ( | ||
219 | 25 | quote, | ||
220 | 26 | urlencode, | ||
221 | 27 | ) | ||
222 | 24 | 28 | ||
223 | 25 | from lazr.restful.interface import copy_field | 29 | from lazr.restful.interface import copy_field |
224 | 26 | from lazr.restful.interfaces import IJSONRequestCache | 30 | from lazr.restful.interfaces import IJSONRequestCache |
225 | 27 | from pytz import timezone | 31 | from pytz import timezone |
226 | 28 | from simplejson import dumps | 32 | from simplejson import dumps |
227 | 29 | from six.moves.urllib.parse import ( | ||
228 | 30 | quote, | ||
229 | 31 | urlencode, | ||
230 | 32 | ) | ||
231 | 33 | from zope.browserpage import ViewPageTemplateFile | 33 | from zope.browserpage import ViewPageTemplateFile |
232 | 34 | from zope.component import getUtility | 34 | from zope.component import getUtility |
233 | 35 | from zope.formlib.form import Fields | 35 | from zope.formlib.form import Fields |
234 | diff --git a/lib/lp/bugs/browser/bugtask.py b/lib/lp/bugs/browser/bugtask.py | |||
235 | index 6e85112..7af4f94 100644 | |||
236 | --- a/lib/lp/bugs/browser/bugtask.py | |||
237 | +++ b/lib/lp/bugs/browser/bugtask.py | |||
238 | @@ -33,6 +33,7 @@ from datetime import ( | |||
239 | 33 | from itertools import groupby | 33 | from itertools import groupby |
240 | 34 | from operator import attrgetter | 34 | from operator import attrgetter |
241 | 35 | import re | 35 | import re |
242 | 36 | from urllib.parse import quote | ||
243 | 36 | 37 | ||
244 | 37 | from lazr.delegates import delegate_to | 38 | from lazr.delegates import delegate_to |
245 | 38 | from lazr.lifecycle.event import ObjectModifiedEvent | 39 | from lazr.lifecycle.event import ObjectModifiedEvent |
246 | @@ -47,7 +48,6 @@ from lazr.restful.interfaces import ( | |||
247 | 47 | from lazr.restful.utils import smartquote | 48 | from lazr.restful.utils import smartquote |
248 | 48 | from pytz import utc | 49 | from pytz import utc |
249 | 49 | from simplejson import dumps | 50 | from simplejson import dumps |
250 | 50 | from six.moves.urllib.parse import quote | ||
251 | 51 | import transaction | 51 | import transaction |
252 | 52 | from zope import formlib | 52 | from zope import formlib |
253 | 53 | from zope.browserpage import ViewPageTemplateFile | 53 | from zope.browserpage import ViewPageTemplateFile |
254 | diff --git a/lib/lp/bugs/browser/person.py b/lib/lp/bugs/browser/person.py | |||
255 | index 4b5de77..d9bc4b6 100644 | |||
256 | --- a/lib/lp/bugs/browser/person.py | |||
257 | +++ b/lib/lp/bugs/browser/person.py | |||
258 | @@ -16,8 +16,8 @@ __all__ = [ | |||
259 | 16 | 16 | ||
260 | 17 | import copy | 17 | import copy |
261 | 18 | from operator import itemgetter | 18 | from operator import itemgetter |
262 | 19 | from urllib.parse import urlencode | ||
263 | 19 | 20 | ||
264 | 20 | from six.moves.urllib.parse import urlencode | ||
265 | 21 | from zope.component import getUtility | 21 | from zope.component import getUtility |
266 | 22 | 22 | ||
267 | 23 | from lp.bugs.browser.buglisting import BugTaskSearchListingView | 23 | from lp.bugs.browser.buglisting import BugTaskSearchListingView |
268 | diff --git a/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py b/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py | |||
269 | index 3b48f29..52c2e36 100644 | |||
270 | --- a/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py | |||
271 | +++ b/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py | |||
272 | @@ -2,13 +2,13 @@ | |||
273 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
274 | 3 | 3 | ||
275 | 4 | import re | 4 | import re |
279 | 5 | 5 | from urllib.parse import ( | |
277 | 6 | import requests | ||
278 | 7 | from six.moves.urllib.parse import ( | ||
280 | 8 | parse_qs, | 6 | parse_qs, |
281 | 9 | urlparse, | 7 | urlparse, |
282 | 10 | urlunparse, | 8 | urlunparse, |
283 | 11 | ) | 9 | ) |
284 | 10 | |||
285 | 11 | import requests | ||
286 | 12 | import transaction | 12 | import transaction |
287 | 13 | from zope.component import ( | 13 | from zope.component import ( |
288 | 14 | getMultiAdapter, | 14 | getMultiAdapter, |
289 | diff --git a/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py b/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py | |||
290 | index 23f9c99..45ec289 100644 | |||
291 | --- a/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py | |||
292 | +++ b/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py | |||
293 | @@ -4,9 +4,9 @@ | |||
294 | 4 | """Tests for bug subscription filter browser code.""" | 4 | """Tests for bug subscription filter browser code.""" |
295 | 5 | 5 | ||
296 | 6 | import json | 6 | import json |
297 | 7 | from urllib.parse import urlparse | ||
298 | 7 | 8 | ||
299 | 8 | from lxml import html | 9 | from lxml import html |
300 | 9 | from six.moves.urllib.parse import urlparse | ||
301 | 10 | from testtools.matchers import StartsWith | 10 | from testtools.matchers import StartsWith |
302 | 11 | 11 | ||
303 | 12 | from lp.app.enums import InformationType | 12 | from lp.app.enums import InformationType |
304 | diff --git a/lib/lp/bugs/browser/tests/test_bugtask.py b/lib/lp/bugs/browser/tests/test_bugtask.py | |||
305 | index 9c13e86..4394120 100644 | |||
306 | --- a/lib/lp/bugs/browser/tests/test_bugtask.py | |||
307 | +++ b/lib/lp/bugs/browser/tests/test_bugtask.py | |||
308 | @@ -6,12 +6,12 @@ from datetime import ( | |||
309 | 6 | timedelta, | 6 | timedelta, |
310 | 7 | ) | 7 | ) |
311 | 8 | import re | 8 | import re |
312 | 9 | from urllib.parse import urlencode | ||
313 | 9 | 10 | ||
314 | 10 | from lazr.restful.interfaces import IJSONRequestCache | 11 | from lazr.restful.interfaces import IJSONRequestCache |
315 | 11 | from pytz import UTC | 12 | from pytz import UTC |
316 | 12 | import simplejson | 13 | import simplejson |
317 | 13 | import six | 14 | import six |
318 | 14 | from six.moves.urllib.parse import urlencode | ||
319 | 15 | import soupmatchers | 15 | import soupmatchers |
320 | 16 | from testscenarios import ( | 16 | from testscenarios import ( |
321 | 17 | load_tests_apply_scenarios, | 17 | load_tests_apply_scenarios, |
322 | diff --git a/lib/lp/bugs/browser/tests/test_structuralsubscription.py b/lib/lp/bugs/browser/tests/test_structuralsubscription.py | |||
323 | index a6fd6a9..5aacbdb 100644 | |||
324 | --- a/lib/lp/bugs/browser/tests/test_structuralsubscription.py | |||
325 | +++ b/lib/lp/bugs/browser/tests/test_structuralsubscription.py | |||
326 | @@ -3,7 +3,8 @@ | |||
327 | 3 | 3 | ||
328 | 4 | """Tests for structural subscription traversal.""" | 4 | """Tests for structural subscription traversal.""" |
329 | 5 | 5 | ||
331 | 6 | from six.moves.urllib.parse import urlparse | 6 | from urllib.parse import urlparse |
332 | 7 | |||
333 | 7 | from zope.publisher.interfaces import NotFound | 8 | from zope.publisher.interfaces import NotFound |
334 | 8 | 9 | ||
335 | 9 | from lp.registry.browser.distribution import DistributionNavigation | 10 | from lp.registry.browser.distribution import DistributionNavigation |
336 | diff --git a/lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt b/lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt | |||
337 | index 8c76531..6e5865f 100644 | |||
338 | --- a/lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt | |||
339 | +++ b/lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt | |||
340 | @@ -31,7 +31,7 @@ Trac to validate $token and return a Set-Cookie header. | |||
341 | 31 | 31 | ||
342 | 32 | >>> import random | 32 | >>> import random |
343 | 33 | >>> import re | 33 | >>> import re |
345 | 34 | >>> from six.moves.urllib_parse import ( | 34 | >>> from urllib.parse import ( |
346 | 35 | ... urljoin, | 35 | ... urljoin, |
347 | 36 | ... urlsplit, | 36 | ... urlsplit, |
348 | 37 | ... ) | 37 | ... ) |
349 | diff --git a/lib/lp/bugs/doc/sourceforge-remote-products.txt b/lib/lp/bugs/doc/sourceforge-remote-products.txt | |||
350 | index 8f15721..edd70ce 100644 | |||
351 | --- a/lib/lp/bugs/doc/sourceforge-remote-products.txt | |||
352 | +++ b/lib/lp/bugs/doc/sourceforge-remote-products.txt | |||
353 | @@ -41,8 +41,8 @@ Define some request mocks so that we don't try to access SourceForge. | |||
354 | 41 | 41 | ||
355 | 42 | >>> import os.path | 42 | >>> import os.path |
356 | 43 | >>> import re | 43 | >>> import re |
357 | 44 | >>> from urllib.parse import urlsplit | ||
358 | 44 | >>> import responses | 45 | >>> import responses |
359 | 45 | >>> from six.moves.urllib_parse import urlsplit | ||
360 | 46 | 46 | ||
361 | 47 | >>> def project_callback(request): | 47 | >>> def project_callback(request): |
362 | 48 | ... url = urlsplit(request.url) | 48 | ... url = urlsplit(request.url) |
363 | diff --git a/lib/lp/bugs/externalbugtracker/base.py b/lib/lp/bugs/externalbugtracker/base.py | |||
364 | index 6ebd4bc..8cf7f0e 100644 | |||
365 | --- a/lib/lp/bugs/externalbugtracker/base.py | |||
366 | +++ b/lib/lp/bugs/externalbugtracker/base.py | |||
367 | @@ -26,11 +26,12 @@ __all__ = [ | |||
368 | 26 | ] | 26 | ] |
369 | 27 | 27 | ||
370 | 28 | 28 | ||
373 | 29 | import requests | 29 | from urllib.parse import ( |
372 | 30 | from six.moves.urllib_parse import ( | ||
374 | 31 | urljoin, | 30 | urljoin, |
375 | 32 | urlparse, | 31 | urlparse, |
376 | 33 | ) | 32 | ) |
377 | 33 | |||
378 | 34 | import requests | ||
379 | 34 | from zope.interface import implementer | 35 | from zope.interface import implementer |
380 | 35 | 36 | ||
381 | 36 | from lp.bugs.adapters import treelookup | 37 | from lp.bugs.adapters import treelookup |
382 | diff --git a/lib/lp/bugs/externalbugtracker/github.py b/lib/lp/bugs/externalbugtracker/github.py | |||
383 | index 4e686ee..8f45e4d 100644 | |||
384 | --- a/lib/lp/bugs/externalbugtracker/github.py | |||
385 | +++ b/lib/lp/bugs/externalbugtracker/github.py | |||
386 | @@ -13,13 +13,13 @@ __all__ = [ | |||
387 | 13 | from contextlib import contextmanager | 13 | from contextlib import contextmanager |
388 | 14 | import http.client | 14 | import http.client |
389 | 15 | import time | 15 | import time |
394 | 16 | 16 | from urllib.parse import ( | |
391 | 17 | import pytz | ||
392 | 18 | import requests | ||
393 | 19 | from six.moves.urllib.parse import ( | ||
395 | 20 | urlencode, | 17 | urlencode, |
396 | 21 | urlunsplit, | 18 | urlunsplit, |
397 | 22 | ) | 19 | ) |
398 | 20 | |||
399 | 21 | import pytz | ||
400 | 22 | import requests | ||
401 | 23 | from zope.component import getUtility | 23 | from zope.component import getUtility |
402 | 24 | from zope.interface import Interface | 24 | from zope.interface import Interface |
403 | 25 | 25 | ||
404 | diff --git a/lib/lp/bugs/externalbugtracker/gitlab.py b/lib/lp/bugs/externalbugtracker/gitlab.py | |||
405 | index cc7ac40..444fcb1 100644 | |||
406 | --- a/lib/lp/bugs/externalbugtracker/gitlab.py | |||
407 | +++ b/lib/lp/bugs/externalbugtracker/gitlab.py | |||
408 | @@ -9,14 +9,14 @@ __all__ = [ | |||
409 | 9 | ] | 9 | ] |
410 | 10 | 10 | ||
411 | 11 | import http.client | 11 | import http.client |
415 | 12 | 12 | from urllib.parse import ( | |
413 | 13 | import pytz | ||
414 | 14 | from six.moves.urllib.parse import ( | ||
416 | 15 | quote, | 13 | quote, |
417 | 16 | quote_plus, | 14 | quote_plus, |
418 | 17 | urlunsplit, | 15 | urlunsplit, |
419 | 18 | ) | 16 | ) |
420 | 19 | 17 | ||
421 | 18 | import pytz | ||
422 | 19 | |||
423 | 20 | from lp.bugs.externalbugtracker import ( | 20 | from lp.bugs.externalbugtracker import ( |
424 | 21 | BugTrackerConnectError, | 21 | BugTrackerConnectError, |
425 | 22 | ExternalBugTracker, | 22 | ExternalBugTracker, |
426 | diff --git a/lib/lp/bugs/externalbugtracker/mantis.py b/lib/lp/bugs/externalbugtracker/mantis.py | |||
427 | index 40562da..bf10470 100644 | |||
428 | --- a/lib/lp/bugs/externalbugtracker/mantis.py | |||
429 | +++ b/lib/lp/bugs/externalbugtracker/mantis.py | |||
430 | @@ -11,15 +11,15 @@ __all__ = [ | |||
431 | 11 | import csv | 11 | import csv |
432 | 12 | import logging | 12 | import logging |
433 | 13 | import re | 13 | import re |
438 | 14 | 14 | from urllib.parse import ( | |
435 | 15 | from bs4.element import Comment | ||
436 | 16 | from requests.cookies import RequestsCookieJar | ||
437 | 17 | from six.moves.urllib_parse import ( | ||
439 | 18 | parse_qsl, | 15 | parse_qsl, |
440 | 19 | urlencode, | 16 | urlencode, |
441 | 20 | urlunparse, | 17 | urlunparse, |
442 | 21 | ) | 18 | ) |
443 | 22 | 19 | ||
444 | 20 | from bs4.element import Comment | ||
445 | 21 | from requests.cookies import RequestsCookieJar | ||
446 | 22 | |||
447 | 23 | from lp.bugs.externalbugtracker import ( | 23 | from lp.bugs.externalbugtracker import ( |
448 | 24 | BugNotFound, | 24 | BugNotFound, |
449 | 25 | BugTrackerConnectError, | 25 | BugTrackerConnectError, |
450 | diff --git a/lib/lp/bugs/externalbugtracker/roundup.py b/lib/lp/bugs/externalbugtracker/roundup.py | |||
451 | index 2bd3de2..84e7967 100644 | |||
452 | --- a/lib/lp/bugs/externalbugtracker/roundup.py | |||
453 | +++ b/lib/lp/bugs/externalbugtracker/roundup.py | |||
454 | @@ -6,9 +6,9 @@ | |||
455 | 6 | __all__ = ['Roundup'] | 6 | __all__ = ['Roundup'] |
456 | 7 | 7 | ||
457 | 8 | import csv | 8 | import csv |
458 | 9 | from urllib.parse import quote_plus | ||
459 | 9 | 10 | ||
460 | 10 | from lazr.uri import URI | 11 | from lazr.uri import URI |
461 | 11 | from six.moves.urllib.parse import quote_plus | ||
462 | 12 | 12 | ||
463 | 13 | from lp.bugs.externalbugtracker import ( | 13 | from lp.bugs.externalbugtracker import ( |
464 | 14 | BugNotFound, | 14 | BugNotFound, |
465 | diff --git a/lib/lp/bugs/externalbugtracker/tests/test_github.py b/lib/lp/bugs/externalbugtracker/tests/test_github.py | |||
466 | index 87cdafa..b7644b5 100644 | |||
467 | --- a/lib/lp/bugs/externalbugtracker/tests/test_github.py | |||
468 | +++ b/lib/lp/bugs/externalbugtracker/tests/test_github.py | |||
469 | @@ -5,14 +5,14 @@ | |||
470 | 5 | 5 | ||
471 | 6 | from datetime import datetime | 6 | from datetime import datetime |
472 | 7 | import json | 7 | import json |
477 | 8 | 8 | from urllib.parse import ( | |
474 | 9 | import pytz | ||
475 | 10 | import responses | ||
476 | 11 | from six.moves.urllib_parse import ( | ||
478 | 12 | parse_qs, | 9 | parse_qs, |
479 | 13 | urlsplit, | 10 | urlsplit, |
480 | 14 | urlunsplit, | 11 | urlunsplit, |
481 | 15 | ) | 12 | ) |
482 | 13 | |||
483 | 14 | import pytz | ||
484 | 15 | import responses | ||
485 | 16 | from testtools import ExpectedException | 16 | from testtools import ExpectedException |
486 | 17 | from testtools.matchers import ( | 17 | from testtools.matchers import ( |
487 | 18 | Contains, | 18 | Contains, |
488 | diff --git a/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py b/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py | |||
489 | index 9fd7351..2ed17bf 100644 | |||
490 | --- a/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py | |||
491 | +++ b/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py | |||
492 | @@ -5,14 +5,14 @@ | |||
493 | 5 | 5 | ||
494 | 6 | from datetime import datetime | 6 | from datetime import datetime |
495 | 7 | import json | 7 | import json |
500 | 8 | 8 | from urllib.parse import ( | |
497 | 9 | import pytz | ||
498 | 10 | import responses | ||
499 | 11 | from six.moves.urllib_parse import ( | ||
501 | 12 | parse_qs, | 9 | parse_qs, |
502 | 13 | urlsplit, | 10 | urlsplit, |
503 | 14 | urlunsplit, | 11 | urlunsplit, |
504 | 15 | ) | 12 | ) |
505 | 13 | |||
506 | 14 | import pytz | ||
507 | 15 | import responses | ||
508 | 16 | from testtools.matchers import ( | 16 | from testtools.matchers import ( |
509 | 17 | Contains, | 17 | Contains, |
510 | 18 | ContainsDict, | 18 | ContainsDict, |
511 | diff --git a/lib/lp/bugs/externalbugtracker/tests/test_mantis.py b/lib/lp/bugs/externalbugtracker/tests/test_mantis.py | |||
512 | index 99de31b..3fc3010 100644 | |||
513 | --- a/lib/lp/bugs/externalbugtracker/tests/test_mantis.py | |||
514 | +++ b/lib/lp/bugs/externalbugtracker/tests/test_mantis.py | |||
515 | @@ -3,8 +3,9 @@ | |||
516 | 3 | 3 | ||
517 | 4 | """Tests for the Mantis BugTracker.""" | 4 | """Tests for the Mantis BugTracker.""" |
518 | 5 | 5 | ||
519 | 6 | from urllib.parse import urljoin | ||
520 | 7 | |||
521 | 6 | import responses | 8 | import responses |
522 | 7 | from six.moves.urllib_parse import urljoin | ||
523 | 8 | from testtools.matchers import ( | 9 | from testtools.matchers import ( |
524 | 9 | Equals, | 10 | Equals, |
525 | 10 | Is, | 11 | Is, |
526 | diff --git a/lib/lp/bugs/externalbugtracker/xmlrpc.py b/lib/lp/bugs/externalbugtracker/xmlrpc.py | |||
527 | index 6d63fe9..228a9de 100644 | |||
528 | --- a/lib/lp/bugs/externalbugtracker/xmlrpc.py | |||
529 | +++ b/lib/lp/bugs/externalbugtracker/xmlrpc.py | |||
530 | @@ -9,6 +9,10 @@ __all__ = [ | |||
531 | 9 | 9 | ||
532 | 10 | 10 | ||
533 | 11 | from io import BytesIO | 11 | from io import BytesIO |
534 | 12 | from urllib.parse import ( | ||
535 | 13 | urlparse, | ||
536 | 14 | urlunparse, | ||
537 | 15 | ) | ||
538 | 12 | from xmlrpc.client import ( | 16 | from xmlrpc.client import ( |
539 | 13 | ProtocolError, | 17 | ProtocolError, |
540 | 14 | Transport, | 18 | Transport, |
541 | @@ -18,10 +22,6 @@ from defusedxml.xmlrpc import monkey_patch | |||
542 | 18 | import requests | 22 | import requests |
543 | 19 | from requests.cookies import RequestsCookieJar | 23 | from requests.cookies import RequestsCookieJar |
544 | 20 | import six | 24 | import six |
545 | 21 | from six.moves.urllib.parse import ( | ||
546 | 22 | urlparse, | ||
547 | 23 | urlunparse, | ||
548 | 24 | ) | ||
549 | 25 | 25 | ||
550 | 26 | from lp.bugs.externalbugtracker.base import repost_on_redirect_hook | 26 | from lp.bugs.externalbugtracker.base import repost_on_redirect_hook |
551 | 27 | from lp.services.config import config | 27 | from lp.services.config import config |
552 | diff --git a/lib/lp/bugs/model/bugtracker.py b/lib/lp/bugs/model/bugtracker.py | |||
553 | index a8070ae..9106ffe 100644 | |||
554 | --- a/lib/lp/bugs/model/bugtracker.py | |||
555 | +++ b/lib/lp/bugs/model/bugtracker.py | |||
556 | @@ -12,15 +12,15 @@ __all__ = [ | |||
557 | 12 | 12 | ||
558 | 13 | from datetime import datetime | 13 | from datetime import datetime |
559 | 14 | from itertools import chain | 14 | from itertools import chain |
565 | 15 | 15 | from urllib.parse import ( | |
561 | 16 | from lazr.uri import URI | ||
562 | 17 | from pytz import timezone | ||
563 | 18 | import six | ||
564 | 19 | from six.moves.urllib.parse import ( | ||
566 | 20 | quote, | 16 | quote, |
567 | 21 | urlsplit, | 17 | urlsplit, |
568 | 22 | urlunsplit, | 18 | urlunsplit, |
569 | 23 | ) | 19 | ) |
570 | 20 | |||
571 | 21 | from lazr.uri import URI | ||
572 | 22 | from pytz import timezone | ||
573 | 23 | import six | ||
574 | 24 | from storm.expr import ( | 24 | from storm.expr import ( |
575 | 25 | Count, | 25 | Count, |
576 | 26 | Desc, | 26 | Desc, |
577 | diff --git a/lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt b/lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt | |||
578 | index 1d29a68..d3656ca 100644 | |||
579 | --- a/lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt | |||
580 | +++ b/lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt | |||
581 | @@ -74,7 +74,7 @@ will be displayed. | |||
582 | 74 | The description given in the link to the bug filing form contains a | 74 | The description given in the link to the bug filing form contains a |
583 | 75 | link back to bug 13, the place where it was originally filed. | 75 | link back to bug 13, the place where it was originally filed. |
584 | 76 | 76 | ||
586 | 77 | >>> from six.moves.urllib.parse import ( | 77 | >>> from urllib.parse import ( |
587 | 78 | ... parse_qs, | 78 | ... parse_qs, |
588 | 79 | ... urlparse, | 79 | ... urlparse, |
589 | 80 | ... ) | 80 | ... ) |
590 | diff --git a/lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt b/lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt | |||
591 | index bf2bed7..2211cbc 100644 | |||
592 | --- a/lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt | |||
593 | +++ b/lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt | |||
594 | @@ -144,7 +144,7 @@ status. Bookmarks of such searches work nevertheless. | |||
595 | 144 | 144 | ||
596 | 145 | The user opens a bookmark for "upstream status doesn't matter" | 145 | The user opens a bookmark for "upstream status doesn't matter" |
597 | 146 | 146 | ||
599 | 147 | >>> from six.moves.urllib.parse import urlencode | 147 | >>> from urllib.parse import urlencode |
600 | 148 | >>> bookmark_params = { | 148 | >>> bookmark_params = { |
601 | 149 | ... 'field.status_upstream': '', | 149 | ... 'field.status_upstream': '', |
602 | 150 | ... 'field.status_upstream-empty-marker': '1', | 150 | ... 'field.status_upstream-empty-marker': '1', |
603 | diff --git a/lib/lp/bugs/stories/bugtask-searches/xx-old-urls-still-work.txt b/lib/lp/bugs/stories/bugtask-searches/xx-old-urls-still-work.txt | |||
604 | index 2992c0b..9bf67e9 100644 | |||
605 | --- a/lib/lp/bugs/stories/bugtask-searches/xx-old-urls-still-work.txt | |||
606 | +++ b/lib/lp/bugs/stories/bugtask-searches/xx-old-urls-still-work.txt | |||
607 | @@ -22,7 +22,7 @@ The user is redirected to a new url to make the change explicit, and | |||
608 | 22 | to allow user agents (and users) to update bookmarks, etc. | 22 | to allow user agents (and users) to update bookmarks, etc. |
609 | 23 | 23 | ||
610 | 24 | >>> def print_query_changes(query_string_before, query_string_after): | 24 | >>> def print_query_changes(query_string_before, query_string_after): |
612 | 25 | ... from six.moves.urllib.parse import parse_qsl | 25 | ... from urllib.parse import parse_qsl |
613 | 26 | ... query_before = parse_qsl( | 26 | ... query_before = parse_qsl( |
614 | 27 | ... query_string_before, keep_blank_values=True) | 27 | ... query_string_before, keep_blank_values=True) |
615 | 28 | ... query_after = parse_qsl( | 28 | ... query_after = parse_qsl( |
616 | diff --git a/lib/lp/bugs/stories/webservice/xx-bug.txt b/lib/lp/bugs/stories/webservice/xx-bug.txt | |||
617 | index e19ef0f..718e63c 100644 | |||
618 | --- a/lib/lp/bugs/stories/webservice/xx-bug.txt | |||
619 | +++ b/lib/lp/bugs/stories/webservice/xx-bug.txt | |||
620 | @@ -1335,7 +1335,7 @@ we must follow to download the data. | |||
621 | 1335 | Location: http://.../numbers.txt | 1335 | Location: http://.../numbers.txt |
622 | 1336 | ... | 1336 | ... |
623 | 1337 | 1337 | ||
625 | 1338 | >>> from six.moves.urllib.request import urlopen | 1338 | >>> from urllib.request import urlopen |
626 | 1339 | 1339 | ||
627 | 1340 | >>> data = None | 1340 | >>> data = None |
628 | 1341 | >>> conn = urlopen(data_response.getHeader('Location')) | 1341 | >>> conn = urlopen(data_response.getHeader('Location')) |
629 | diff --git a/lib/lp/bugs/tests/externalbugtracker.py b/lib/lp/bugs/tests/externalbugtracker.py | |||
630 | index a7706d7..11dcaab 100644 | |||
631 | --- a/lib/lp/bugs/tests/externalbugtracker.py | |||
632 | +++ b/lib/lp/bugs/tests/externalbugtracker.py | |||
633 | @@ -14,14 +14,14 @@ import os | |||
634 | 14 | import random | 14 | import random |
635 | 15 | import re | 15 | import re |
636 | 16 | import time | 16 | import time |
641 | 17 | import xmlrpc.client | 17 | from urllib.parse import ( |
638 | 18 | |||
639 | 19 | import responses | ||
640 | 20 | from six.moves.urllib_parse import ( | ||
642 | 21 | parse_qs, | 18 | parse_qs, |
643 | 22 | urljoin, | 19 | urljoin, |
644 | 23 | urlsplit, | 20 | urlsplit, |
645 | 24 | ) | 21 | ) |
646 | 22 | import xmlrpc.client | ||
647 | 23 | |||
648 | 24 | import responses | ||
649 | 25 | from zope.component import getUtility | 25 | from zope.component import getUtility |
650 | 26 | from zope.security.proxy import removeSecurityProxy | 26 | from zope.security.proxy import removeSecurityProxy |
651 | 27 | 27 | ||
652 | diff --git a/lib/lp/bugs/tests/test_bugtracker.py b/lib/lp/bugs/tests/test_bugtracker.py | |||
653 | index 59f4e7d..d4a3e28 100644 | |||
654 | --- a/lib/lp/bugs/tests/test_bugtracker.py | |||
655 | +++ b/lib/lp/bugs/tests/test_bugtracker.py | |||
656 | @@ -11,11 +11,11 @@ from doctest import ( | |||
657 | 11 | NORMALIZE_WHITESPACE, | 11 | NORMALIZE_WHITESPACE, |
658 | 12 | ) | 12 | ) |
659 | 13 | import unittest | 13 | import unittest |
660 | 14 | from urllib.parse import urlencode | ||
661 | 14 | 15 | ||
662 | 15 | from lazr.lifecycle.snapshot import Snapshot | 16 | from lazr.lifecycle.snapshot import Snapshot |
663 | 16 | from pytz import utc | 17 | from pytz import utc |
664 | 17 | import responses | 18 | import responses |
665 | 18 | from six.moves.urllib_parse import urlencode | ||
666 | 19 | from testtools.matchers import ( | 19 | from testtools.matchers import ( |
667 | 20 | Equals, | 20 | Equals, |
668 | 21 | MatchesListwise, | 21 | MatchesListwise, |
669 | diff --git a/lib/lp/bugs/tests/test_bugwatch.py b/lib/lp/bugs/tests/test_bugwatch.py | |||
670 | index 402253b..9a363d5 100644 | |||
671 | --- a/lib/lp/bugs/tests/test_bugwatch.py | |||
672 | +++ b/lib/lp/bugs/tests/test_bugwatch.py | |||
673 | @@ -8,10 +8,10 @@ from datetime import ( | |||
674 | 8 | timedelta, | 8 | timedelta, |
675 | 9 | ) | 9 | ) |
676 | 10 | import re | 10 | import re |
677 | 11 | from urllib.parse import urlunsplit | ||
678 | 11 | 12 | ||
679 | 12 | from lazr.lifecycle.snapshot import Snapshot | 13 | from lazr.lifecycle.snapshot import Snapshot |
680 | 13 | from pytz import utc | 14 | from pytz import utc |
681 | 14 | from six.moves.urllib.parse import urlunsplit | ||
682 | 15 | from storm.store import Store | 15 | from storm.store import Store |
683 | 16 | from testscenarios import ( | 16 | from testscenarios import ( |
684 | 17 | load_tests_apply_scenarios, | 17 | load_tests_apply_scenarios, |
685 | diff --git a/lib/lp/buildmaster/interactor.py b/lib/lp/buildmaster/interactor.py | |||
686 | index 679d5c6..eed2b23 100644 | |||
687 | --- a/lib/lp/buildmaster/interactor.py | |||
688 | +++ b/lib/lp/buildmaster/interactor.py | |||
689 | @@ -14,10 +14,10 @@ import logging | |||
690 | 14 | import os.path | 14 | import os.path |
691 | 15 | import sys | 15 | import sys |
692 | 16 | import traceback | 16 | import traceback |
693 | 17 | from urllib.parse import urlparse | ||
694 | 17 | 18 | ||
695 | 18 | from ampoule.pool import ProcessPool | 19 | from ampoule.pool import ProcessPool |
696 | 19 | import six | 20 | import six |
697 | 20 | from six.moves.urllib.parse import urlparse | ||
698 | 21 | import transaction | 21 | import transaction |
699 | 22 | from twisted.internet import ( | 22 | from twisted.internet import ( |
700 | 23 | defer, | 23 | defer, |
701 | diff --git a/lib/lp/buildmaster/tests/builderproxy.py b/lib/lp/buildmaster/tests/builderproxy.py | |||
702 | index 82197ed..356bc0f 100644 | |||
703 | --- a/lib/lp/buildmaster/tests/builderproxy.py | |||
704 | +++ b/lib/lp/buildmaster/tests/builderproxy.py | |||
705 | @@ -6,10 +6,10 @@ | |||
706 | 6 | from datetime import datetime | 6 | from datetime import datetime |
707 | 7 | import json | 7 | import json |
708 | 8 | from textwrap import dedent | 8 | from textwrap import dedent |
709 | 9 | from urllib.parse import urlsplit | ||
710 | 9 | import uuid | 10 | import uuid |
711 | 10 | 11 | ||
712 | 11 | import fixtures | 12 | import fixtures |
713 | 12 | from six.moves.urllib_parse import urlsplit | ||
714 | 13 | from testtools.matchers import ( | 13 | from testtools.matchers import ( |
715 | 14 | Equals, | 14 | Equals, |
716 | 15 | HasLength, | 15 | HasLength, |
717 | diff --git a/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py b/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py | |||
718 | index 6cd8791..a473487 100644 | |||
719 | --- a/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py | |||
720 | +++ b/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py | |||
721 | @@ -7,11 +7,11 @@ import base64 | |||
722 | 7 | from datetime import datetime | 7 | from datetime import datetime |
723 | 8 | import os.path | 8 | import os.path |
724 | 9 | import time | 9 | import time |
725 | 10 | from urllib.parse import urlsplit | ||
726 | 10 | import uuid | 11 | import uuid |
727 | 11 | 12 | ||
728 | 12 | from fixtures import MockPatch | 13 | from fixtures import MockPatch |
729 | 13 | from pymacaroons import Macaroon | 14 | from pymacaroons import Macaroon |
730 | 14 | from six.moves.urllib_parse import urlsplit | ||
731 | 15 | from testtools import ExpectedException | 15 | from testtools import ExpectedException |
732 | 16 | from testtools.matchers import ( | 16 | from testtools.matchers import ( |
733 | 17 | ContainsDict, | 17 | ContainsDict, |
734 | diff --git a/lib/lp/code/browser/branchlisting.py b/lib/lp/code/browser/branchlisting.py | |||
735 | index 56e26b2..eee45b8 100644 | |||
736 | --- a/lib/lp/code/browser/branchlisting.py | |||
737 | +++ b/lib/lp/code/browser/branchlisting.py | |||
738 | @@ -25,13 +25,13 @@ __all__ = [ | |||
739 | 25 | ] | 25 | ] |
740 | 26 | 26 | ||
741 | 27 | from operator import attrgetter | 27 | from operator import attrgetter |
742 | 28 | from urllib.parse import parse_qs | ||
743 | 28 | 29 | ||
744 | 29 | from lazr.delegates import delegate_to | 30 | from lazr.delegates import delegate_to |
745 | 30 | from lazr.enum import ( | 31 | from lazr.enum import ( |
746 | 31 | EnumeratedType, | 32 | EnumeratedType, |
747 | 32 | Item, | 33 | Item, |
748 | 33 | ) | 34 | ) |
749 | 34 | from six.moves.urllib.parse import parse_qs | ||
750 | 35 | from storm.expr import Desc | 35 | from storm.expr import Desc |
751 | 36 | from zope.browserpage import ViewPageTemplateFile | 36 | from zope.browserpage import ViewPageTemplateFile |
752 | 37 | from zope.component import getUtility | 37 | from zope.component import getUtility |
753 | diff --git a/lib/lp/code/browser/branchmergeproposal.py b/lib/lp/code/browser/branchmergeproposal.py | |||
754 | index 4e89019..fcaddeb 100644 | |||
755 | --- a/lib/lp/code/browser/branchmergeproposal.py | |||
756 | +++ b/lib/lp/code/browser/branchmergeproposal.py | |||
757 | @@ -26,6 +26,10 @@ __all__ = [ | |||
758 | 26 | 26 | ||
759 | 27 | from functools import wraps | 27 | from functools import wraps |
760 | 28 | import operator | 28 | import operator |
761 | 29 | from urllib.parse import ( | ||
762 | 30 | urlsplit, | ||
763 | 31 | urlunsplit, | ||
764 | 32 | ) | ||
765 | 29 | 33 | ||
766 | 30 | from lazr.delegates import delegate_to | 34 | from lazr.delegates import delegate_to |
767 | 31 | from lazr.restful.interface import copy_field | 35 | from lazr.restful.interface import copy_field |
768 | @@ -34,10 +38,6 @@ from lazr.restful.interfaces import ( | |||
769 | 34 | IWebServiceClientRequest, | 38 | IWebServiceClientRequest, |
770 | 35 | ) | 39 | ) |
771 | 36 | import simplejson | 40 | import simplejson |
772 | 37 | from six.moves.urllib_parse import ( | ||
773 | 38 | urlsplit, | ||
774 | 39 | urlunsplit, | ||
775 | 40 | ) | ||
776 | 41 | from zope.component import ( | 41 | from zope.component import ( |
777 | 42 | adapter, | 42 | adapter, |
778 | 43 | getMultiAdapter, | 43 | getMultiAdapter, |
779 | diff --git a/lib/lp/code/browser/codeimport.py b/lib/lp/code/browser/codeimport.py | |||
780 | index 5ecf7d4..33a2cd4 100644 | |||
781 | --- a/lib/lp/code/browser/codeimport.py | |||
782 | +++ b/lib/lp/code/browser/codeimport.py | |||
783 | @@ -18,12 +18,12 @@ __all__ = [ | |||
784 | 18 | ] | 18 | ] |
785 | 19 | 19 | ||
786 | 20 | from textwrap import dedent | 20 | from textwrap import dedent |
787 | 21 | from urllib.parse import urlparse | ||
788 | 21 | 22 | ||
789 | 22 | from lazr.restful.interface import ( | 23 | from lazr.restful.interface import ( |
790 | 23 | copy_field, | 24 | copy_field, |
791 | 24 | use_template, | 25 | use_template, |
792 | 25 | ) | 26 | ) |
793 | 26 | from six.moves.urllib.parse import urlparse | ||
794 | 27 | from zope.component import ( | 27 | from zope.component import ( |
795 | 28 | getUtility, | 28 | getUtility, |
796 | 29 | queryAdapter, | 29 | queryAdapter, |
797 | diff --git a/lib/lp/code/browser/gitref.py b/lib/lp/code/browser/gitref.py | |||
798 | index fedff3e..bc72f3a 100644 | |||
799 | --- a/lib/lp/code/browser/gitref.py | |||
800 | +++ b/lib/lp/code/browser/gitref.py | |||
801 | @@ -10,14 +10,14 @@ __all__ = [ | |||
802 | 10 | ] | 10 | ] |
803 | 11 | 11 | ||
804 | 12 | import json | 12 | import json |
809 | 13 | 13 | from urllib.parse import ( | |
806 | 14 | from breezy import urlutils | ||
807 | 15 | from lazr.restful.interface import copy_field | ||
808 | 16 | from six.moves.urllib_parse import ( | ||
810 | 17 | quote_plus, | 14 | quote_plus, |
811 | 18 | urlsplit, | 15 | urlsplit, |
812 | 19 | urlunsplit, | 16 | urlunsplit, |
813 | 20 | ) | 17 | ) |
814 | 18 | |||
815 | 19 | from breezy import urlutils | ||
816 | 20 | from lazr.restful.interface import copy_field | ||
817 | 21 | from zope.component import getUtility | 21 | from zope.component import getUtility |
818 | 22 | from zope.formlib.widget import CustomWidgetFactory | 22 | from zope.formlib.widget import CustomWidgetFactory |
819 | 23 | from zope.formlib.widgets import TextAreaWidget | 23 | from zope.formlib.widgets import TextAreaWidget |
820 | diff --git a/lib/lp/code/browser/gitrepository.py b/lib/lp/code/browser/gitrepository.py | |||
821 | index 072f626..96a6ce0 100644 | |||
822 | --- a/lib/lp/code/browser/gitrepository.py | |||
823 | +++ b/lib/lp/code/browser/gitrepository.py | |||
824 | @@ -23,6 +23,10 @@ __all__ = [ | |||
825 | 23 | import base64 | 23 | import base64 |
826 | 24 | import binascii | 24 | import binascii |
827 | 25 | from collections import defaultdict | 25 | from collections import defaultdict |
828 | 26 | from urllib.parse import ( | ||
829 | 27 | urlsplit, | ||
830 | 28 | urlunsplit, | ||
831 | 29 | ) | ||
832 | 26 | 30 | ||
833 | 27 | from breezy import urlutils | 31 | from breezy import urlutils |
834 | 28 | from lazr.lifecycle.event import ObjectModifiedEvent | 32 | from lazr.lifecycle.event import ObjectModifiedEvent |
835 | @@ -31,10 +35,6 @@ from lazr.restful.interface import ( | |||
836 | 31 | copy_field, | 35 | copy_field, |
837 | 32 | use_template, | 36 | use_template, |
838 | 33 | ) | 37 | ) |
839 | 34 | from six.moves.urllib_parse import ( | ||
840 | 35 | urlsplit, | ||
841 | 36 | urlunsplit, | ||
842 | 37 | ) | ||
843 | 38 | from zope.component import getUtility | 38 | from zope.component import getUtility |
844 | 39 | from zope.event import notify | 39 | from zope.event import notify |
845 | 40 | from zope.formlib import form | 40 | from zope.formlib import form |
846 | diff --git a/lib/lp/code/browser/tests/test_gitsubscription.py b/lib/lp/code/browser/tests/test_gitsubscription.py | |||
847 | index 1fb5fb7..6f2a5a6 100644 | |||
848 | --- a/lib/lp/code/browser/tests/test_gitsubscription.py | |||
849 | +++ b/lib/lp/code/browser/tests/test_gitsubscription.py | |||
850 | @@ -3,8 +3,9 @@ | |||
851 | 3 | 3 | ||
852 | 4 | """Unit tests for GitSubscriptions.""" | 4 | """Unit tests for GitSubscriptions.""" |
853 | 5 | 5 | ||
854 | 6 | from urllib.parse import urlencode | ||
855 | 7 | |||
856 | 6 | from fixtures import FakeLogger | 8 | from fixtures import FakeLogger |
857 | 7 | from six.moves.urllib.parse import urlencode | ||
858 | 8 | from testtools.matchers import MatchesStructure | 9 | from testtools.matchers import MatchesStructure |
859 | 9 | from zope.security.interfaces import Unauthorized | 10 | from zope.security.interfaces import Unauthorized |
860 | 10 | from zope.testbrowser.browser import LinkNotFoundError | 11 | from zope.testbrowser.browser import LinkNotFoundError |
861 | diff --git a/lib/lp/code/interfaces/codehosting.py b/lib/lp/code/interfaces/codehosting.py | |||
862 | index 91bce70..07a9411 100644 | |||
863 | --- a/lib/lp/code/interfaces/codehosting.py | |||
864 | +++ b/lib/lp/code/interfaces/codehosting.py | |||
865 | @@ -21,10 +21,10 @@ __all__ = [ | |||
866 | 21 | ] | 21 | ] |
867 | 22 | 22 | ||
868 | 23 | import os.path | 23 | import os.path |
869 | 24 | from urllib.parse import quote | ||
870 | 24 | 25 | ||
871 | 25 | from lazr.uri import URI | 26 | from lazr.uri import URI |
872 | 26 | import six | 27 | import six |
873 | 27 | from six.moves.urllib.parse import quote | ||
874 | 28 | from zope.interface import Interface | 28 | from zope.interface import Interface |
875 | 29 | 29 | ||
876 | 30 | from lp.app.validators.name import valid_name | 30 | from lp.app.validators.name import valid_name |
877 | diff --git a/lib/lp/code/model/branch.py b/lib/lp/code/model/branch.py | |||
878 | index fc7da1a..2b940ba 100644 | |||
879 | --- a/lib/lp/code/model/branch.py | |||
880 | +++ b/lib/lp/code/model/branch.py | |||
881 | @@ -11,6 +11,7 @@ from datetime import datetime | |||
882 | 11 | from functools import partial | 11 | from functools import partial |
883 | 12 | import operator | 12 | import operator |
884 | 13 | import os.path | 13 | import os.path |
885 | 14 | from urllib.parse import urlsplit | ||
886 | 14 | 15 | ||
887 | 15 | from breezy import urlutils | 16 | from breezy import urlutils |
888 | 16 | from breezy.revision import NULL_REVISION | 17 | from breezy.revision import NULL_REVISION |
889 | @@ -18,7 +19,6 @@ from breezy.url_policy_open import open_only_scheme | |||
890 | 18 | from lazr.lifecycle.event import ObjectCreatedEvent | 19 | from lazr.lifecycle.event import ObjectCreatedEvent |
891 | 19 | import pytz | 20 | import pytz |
892 | 20 | import six | 21 | import six |
893 | 21 | from six.moves.urllib_parse import urlsplit | ||
894 | 22 | from storm.expr import ( | 22 | from storm.expr import ( |
895 | 23 | And, | 23 | And, |
896 | 24 | Coalesce, | 24 | Coalesce, |
897 | diff --git a/lib/lp/code/model/branchhosting.py b/lib/lp/code/model/branchhosting.py | |||
898 | index 3911c16..c585df2 100644 | |||
899 | --- a/lib/lp/code/model/branchhosting.py | |||
900 | +++ b/lib/lp/code/model/branchhosting.py | |||
901 | @@ -9,13 +9,13 @@ __all__ = [ | |||
902 | 9 | 9 | ||
903 | 10 | import json | 10 | import json |
904 | 11 | import sys | 11 | import sys |
909 | 12 | 12 | from urllib.parse import ( | |
906 | 13 | from lazr.restful.utils import get_current_browser_request | ||
907 | 14 | import requests | ||
908 | 15 | from six.moves.urllib_parse import ( | ||
910 | 16 | quote, | 13 | quote, |
911 | 17 | urljoin, | 14 | urljoin, |
912 | 18 | ) | 15 | ) |
913 | 16 | |||
914 | 17 | from lazr.restful.utils import get_current_browser_request | ||
915 | 18 | import requests | ||
916 | 19 | from zope.interface import implementer | 19 | from zope.interface import implementer |
917 | 20 | 20 | ||
918 | 21 | from lp.code.errors import ( | 21 | from lp.code.errors import ( |
919 | diff --git a/lib/lp/code/model/githosting.py b/lib/lp/code/model/githosting.py | |||
920 | index c5ade39..675b1eb 100644 | |||
921 | --- a/lib/lp/code/model/githosting.py | |||
922 | +++ b/lib/lp/code/model/githosting.py | |||
923 | @@ -11,14 +11,14 @@ __all__ = [ | |||
924 | 11 | import base64 | 11 | import base64 |
925 | 12 | import json | 12 | import json |
926 | 13 | import sys | 13 | import sys |
927 | 14 | from urllib.parse import ( | ||
928 | 15 | quote, | ||
929 | 16 | urljoin, | ||
930 | 17 | ) | ||
931 | 14 | 18 | ||
932 | 15 | from lazr.restful.utils import get_current_browser_request | 19 | from lazr.restful.utils import get_current_browser_request |
933 | 16 | import requests | 20 | import requests |
934 | 17 | from six import ensure_text | 21 | from six import ensure_text |
935 | 18 | from six.moves.urllib.parse import ( | ||
936 | 19 | quote, | ||
937 | 20 | urljoin, | ||
938 | 21 | ) | ||
939 | 22 | from zope.interface import implementer | 22 | from zope.interface import implementer |
940 | 23 | 23 | ||
941 | 24 | from lp.code.errors import ( | 24 | from lp.code.errors import ( |
942 | diff --git a/lib/lp/code/model/gitref.py b/lib/lp/code/model/gitref.py | |||
943 | index a3ef756..f91d1e5 100644 | |||
944 | --- a/lib/lp/code/model/gitref.py | |||
945 | +++ b/lib/lp/code/model/gitref.py | |||
946 | @@ -10,16 +10,16 @@ __all__ = [ | |||
947 | 10 | 10 | ||
948 | 11 | from functools import partial | 11 | from functools import partial |
949 | 12 | import re | 12 | import re |
950 | 13 | from urllib.parse import ( | ||
951 | 14 | quote, | ||
952 | 15 | quote_plus, | ||
953 | 16 | urlsplit, | ||
954 | 17 | ) | ||
955 | 13 | 18 | ||
956 | 14 | from lazr.lifecycle.event import ObjectCreatedEvent | 19 | from lazr.lifecycle.event import ObjectCreatedEvent |
957 | 15 | import pytz | 20 | import pytz |
958 | 16 | import requests | 21 | import requests |
959 | 17 | import six | 22 | import six |
960 | 18 | from six.moves.urllib.parse import ( | ||
961 | 19 | quote, | ||
962 | 20 | quote_plus, | ||
963 | 21 | urlsplit, | ||
964 | 22 | ) | ||
965 | 23 | from storm.expr import And | 23 | from storm.expr import And |
966 | 24 | from storm.locals import ( | 24 | from storm.locals import ( |
967 | 25 | DateTime, | 25 | DateTime, |
968 | diff --git a/lib/lp/code/model/gitrepository.py b/lib/lp/code/model/gitrepository.py | |||
969 | index f1a9dfa..39ffda1 100644 | |||
970 | --- a/lib/lp/code/model/gitrepository.py | |||
971 | +++ b/lib/lp/code/model/gitrepository.py | |||
972 | @@ -25,6 +25,11 @@ from itertools import ( | |||
973 | 25 | ) | 25 | ) |
974 | 26 | import logging | 26 | import logging |
975 | 27 | from operator import attrgetter | 27 | from operator import attrgetter |
976 | 28 | from urllib.parse import ( | ||
977 | 29 | quote_plus, | ||
978 | 30 | urlsplit, | ||
979 | 31 | urlunsplit, | ||
980 | 32 | ) | ||
981 | 28 | 33 | ||
982 | 29 | from breezy import urlutils | 34 | from breezy import urlutils |
983 | 30 | from lazr.enum import DBItem | 35 | from lazr.enum import DBItem |
984 | @@ -32,11 +37,6 @@ from lazr.lifecycle.event import ObjectModifiedEvent | |||
985 | 32 | from lazr.lifecycle.snapshot import Snapshot | 37 | from lazr.lifecycle.snapshot import Snapshot |
986 | 33 | import pytz | 38 | import pytz |
987 | 34 | import six | 39 | import six |
988 | 35 | from six.moves.urllib.parse import ( | ||
989 | 36 | quote_plus, | ||
990 | 37 | urlsplit, | ||
991 | 38 | urlunsplit, | ||
992 | 39 | ) | ||
993 | 40 | from storm.databases.postgres import Returning | 40 | from storm.databases.postgres import Returning |
994 | 41 | from storm.expr import ( | 41 | from storm.expr import ( |
995 | 42 | And, | 42 | And, |
996 | diff --git a/lib/lp/code/model/tests/test_githosting.py b/lib/lp/code/model/tests/test_githosting.py | |||
997 | index ea1ebbd..ef7802c 100644 | |||
998 | --- a/lib/lp/code/model/tests/test_githosting.py | |||
999 | +++ b/lib/lp/code/model/tests/test_githosting.py | |||
1000 | @@ -11,13 +11,13 @@ import base64 | |||
1001 | 11 | from contextlib import contextmanager | 11 | from contextlib import contextmanager |
1002 | 12 | import json | 12 | import json |
1003 | 13 | import re | 13 | import re |
1008 | 14 | 14 | from urllib.parse import ( | |
1005 | 15 | from lazr.restful.utils import get_current_browser_request | ||
1006 | 16 | import responses | ||
1007 | 17 | from six.moves.urllib.parse import ( | ||
1009 | 18 | parse_qsl, | 15 | parse_qsl, |
1010 | 19 | urlsplit, | 16 | urlsplit, |
1011 | 20 | ) | 17 | ) |
1012 | 18 | |||
1013 | 19 | from lazr.restful.utils import get_current_browser_request | ||
1014 | 20 | import responses | ||
1015 | 21 | from testtools.matchers import ( | 21 | from testtools.matchers import ( |
1016 | 22 | AfterPreprocessing, | 22 | AfterPreprocessing, |
1017 | 23 | Equals, | 23 | Equals, |
1018 | diff --git a/lib/lp/code/stories/branches/xx-private-branch-listings.txt b/lib/lp/code/stories/branches/xx-private-branch-listings.txt | |||
1019 | index c775877..3e7fa21 100644 | |||
1020 | --- a/lib/lp/code/stories/branches/xx-private-branch-listings.txt | |||
1021 | +++ b/lib/lp/code/stories/branches/xx-private-branch-listings.txt | |||
1022 | @@ -145,7 +145,7 @@ Person code listing pages | |||
1023 | 145 | The person code listings is the other obvious place to filter out the | 145 | The person code listings is the other obvious place to filter out the |
1024 | 146 | viewable branches. | 146 | viewable branches. |
1025 | 147 | 147 | ||
1027 | 148 | >>> from six.moves.urllib.parse import urlencode | 148 | >>> from urllib.parse import urlencode |
1028 | 149 | >>> def print_person_code_listing(browser, category=None): | 149 | >>> def print_person_code_listing(browser, category=None): |
1029 | 150 | ... params = {'batch': '15'} | 150 | ... params = {'batch': '15'} |
1030 | 151 | ... if category is not None: | 151 | ... if category is not None: |
1031 | diff --git a/lib/lp/code/stories/branches/xx-subscribing-branches.txt b/lib/lp/code/stories/branches/xx-subscribing-branches.txt | |||
1032 | index 1974c42..5db15a2 100644 | |||
1033 | --- a/lib/lp/code/stories/branches/xx-subscribing-branches.txt | |||
1034 | +++ b/lib/lp/code/stories/branches/xx-subscribing-branches.txt | |||
1035 | @@ -120,7 +120,7 @@ shown to the user. | |||
1036 | 120 | Clicking the back button and then clicking on either Change or | 120 | Clicking the back button and then clicking on either Change or |
1037 | 121 | Unsubscribe will give a message that we are not subscribed. | 121 | Unsubscribe will give a message that we are not subscribed. |
1038 | 122 | 122 | ||
1040 | 123 | >>> from six.moves.urllib.parse import urlencode | 123 | >>> from urllib.parse import urlencode |
1041 | 124 | >>> browser.addHeader('Referer', 'https://launchpad.test/') | 124 | >>> browser.addHeader('Referer', 'https://launchpad.test/') |
1042 | 125 | >>> browser.open( | 125 | >>> browser.open( |
1043 | 126 | ... form_url, | 126 | ... form_url, |
1044 | diff --git a/lib/lp/code/xmlrpc/git.py b/lib/lp/code/xmlrpc/git.py | |||
1045 | index 23c67a2..6221845 100644 | |||
1046 | --- a/lib/lp/code/xmlrpc/git.py | |||
1047 | +++ b/lib/lp/code/xmlrpc/git.py | |||
1048 | @@ -9,12 +9,12 @@ __all__ = [ | |||
1049 | 9 | 9 | ||
1050 | 10 | import logging | 10 | import logging |
1051 | 11 | import sys | 11 | import sys |
1052 | 12 | from urllib.parse import quote | ||
1053 | 12 | import uuid | 13 | import uuid |
1054 | 13 | import xmlrpc.client | 14 | import xmlrpc.client |
1055 | 14 | 15 | ||
1056 | 15 | from pymacaroons import Macaroon | 16 | from pymacaroons import Macaroon |
1057 | 16 | import six | 17 | import six |
1058 | 17 | from six.moves.urllib.parse import quote | ||
1059 | 18 | import transaction | 18 | import transaction |
1060 | 19 | from zope.component import getUtility | 19 | from zope.component import getUtility |
1061 | 20 | from zope.error.interfaces import IErrorReportingUtility | 20 | from zope.error.interfaces import IErrorReportingUtility |
1062 | diff --git a/lib/lp/code/xmlrpc/tests/test_git.py b/lib/lp/code/xmlrpc/tests/test_git.py | |||
1063 | index 1f2b52a..131b803 100644 | |||
1064 | --- a/lib/lp/code/xmlrpc/tests/test_git.py | |||
1065 | +++ b/lib/lp/code/xmlrpc/tests/test_git.py | |||
1066 | @@ -5,6 +5,7 @@ | |||
1067 | 5 | 5 | ||
1068 | 6 | from datetime import datetime | 6 | from datetime import datetime |
1069 | 7 | import hashlib | 7 | import hashlib |
1070 | 8 | from urllib.parse import quote | ||
1071 | 8 | import uuid | 9 | import uuid |
1072 | 9 | import xmlrpc.client | 10 | import xmlrpc.client |
1073 | 10 | 11 | ||
1074 | @@ -12,7 +13,6 @@ from fixtures import FakeLogger | |||
1075 | 12 | from pymacaroons import Macaroon | 13 | from pymacaroons import Macaroon |
1076 | 13 | import pytz | 14 | import pytz |
1077 | 14 | import six | 15 | import six |
1078 | 15 | from six.moves.urllib.parse import quote | ||
1079 | 16 | from storm.store import Store | 16 | from storm.store import Store |
1080 | 17 | from testtools.matchers import ( | 17 | from testtools.matchers import ( |
1081 | 18 | Equals, | 18 | Equals, |
1082 | diff --git a/lib/lp/codehosting/puller/tests/test_errors.py b/lib/lp/codehosting/puller/tests/test_errors.py | |||
1083 | index f06ca00..4ec9a75 100644 | |||
1084 | --- a/lib/lp/codehosting/puller/tests/test_errors.py | |||
1085 | +++ b/lib/lp/codehosting/puller/tests/test_errors.py | |||
1086 | @@ -7,6 +7,7 @@ import http.client | |||
1087 | 7 | import os | 7 | import os |
1088 | 8 | import socket | 8 | import socket |
1089 | 9 | import tempfile | 9 | import tempfile |
1090 | 10 | from urllib.error import HTTPError | ||
1091 | 10 | 11 | ||
1092 | 11 | from breezy.errors import ( | 12 | from breezy.errors import ( |
1093 | 12 | BzrError, | 13 | BzrError, |
1094 | @@ -20,7 +21,6 @@ from breezy.url_policy_open import ( | |||
1095 | 20 | BranchReferenceForbidden, | 21 | BranchReferenceForbidden, |
1096 | 21 | ) | 22 | ) |
1097 | 22 | from lazr.uri import InvalidURIError | 23 | from lazr.uri import InvalidURIError |
1098 | 23 | from six.moves.urllib.error import HTTPError | ||
1099 | 24 | 24 | ||
1100 | 25 | from lp.code.enums import BranchType | 25 | from lp.code.enums import BranchType |
1101 | 26 | from lp.codehosting.puller.worker import ( | 26 | from lp.codehosting.puller.worker import ( |
1102 | diff --git a/lib/lp/codehosting/puller/worker.py b/lib/lp/codehosting/puller/worker.py | |||
1103 | index 5f4e58d..be4cb8c 100644 | |||
1104 | --- a/lib/lp/codehosting/puller/worker.py | |||
1105 | +++ b/lib/lp/codehosting/puller/worker.py | |||
1106 | @@ -9,6 +9,8 @@ import sys | |||
1107 | 9 | # line below this comment. | 9 | # line below this comment. |
1108 | 10 | import lp.codehosting # noqa: F401 # isort: split | 10 | import lp.codehosting # noqa: F401 # isort: split |
1109 | 11 | 11 | ||
1110 | 12 | from urllib.error import HTTPError | ||
1111 | 13 | |||
1112 | 12 | from breezy import ( | 14 | from breezy import ( |
1113 | 13 | errors, | 15 | errors, |
1114 | 14 | urlutils, | 16 | urlutils, |
1115 | @@ -39,7 +41,6 @@ from lazr.uri import ( | |||
1116 | 39 | URI, | 41 | URI, |
1117 | 40 | ) | 42 | ) |
1118 | 41 | import six | 43 | import six |
1119 | 42 | from six.moves.urllib.error import HTTPError | ||
1120 | 43 | 44 | ||
1121 | 44 | from lp.code.bzr import ( | 45 | from lp.code.bzr import ( |
1122 | 45 | BranchFormat, | 46 | BranchFormat, |
1123 | diff --git a/lib/lp/codehosting/scanner/buglinks.py b/lib/lp/codehosting/scanner/buglinks.py | |||
1124 | index 33a18ed..f7fcfd5 100644 | |||
1125 | --- a/lib/lp/codehosting/scanner/buglinks.py | |||
1126 | +++ b/lib/lp/codehosting/scanner/buglinks.py | |||
1127 | @@ -7,8 +7,9 @@ __all__ = [ | |||
1128 | 7 | 'BugBranchLinker', | 7 | 'BugBranchLinker', |
1129 | 8 | ] | 8 | ] |
1130 | 9 | 9 | ||
1131 | 10 | from urllib.parse import urlsplit | ||
1132 | 11 | |||
1133 | 10 | from breezy.bugtracker import InvalidBugStatus | 12 | from breezy.bugtracker import InvalidBugStatus |
1134 | 11 | from six.moves.urllib.parse import urlsplit | ||
1135 | 12 | from zope.component import getUtility | 13 | from zope.component import getUtility |
1136 | 13 | 14 | ||
1137 | 14 | from lp.app.errors import NotFoundError | 15 | from lp.app.errors import NotFoundError |
1138 | diff --git a/lib/lp/codehosting/sshserver/session.py b/lib/lp/codehosting/sshserver/session.py | |||
1139 | index 9dc9a5d..4f0d549 100644 | |||
1140 | --- a/lib/lp/codehosting/sshserver/session.py | |||
1141 | +++ b/lib/lp/codehosting/sshserver/session.py | |||
1142 | @@ -8,11 +8,11 @@ __all__ = [ | |||
1143 | 8 | ] | 8 | ] |
1144 | 9 | 9 | ||
1145 | 10 | import os | 10 | import os |
1146 | 11 | from urllib.parse import urlparse | ||
1147 | 11 | 12 | ||
1148 | 12 | from lazr.sshserver.events import AvatarEvent | 13 | from lazr.sshserver.events import AvatarEvent |
1149 | 13 | from lazr.sshserver.session import DoNothingSession | 14 | from lazr.sshserver.session import DoNothingSession |
1150 | 14 | import six | 15 | import six |
1151 | 15 | from six.moves.urllib.parse import urlparse | ||
1152 | 16 | from twisted.internet import process | 16 | from twisted.internet import process |
1153 | 17 | from twisted.python import log | 17 | from twisted.python import log |
1154 | 18 | from zope.event import notify | 18 | from zope.event import notify |
1155 | diff --git a/lib/lp/codehosting/tests/test_acceptance.py b/lib/lp/codehosting/tests/test_acceptance.py | |||
1156 | index 0beee84..835b4d8 100644 | |||
1157 | --- a/lib/lp/codehosting/tests/test_acceptance.py | |||
1158 | +++ b/lib/lp/codehosting/tests/test_acceptance.py | |||
1159 | @@ -5,6 +5,7 @@ | |||
1160 | 5 | 5 | ||
1161 | 6 | import os | 6 | import os |
1162 | 7 | import re | 7 | import re |
1163 | 8 | from urllib.request import urlopen | ||
1164 | 8 | import xmlrpc.client | 9 | import xmlrpc.client |
1165 | 9 | 10 | ||
1166 | 10 | import breezy.branch | 11 | import breezy.branch |
1167 | @@ -13,7 +14,6 @@ from breezy.tests.per_repository import all_repository_format_scenarios | |||
1168 | 13 | from breezy.urlutils import local_path_from_url | 14 | from breezy.urlutils import local_path_from_url |
1169 | 14 | from breezy.workingtree import WorkingTree | 15 | from breezy.workingtree import WorkingTree |
1170 | 15 | import six | 16 | import six |
1171 | 16 | from six.moves.urllib.request import urlopen | ||
1172 | 17 | from testscenarios import ( | 17 | from testscenarios import ( |
1173 | 18 | load_tests_apply_scenarios, | 18 | load_tests_apply_scenarios, |
1174 | 19 | WithScenarios, | 19 | WithScenarios, |
1175 | diff --git a/lib/lp/oci/browser/tests/test_ocirecipe.py b/lib/lp/oci/browser/tests/test_ocirecipe.py | |||
1176 | index 9b17ee7..97fc3c9 100644 | |||
1177 | --- a/lib/lp/oci/browser/tests/test_ocirecipe.py | |||
1178 | +++ b/lib/lp/oci/browser/tests/test_ocirecipe.py | |||
1179 | @@ -8,10 +8,10 @@ from datetime import ( | |||
1180 | 8 | timedelta, | 8 | timedelta, |
1181 | 9 | ) | 9 | ) |
1182 | 10 | from operator import attrgetter | 10 | from operator import attrgetter |
1183 | 11 | from urllib.parse import quote | ||
1184 | 11 | 12 | ||
1185 | 12 | from fixtures import FakeLogger | 13 | from fixtures import FakeLogger |
1186 | 13 | import pytz | 14 | import pytz |
1187 | 14 | from six.moves.urllib.parse import quote | ||
1188 | 15 | import soupmatchers | 15 | import soupmatchers |
1189 | 16 | from storm.locals import Store | 16 | from storm.locals import Store |
1190 | 17 | from testtools.matchers import ( | 17 | from testtools.matchers import ( |
1191 | diff --git a/lib/lp/oci/model/ociregistryclient.py b/lib/lp/oci/model/ociregistryclient.py | |||
1192 | index e04a17a..1b71e33 100644 | |||
1193 | --- a/lib/lp/oci/model/ociregistryclient.py | |||
1194 | +++ b/lib/lp/oci/model/ociregistryclient.py | |||
1195 | @@ -16,6 +16,7 @@ import json | |||
1196 | 16 | import logging | 16 | import logging |
1197 | 17 | import re | 17 | import re |
1198 | 18 | import tarfile | 18 | import tarfile |
1199 | 19 | from urllib.parse import urlparse | ||
1200 | 19 | 20 | ||
1201 | 20 | import boto3 | 21 | import boto3 |
1202 | 21 | from botocore.config import Config | 22 | from botocore.config import Config |
1203 | @@ -24,7 +25,6 @@ from requests.exceptions import ( | |||
1204 | 24 | HTTPError, | 25 | HTTPError, |
1205 | 25 | ) | 26 | ) |
1206 | 26 | from requests.utils import parse_dict_header | 27 | from requests.utils import parse_dict_header |
1207 | 27 | from six.moves.urllib.parse import urlparse | ||
1208 | 28 | from tenacity import ( | 28 | from tenacity import ( |
1209 | 29 | before_log, | 29 | before_log, |
1210 | 30 | retry, | 30 | retry, |
1211 | diff --git a/lib/lp/oci/tests/test_ocirecipebuild.py b/lib/lp/oci/tests/test_ocirecipebuild.py | |||
1212 | index 8a9c33b..3a1b83d 100644 | |||
1213 | --- a/lib/lp/oci/tests/test_ocirecipebuild.py | |||
1214 | +++ b/lib/lp/oci/tests/test_ocirecipebuild.py | |||
1215 | @@ -7,11 +7,11 @@ from datetime import ( | |||
1216 | 7 | datetime, | 7 | datetime, |
1217 | 8 | timedelta, | 8 | timedelta, |
1218 | 9 | ) | 9 | ) |
1219 | 10 | from urllib.request import urlopen | ||
1220 | 10 | 11 | ||
1221 | 11 | from fixtures import FakeLogger | 12 | from fixtures import FakeLogger |
1222 | 12 | from pymacaroons import Macaroon | 13 | from pymacaroons import Macaroon |
1223 | 13 | import pytz | 14 | import pytz |
1224 | 14 | from six.moves.urllib.request import urlopen | ||
1225 | 15 | from testtools.matchers import ( | 15 | from testtools.matchers import ( |
1226 | 16 | ContainsDict, | 16 | ContainsDict, |
1227 | 17 | Equals, | 17 | Equals, |
1228 | diff --git a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py | |||
1229 | index 890a916..e4b0fa7 100644 | |||
1230 | --- a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py | |||
1231 | +++ b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py | |||
1232 | @@ -10,6 +10,7 @@ import os | |||
1233 | 10 | import shutil | 10 | import shutil |
1234 | 11 | import tempfile | 11 | import tempfile |
1235 | 12 | import time | 12 | import time |
1236 | 13 | from urllib.parse import urlsplit | ||
1237 | 13 | import uuid | 14 | import uuid |
1238 | 14 | 15 | ||
1239 | 15 | import fixtures | 16 | import fixtures |
1240 | @@ -17,7 +18,6 @@ from fixtures import MockPatch | |||
1241 | 17 | from pymacaroons import Macaroon | 18 | from pymacaroons import Macaroon |
1242 | 18 | import pytz | 19 | import pytz |
1243 | 19 | import six | 20 | import six |
1244 | 20 | from six.moves.urllib_parse import urlsplit | ||
1245 | 21 | from testtools import ExpectedException | 21 | from testtools import ExpectedException |
1246 | 22 | from testtools.matchers import ( | 22 | from testtools.matchers import ( |
1247 | 23 | AfterPreprocessing, | 23 | AfterPreprocessing, |
1248 | diff --git a/lib/lp/oci/vocabularies.py b/lib/lp/oci/vocabularies.py | |||
1249 | index e8e60df..84b680b 100644 | |||
1250 | --- a/lib/lp/oci/vocabularies.py | |||
1251 | +++ b/lib/lp/oci/vocabularies.py | |||
1252 | @@ -5,10 +5,11 @@ | |||
1253 | 5 | 5 | ||
1254 | 6 | __all__ = [] | 6 | __all__ = [] |
1255 | 7 | 7 | ||
1257 | 8 | from six.moves.urllib.parse import ( | 8 | from urllib.parse import ( |
1258 | 9 | quote, | 9 | quote, |
1259 | 10 | unquote, | 10 | unquote, |
1260 | 11 | ) | 11 | ) |
1261 | 12 | |||
1262 | 12 | from zope.component import getUtility | 13 | from zope.component import getUtility |
1263 | 13 | from zope.interface import implementer | 14 | from zope.interface import implementer |
1264 | 14 | from zope.schema.vocabulary import SimpleTerm | 15 | from zope.schema.vocabulary import SimpleTerm |
1265 | diff --git a/lib/lp/registry/browser/mailinglists.py b/lib/lp/registry/browser/mailinglists.py | |||
1266 | index bbc26a2..be1e872 100644 | |||
1267 | --- a/lib/lp/registry/browser/mailinglists.py | |||
1268 | +++ b/lib/lp/registry/browser/mailinglists.py | |||
1269 | @@ -10,8 +10,8 @@ __all__ = [ | |||
1270 | 10 | 10 | ||
1271 | 11 | 11 | ||
1272 | 12 | from textwrap import TextWrapper | 12 | from textwrap import TextWrapper |
1273 | 13 | from urllib.parse import quote | ||
1274 | 13 | 14 | ||
1275 | 14 | from six.moves.urllib.parse import quote | ||
1276 | 15 | from zope.component import getUtility | 15 | from zope.component import getUtility |
1277 | 16 | 16 | ||
1278 | 17 | from lp.app.browser.tales import PersonFormatterAPI | 17 | from lp.app.browser.tales import PersonFormatterAPI |
1279 | diff --git a/lib/lp/registry/browser/ociproject.py b/lib/lp/registry/browser/ociproject.py | |||
1280 | index 85a1c00..00e8024 100644 | |||
1281 | --- a/lib/lp/registry/browser/ociproject.py | |||
1282 | +++ b/lib/lp/registry/browser/ociproject.py | |||
1283 | @@ -12,11 +12,12 @@ __all__ = [ | |||
1284 | 12 | 'OCIProjectURL', | 12 | 'OCIProjectURL', |
1285 | 13 | ] | 13 | ] |
1286 | 14 | 14 | ||
1289 | 15 | from breezy import urlutils | 15 | from urllib.parse import ( |
1288 | 16 | from six.moves.urllib.parse import ( | ||
1290 | 17 | urlsplit, | 16 | urlsplit, |
1291 | 18 | urlunsplit, | 17 | urlunsplit, |
1292 | 19 | ) | 18 | ) |
1293 | 19 | |||
1294 | 20 | from breezy import urlutils | ||
1295 | 20 | from zope.component import getUtility | 21 | from zope.component import getUtility |
1296 | 21 | from zope.interface import implementer | 22 | from zope.interface import implementer |
1297 | 22 | 23 | ||
1298 | diff --git a/lib/lp/registry/browser/person.py b/lib/lp/registry/browser/person.py | |||
1299 | index ccd09c7..99526b7 100644 | |||
1300 | --- a/lib/lp/registry/browser/person.py | |||
1301 | +++ b/lib/lp/registry/browser/person.py | |||
1302 | @@ -57,6 +57,10 @@ from operator import ( | |||
1303 | 57 | itemgetter, | 57 | itemgetter, |
1304 | 58 | ) | 58 | ) |
1305 | 59 | from textwrap import dedent | 59 | from textwrap import dedent |
1306 | 60 | from urllib.parse import ( | ||
1307 | 61 | quote, | ||
1308 | 62 | urlencode, | ||
1309 | 63 | ) | ||
1310 | 60 | 64 | ||
1311 | 61 | from lazr.config import as_timedelta | 65 | from lazr.config import as_timedelta |
1312 | 62 | from lazr.delegates import delegate_to | 66 | from lazr.delegates import delegate_to |
1313 | @@ -65,10 +69,6 @@ from lazr.restful.interfaces import IWebServiceClientRequest | |||
1314 | 65 | from lazr.restful.utils import smartquote | 69 | from lazr.restful.utils import smartquote |
1315 | 66 | from lazr.uri import URI | 70 | from lazr.uri import URI |
1316 | 67 | import pytz | 71 | import pytz |
1317 | 68 | from six.moves.urllib.parse import ( | ||
1318 | 69 | quote, | ||
1319 | 70 | urlencode, | ||
1320 | 71 | ) | ||
1321 | 72 | from storm.zope.interfaces import IResultSet | 72 | from storm.zope.interfaces import IResultSet |
1322 | 73 | from zope.browserpage import ViewPageTemplateFile | 73 | from zope.browserpage import ViewPageTemplateFile |
1323 | 74 | from zope.component import ( | 74 | from zope.component import ( |
1324 | diff --git a/lib/lp/registry/browser/product.py b/lib/lp/registry/browser/product.py | |||
1325 | index faea1f8..9001fdb 100644 | |||
1326 | --- a/lib/lp/registry/browser/product.py | |||
1327 | +++ b/lib/lp/registry/browser/product.py | |||
1328 | @@ -40,6 +40,7 @@ __all__ = [ | |||
1329 | 40 | 40 | ||
1330 | 41 | 41 | ||
1331 | 42 | from operator import attrgetter | 42 | from operator import attrgetter |
1332 | 43 | from urllib.parse import urlunsplit | ||
1333 | 43 | 44 | ||
1334 | 44 | from breezy import urlutils | 45 | from breezy import urlutils |
1335 | 45 | from breezy.revision import NULL_REVISION | 46 | from breezy.revision import NULL_REVISION |
1336 | @@ -49,7 +50,6 @@ from lazr.restful.interface import ( | |||
1337 | 49 | use_template, | 50 | use_template, |
1338 | 50 | ) | 51 | ) |
1339 | 51 | from lazr.restful.interfaces import IJSONRequestCache | 52 | from lazr.restful.interfaces import IJSONRequestCache |
1340 | 52 | from six.moves.urllib.parse import urlunsplit | ||
1341 | 53 | from zope.browserpage import ViewPageTemplateFile | 53 | from zope.browserpage import ViewPageTemplateFile |
1342 | 54 | from zope.component import getUtility | 54 | from zope.component import getUtility |
1343 | 55 | from zope.event import notify | 55 | from zope.event import notify |
1344 | diff --git a/lib/lp/registry/browser/sourcepackage.py b/lib/lp/registry/browser/sourcepackage.py | |||
1345 | index 43e6fb7..6eb7d3b 100644 | |||
1346 | --- a/lib/lp/registry/browser/sourcepackage.py | |||
1347 | +++ b/lib/lp/registry/browser/sourcepackage.py | |||
1348 | @@ -16,6 +16,7 @@ __all__ = [ | |||
1349 | 16 | ] | 16 | ] |
1350 | 17 | 17 | ||
1351 | 18 | import string | 18 | import string |
1352 | 19 | from urllib.parse import urlencode | ||
1353 | 19 | 20 | ||
1354 | 20 | from apt_pkg import ( | 21 | from apt_pkg import ( |
1355 | 21 | upstream_version, | 22 | upstream_version, |
1356 | @@ -26,7 +27,6 @@ from lazr.enum import ( | |||
1357 | 26 | Item, | 27 | Item, |
1358 | 27 | ) | 28 | ) |
1359 | 28 | from lazr.restful.interface import copy_field | 29 | from lazr.restful.interface import copy_field |
1360 | 29 | from six.moves.urllib.parse import urlencode | ||
1361 | 30 | from zope.browserpage import ViewPageTemplateFile | 30 | from zope.browserpage import ViewPageTemplateFile |
1362 | 31 | from zope.component import ( | 31 | from zope.component import ( |
1363 | 32 | adapter, | 32 | adapter, |
1364 | diff --git a/lib/lp/registry/browser/team.py b/lib/lp/registry/browser/team.py | |||
1365 | index c37bbf0..c0e0be1 100644 | |||
1366 | --- a/lib/lp/registry/browser/team.py | |||
1367 | +++ b/lib/lp/registry/browser/team.py | |||
1368 | @@ -36,13 +36,13 @@ from datetime import ( | |||
1369 | 36 | timedelta, | 36 | timedelta, |
1370 | 37 | ) | 37 | ) |
1371 | 38 | import math | 38 | import math |
1372 | 39 | from urllib.parse import unquote | ||
1373 | 39 | 40 | ||
1374 | 40 | from lazr.restful.interface import copy_field | 41 | from lazr.restful.interface import copy_field |
1375 | 41 | from lazr.restful.interfaces import IJSONRequestCache | 42 | from lazr.restful.interfaces import IJSONRequestCache |
1376 | 42 | from lazr.restful.utils import smartquote | 43 | from lazr.restful.utils import smartquote |
1377 | 43 | import pytz | 44 | import pytz |
1378 | 44 | import simplejson | 45 | import simplejson |
1379 | 45 | from six.moves.urllib.parse import unquote | ||
1380 | 46 | from zope.browserpage import ViewPageTemplateFile | 46 | from zope.browserpage import ViewPageTemplateFile |
1381 | 47 | from zope.component import getUtility | 47 | from zope.component import getUtility |
1382 | 48 | from zope.formlib.form import ( | 48 | from zope.formlib.form import ( |
1383 | diff --git a/lib/lp/registry/browser/tests/test_distroseries.py b/lib/lp/registry/browser/tests/test_distroseries.py | |||
1384 | index 326bbfd..505d2aa 100644 | |||
1385 | --- a/lib/lp/registry/browser/tests/test_distroseries.py | |||
1386 | +++ b/lib/lp/registry/browser/tests/test_distroseries.py | |||
1387 | @@ -7,15 +7,15 @@ from datetime import timedelta | |||
1388 | 7 | import difflib | 7 | import difflib |
1389 | 8 | import re | 8 | import re |
1390 | 9 | from textwrap import TextWrapper | 9 | from textwrap import TextWrapper |
1391 | 10 | from urllib.parse import ( | ||
1392 | 11 | urlencode, | ||
1393 | 12 | urlparse, | ||
1394 | 13 | ) | ||
1395 | 10 | 14 | ||
1396 | 11 | from fixtures import FakeLogger | 15 | from fixtures import FakeLogger |
1397 | 12 | from lazr.restful.interfaces import IJSONRequestCache | 16 | from lazr.restful.interfaces import IJSONRequestCache |
1398 | 13 | from lxml import html | 17 | from lxml import html |
1399 | 14 | import six | 18 | import six |
1400 | 15 | from six.moves.urllib.parse import ( | ||
1401 | 16 | urlencode, | ||
1402 | 17 | urlparse, | ||
1403 | 18 | ) | ||
1404 | 19 | import soupmatchers | 19 | import soupmatchers |
1405 | 20 | from storm.zope.interfaces import IResultSet | 20 | from storm.zope.interfaces import IResultSet |
1406 | 21 | from testtools.content import ( | 21 | from testtools.content import ( |
1407 | diff --git a/lib/lp/registry/browser/tests/test_person.py b/lib/lp/registry/browser/tests/test_person.py | |||
1408 | index 1a1624f..2f5eb23 100644 | |||
1409 | --- a/lib/lp/registry/browser/tests/test_person.py | |||
1410 | +++ b/lib/lp/registry/browser/tests/test_person.py | |||
1411 | @@ -6,10 +6,10 @@ import email | |||
1412 | 6 | from operator import attrgetter | 6 | from operator import attrgetter |
1413 | 7 | import re | 7 | import re |
1414 | 8 | from textwrap import dedent | 8 | from textwrap import dedent |
1415 | 9 | from urllib.parse import urljoin | ||
1416 | 9 | 10 | ||
1417 | 10 | from fixtures import FakeLogger | 11 | from fixtures import FakeLogger |
1418 | 11 | import six | 12 | import six |
1419 | 12 | from six.moves.urllib.parse import urljoin | ||
1420 | 13 | import soupmatchers | 13 | import soupmatchers |
1421 | 14 | from storm.store import Store | 14 | from storm.store import Store |
1422 | 15 | from testscenarios import ( | 15 | from testscenarios import ( |
1423 | diff --git a/lib/lp/registry/browser/tests/test_product.py b/lib/lp/registry/browser/tests/test_product.py | |||
1424 | index c79cbd1..fadb04a 100644 | |||
1425 | --- a/lib/lp/registry/browser/tests/test_product.py | |||
1426 | +++ b/lib/lp/registry/browser/tests/test_product.py | |||
1427 | @@ -7,16 +7,16 @@ __all__ = ['make_product_form'] | |||
1428 | 7 | 7 | ||
1429 | 8 | import re | 8 | import re |
1430 | 9 | from textwrap import dedent | 9 | from textwrap import dedent |
1431 | 10 | from urllib.parse import ( | ||
1432 | 11 | urlencode, | ||
1433 | 12 | urlsplit, | ||
1434 | 13 | ) | ||
1435 | 10 | 14 | ||
1436 | 11 | from lazr.restful.fields import Reference | 15 | from lazr.restful.fields import Reference |
1437 | 12 | from lazr.restful.interfaces import ( | 16 | from lazr.restful.interfaces import ( |
1438 | 13 | IFieldMarshaller, | 17 | IFieldMarshaller, |
1439 | 14 | IJSONRequestCache, | 18 | IJSONRequestCache, |
1440 | 15 | ) | 19 | ) |
1441 | 16 | from six.moves.urllib.parse import ( | ||
1442 | 17 | urlencode, | ||
1443 | 18 | urlsplit, | ||
1444 | 19 | ) | ||
1445 | 20 | from soupmatchers import ( | 20 | from soupmatchers import ( |
1446 | 21 | HTMLContains, | 21 | HTMLContains, |
1447 | 22 | Tag, | 22 | Tag, |
1448 | diff --git a/lib/lp/registry/browser/tests/test_sourcepackage_views.py b/lib/lp/registry/browser/tests/test_sourcepackage_views.py | |||
1449 | index dcb66d0..2e4d2f7 100644 | |||
1450 | --- a/lib/lp/registry/browser/tests/test_sourcepackage_views.py | |||
1451 | +++ b/lib/lp/registry/browser/tests/test_sourcepackage_views.py | |||
1452 | @@ -3,10 +3,11 @@ | |||
1453 | 3 | 3 | ||
1454 | 4 | """Tests for SourcePackage view code.""" | 4 | """Tests for SourcePackage view code.""" |
1455 | 5 | 5 | ||
1457 | 6 | from six.moves.urllib.parse import ( | 6 | from urllib.parse import ( |
1458 | 7 | parse_qsl, | 7 | parse_qsl, |
1459 | 8 | splitquery, | 8 | splitquery, |
1460 | 9 | ) | 9 | ) |
1461 | 10 | |||
1462 | 10 | from soupmatchers import ( | 11 | from soupmatchers import ( |
1463 | 11 | HTMLContains, | 12 | HTMLContains, |
1464 | 12 | Tag, | 13 | Tag, |
1465 | diff --git a/lib/lp/registry/scripts/distributionmirror_prober.py b/lib/lp/registry/scripts/distributionmirror_prober.py | |||
1466 | index acd384d..00e1389 100644 | |||
1467 | --- a/lib/lp/registry/scripts/distributionmirror_prober.py | |||
1468 | +++ b/lib/lp/registry/scripts/distributionmirror_prober.py | |||
1469 | @@ -11,6 +11,12 @@ import io | |||
1470 | 11 | import itertools | 11 | import itertools |
1471 | 12 | import logging | 12 | import logging |
1472 | 13 | import os.path | 13 | import os.path |
1473 | 14 | from urllib.parse import ( | ||
1474 | 15 | unquote, | ||
1475 | 16 | urljoin, | ||
1476 | 17 | urlparse, | ||
1477 | 18 | urlunparse, | ||
1478 | 19 | ) | ||
1479 | 14 | 20 | ||
1480 | 15 | import OpenSSL | 21 | import OpenSSL |
1481 | 16 | from OpenSSL.SSL import ( | 22 | from OpenSSL.SSL import ( |
1482 | @@ -19,12 +25,6 @@ from OpenSSL.SSL import ( | |||
1483 | 19 | ) | 25 | ) |
1484 | 20 | import requests | 26 | import requests |
1485 | 21 | import six | 27 | import six |
1486 | 22 | from six.moves.urllib.parse import ( | ||
1487 | 23 | unquote, | ||
1488 | 24 | urljoin, | ||
1489 | 25 | urlparse, | ||
1490 | 26 | urlunparse, | ||
1491 | 27 | ) | ||
1492 | 28 | from treq.client import HTTPClient as TreqHTTPClient | 28 | from treq.client import HTTPClient as TreqHTTPClient |
1493 | 29 | from twisted.internet import ( | 29 | from twisted.internet import ( |
1494 | 30 | defer, | 30 | defer, |
1495 | diff --git a/lib/lp/registry/scripts/productreleasefinder/finder.py b/lib/lp/registry/scripts/productreleasefinder/finder.py | |||
1496 | index df79137..5d51c0c 100644 | |||
1497 | --- a/lib/lp/registry/scripts/productreleasefinder/finder.py | |||
1498 | +++ b/lib/lp/registry/scripts/productreleasefinder/finder.py | |||
1499 | @@ -11,10 +11,10 @@ import mimetypes | |||
1500 | 11 | import os | 11 | import os |
1501 | 12 | import re | 12 | import re |
1502 | 13 | import tempfile | 13 | import tempfile |
1503 | 14 | from urllib.parse import urlsplit | ||
1504 | 14 | 15 | ||
1505 | 15 | import pytz | 16 | import pytz |
1506 | 16 | import requests | 17 | import requests |
1507 | 17 | from six.moves.urllib.parse import urlsplit | ||
1508 | 18 | from zope.component import getUtility | 18 | from zope.component import getUtility |
1509 | 19 | 19 | ||
1510 | 20 | from lp.app.validators.name import invalid_name_pattern | 20 | from lp.app.validators.name import invalid_name_pattern |
1511 | diff --git a/lib/lp/registry/scripts/productreleasefinder/walker.py b/lib/lp/registry/scripts/productreleasefinder/walker.py | |||
1512 | index a7ee116..908dfd5 100644 | |||
1513 | --- a/lib/lp/registry/scripts/productreleasefinder/walker.py | |||
1514 | +++ b/lib/lp/registry/scripts/productreleasefinder/walker.py | |||
1515 | @@ -13,17 +13,17 @@ __all__ = [ | |||
1516 | 13 | 13 | ||
1517 | 14 | import ftplib | 14 | import ftplib |
1518 | 15 | import os | 15 | import os |
1519 | 16 | from urllib.parse import ( | ||
1520 | 17 | unquote_plus, | ||
1521 | 18 | urljoin, | ||
1522 | 19 | urlsplit, | ||
1523 | 20 | ) | ||
1524 | 16 | 21 | ||
1525 | 17 | from lazr.uri import ( | 22 | from lazr.uri import ( |
1526 | 18 | InvalidURIError, | 23 | InvalidURIError, |
1527 | 19 | URI, | 24 | URI, |
1528 | 20 | ) | 25 | ) |
1529 | 21 | import requests | 26 | import requests |
1530 | 22 | from six.moves.urllib.parse import ( | ||
1531 | 23 | unquote_plus, | ||
1532 | 24 | urljoin, | ||
1533 | 25 | urlsplit, | ||
1534 | 26 | ) | ||
1535 | 27 | 27 | ||
1536 | 28 | from lp.registry.scripts.productreleasefinder import log | 28 | from lp.registry.scripts.productreleasefinder import log |
1537 | 29 | from lp.registry.scripts.productreleasefinder.path import ( | 29 | from lp.registry.scripts.productreleasefinder.path import ( |
1538 | diff --git a/lib/lp/registry/stories/product/xx-product-files.txt b/lib/lp/registry/stories/product/xx-product-files.txt | |||
1539 | index cb82bc6..34dd7cd 100644 | |||
1540 | --- a/lib/lp/registry/stories/product/xx-product-files.txt | |||
1541 | +++ b/lib/lp/registry/stories/product/xx-product-files.txt | |||
1542 | @@ -401,8 +401,8 @@ Downloading and deleting files | |||
1543 | 401 | 401 | ||
1544 | 402 | Download one of the files. | 402 | Download one of the files. |
1545 | 403 | 403 | ||
1548 | 404 | >>> from six.moves.urllib.parse import urlparse | 404 | >>> from urllib.parse import urlparse |
1549 | 405 | >>> from six.moves.urllib.request import urlopen | 405 | >>> from urllib.request import urlopen |
1550 | 406 | 406 | ||
1551 | 407 | XXX Downloading via the testbrowser does not work | 407 | XXX Downloading via the testbrowser does not work |
1552 | 408 | XXX unless the file is served by the Zope publisher. | 408 | XXX unless the file is served by the Zope publisher. |
1553 | diff --git a/lib/lp/services/feeds/feed.py b/lib/lp/services/feeds/feed.py | |||
1554 | index 9798bc0..b7e1467 100644 | |||
1555 | --- a/lib/lp/services/feeds/feed.py | |||
1556 | +++ b/lib/lp/services/feeds/feed.py | |||
1557 | @@ -18,8 +18,8 @@ __all__ = [ | |||
1558 | 18 | import operator | 18 | import operator |
1559 | 19 | import os | 19 | import os |
1560 | 20 | import time | 20 | import time |
1561 | 21 | from urllib.parse import urljoin | ||
1562 | 21 | 22 | ||
1563 | 22 | from six.moves.urllib.parse import urljoin | ||
1564 | 23 | from zope.browserpage import ViewPageTemplateFile | 23 | from zope.browserpage import ViewPageTemplateFile |
1565 | 24 | from zope.component import getUtility | 24 | from zope.component import getUtility |
1566 | 25 | from zope.datetime import rfc1123_date | 25 | from zope.datetime import rfc1123_date |
1567 | diff --git a/lib/lp/services/gpg/handler.py b/lib/lp/services/gpg/handler.py | |||
1568 | index 005ca79..7dd60c9 100644 | |||
1569 | --- a/lib/lp/services/gpg/handler.py | |||
1570 | +++ b/lib/lp/services/gpg/handler.py | |||
1571 | @@ -18,13 +18,13 @@ import shutil | |||
1572 | 18 | import subprocess | 18 | import subprocess |
1573 | 19 | import sys | 19 | import sys |
1574 | 20 | import tempfile | 20 | import tempfile |
1575 | 21 | from urllib.parse import urlencode | ||
1576 | 21 | 22 | ||
1577 | 22 | import gpgme | 23 | import gpgme |
1578 | 23 | from lazr.restful.utils import get_current_browser_request | 24 | from lazr.restful.utils import get_current_browser_request |
1579 | 24 | import pytz | 25 | import pytz |
1580 | 25 | import requests | 26 | import requests |
1581 | 26 | import six | 27 | import six |
1582 | 27 | from six.moves.urllib.parse import urlencode | ||
1583 | 28 | from zope.component import getUtility | 28 | from zope.component import getUtility |
1584 | 29 | from zope.interface import implementer | 29 | from zope.interface import implementer |
1585 | 30 | from zope.security.proxy import removeSecurityProxy | 30 | from zope.security.proxy import removeSecurityProxy |
1586 | diff --git a/lib/lp/services/librarian/client.py b/lib/lp/services/librarian/client.py | |||
1587 | index a011bc3..0ef6028 100644 | |||
1588 | --- a/lib/lp/services/librarian/client.py | |||
1589 | +++ b/lib/lp/services/librarian/client.py | |||
1590 | @@ -21,20 +21,20 @@ from socket import ( | |||
1591 | 21 | ) | 21 | ) |
1592 | 22 | import threading | 22 | import threading |
1593 | 23 | import time | 23 | import time |
1598 | 24 | 24 | from urllib.error import ( | |
1595 | 25 | from lazr.restful.utils import get_current_browser_request | ||
1596 | 26 | import six | ||
1597 | 27 | from six.moves.urllib.error import ( | ||
1599 | 28 | HTTPError, | 25 | HTTPError, |
1600 | 29 | URLError, | 26 | URLError, |
1601 | 30 | ) | 27 | ) |
1603 | 31 | from six.moves.urllib.parse import ( | 28 | from urllib.parse import ( |
1604 | 32 | quote, | 29 | quote, |
1605 | 33 | urljoin, | 30 | urljoin, |
1606 | 34 | urlparse, | 31 | urlparse, |
1607 | 35 | urlunparse, | 32 | urlunparse, |
1608 | 36 | ) | 33 | ) |
1610 | 37 | from six.moves.urllib.request import urlopen | 34 | from urllib.request import urlopen |
1611 | 35 | |||
1612 | 36 | from lazr.restful.utils import get_current_browser_request | ||
1613 | 37 | import six | ||
1614 | 38 | from storm.store import Store | 38 | from storm.store import Store |
1615 | 39 | from zope.interface import implementer | 39 | from zope.interface import implementer |
1616 | 40 | 40 | ||
1617 | diff --git a/lib/lp/services/librarian/doc/librarian.txt b/lib/lp/services/librarian/doc/librarian.txt | |||
1618 | index 6c41957..b5c3daf 100644 | |||
1619 | --- a/lib/lp/services/librarian/doc/librarian.txt | |||
1620 | +++ b/lib/lp/services/librarian/doc/librarian.txt | |||
1621 | @@ -252,7 +252,7 @@ the client until it begins a new transaction. | |||
1622 | 252 | >>> print(url) | 252 | >>> print(url) |
1623 | 253 | http://.../text.txt | 253 | http://.../text.txt |
1624 | 254 | 254 | ||
1626 | 255 | >>> from six.moves.urllib.request import urlopen | 255 | >>> from urllib.request import urlopen |
1627 | 256 | >>> six.ensure_str(urlopen(url).read()) | 256 | >>> six.ensure_str(urlopen(url).read()) |
1628 | 257 | 'This is some data' | 257 | 'This is some data' |
1629 | 258 | 258 | ||
1630 | diff --git a/lib/lp/services/librarian/model.py b/lib/lp/services/librarian/model.py | |||
1631 | index 6b0ea19..bf27020 100644 | |||
1632 | --- a/lib/lp/services/librarian/model.py | |||
1633 | +++ b/lib/lp/services/librarian/model.py | |||
1634 | @@ -12,10 +12,10 @@ __all__ = [ | |||
1635 | 12 | 12 | ||
1636 | 13 | from datetime import datetime | 13 | from datetime import datetime |
1637 | 14 | import hashlib | 14 | import hashlib |
1638 | 15 | from urllib.parse import urlparse | ||
1639 | 15 | 16 | ||
1640 | 16 | from lazr.delegates import delegate_to | 17 | from lazr.delegates import delegate_to |
1641 | 17 | import pytz | 18 | import pytz |
1642 | 18 | from six.moves.urllib.parse import urlparse | ||
1643 | 19 | from storm.locals import ( | 19 | from storm.locals import ( |
1644 | 20 | Date, | 20 | Date, |
1645 | 21 | Desc, | 21 | Desc, |
1646 | diff --git a/lib/lp/services/librarian/smoketest.py b/lib/lp/services/librarian/smoketest.py | |||
1647 | index 5fd3a2b..8b4ba38 100644 | |||
1648 | --- a/lib/lp/services/librarian/smoketest.py | |||
1649 | +++ b/lib/lp/services/librarian/smoketest.py | |||
1650 | @@ -9,9 +9,9 @@ | |||
1651 | 9 | import datetime | 9 | import datetime |
1652 | 10 | import io | 10 | import io |
1653 | 11 | import sys | 11 | import sys |
1654 | 12 | from urllib.request import urlopen | ||
1655 | 12 | 13 | ||
1656 | 13 | import pytz | 14 | import pytz |
1657 | 14 | from six.moves.urllib.request import urlopen | ||
1658 | 15 | import transaction | 15 | import transaction |
1659 | 16 | from zope.component import getUtility | 16 | from zope.component import getUtility |
1660 | 17 | 17 | ||
1661 | diff --git a/lib/lp/services/librarian/tests/test_client.py b/lib/lp/services/librarian/tests/test_client.py | |||
1662 | index 6bef538..2fef0cf 100644 | |||
1663 | --- a/lib/lp/services/librarian/tests/test_client.py | |||
1664 | +++ b/lib/lp/services/librarian/tests/test_client.py | |||
1665 | @@ -10,16 +10,16 @@ import socket | |||
1666 | 10 | import textwrap | 10 | import textwrap |
1667 | 11 | import threading | 11 | import threading |
1668 | 12 | import unittest | 12 | import unittest |
1669 | 13 | from urllib.error import ( | ||
1670 | 14 | HTTPError, | ||
1671 | 15 | URLError, | ||
1672 | 16 | ) | ||
1673 | 17 | from urllib.request import urlopen | ||
1674 | 13 | 18 | ||
1675 | 14 | from fixtures import ( | 19 | from fixtures import ( |
1676 | 15 | EnvironmentVariable, | 20 | EnvironmentVariable, |
1677 | 16 | TempDir, | 21 | TempDir, |
1678 | 17 | ) | 22 | ) |
1679 | 18 | from six.moves.urllib.error import ( | ||
1680 | 19 | HTTPError, | ||
1681 | 20 | URLError, | ||
1682 | 21 | ) | ||
1683 | 22 | from six.moves.urllib.request import urlopen | ||
1684 | 23 | from testtools.testcase import ExpectedException | 23 | from testtools.testcase import ExpectedException |
1685 | 24 | import transaction | 24 | import transaction |
1686 | 25 | 25 | ||
1687 | diff --git a/lib/lp/services/librarianserver/db.py b/lib/lp/services/librarianserver/db.py | |||
1688 | index 4ed2901..3c0d9d0 100644 | |||
1689 | --- a/lib/lp/services/librarianserver/db.py | |||
1690 | +++ b/lib/lp/services/librarianserver/db.py | |||
1691 | @@ -8,13 +8,13 @@ __all__ = [ | |||
1692 | 8 | ] | 8 | ] |
1693 | 9 | 9 | ||
1694 | 10 | import hashlib | 10 | import hashlib |
1699 | 11 | from xmlrpc.client import Fault | 11 | from urllib.parse import ( |
1696 | 12 | |||
1697 | 13 | from pymacaroons import Macaroon | ||
1698 | 14 | from six.moves.urllib.parse import ( | ||
1700 | 15 | quote, | 12 | quote, |
1701 | 16 | unquote, | 13 | unquote, |
1702 | 17 | ) | 14 | ) |
1703 | 15 | from xmlrpc.client import Fault | ||
1704 | 16 | |||
1705 | 17 | from pymacaroons import Macaroon | ||
1706 | 18 | from storm.expr import ( | 18 | from storm.expr import ( |
1707 | 19 | And, | 19 | And, |
1708 | 20 | SQL, | 20 | SQL, |
1709 | diff --git a/lib/lp/services/librarianserver/swift.py b/lib/lp/services/librarianserver/swift.py | |||
1710 | index bd22a1e..87bee7b 100644 | |||
1711 | --- a/lib/lp/services/librarianserver/swift.py | |||
1712 | +++ b/lib/lp/services/librarianserver/swift.py | |||
1713 | @@ -19,8 +19,8 @@ import hashlib | |||
1714 | 19 | import os.path | 19 | import os.path |
1715 | 20 | import re | 20 | import re |
1716 | 21 | import time | 21 | import time |
1717 | 22 | from urllib.parse import quote | ||
1718 | 22 | 23 | ||
1719 | 23 | from six.moves.urllib.parse import quote | ||
1720 | 24 | from swiftclient import client as swiftclient | 24 | from swiftclient import client as swiftclient |
1721 | 25 | 25 | ||
1722 | 26 | from lp.services.config import config | 26 | from lp.services.config import config |
1723 | diff --git a/lib/lp/services/librarianserver/testing/fake.py b/lib/lp/services/librarianserver/testing/fake.py | |||
1724 | index b18f9a9..59ed31b 100644 | |||
1725 | --- a/lib/lp/services/librarianserver/testing/fake.py | |||
1726 | +++ b/lib/lp/services/librarianserver/testing/fake.py | |||
1727 | @@ -16,9 +16,9 @@ __all__ = [ | |||
1728 | 16 | 16 | ||
1729 | 17 | import hashlib | 17 | import hashlib |
1730 | 18 | import io | 18 | import io |
1731 | 19 | from urllib.parse import urljoin | ||
1732 | 19 | 20 | ||
1733 | 20 | from fixtures import Fixture | 21 | from fixtures import Fixture |
1734 | 21 | from six.moves.urllib.parse import urljoin | ||
1735 | 22 | import transaction | 22 | import transaction |
1736 | 23 | from transaction.interfaces import ISynchronizer | 23 | from transaction.interfaces import ISynchronizer |
1737 | 24 | import zope.component | 24 | import zope.component |
1738 | diff --git a/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py b/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py | |||
1739 | index 86a6619..bd617e9 100644 | |||
1740 | --- a/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py | |||
1741 | +++ b/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py | |||
1742 | @@ -6,8 +6,7 @@ | |||
1743 | 6 | import os | 6 | import os |
1744 | 7 | import socket | 7 | import socket |
1745 | 8 | from textwrap import dedent | 8 | from textwrap import dedent |
1748 | 9 | 9 | from urllib.request import urlopen | |
1747 | 10 | from six.moves.urllib.request import urlopen | ||
1749 | 11 | 10 | ||
1750 | 12 | from lp.services.config import config | 11 | from lp.services.config import config |
1751 | 13 | from lp.services.config.fixture import ConfigFixture | 12 | from lp.services.config.fixture import ConfigFixture |
1752 | diff --git a/lib/lp/services/librarianserver/tests/test_db_outage.py b/lib/lp/services/librarianserver/tests/test_db_outage.py | |||
1753 | index 5709cd9..7887632 100644 | |||
1754 | --- a/lib/lp/services/librarianserver/tests/test_db_outage.py | |||
1755 | +++ b/lib/lp/services/librarianserver/tests/test_db_outage.py | |||
1756 | @@ -6,10 +6,10 @@ | |||
1757 | 6 | Database outages happen by accident and during fastdowntime deployments.""" | 6 | Database outages happen by accident and during fastdowntime deployments.""" |
1758 | 7 | 7 | ||
1759 | 8 | import io | 8 | import io |
1760 | 9 | from urllib.error import HTTPError | ||
1761 | 10 | from urllib.request import urlopen | ||
1762 | 9 | 11 | ||
1763 | 10 | from fixtures import Fixture | 12 | from fixtures import Fixture |
1764 | 11 | from six.moves.urllib.error import HTTPError | ||
1765 | 12 | from six.moves.urllib.request import urlopen | ||
1766 | 13 | 13 | ||
1767 | 14 | from lp.services.librarian.client import LibrarianClient | 14 | from lp.services.librarian.client import LibrarianClient |
1768 | 15 | from lp.services.librarianserver.testing.server import LibrarianServerFixture | 15 | from lp.services.librarianserver.testing.server import LibrarianServerFixture |
1769 | diff --git a/lib/lp/services/librarianserver/tests/test_gc.py b/lib/lp/services/librarianserver/tests/test_gc.py | |||
1770 | index 7e1eedb..850f9ae 100644 | |||
1771 | --- a/lib/lp/services/librarianserver/tests/test_gc.py | |||
1772 | +++ b/lib/lp/services/librarianserver/tests/test_gc.py | |||
1773 | @@ -19,11 +19,11 @@ from subprocess import ( | |||
1774 | 19 | STDOUT, | 19 | STDOUT, |
1775 | 20 | ) | 20 | ) |
1776 | 21 | import tempfile | 21 | import tempfile |
1777 | 22 | from urllib.parse import urljoin | ||
1778 | 22 | 23 | ||
1779 | 23 | from fixtures import MockPatchObject | 24 | from fixtures import MockPatchObject |
1780 | 24 | import pytz | 25 | import pytz |
1781 | 25 | import requests | 26 | import requests |
1782 | 26 | from six.moves.urllib.parse import urljoin | ||
1783 | 27 | from storm.store import Store | 27 | from storm.store import Store |
1784 | 28 | from swiftclient import client as swiftclient | 28 | from swiftclient import client as swiftclient |
1785 | 29 | from testtools.matchers import ( | 29 | from testtools.matchers import ( |
1786 | diff --git a/lib/lp/services/librarianserver/tests/test_web.py b/lib/lp/services/librarianserver/tests/test_web.py | |||
1787 | index 5800724..1fe9c22 100644 | |||
1788 | --- a/lib/lp/services/librarianserver/tests/test_web.py | |||
1789 | +++ b/lib/lp/services/librarianserver/tests/test_web.py | |||
1790 | @@ -8,11 +8,11 @@ import http.client | |||
1791 | 8 | from io import BytesIO | 8 | from io import BytesIO |
1792 | 9 | import os | 9 | import os |
1793 | 10 | import unittest | 10 | import unittest |
1794 | 11 | from urllib.parse import urlparse | ||
1795 | 11 | 12 | ||
1796 | 12 | from lazr.uri import URI | 13 | from lazr.uri import URI |
1797 | 13 | import pytz | 14 | import pytz |
1798 | 14 | import requests | 15 | import requests |
1799 | 15 | from six.moves.urllib.parse import urlparse | ||
1800 | 16 | from storm.expr import SQL | 16 | from storm.expr import SQL |
1801 | 17 | from testtools.matchers import EndsWith | 17 | from testtools.matchers import EndsWith |
1802 | 18 | import transaction | 18 | import transaction |
1803 | diff --git a/lib/lp/services/librarianserver/web.py b/lib/lp/services/librarianserver/web.py | |||
1804 | index b40536f..989e043 100644 | |||
1805 | --- a/lib/lp/services/librarianserver/web.py | |||
1806 | +++ b/lib/lp/services/librarianserver/web.py | |||
1807 | @@ -3,10 +3,10 @@ | |||
1808 | 3 | 3 | ||
1809 | 4 | from datetime import datetime | 4 | from datetime import datetime |
1810 | 5 | import time | 5 | import time |
1811 | 6 | from urllib.parse import urlparse | ||
1812 | 6 | 7 | ||
1813 | 7 | from pymacaroons import Macaroon | 8 | from pymacaroons import Macaroon |
1814 | 8 | import six | 9 | import six |
1815 | 9 | from six.moves.urllib.parse import urlparse | ||
1816 | 10 | from storm.exceptions import DisconnectionError | 10 | from storm.exceptions import DisconnectionError |
1817 | 11 | from twisted.internet import ( | 11 | from twisted.internet import ( |
1818 | 12 | abstract, | 12 | abstract, |
1819 | diff --git a/lib/lp/services/oauth/stories/access-token.txt b/lib/lp/services/oauth/stories/access-token.txt | |||
1820 | index a56ee3c..86c5241 100644 | |||
1821 | --- a/lib/lp/services/oauth/stories/access-token.txt | |||
1822 | +++ b/lib/lp/services/oauth/stories/access-token.txt | |||
1823 | @@ -19,7 +19,7 @@ access token. | |||
1824 | 19 | >>> token.review(salgado, OAuthPermission.WRITE_PUBLIC) | 19 | >>> token.review(salgado, OAuthPermission.WRITE_PUBLIC) |
1825 | 20 | >>> logout() | 20 | >>> logout() |
1826 | 21 | 21 | ||
1828 | 22 | >>> from six.moves.urllib.parse import urlencode | 22 | >>> from urllib.parse import urlencode |
1829 | 23 | >>> data = dict( | 23 | >>> data = dict( |
1830 | 24 | ... oauth_consumer_key='foobar123451432', | 24 | ... oauth_consumer_key='foobar123451432', |
1831 | 25 | ... oauth_version='1.0', | 25 | ... oauth_version='1.0', |
1832 | diff --git a/lib/lp/services/oauth/stories/authorize-token.txt b/lib/lp/services/oauth/stories/authorize-token.txt | |||
1833 | index 6634a7a..ecd2e7a 100644 | |||
1834 | --- a/lib/lp/services/oauth/stories/authorize-token.txt | |||
1835 | +++ b/lib/lp/services/oauth/stories/authorize-token.txt | |||
1836 | @@ -31,7 +31,7 @@ The +authorize-token page is restricted to logged in users, so users will | |||
1837 | 31 | first be asked to log in. (We won't show the actual login process because | 31 | first be asked to log in. (We won't show the actual login process because |
1838 | 32 | it involves OpenID, which would complicate this test quite a bit.) | 32 | it involves OpenID, which would complicate this test quite a bit.) |
1839 | 33 | 33 | ||
1841 | 34 | >>> from six.moves.urllib.parse import urlencode | 34 | >>> from urllib.parse import urlencode |
1842 | 35 | >>> params = dict( | 35 | >>> params = dict( |
1843 | 36 | ... oauth_token=token.key, oauth_callback='http://launchpad.test/bzr') | 36 | ... oauth_token=token.key, oauth_callback='http://launchpad.test/bzr') |
1844 | 37 | >>> url = "http://launchpad.test/+authorize-token?%s" % urlencode(params) | 37 | >>> url = "http://launchpad.test/+authorize-token?%s" % urlencode(params) |
1845 | diff --git a/lib/lp/services/oauth/stories/request-token.txt b/lib/lp/services/oauth/stories/request-token.txt | |||
1846 | index 3e9b4cb..dc1b001 100644 | |||
1847 | --- a/lib/lp/services/oauth/stories/request-token.txt | |||
1848 | +++ b/lib/lp/services/oauth/stories/request-token.txt | |||
1849 | @@ -4,7 +4,7 @@ Asking for a request token | |||
1850 | 4 | Our sample consumer (whose key is 'foobar123451432') asks Launchpad for | 4 | Our sample consumer (whose key is 'foobar123451432') asks Launchpad for |
1851 | 5 | a request token which may later be exchanged for an access token. | 5 | a request token which may later be exchanged for an access token. |
1852 | 6 | 6 | ||
1854 | 7 | >>> from six.moves.urllib.parse import urlencode | 7 | >>> from urllib.parse import urlencode |
1855 | 8 | >>> data = dict( | 8 | >>> data = dict( |
1856 | 9 | ... oauth_consumer_key='foobar123451432', | 9 | ... oauth_consumer_key='foobar123451432', |
1857 | 10 | ... oauth_version='1.0', | 10 | ... oauth_version='1.0', |
1858 | diff --git a/lib/lp/services/openid/fetcher.py b/lib/lp/services/openid/fetcher.py | |||
1859 | index 88343a1..a32e0f7 100644 | |||
1860 | --- a/lib/lp/services/openid/fetcher.py | |||
1861 | +++ b/lib/lp/services/openid/fetcher.py | |||
1862 | @@ -9,12 +9,12 @@ __all__ = [ | |||
1863 | 9 | 9 | ||
1864 | 10 | from functools import partial | 10 | from functools import partial |
1865 | 11 | import os.path | 11 | import os.path |
1866 | 12 | from urllib.request import urlopen | ||
1867 | 12 | 13 | ||
1868 | 13 | from openid.fetchers import ( | 14 | from openid.fetchers import ( |
1869 | 14 | setDefaultFetcher, | 15 | setDefaultFetcher, |
1870 | 15 | Urllib2Fetcher, | 16 | Urllib2Fetcher, |
1871 | 16 | ) | 17 | ) |
1872 | 17 | from six.moves.urllib.request import urlopen | ||
1873 | 18 | 18 | ||
1874 | 19 | from lp.services.config import config | 19 | from lp.services.config import config |
1875 | 20 | from lp.services.encoding import wsgi_native_string | 20 | from lp.services.encoding import wsgi_native_string |
1876 | diff --git a/lib/lp/services/scripts/base.py b/lib/lp/services/scripts/base.py | |||
1877 | index 9abdbb2..62dc799 100644 | |||
1878 | --- a/lib/lp/services/scripts/base.py | |||
1879 | +++ b/lib/lp/services/scripts/base.py | |||
1880 | @@ -19,6 +19,10 @@ import logging | |||
1881 | 19 | from optparse import OptionParser | 19 | from optparse import OptionParser |
1882 | 20 | import os.path | 20 | import os.path |
1883 | 21 | import sys | 21 | import sys |
1884 | 22 | from urllib.parse import ( | ||
1885 | 23 | urlparse, | ||
1886 | 24 | urlunparse, | ||
1887 | 25 | ) | ||
1888 | 22 | 26 | ||
1889 | 23 | from contrib.glock import ( | 27 | from contrib.glock import ( |
1890 | 24 | GlobalLock, | 28 | GlobalLock, |
1891 | @@ -26,10 +30,6 @@ from contrib.glock import ( | |||
1892 | 26 | ) | 30 | ) |
1893 | 27 | import pytz | 31 | import pytz |
1894 | 28 | import requests | 32 | import requests |
1895 | 29 | from six.moves.urllib.parse import ( | ||
1896 | 30 | urlparse, | ||
1897 | 31 | urlunparse, | ||
1898 | 32 | ) | ||
1899 | 33 | import transaction | 33 | import transaction |
1900 | 34 | from zope.component import getUtility | 34 | from zope.component import getUtility |
1901 | 35 | 35 | ||
1902 | diff --git a/lib/lp/services/signing/proxy.py b/lib/lp/services/signing/proxy.py | |||
1903 | index 0e5fded..5bd23ba 100644 | |||
1904 | --- a/lib/lp/services/signing/proxy.py | |||
1905 | +++ b/lib/lp/services/signing/proxy.py | |||
1906 | @@ -5,6 +5,7 @@ | |||
1907 | 5 | 5 | ||
1908 | 6 | import base64 | 6 | import base64 |
1909 | 7 | import json | 7 | import json |
1910 | 8 | from urllib.parse import urljoin | ||
1911 | 8 | 9 | ||
1912 | 9 | from lazr.restful.utils import get_current_browser_request | 10 | from lazr.restful.utils import get_current_browser_request |
1913 | 10 | from nacl.encoding import Base64Encoder | 11 | from nacl.encoding import Base64Encoder |
1914 | @@ -14,7 +15,6 @@ from nacl.public import ( | |||
1915 | 14 | PublicKey, | 15 | PublicKey, |
1916 | 15 | ) | 16 | ) |
1917 | 16 | from nacl.utils import random | 17 | from nacl.utils import random |
1918 | 17 | from six.moves.urllib.parse import urljoin | ||
1919 | 18 | from zope.interface import implementer | 18 | from zope.interface import implementer |
1920 | 19 | 19 | ||
1921 | 20 | from lp.services.config import config | 20 | from lp.services.config import config |
1922 | diff --git a/lib/lp/services/sitesearch/__init__.py b/lib/lp/services/sitesearch/__init__.py | |||
1923 | index 074c1a1..9c04b05 100644 | |||
1924 | --- a/lib/lp/services/sitesearch/__init__.py | |||
1925 | +++ b/lib/lp/services/sitesearch/__init__.py | |||
1926 | @@ -9,14 +9,15 @@ __all__ = [ | |||
1927 | 9 | 'PageMatches', | 9 | 'PageMatches', |
1928 | 10 | ] | 10 | ] |
1929 | 11 | 11 | ||
1934 | 12 | from lazr.restful.utils import get_current_browser_request | 12 | from urllib.parse import ( |
1931 | 13 | from lazr.uri import URI | ||
1932 | 14 | import requests | ||
1933 | 15 | from six.moves.urllib.parse import ( | ||
1935 | 16 | parse_qsl, | 13 | parse_qsl, |
1936 | 17 | urlencode, | 14 | urlencode, |
1937 | 18 | urlunparse, | 15 | urlunparse, |
1938 | 19 | ) | 16 | ) |
1939 | 17 | |||
1940 | 18 | from lazr.restful.utils import get_current_browser_request | ||
1941 | 19 | from lazr.uri import URI | ||
1942 | 20 | import requests | ||
1943 | 20 | from zope.interface import implementer | 21 | from zope.interface import implementer |
1944 | 21 | 22 | ||
1945 | 22 | from lp.services.config import config | 23 | from lp.services.config import config |
1946 | diff --git a/lib/lp/services/verification/browser/logintoken.py b/lib/lp/services/verification/browser/logintoken.py | |||
1947 | index 8d13422..a9004d4 100644 | |||
1948 | --- a/lib/lp/services/verification/browser/logintoken.py | |||
1949 | +++ b/lib/lp/services/verification/browser/logintoken.py | |||
1950 | @@ -13,10 +13,11 @@ __all__ = [ | |||
1951 | 13 | 'ValidateGPGKeyView', | 13 | 'ValidateGPGKeyView', |
1952 | 14 | ] | 14 | ] |
1953 | 15 | 15 | ||
1955 | 16 | from six.moves.urllib.parse import ( | 16 | from urllib.parse import ( |
1956 | 17 | urlencode, | 17 | urlencode, |
1957 | 18 | urljoin, | 18 | urljoin, |
1958 | 19 | ) | 19 | ) |
1959 | 20 | |||
1960 | 20 | from zope.component import getUtility | 21 | from zope.component import getUtility |
1961 | 21 | from zope.formlib.widget import CustomWidgetFactory | 22 | from zope.formlib.widget import CustomWidgetFactory |
1962 | 22 | from zope.formlib.widgets import TextAreaWidget | 23 | from zope.formlib.widgets import TextAreaWidget |
1963 | diff --git a/lib/lp/services/webapp/doc/webapp-publication.txt b/lib/lp/services/webapp/doc/webapp-publication.txt | |||
1964 | index d7f8dcc..430ead9 100644 | |||
1965 | --- a/lib/lp/services/webapp/doc/webapp-publication.txt | |||
1966 | +++ b/lib/lp/services/webapp/doc/webapp-publication.txt | |||
1967 | @@ -507,7 +507,7 @@ python 'in' operator. | |||
1968 | 507 | 507 | ||
1969 | 508 | >>> from lp.services.webapp.servers import ( | 508 | >>> from lp.services.webapp.servers import ( |
1970 | 509 | ... LaunchpadBrowserRequest) | 509 | ... LaunchpadBrowserRequest) |
1972 | 510 | >>> from six.moves.urllib.parse import urlencode | 510 | >>> from urllib.parse import urlencode |
1973 | 511 | >>> environment = {'QUERY_STRING': urlencode({ | 511 | >>> environment = {'QUERY_STRING': urlencode({ |
1974 | 512 | ... 'a_field': 'a_value', | 512 | ... 'a_field': 'a_value', |
1975 | 513 | ... 'items_field': [1, 2, 3]}, doseq=True)} | 513 | ... 'items_field': [1, 2, 3]}, doseq=True)} |
1976 | diff --git a/lib/lp/services/webapp/errorlog.py b/lib/lp/services/webapp/errorlog.py | |||
1977 | index 7327c8f..82e698f 100644 | |||
1978 | --- a/lib/lp/services/webapp/errorlog.py | |||
1979 | +++ b/lib/lp/services/webapp/errorlog.py | |||
1980 | @@ -7,6 +7,7 @@ import contextlib | |||
1981 | 7 | from itertools import repeat | 7 | from itertools import repeat |
1982 | 8 | import operator | 8 | import operator |
1983 | 9 | import re | 9 | import re |
1984 | 10 | from urllib.parse import urlparse | ||
1985 | 10 | 11 | ||
1986 | 11 | from lazr.restful.utils import get_current_browser_request | 12 | from lazr.restful.utils import get_current_browser_request |
1987 | 12 | import oops.createhooks | 13 | import oops.createhooks |
1988 | @@ -15,7 +16,6 @@ from oops_datedir_repo import DateDirRepo | |||
1989 | 15 | import oops_timeline | 16 | import oops_timeline |
1990 | 16 | import pytz | 17 | import pytz |
1991 | 17 | import six | 18 | import six |
1992 | 18 | from six.moves.urllib.parse import urlparse | ||
1993 | 19 | from talisker.logs import logging_context | 19 | from talisker.logs import logging_context |
1994 | 20 | from zope.component import getUtility | 20 | from zope.component import getUtility |
1995 | 21 | from zope.error.interfaces import IErrorReportingUtility | 21 | from zope.error.interfaces import IErrorReportingUtility |
1996 | diff --git a/lib/lp/services/webapp/login.py b/lib/lp/services/webapp/login.py | |||
1997 | index 08e693a..0060ab7 100644 | |||
1998 | --- a/lib/lp/services/webapp/login.py | |||
1999 | +++ b/lib/lp/services/webapp/login.py | |||
2000 | @@ -6,6 +6,7 @@ from datetime import ( | |||
2001 | 6 | datetime, | 6 | datetime, |
2002 | 7 | timedelta, | 7 | timedelta, |
2003 | 8 | ) | 8 | ) |
2004 | 9 | from urllib.parse import urlencode | ||
2005 | 9 | 10 | ||
2006 | 10 | from openid.consumer.consumer import ( | 11 | from openid.consumer.consumer import ( |
2007 | 11 | CANCEL, | 12 | CANCEL, |
2008 | @@ -22,7 +23,6 @@ from paste.httpexceptions import ( | |||
2009 | 22 | HTTPException, | 23 | HTTPException, |
2010 | 23 | ) | 24 | ) |
2011 | 24 | import six | 25 | import six |
2012 | 25 | from six.moves.urllib.parse import urlencode | ||
2013 | 26 | import transaction | 26 | import transaction |
2014 | 27 | from zope.authentication.interfaces import IUnauthenticatedPrincipal | 27 | from zope.authentication.interfaces import IUnauthenticatedPrincipal |
2015 | 28 | from zope.browserpage import ViewPageTemplateFile | 28 | from zope.browserpage import ViewPageTemplateFile |
2016 | diff --git a/lib/lp/services/webapp/publication.py b/lib/lp/services/webapp/publication.py | |||
2017 | index 37cd383..6f2690d 100644 | |||
2018 | --- a/lib/lp/services/webapp/publication.py | |||
2019 | +++ b/lib/lp/services/webapp/publication.py | |||
2020 | @@ -11,13 +11,13 @@ import sys | |||
2021 | 11 | import threading | 11 | import threading |
2022 | 12 | import time | 12 | import time |
2023 | 13 | import traceback | 13 | import traceback |
2024 | 14 | from urllib.parse import quote | ||
2025 | 14 | 15 | ||
2026 | 15 | from lazr.uri import ( | 16 | from lazr.uri import ( |
2027 | 16 | InvalidURIError, | 17 | InvalidURIError, |
2028 | 17 | URI, | 18 | URI, |
2029 | 18 | ) | 19 | ) |
2030 | 19 | from psycopg2.extensions import TransactionRollbackError | 20 | from psycopg2.extensions import TransactionRollbackError |
2031 | 20 | from six.moves.urllib.parse import quote | ||
2032 | 21 | from storm.database import STATE_DISCONNECTED | 21 | from storm.database import STATE_DISCONNECTED |
2033 | 22 | from storm.exceptions import ( | 22 | from storm.exceptions import ( |
2034 | 23 | DisconnectionError, | 23 | DisconnectionError, |
2035 | diff --git a/lib/lp/services/webapp/publisher.py b/lib/lp/services/webapp/publisher.py | |||
2036 | index 2f5960d..397c873 100644 | |||
2037 | --- a/lib/lp/services/webapp/publisher.py | |||
2038 | +++ b/lib/lp/services/webapp/publisher.py | |||
2039 | @@ -28,6 +28,7 @@ __all__ = [ | |||
2040 | 28 | from cgi import FieldStorage | 28 | from cgi import FieldStorage |
2041 | 29 | import http.client | 29 | import http.client |
2042 | 30 | import re | 30 | import re |
2043 | 31 | from urllib.parse import urlparse | ||
2044 | 31 | from wsgiref.headers import Headers | 32 | from wsgiref.headers import Headers |
2045 | 32 | 33 | ||
2046 | 33 | from lazr.restful import ( | 34 | from lazr.restful import ( |
2047 | @@ -41,7 +42,6 @@ from lazr.restful.tales import WebLayerAPI | |||
2048 | 41 | from lazr.restful.utils import get_current_browser_request | 42 | from lazr.restful.utils import get_current_browser_request |
2049 | 42 | import simplejson | 43 | import simplejson |
2050 | 43 | import six | 44 | import six |
2051 | 44 | from six.moves.urllib.parse import urlparse | ||
2052 | 45 | from zope.app.publisher.xmlrpc import IMethodPublisher | 45 | from zope.app.publisher.xmlrpc import IMethodPublisher |
2053 | 46 | from zope.component import ( | 46 | from zope.component import ( |
2054 | 47 | getUtility, | 47 | getUtility, |
2055 | diff --git a/lib/lp/services/webapp/servers.py b/lib/lp/services/webapp/servers.py | |||
2056 | index e644e05..79888bd 100644 | |||
2057 | --- a/lib/lp/services/webapp/servers.py | |||
2058 | +++ b/lib/lp/services/webapp/servers.py | |||
2059 | @@ -4,6 +4,7 @@ | |||
2060 | 4 | """Definition of the internet servers that Launchpad uses.""" | 4 | """Definition of the internet servers that Launchpad uses.""" |
2061 | 5 | 5 | ||
2062 | 6 | import threading | 6 | import threading |
2063 | 7 | from urllib.parse import parse_qs | ||
2064 | 7 | import xmlrpc.client | 8 | import xmlrpc.client |
2065 | 8 | 9 | ||
2066 | 9 | from lazr.restful.interfaces import ( | 10 | from lazr.restful.interfaces import ( |
2067 | @@ -18,7 +19,6 @@ from lazr.restful.publisher import ( | |||
2068 | 18 | from lazr.restful.utils import get_current_browser_request | 19 | from lazr.restful.utils import get_current_browser_request |
2069 | 19 | from lazr.uri import URI | 20 | from lazr.uri import URI |
2070 | 20 | import six | 21 | import six |
2071 | 21 | from six.moves.urllib.parse import parse_qs | ||
2072 | 22 | from talisker.logs import logging_context | 22 | from talisker.logs import logging_context |
2073 | 23 | import transaction | 23 | import transaction |
2074 | 24 | from transaction.interfaces import ISynchronizer | 24 | from transaction.interfaces import ISynchronizer |
2075 | diff --git a/lib/lp/services/webapp/tests/test_error.py b/lib/lp/services/webapp/tests/test_error.py | |||
2076 | index 2081b14..eae2756 100644 | |||
2077 | --- a/lib/lp/services/webapp/tests/test_error.py | |||
2078 | +++ b/lib/lp/services/webapp/tests/test_error.py | |||
2079 | @@ -7,10 +7,10 @@ import http.client | |||
2080 | 7 | import logging | 7 | import logging |
2081 | 8 | import socket | 8 | import socket |
2082 | 9 | import time | 9 | import time |
2083 | 10 | from urllib.error import HTTPError | ||
2084 | 10 | 11 | ||
2085 | 11 | from fixtures import FakeLogger | 12 | from fixtures import FakeLogger |
2086 | 12 | import psycopg2 | 13 | import psycopg2 |
2087 | 13 | from six.moves.urllib.error import HTTPError | ||
2088 | 14 | from storm.exceptions import ( | 14 | from storm.exceptions import ( |
2089 | 15 | DisconnectionError, | 15 | DisconnectionError, |
2090 | 16 | OperationalError, | 16 | OperationalError, |
2091 | diff --git a/lib/lp/services/webapp/tests/test_login.py b/lib/lp/services/webapp/tests/test_login.py | |||
2092 | index 61357d4..1cfec2d 100644 | |||
2093 | --- a/lib/lp/services/webapp/tests/test_login.py | |||
2094 | +++ b/lib/lp/services/webapp/tests/test_login.py | |||
2095 | @@ -17,6 +17,12 @@ from datetime import ( | |||
2096 | 17 | ) | 17 | ) |
2097 | 18 | import http.client | 18 | import http.client |
2098 | 19 | import unittest | 19 | import unittest |
2099 | 20 | from urllib.error import HTTPError | ||
2100 | 21 | from urllib.parse import ( | ||
2101 | 22 | parse_qsl, | ||
2102 | 23 | quote, | ||
2103 | 24 | urlsplit, | ||
2104 | 25 | ) | ||
2105 | 20 | 26 | ||
2106 | 21 | from openid.consumer.consumer import ( | 27 | from openid.consumer.consumer import ( |
2107 | 22 | FAILURE, | 28 | FAILURE, |
2108 | @@ -27,12 +33,6 @@ from openid.extensions import ( | |||
2109 | 27 | sreg, | 33 | sreg, |
2110 | 28 | ) | 34 | ) |
2111 | 29 | from openid.yadis.discover import DiscoveryFailure | 35 | from openid.yadis.discover import DiscoveryFailure |
2112 | 30 | from six.moves.urllib.error import HTTPError | ||
2113 | 31 | from six.moves.urllib.parse import ( | ||
2114 | 32 | parse_qsl, | ||
2115 | 33 | quote, | ||
2116 | 34 | urlsplit, | ||
2117 | 35 | ) | ||
2118 | 36 | from testtools.matchers import ( | 36 | from testtools.matchers import ( |
2119 | 37 | Contains, | 37 | Contains, |
2120 | 38 | ContainsDict, | 38 | ContainsDict, |
2121 | diff --git a/lib/lp/services/webapp/tests/test_login_account.py b/lib/lp/services/webapp/tests/test_login_account.py | |||
2122 | index 6d6f535..550a7ae 100644 | |||
2123 | --- a/lib/lp/services/webapp/tests/test_login_account.py | |||
2124 | +++ b/lib/lp/services/webapp/tests/test_login_account.py | |||
2125 | @@ -2,9 +2,9 @@ | |||
2126 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
2127 | 3 | 3 | ||
2128 | 4 | from datetime import datetime | 4 | from datetime import datetime |
2129 | 5 | from urllib.parse import parse_qs | ||
2130 | 5 | 6 | ||
2131 | 6 | import lazr.uri | 7 | import lazr.uri |
2132 | 7 | from six.moves.urllib.parse import parse_qs | ||
2133 | 8 | from zope.component import getUtility | 8 | from zope.component import getUtility |
2134 | 9 | from zope.event import notify | 9 | from zope.event import notify |
2135 | 10 | from zope.session.interfaces import ISession | 10 | from zope.session.interfaces import ISession |
2136 | diff --git a/lib/lp/services/webapp/url.py b/lib/lp/services/webapp/url.py | |||
2137 | index a6f15b5..e3932d5 100644 | |||
2138 | --- a/lib/lp/services/webapp/url.py | |||
2139 | +++ b/lib/lp/services/webapp/url.py | |||
2140 | @@ -5,8 +5,8 @@ | |||
2141 | 5 | 5 | ||
2142 | 6 | __all__ = ['urlappend', 'urlparse', 'urlsplit'] | 6 | __all__ = ['urlappend', 'urlparse', 'urlsplit'] |
2143 | 7 | 7 | ||
2146 | 8 | import six.moves.urllib.parse as urlparse_module | 8 | import urllib.parse as urlparse_module |
2147 | 9 | from six.moves.urllib.parse import ( | 9 | from urllib.parse import ( |
2148 | 10 | urljoin, | 10 | urljoin, |
2149 | 11 | urlparse as original_urlparse, | 11 | urlparse as original_urlparse, |
2150 | 12 | urlsplit as original_urlsplit, | 12 | urlsplit as original_urlsplit, |
2151 | diff --git a/lib/lp/services/webhooks/model.py b/lib/lp/services/webhooks/model.py | |||
2152 | index aed49ae..e8518db 100644 | |||
2153 | --- a/lib/lp/services/webhooks/model.py | |||
2154 | +++ b/lib/lp/services/webhooks/model.py | |||
2155 | @@ -15,6 +15,7 @@ from datetime import ( | |||
2156 | 15 | import ipaddress | 15 | import ipaddress |
2157 | 16 | import re | 16 | import re |
2158 | 17 | import socket | 17 | import socket |
2159 | 18 | from urllib.parse import urlsplit | ||
2160 | 18 | 19 | ||
2161 | 19 | import iso8601 | 20 | import iso8601 |
2162 | 20 | from lazr.delegates import delegate_to | 21 | from lazr.delegates import delegate_to |
2163 | @@ -24,7 +25,6 @@ from lazr.enum import ( | |||
2164 | 24 | ) | 25 | ) |
2165 | 25 | import psutil | 26 | import psutil |
2166 | 26 | from pytz import utc | 27 | from pytz import utc |
2167 | 27 | from six.moves.urllib.parse import urlsplit | ||
2168 | 28 | from storm.expr import Desc | 28 | from storm.expr import Desc |
2169 | 29 | from storm.properties import ( | 29 | from storm.properties import ( |
2170 | 30 | Bool, | 30 | Bool, |
2171 | diff --git a/lib/lp/services/webservice/wadl.py b/lib/lp/services/webservice/wadl.py | |||
2172 | index 5432f26..bcbf3bf 100644 | |||
2173 | --- a/lib/lp/services/webservice/wadl.py | |||
2174 | +++ b/lib/lp/services/webservice/wadl.py | |||
2175 | @@ -7,9 +7,9 @@ try: | |||
2176 | 7 | from importlib import resources | 7 | from importlib import resources |
2177 | 8 | except ImportError: | 8 | except ImportError: |
2178 | 9 | import importlib_resources as resources | 9 | import importlib_resources as resources |
2179 | 10 | import subprocess | ||
2180 | 11 | 10 | ||
2182 | 12 | from six.moves.urllib.parse import urljoin | 11 | import subprocess |
2183 | 12 | from urllib.parse import urljoin | ||
2184 | 13 | 13 | ||
2185 | 14 | from lp.services.webapp.interaction import ( | 14 | from lp.services.webapp.interaction import ( |
2186 | 15 | ANONYMOUS, | 15 | ANONYMOUS, |
2187 | diff --git a/lib/lp/snappy/browser/snap.py b/lib/lp/snappy/browser/snap.py | |||
2188 | index 0fc63ca..eccbcd8 100644 | |||
2189 | --- a/lib/lp/snappy/browser/snap.py | |||
2190 | +++ b/lib/lp/snappy/browser/snap.py | |||
2191 | @@ -15,12 +15,13 @@ __all__ = [ | |||
2192 | 15 | 'SnapView', | 15 | 'SnapView', |
2193 | 16 | ] | 16 | ] |
2194 | 17 | 17 | ||
2195 | 18 | from urllib.parse import urlencode | ||
2196 | 19 | |||
2197 | 18 | from lazr.restful.fields import Reference | 20 | from lazr.restful.fields import Reference |
2198 | 19 | from lazr.restful.interface import ( | 21 | from lazr.restful.interface import ( |
2199 | 20 | copy_field, | 22 | copy_field, |
2200 | 21 | use_template, | 23 | use_template, |
2201 | 22 | ) | 24 | ) |
2202 | 23 | from six.moves.urllib.parse import urlencode | ||
2203 | 24 | from zope.component import getUtility | 25 | from zope.component import getUtility |
2204 | 25 | from zope.error.interfaces import IErrorReportingUtility | 26 | from zope.error.interfaces import IErrorReportingUtility |
2205 | 26 | from zope.formlib.widget import CustomWidgetFactory | 27 | from zope.formlib.widget import CustomWidgetFactory |
2206 | diff --git a/lib/lp/snappy/browser/tests/test_snap.py b/lib/lp/snappy/browser/tests/test_snap.py | |||
2207 | index c513111..bbc0be7 100644 | |||
2208 | --- a/lib/lp/snappy/browser/tests/test_snap.py | |||
2209 | +++ b/lib/lp/snappy/browser/tests/test_snap.py | |||
2210 | @@ -9,15 +9,15 @@ from datetime import ( | |||
2211 | 9 | ) | 9 | ) |
2212 | 10 | import json | 10 | import json |
2213 | 11 | import re | 11 | import re |
2214 | 12 | from urllib.parse import ( | ||
2215 | 13 | parse_qs, | ||
2216 | 14 | urlsplit, | ||
2217 | 15 | ) | ||
2218 | 12 | 16 | ||
2219 | 13 | from fixtures import FakeLogger | 17 | from fixtures import FakeLogger |
2220 | 14 | from pymacaroons import Macaroon | 18 | from pymacaroons import Macaroon |
2221 | 15 | import pytz | 19 | import pytz |
2222 | 16 | import responses | 20 | import responses |
2223 | 17 | from six.moves.urllib.parse import ( | ||
2224 | 18 | parse_qs, | ||
2225 | 19 | urlsplit, | ||
2226 | 20 | ) | ||
2227 | 21 | import soupmatchers | 21 | import soupmatchers |
2228 | 22 | from testtools.matchers import ( | 22 | from testtools.matchers import ( |
2229 | 23 | AfterPreprocessing, | 23 | AfterPreprocessing, |
2230 | diff --git a/lib/lp/snappy/model/snap.py b/lib/lp/snappy/model/snap.py | |||
2231 | index 1a2bf68..16bbfed 100644 | |||
2232 | --- a/lib/lp/snappy/model/snap.py | |||
2233 | +++ b/lib/lp/snappy/model/snap.py | |||
2234 | @@ -13,13 +13,13 @@ from datetime import ( | |||
2235 | 13 | timedelta, | 13 | timedelta, |
2236 | 14 | ) | 14 | ) |
2237 | 15 | from operator import attrgetter | 15 | from operator import attrgetter |
2238 | 16 | from urllib.parse import urlsplit | ||
2239 | 16 | 17 | ||
2240 | 17 | from breezy import urlutils | 18 | from breezy import urlutils |
2241 | 18 | from lazr.lifecycle.event import ObjectCreatedEvent | 19 | from lazr.lifecycle.event import ObjectCreatedEvent |
2242 | 19 | from pymacaroons import Macaroon | 20 | from pymacaroons import Macaroon |
2243 | 20 | import pytz | 21 | import pytz |
2244 | 21 | import six | 22 | import six |
2245 | 22 | from six.moves.urllib.parse import urlsplit | ||
2246 | 23 | from storm.expr import ( | 23 | from storm.expr import ( |
2247 | 24 | And, | 24 | And, |
2248 | 25 | Coalesce, | 25 | Coalesce, |
2249 | diff --git a/lib/lp/snappy/model/snapstoreclient.py b/lib/lp/snappy/model/snapstoreclient.py | |||
2250 | index e5900fc..b56f5b6 100644 | |||
2251 | --- a/lib/lp/snappy/model/snapstoreclient.py | |||
2252 | +++ b/lib/lp/snappy/model/snapstoreclient.py | |||
2253 | @@ -11,13 +11,13 @@ import base64 | |||
2254 | 11 | import json | 11 | import json |
2255 | 12 | import string | 12 | import string |
2256 | 13 | import time | 13 | import time |
2257 | 14 | from urllib.parse import urlsplit | ||
2258 | 14 | 15 | ||
2259 | 15 | from lazr.restful.utils import get_current_browser_request | 16 | from lazr.restful.utils import get_current_browser_request |
2260 | 16 | from pymacaroons import Macaroon | 17 | from pymacaroons import Macaroon |
2261 | 17 | import requests | 18 | import requests |
2262 | 18 | from requests_toolbelt import MultipartEncoder | 19 | from requests_toolbelt import MultipartEncoder |
2263 | 19 | import six | 20 | import six |
2264 | 20 | from six.moves.urllib.parse import urlsplit | ||
2265 | 21 | from zope.component import getUtility | 21 | from zope.component import getUtility |
2266 | 22 | from zope.interface import implementer | 22 | from zope.interface import implementer |
2267 | 23 | from zope.security.proxy import removeSecurityProxy | 23 | from zope.security.proxy import removeSecurityProxy |
2268 | diff --git a/lib/lp/snappy/tests/test_snap.py b/lib/lp/snappy/tests/test_snap.py | |||
2269 | index 7d8d45e..0dae2d5 100644 | |||
2270 | --- a/lib/lp/snappy/tests/test_snap.py | |||
2271 | +++ b/lib/lp/snappy/tests/test_snap.py | |||
2272 | @@ -11,6 +11,7 @@ from datetime import ( | |||
2273 | 11 | import json | 11 | import json |
2274 | 12 | from operator import attrgetter | 12 | from operator import attrgetter |
2275 | 13 | from textwrap import dedent | 13 | from textwrap import dedent |
2276 | 14 | from urllib.parse import urlsplit | ||
2277 | 14 | 15 | ||
2278 | 15 | from fixtures import ( | 16 | from fixtures import ( |
2279 | 16 | FakeLogger, | 17 | FakeLogger, |
2280 | @@ -21,7 +22,6 @@ from nacl.public import PrivateKey | |||
2281 | 21 | from pymacaroons import Macaroon | 22 | from pymacaroons import Macaroon |
2282 | 22 | import pytz | 23 | import pytz |
2283 | 23 | import responses | 24 | import responses |
2284 | 24 | from six.moves.urllib.parse import urlsplit | ||
2285 | 25 | from storm.exceptions import LostObjectError | 25 | from storm.exceptions import LostObjectError |
2286 | 26 | from storm.locals import Store | 26 | from storm.locals import Store |
2287 | 27 | from testtools.matchers import ( | 27 | from testtools.matchers import ( |
2288 | diff --git a/lib/lp/snappy/tests/test_snapbuild.py b/lib/lp/snappy/tests/test_snapbuild.py | |||
2289 | index 0cf70ac..f11a097 100644 | |||
2290 | --- a/lib/lp/snappy/tests/test_snapbuild.py | |||
2291 | +++ b/lib/lp/snappy/tests/test_snapbuild.py | |||
2292 | @@ -7,12 +7,12 @@ from datetime import ( | |||
2293 | 7 | datetime, | 7 | datetime, |
2294 | 8 | timedelta, | 8 | timedelta, |
2295 | 9 | ) | 9 | ) |
2296 | 10 | from urllib.request import urlopen | ||
2297 | 10 | 11 | ||
2298 | 11 | from fixtures import FakeLogger | 12 | from fixtures import FakeLogger |
2299 | 12 | from pymacaroons import Macaroon | 13 | from pymacaroons import Macaroon |
2300 | 13 | import pytz | 14 | import pytz |
2301 | 14 | import six | 15 | import six |
2302 | 15 | from six.moves.urllib.request import urlopen | ||
2303 | 16 | from testtools.matchers import ( | 16 | from testtools.matchers import ( |
2304 | 17 | ContainsDict, | 17 | ContainsDict, |
2305 | 18 | Equals, | 18 | Equals, |
2306 | diff --git a/lib/lp/snappy/tests/test_snapbuildbehaviour.py b/lib/lp/snappy/tests/test_snapbuildbehaviour.py | |||
2307 | index d1836e1..db202cb 100644 | |||
2308 | --- a/lib/lp/snappy/tests/test_snapbuildbehaviour.py | |||
2309 | +++ b/lib/lp/snappy/tests/test_snapbuildbehaviour.py | |||
2310 | @@ -8,13 +8,13 @@ from datetime import datetime | |||
2311 | 8 | import os.path | 8 | import os.path |
2312 | 9 | from textwrap import dedent | 9 | from textwrap import dedent |
2313 | 10 | import time | 10 | import time |
2314 | 11 | from urllib.parse import urlsplit | ||
2315 | 11 | import uuid | 12 | import uuid |
2316 | 12 | 13 | ||
2317 | 13 | from aptsources.sourceslist import SourceEntry | 14 | from aptsources.sourceslist import SourceEntry |
2318 | 14 | import fixtures | 15 | import fixtures |
2319 | 15 | from pymacaroons import Macaroon | 16 | from pymacaroons import Macaroon |
2320 | 16 | import pytz | 17 | import pytz |
2321 | 17 | from six.moves.urllib_parse import urlsplit | ||
2322 | 18 | from testtools import ExpectedException | 18 | from testtools import ExpectedException |
2323 | 19 | from testtools.matchers import ( | 19 | from testtools.matchers import ( |
2324 | 20 | AfterPreprocessing, | 20 | AfterPreprocessing, |
2325 | diff --git a/lib/lp/soyuz/browser/widgets/archive.py b/lib/lp/soyuz/browser/widgets/archive.py | |||
2326 | index 17d0947..73a279f 100644 | |||
2327 | --- a/lib/lp/soyuz/browser/widgets/archive.py | |||
2328 | +++ b/lib/lp/soyuz/browser/widgets/archive.py | |||
2329 | @@ -7,7 +7,7 @@ __all__ = [ | |||
2330 | 7 | 'PPANameWidget', | 7 | 'PPANameWidget', |
2331 | 8 | ] | 8 | ] |
2332 | 9 | 9 | ||
2334 | 10 | from six.moves.urllib.parse import urljoin | 10 | from urllib.parse import urljoin |
2335 | 11 | 11 | ||
2336 | 12 | from lp.app.widgets.textwidgets import URIComponentWidget | 12 | from lp.app.widgets.textwidgets import URIComponentWidget |
2337 | 13 | from lp.services.config import config | 13 | from lp.services.config import config |
2338 | diff --git a/lib/lp/soyuz/interfaces/archive.py b/lib/lp/soyuz/interfaces/archive.py | |||
2339 | index da4b948..e011591 100644 | |||
2340 | --- a/lib/lp/soyuz/interfaces/archive.py | |||
2341 | +++ b/lib/lp/soyuz/interfaces/archive.py | |||
2342 | @@ -54,6 +54,7 @@ __all__ = [ | |||
2343 | 54 | 54 | ||
2344 | 55 | import http.client | 55 | import http.client |
2345 | 56 | import re | 56 | import re |
2346 | 57 | from urllib.parse import urlparse | ||
2347 | 57 | 58 | ||
2348 | 58 | from lazr.restful.declarations import ( | 59 | from lazr.restful.declarations import ( |
2349 | 59 | call_with, | 60 | call_with, |
2350 | @@ -78,7 +79,6 @@ from lazr.restful.fields import ( | |||
2351 | 78 | CollectionField, | 79 | CollectionField, |
2352 | 79 | Reference, | 80 | Reference, |
2353 | 80 | ) | 81 | ) |
2354 | 81 | from six.moves.urllib.parse import urlparse | ||
2355 | 82 | from zope.interface import ( | 82 | from zope.interface import ( |
2356 | 83 | Attribute, | 83 | Attribute, |
2357 | 84 | Interface, | 84 | Interface, |
2358 | diff --git a/lib/lp/soyuz/scripts/ppa_apache_log_parser.py b/lib/lp/soyuz/scripts/ppa_apache_log_parser.py | |||
2359 | index 64bfcd1..c8c1e58 100644 | |||
2360 | --- a/lib/lp/soyuz/scripts/ppa_apache_log_parser.py | |||
2361 | +++ b/lib/lp/soyuz/scripts/ppa_apache_log_parser.py | |||
2362 | @@ -4,8 +4,7 @@ | |||
2363 | 4 | __all__ = ['DBUSER', 'get_ppa_file_key'] | 4 | __all__ = ['DBUSER', 'get_ppa_file_key'] |
2364 | 5 | 5 | ||
2365 | 6 | import os.path | 6 | import os.path |
2368 | 7 | 7 | from urllib.parse import unquote | |
2367 | 8 | from six.moves.urllib.parse import unquote | ||
2369 | 9 | 8 | ||
2370 | 10 | from lp.archiveuploader.utils import re_isadeb | 9 | from lp.archiveuploader.utils import re_isadeb |
2371 | 11 | 10 | ||
2372 | diff --git a/lib/lp/soyuz/tests/test_archive.py b/lib/lp/soyuz/tests/test_archive.py | |||
2373 | index cbc40ac..a02d75d 100644 | |||
2374 | --- a/lib/lp/soyuz/tests/test_archive.py | |||
2375 | +++ b/lib/lp/soyuz/tests/test_archive.py | |||
2376 | @@ -11,11 +11,11 @@ from datetime import ( | |||
2377 | 11 | import doctest | 11 | import doctest |
2378 | 12 | import http.client | 12 | import http.client |
2379 | 13 | import os.path | 13 | import os.path |
2380 | 14 | from urllib.parse import urlsplit | ||
2381 | 14 | 15 | ||
2382 | 15 | from aptsources.sourceslist import SourceEntry | 16 | from aptsources.sourceslist import SourceEntry |
2383 | 16 | from pytz import UTC | 17 | from pytz import UTC |
2384 | 17 | import responses | 18 | import responses |
2385 | 18 | from six.moves.urllib.parse import urlsplit | ||
2386 | 19 | from storm.store import Store | 19 | from storm.store import Store |
2387 | 20 | from testtools.matchers import ( | 20 | from testtools.matchers import ( |
2388 | 21 | AfterPreprocessing, | 21 | AfterPreprocessing, |
2389 | diff --git a/lib/lp/soyuz/tests/test_livefsbuild.py b/lib/lp/soyuz/tests/test_livefsbuild.py | |||
2390 | index d448344..f642bcd 100644 | |||
2391 | --- a/lib/lp/soyuz/tests/test_livefsbuild.py | |||
2392 | +++ b/lib/lp/soyuz/tests/test_livefsbuild.py | |||
2393 | @@ -7,12 +7,12 @@ from datetime import ( | |||
2394 | 7 | datetime, | 7 | datetime, |
2395 | 8 | timedelta, | 8 | timedelta, |
2396 | 9 | ) | 9 | ) |
2397 | 10 | from urllib.parse import urlsplit | ||
2398 | 11 | from urllib.request import urlopen | ||
2399 | 10 | 12 | ||
2400 | 11 | from fixtures import FakeLogger | 13 | from fixtures import FakeLogger |
2401 | 12 | from pymacaroons import Macaroon | 14 | from pymacaroons import Macaroon |
2402 | 13 | import pytz | 15 | import pytz |
2403 | 14 | from six.moves.urllib.parse import urlsplit | ||
2404 | 15 | from six.moves.urllib.request import urlopen | ||
2405 | 16 | from testtools.matchers import ( | 16 | from testtools.matchers import ( |
2406 | 17 | ContainsDict, | 17 | ContainsDict, |
2407 | 18 | Equals, | 18 | Equals, |
2408 | diff --git a/lib/lp/soyuz/tests/test_packageupload.py b/lib/lp/soyuz/tests/test_packageupload.py | |||
2409 | index 24d21ca..3e88b0e 100644 | |||
2410 | --- a/lib/lp/soyuz/tests/test_packageupload.py | |||
2411 | +++ b/lib/lp/soyuz/tests/test_packageupload.py | |||
2412 | @@ -7,13 +7,13 @@ from datetime import timedelta | |||
2413 | 7 | import io | 7 | import io |
2414 | 8 | import os.path | 8 | import os.path |
2415 | 9 | import shutil | 9 | import shutil |
2416 | 10 | from urllib.request import urlopen | ||
2417 | 10 | 11 | ||
2418 | 11 | from debian.deb822 import Changes | 12 | from debian.deb822 import Changes |
2419 | 12 | from lazr.restfulclient.errors import ( | 13 | from lazr.restfulclient.errors import ( |
2420 | 13 | BadRequest, | 14 | BadRequest, |
2421 | 14 | Unauthorized, | 15 | Unauthorized, |
2422 | 15 | ) | 16 | ) |
2423 | 16 | from six.moves.urllib.request import urlopen | ||
2424 | 17 | from testtools.matchers import ( | 17 | from testtools.matchers import ( |
2425 | 18 | Equals, | 18 | Equals, |
2426 | 19 | MatchesListwise, | 19 | MatchesListwise, |
2427 | diff --git a/lib/lp/testing/keyserver/tests/test_harness.py b/lib/lp/testing/keyserver/tests/test_harness.py | |||
2428 | index 18b5ac0..e0727f4 100644 | |||
2429 | --- a/lib/lp/testing/keyserver/tests/test_harness.py | |||
2430 | +++ b/lib/lp/testing/keyserver/tests/test_harness.py | |||
2431 | @@ -1,7 +1,7 @@ | |||
2432 | 1 | # Copyright 2009-2011 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2009-2011 Canonical Ltd. This software is licensed under the |
2433 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
2434 | 3 | 3 | ||
2436 | 4 | from six.moves.urllib.request import urlopen | 4 | from urllib.request import urlopen |
2437 | 5 | 5 | ||
2438 | 6 | from lp.services.config import config | 6 | from lp.services.config import config |
2439 | 7 | from lp.testing import TestCase | 7 | from lp.testing import TestCase |
2440 | diff --git a/lib/lp/testing/layers.py b/lib/lp/testing/layers.py | |||
2441 | index 94c5dcd..6af3146 100644 | |||
2442 | --- a/lib/lp/testing/layers.py | |||
2443 | +++ b/lib/lp/testing/layers.py | |||
2444 | @@ -65,6 +65,12 @@ from unittest import ( | |||
2445 | 65 | TestCase, | 65 | TestCase, |
2446 | 66 | TestResult, | 66 | TestResult, |
2447 | 67 | ) | 67 | ) |
2448 | 68 | from urllib.error import ( | ||
2449 | 69 | HTTPError, | ||
2450 | 70 | URLError, | ||
2451 | 71 | ) | ||
2452 | 72 | from urllib.parse import urlparse | ||
2453 | 73 | from urllib.request import urlopen | ||
2454 | 68 | 74 | ||
2455 | 69 | from fixtures import ( | 75 | from fixtures import ( |
2456 | 70 | Fixture, | 76 | Fixture, |
2457 | @@ -73,12 +79,6 @@ from fixtures import ( | |||
2458 | 73 | import psycopg2 | 79 | import psycopg2 |
2459 | 74 | from requests import Session | 80 | from requests import Session |
2460 | 75 | from requests.adapters import HTTPAdapter | 81 | from requests.adapters import HTTPAdapter |
2461 | 76 | from six.moves.urllib.error import ( | ||
2462 | 77 | HTTPError, | ||
2463 | 78 | URLError, | ||
2464 | 79 | ) | ||
2465 | 80 | from six.moves.urllib.parse import urlparse | ||
2466 | 81 | from six.moves.urllib.request import urlopen | ||
2467 | 82 | from storm.uri import URI | 82 | from storm.uri import URI |
2468 | 83 | from talisker.context import Context | 83 | from talisker.context import Context |
2469 | 84 | import transaction | 84 | import transaction |
2470 | diff --git a/lib/lp/testing/pages.py b/lib/lp/testing/pages.py | |||
2471 | index 0772e0c..c706ab8 100644 | |||
2472 | --- a/lib/lp/testing/pages.py | |||
2473 | +++ b/lib/lp/testing/pages.py | |||
2474 | @@ -11,6 +11,7 @@ from itertools import chain | |||
2475 | 11 | import os | 11 | import os |
2476 | 12 | import re | 12 | import re |
2477 | 13 | import unittest | 13 | import unittest |
2478 | 14 | from urllib.parse import urljoin | ||
2479 | 14 | 15 | ||
2480 | 15 | from bs4.element import ( | 16 | from bs4.element import ( |
2481 | 16 | CData, | 17 | CData, |
2482 | @@ -25,7 +26,6 @@ from bs4.element import ( | |||
2483 | 25 | from lazr.restful.testing.webservice import WebServiceCaller | 26 | from lazr.restful.testing.webservice import WebServiceCaller |
2484 | 26 | from oauthlib import oauth1 | 27 | from oauthlib import oauth1 |
2485 | 27 | import six | 28 | import six |
2486 | 28 | from six.moves.urllib.parse import urljoin | ||
2487 | 29 | from soupsieve import escape as css_escape | 29 | from soupsieve import escape as css_escape |
2488 | 30 | import transaction | 30 | import transaction |
2489 | 31 | from webtest import TestRequest | 31 | from webtest import TestRequest |
2490 | diff --git a/lib/lp/testing/publication.py b/lib/lp/testing/publication.py | |||
2491 | index 74b350f..a0f6d55 100644 | |||
2492 | --- a/lib/lp/testing/publication.py | |||
2493 | +++ b/lib/lp/testing/publication.py | |||
2494 | @@ -10,11 +10,11 @@ __all__ = [ | |||
2495 | 10 | ] | 10 | ] |
2496 | 11 | 11 | ||
2497 | 12 | import io | 12 | import io |
2500 | 13 | 13 | from urllib.parse import ( | |
2499 | 14 | from six.moves.urllib_parse import ( | ||
2501 | 15 | unquote, | 14 | unquote, |
2502 | 16 | urljoin, | 15 | urljoin, |
2503 | 17 | ) | 16 | ) |
2504 | 17 | |||
2505 | 18 | from zope.app.publication.requestpublicationregistry import factoryRegistry | 18 | from zope.app.publication.requestpublicationregistry import factoryRegistry |
2506 | 19 | from zope.authentication.interfaces import IUnauthenticatedPrincipal | 19 | from zope.authentication.interfaces import IUnauthenticatedPrincipal |
2507 | 20 | from zope.component import ( | 20 | from zope.component import ( |
2508 | diff --git a/lib/lp/testing/tests/test_layers_functional.py b/lib/lp/testing/tests/test_layers_functional.py | |||
2509 | index 212701a..0a665dc 100644 | |||
2510 | --- a/lib/lp/testing/tests/test_layers_functional.py | |||
2511 | +++ b/lib/lp/testing/tests/test_layers_functional.py | |||
2512 | @@ -10,6 +10,8 @@ to confirm that the environment hasn't been corrupted by tests | |||
2513 | 10 | import io | 10 | import io |
2514 | 11 | import os | 11 | import os |
2515 | 12 | import signal | 12 | import signal |
2516 | 13 | from urllib.error import HTTPError | ||
2517 | 14 | from urllib.request import urlopen | ||
2518 | 13 | 15 | ||
2519 | 14 | import amqp | 16 | import amqp |
2520 | 15 | from fixtures import ( | 17 | from fixtures import ( |
2521 | @@ -18,8 +20,6 @@ from fixtures import ( | |||
2522 | 18 | TestWithFixtures, | 20 | TestWithFixtures, |
2523 | 19 | ) | 21 | ) |
2524 | 20 | import six | 22 | import six |
2525 | 21 | from six.moves.urllib.error import HTTPError | ||
2526 | 22 | from six.moves.urllib.request import urlopen | ||
2527 | 23 | from zope.component import getUtility | 23 | from zope.component import getUtility |
2528 | 24 | from zope.interface.interfaces import ComponentLookupError | 24 | from zope.interface.interfaces import ComponentLookupError |
2529 | 25 | 25 | ||
2530 | diff --git a/lib/lp/testing/tests/test_publication.py b/lib/lp/testing/tests/test_publication.py | |||
2531 | index 606ae31..a748c39 100644 | |||
2532 | --- a/lib/lp/testing/tests/test_publication.py | |||
2533 | +++ b/lib/lp/testing/tests/test_publication.py | |||
2534 | @@ -3,9 +3,10 @@ | |||
2535 | 3 | 3 | ||
2536 | 4 | """Tests for the helpers in `lp.testing.publication`.""" | 4 | """Tests for the helpers in `lp.testing.publication`.""" |
2537 | 5 | 5 | ||
2538 | 6 | from urllib.parse import quote | ||
2539 | 7 | |||
2540 | 6 | from lazr.restful import EntryResource | 8 | from lazr.restful import EntryResource |
2541 | 7 | from lazr.restful.utils import get_current_browser_request | 9 | from lazr.restful.utils import get_current_browser_request |
2542 | 8 | from six.moves.urllib_parse import quote | ||
2543 | 9 | from zope.browserpage.simpleviewclass import simple | 10 | from zope.browserpage.simpleviewclass import simple |
2544 | 10 | from zope.component import ( | 11 | from zope.component import ( |
2545 | 11 | getSiteManager, | 12 | getSiteManager, |
2546 | diff --git a/lib/lp/testopenid/stories/basics.txt b/lib/lp/testopenid/stories/basics.txt | |||
2547 | index 380bb7d..0543953 100644 | |||
2548 | --- a/lib/lp/testopenid/stories/basics.txt | |||
2549 | +++ b/lib/lp/testopenid/stories/basics.txt | |||
2550 | @@ -29,7 +29,7 @@ After determining the URL of the OpenID server, the next thing a consumer | |||
2551 | 29 | needs to do is associate with the server and get a shared secret via a | 29 | needs to do is associate with the server and get a shared secret via a |
2552 | 30 | POST request. | 30 | POST request. |
2553 | 31 | 31 | ||
2555 | 32 | >>> from six.moves.urllib.parse import urlencode | 32 | >>> from urllib.parse import urlencode |
2556 | 33 | >>> anon_browser.open( | 33 | >>> anon_browser.open( |
2557 | 34 | ... 'http://testopenid.test/+openid', data=urlencode({ | 34 | ... 'http://testopenid.test/+openid', data=urlencode({ |
2558 | 35 | ... 'openid.mode': 'associate', | 35 | ... 'openid.mode': 'associate', |
2559 | diff --git a/lib/lp/testopenid/testing/helpers.py b/lib/lp/testopenid/testing/helpers.py | |||
2560 | index 4d189e4..bcbe038 100644 | |||
2561 | --- a/lib/lp/testopenid/testing/helpers.py | |||
2562 | +++ b/lib/lp/testopenid/testing/helpers.py | |||
2563 | @@ -11,13 +11,13 @@ __all__ = [ | |||
2564 | 11 | ] | 11 | ] |
2565 | 12 | 12 | ||
2566 | 13 | import io | 13 | import io |
2567 | 14 | from urllib.error import HTTPError | ||
2568 | 14 | 15 | ||
2569 | 15 | from openid import fetchers | 16 | from openid import fetchers |
2570 | 16 | from openid.consumer.discover import ( | 17 | from openid.consumer.discover import ( |
2571 | 17 | OPENID_IDP_2_0_TYPE, | 18 | OPENID_IDP_2_0_TYPE, |
2572 | 18 | OpenIDServiceEndpoint, | 19 | OpenIDServiceEndpoint, |
2573 | 19 | ) | 20 | ) |
2574 | 20 | from six.moves.urllib.error import HTTPError | ||
2575 | 21 | from zope.testbrowser.wsgi import Browser | 21 | from zope.testbrowser.wsgi import Browser |
2576 | 22 | 22 | ||
2577 | 23 | from lp.services.encoding import wsgi_native_string | 23 | from lp.services.encoding import wsgi_native_string |
2578 | diff --git a/lib/lp/translations/browser/person.py b/lib/lp/translations/browser/person.py | |||
2579 | index 2dd8d81..ec90dde 100644 | |||
2580 | --- a/lib/lp/translations/browser/person.py | |||
2581 | +++ b/lib/lp/translations/browser/person.py | |||
2582 | @@ -14,9 +14,9 @@ from datetime import ( | |||
2583 | 14 | timedelta, | 14 | timedelta, |
2584 | 15 | ) | 15 | ) |
2585 | 16 | from itertools import islice | 16 | from itertools import islice |
2586 | 17 | from urllib.parse import urlencode | ||
2587 | 17 | 18 | ||
2588 | 18 | import pytz | 19 | import pytz |
2589 | 19 | from six.moves.urllib.parse import urlencode | ||
2590 | 20 | from zope.browserpage import ViewPageTemplateFile | 20 | from zope.browserpage import ViewPageTemplateFile |
2591 | 21 | from zope.component import getUtility | 21 | from zope.component import getUtility |
2592 | 22 | from zope.formlib.widget import CustomWidgetFactory | 22 | from zope.formlib.widget import CustomWidgetFactory |
2593 | diff --git a/lib/lp/translations/browser/pofile.py b/lib/lp/translations/browser/pofile.py | |||
2594 | index 1e85b3e..e636631 100644 | |||
2595 | --- a/lib/lp/translations/browser/pofile.py | |||
2596 | +++ b/lib/lp/translations/browser/pofile.py | |||
2597 | @@ -15,10 +15,10 @@ __all__ = [ | |||
2598 | 15 | 15 | ||
2599 | 16 | import os.path | 16 | import os.path |
2600 | 17 | import re | 17 | import re |
2601 | 18 | from urllib.parse import urlencode | ||
2602 | 18 | 19 | ||
2603 | 19 | from lazr.restful.utils import smartquote | 20 | from lazr.restful.utils import smartquote |
2604 | 20 | import six | 21 | import six |
2605 | 21 | from six.moves.urllib.parse import urlencode | ||
2606 | 22 | from zope.component import getUtility | 22 | from zope.component import getUtility |
2607 | 23 | from zope.publisher.browser import FileUpload | 23 | from zope.publisher.browser import FileUpload |
2608 | 24 | 24 | ||
2609 | diff --git a/lib/lp/translations/browser/tests/test_persontranslationview.py b/lib/lp/translations/browser/tests/test_persontranslationview.py | |||
2610 | index e3c1251..aa0d873 100644 | |||
2611 | --- a/lib/lp/translations/browser/tests/test_persontranslationview.py | |||
2612 | +++ b/lib/lp/translations/browser/tests/test_persontranslationview.py | |||
2613 | @@ -1,7 +1,8 @@ | |||
2614 | 1 | # Copyright 2009-2018 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2009-2018 Canonical Ltd. This software is licensed under the |
2615 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
2616 | 3 | 3 | ||
2618 | 4 | from six.moves.urllib.parse import urlencode | 4 | from urllib.parse import urlencode |
2619 | 5 | |||
2620 | 5 | from zope.security.proxy import removeSecurityProxy | 6 | from zope.security.proxy import removeSecurityProxy |
2621 | 6 | 7 | ||
2622 | 7 | from lp.app.enums import ServiceUsage | 8 | from lp.app.enums import ServiceUsage |
2623 | diff --git a/lib/lp/translations/browser/translationmessage.py b/lib/lp/translations/browser/translationmessage.py | |||
2624 | index 4f904d9..105ad46 100644 | |||
2625 | --- a/lib/lp/translations/browser/translationmessage.py | |||
2626 | +++ b/lib/lp/translations/browser/translationmessage.py | |||
2627 | @@ -19,12 +19,12 @@ __all__ = [ | |||
2628 | 19 | import datetime | 19 | import datetime |
2629 | 20 | import operator | 20 | import operator |
2630 | 21 | import re | 21 | import re |
2634 | 22 | 22 | from urllib.parse import ( | |
2632 | 23 | import pytz | ||
2633 | 24 | from six.moves.urllib.parse import ( | ||
2635 | 25 | parse_qsl, | 23 | parse_qsl, |
2636 | 26 | urlencode, | 24 | urlencode, |
2637 | 27 | ) | 25 | ) |
2638 | 26 | |||
2639 | 27 | import pytz | ||
2640 | 28 | from zope import datetime as zope_datetime | 28 | from zope import datetime as zope_datetime |
2641 | 29 | from zope.browserpage import ViewPageTemplateFile | 29 | from zope.browserpage import ViewPageTemplateFile |
2642 | 30 | from zope.component import getUtility | 30 | from zope.component import getUtility |
2643 | diff --git a/lib/lp/translations/doc/poexport-request-productseries.txt b/lib/lp/translations/doc/poexport-request-productseries.txt | |||
2644 | index a762411..45aa763 100644 | |||
2645 | --- a/lib/lp/translations/doc/poexport-request-productseries.txt | |||
2646 | +++ b/lib/lp/translations/doc/poexport-request-productseries.txt | |||
2647 | @@ -84,7 +84,7 @@ The email contains a URL linking to where the exported file can be downloaded. | |||
2648 | 84 | 84 | ||
2649 | 85 | Let's download it and make sure the contents look ok. | 85 | Let's download it and make sure the contents look ok. |
2650 | 86 | 86 | ||
2652 | 87 | >>> from six.moves.urllib.request import urlopen | 87 | >>> from urllib.request import urlopen |
2653 | 88 | >>> from lp.services.helpers import bytes_to_tarfile | 88 | >>> from lp.services.helpers import bytes_to_tarfile |
2654 | 89 | >>> tarball = bytes_to_tarfile(urlopen(url).read()) | 89 | >>> tarball = bytes_to_tarfile(urlopen(url).read()) |
2655 | 90 | >>> for name in sorted(tarball.getnames()): | 90 | >>> for name in sorted(tarball.getnames()): |
2656 | diff --git a/lib/lp/translations/doc/poexport-request.txt b/lib/lp/translations/doc/poexport-request.txt | |||
2657 | index 18d685d..5aee787 100644 | |||
2658 | --- a/lib/lp/translations/doc/poexport-request.txt | |||
2659 | +++ b/lib/lp/translations/doc/poexport-request.txt | |||
2660 | @@ -85,7 +85,7 @@ The email contains a URL linking to where the exported file can be downloaded. | |||
2661 | 85 | 85 | ||
2662 | 86 | Let's download it and make sure the contents look ok. | 86 | Let's download it and make sure the contents look ok. |
2663 | 87 | 87 | ||
2665 | 88 | >>> from six.moves.urllib.request import urlopen | 88 | >>> from urllib.request import urlopen |
2666 | 89 | >>> from lp.services.helpers import bytes_to_tarfile | 89 | >>> from lp.services.helpers import bytes_to_tarfile |
2667 | 90 | >>> tarball = bytes_to_tarfile(urlopen(url).read()) | 90 | >>> tarball = bytes_to_tarfile(urlopen(url).read()) |
2668 | 91 | >>> for name in sorted(tarball.getnames()): | 91 | >>> for name in sorted(tarball.getnames()): |
2669 | diff --git a/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt b/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt | |||
2670 | index 0dcbd93..2279d03 100644 | |||
2671 | --- a/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt | |||
2672 | +++ b/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt | |||
2673 | @@ -209,7 +209,7 @@ There is an option to remove entries from the queue. | |||
2674 | 209 | 209 | ||
2675 | 210 | No Privileges Person tries to remove entries but to no effect. | 210 | No Privileges Person tries to remove entries but to no effect. |
2676 | 211 | 211 | ||
2678 | 212 | >>> from six.moves.urllib.parse import urlencode | 212 | >>> from urllib.parse import urlencode |
2679 | 213 | >>> post_data = urlencode( | 213 | >>> post_data = urlencode( |
2680 | 214 | ... { | 214 | ... { |
2681 | 215 | ... 'field.filter_target': 'all', | 215 | ... 'field.filter_target': 'all', |
2682 | diff --git a/utilities/paste b/utilities/paste | |||
2683 | index 2787a3a..fa461f0 100755 | |||
2684 | --- a/utilities/paste | |||
2685 | +++ b/utilities/paste | |||
2686 | @@ -9,11 +9,11 @@ from optparse import OptionParser | |||
2687 | 9 | import os | 9 | import os |
2688 | 10 | import pwd | 10 | import pwd |
2689 | 11 | import sys | 11 | import sys |
2690 | 12 | from urllib.parse import urljoin | ||
2691 | 12 | import webbrowser | 13 | import webbrowser |
2692 | 13 | 14 | ||
2693 | 14 | from fixtures import MonkeyPatch | 15 | from fixtures import MonkeyPatch |
2694 | 15 | from six.moves.http_cookiejar import Cookie | 16 | from six.moves.http_cookiejar import Cookie |
2695 | 16 | from six.moves.urllib.parse import urljoin | ||
2696 | 17 | from zope.testbrowser.browser import Browser | 17 | from zope.testbrowser.browser import Browser |
2697 | 18 | 18 | ||
2698 | 19 | 19 | ||
2699 | @@ -118,8 +118,7 @@ def main(): | |||
2700 | 118 | # Remove the check for robots.txt, since the one on | 118 | # Remove the check for robots.txt, since the one on |
2701 | 119 | # pastebin.ubuntu.com doesn't allow us to open the page. We're not | 119 | # pastebin.ubuntu.com doesn't allow us to open the page. We're not |
2702 | 120 | # really a robot. | 120 | # really a robot. |
2705 | 121 | with MonkeyPatch( | 121 | with MonkeyPatch('urllib.robotparser.RobotFileParser.allow_all', True): |
2704 | 122 | 'six.moves.urllib.robotparser.RobotFileParser.allow_all', True): | ||
2706 | 123 | browser.open(urljoin('https://' + paste_host, PASTE_PATH)) | 122 | browser.open(urljoin('https://' + paste_host, PASTE_PATH)) |
2707 | 124 | 123 | ||
2708 | 125 | if parser.options.private: | 124 | if parser.options.private: |
2709 | diff --git a/utilities/roundup-sniffer.py b/utilities/roundup-sniffer.py | |||
2710 | index 5fbfb26..16bebbe 100755 | |||
2711 | --- a/utilities/roundup-sniffer.py | |||
2712 | +++ b/utilities/roundup-sniffer.py | |||
2713 | @@ -44,9 +44,8 @@ from os.path import ( | |||
2714 | 44 | from pprint import pprint | 44 | from pprint import pprint |
2715 | 45 | import sys | 45 | import sys |
2716 | 46 | from time import sleep | 46 | from time import sleep |
2720 | 47 | 47 | from urllib.parse import urlencode | |
2721 | 48 | from six.moves.urllib.parse import urlencode | 48 | from urllib.request import urlopen |
2719 | 49 | from six.moves.urllib.request import urlopen | ||
2722 | 50 | 49 | ||
2723 | 51 | from lp.services.beautifulsoup import BeautifulSoup | 50 | from lp.services.beautifulsoup import BeautifulSoup |
2724 | 52 | 51 |
LGTM 👍. I have left one minor suggestion.