Merge ~cjwatson/launchpad:py3only-scandir into launchpad:master
- Git
- lp:~cjwatson/launchpad
- py3only-scandir
- Merge into master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | bd40ffed732d70beeb73eee14afc67a1bd14fc44 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:py3only-scandir |
Merge into: | launchpad:master |
Diff against target: |
942 lines (+50/-99) 41 files modified
configs/development/gunicorn.conf.py (+1/-3) lib/lp/archivepublisher/customupload.py (+2/-3) lib/lp/archivepublisher/model/ftparchive.py (+1/-2) lib/lp/archivepublisher/publishing.py (+4/-5) lib/lp/archivepublisher/scripts/publish_ftpmaster.py (+1/-2) lib/lp/archivepublisher/signing.py (+1/-2) lib/lp/archivepublisher/tests/test_publisher.py (+1/-2) lib/lp/archivepublisher/tests/test_signing.py (+1/-2) lib/lp/archiveuploader/charmrecipeupload.py (+1/-2) lib/lp/archiveuploader/dscfile.py (+1/-2) lib/lp/archiveuploader/livefsupload.py (+1/-2) lib/lp/archiveuploader/ocirecipeupload.py (+1/-2) lib/lp/archiveuploader/snapupload.py (+1/-2) lib/lp/archiveuploader/uploadprocessor.py (+2/-3) lib/lp/bugs/tests/test_doc.py (+1/-3) lib/lp/registry/model/codeofconduct.py (+1/-2) lib/lp/registry/scripts/productreleasefinder/walker.py (+4/-4) lib/lp/scripts/utilities/js/jsbuild.py (+3/-4) lib/lp/services/config/fixture.py (+1/-2) lib/lp/services/config/tests/test_config.py (+1/-2) lib/lp/services/librarianserver/librariangc.py (+2/-3) lib/lp/services/librarianserver/swift.py (+1/-3) lib/lp/services/mail/mailbox.py (+1/-2) lib/lp/services/scripts/tests/__init__.py (+1/-3) lib/lp/services/testing/__init__.py (+1/-3) lib/lp/services/webservice/tests/test_wadllib.py (+1/-2) lib/lp/soyuz/doc/soyuz-set-of-uploads.txt (+1/-3) lib/lp/soyuz/doc/soyuz-upload.txt (+1/-2) lib/lp/soyuz/scripts/gina/packages.py (+1/-2) lib/lp/soyuz/tests/fakepackager.py (+1/-2) lib/lp/soyuz/tests/test_doc.py (+1/-2) lib/lp/soyuz/tests/test_publishing.py (+1/-2) lib/lp/testing/__init__.py (+1/-2) lib/lp/testing/gpgkeys/__init__.py (+1/-2) lib/lp/testing/yuixhr.py (+1/-2) lib/lp/testopenid/stories/tests.py (+1/-3) lib/lp/tests/test_opensource.py (+1/-2) lib/lp/translations/tests/test_doc.py (+1/-3) requirements/launchpad.txt (+0/-1) scripts/migrate-librarian-content-md5.py (+1/-3) setup.py (+0/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cristian Gonzalez (community) | Approve | ||
Review via email: mp+407246@code.launchpad.net |
Commit message
Use os.scandir and os.walk directly
Description of the change
The separate `scandir` module was a backport of the same code to Python versions earlier than 3.5, and is no longer needed.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/configs/development/gunicorn.conf.py b/configs/development/gunicorn.conf.py | |||
2 | index 0576e0d..2c914aa 100644 | |||
3 | --- a/configs/development/gunicorn.conf.py | |||
4 | +++ b/configs/development/gunicorn.conf.py | |||
5 | @@ -1,8 +1,6 @@ | |||
6 | 1 | from fnmatch import fnmatch | 1 | from fnmatch import fnmatch |
7 | 2 | import os | 2 | import os |
8 | 3 | 3 | ||
9 | 4 | import scandir | ||
10 | 5 | |||
11 | 6 | 4 | ||
12 | 7 | BASE_DIR = os.path.realpath( | 5 | BASE_DIR = os.path.realpath( |
13 | 8 | os.path.join(os.path.dirname(__file__), '..', '..')) | 6 | os.path.join(os.path.dirname(__file__), '..', '..')) |
14 | @@ -13,7 +11,7 @@ def find_files(directory, pattern): | |||
15 | 13 | """Find files in `directory` matching `pattern`. | 11 | """Find files in `directory` matching `pattern`. |
16 | 14 | """ | 12 | """ |
17 | 15 | result = [] | 13 | result = [] |
19 | 16 | for root, dirs, files in scandir.walk(directory): | 14 | for root, dirs, files in os.walk(directory): |
20 | 17 | for basename in files: | 15 | for basename in files: |
21 | 18 | matches = fnmatch(basename, pattern) | 16 | matches = fnmatch(basename, pattern) |
22 | 19 | if matches: | 17 | if matches: |
23 | diff --git a/lib/lp/archivepublisher/customupload.py b/lib/lp/archivepublisher/customupload.py | |||
24 | index 741211a..42dfea3 100644 | |||
25 | --- a/lib/lp/archivepublisher/customupload.py | |||
26 | +++ b/lib/lp/archivepublisher/customupload.py | |||
27 | @@ -20,7 +20,6 @@ import shutil | |||
28 | 20 | import tarfile | 20 | import tarfile |
29 | 21 | import tempfile | 21 | import tempfile |
30 | 22 | 22 | ||
31 | 23 | import scandir | ||
32 | 24 | from zope.interface import implementer | 23 | from zope.interface import implementer |
33 | 25 | 24 | ||
34 | 26 | from lp.archivepublisher.debversion import ( | 25 | from lp.archivepublisher.debversion import ( |
35 | @@ -290,7 +289,7 @@ class CustomUpload: | |||
36 | 290 | """Install the files from the custom upload to the archive.""" | 289 | """Install the files from the custom upload to the archive.""" |
37 | 291 | assert self.tmpdir is not None, "Must extract tarfile first" | 290 | assert self.tmpdir is not None, "Must extract tarfile first" |
38 | 292 | extracted = False | 291 | extracted = False |
40 | 293 | for dirpath, dirnames, filenames in scandir.walk(self.tmpdir): | 292 | for dirpath, dirnames, filenames in os.walk(self.tmpdir): |
41 | 294 | 293 | ||
42 | 295 | # Create symbolic links to directories. | 294 | # Create symbolic links to directories. |
43 | 296 | for dirname in dirnames: | 295 | for dirname in dirnames: |
44 | @@ -359,7 +358,7 @@ class CustomUpload: | |||
45 | 359 | # now present in the target. Deliberately skip 'broken' versions | 358 | # now present in the target. Deliberately skip 'broken' versions |
46 | 360 | # because they can't be sorted anyway. | 359 | # because they can't be sorted anyway. |
47 | 361 | versions = [] | 360 | versions = [] |
49 | 362 | for entry in scandir.scandir(self.targetdir): | 361 | for entry in os.scandir(self.targetdir): |
50 | 363 | # Skip the symlink. | 362 | # Skip the symlink. |
51 | 364 | if entry.name == 'current': | 363 | if entry.name == 'current': |
52 | 365 | continue | 364 | continue |
53 | diff --git a/lib/lp/archivepublisher/model/ftparchive.py b/lib/lp/archivepublisher/model/ftparchive.py | |||
54 | index 624aebf..d56b881 100644 | |||
55 | --- a/lib/lp/archivepublisher/model/ftparchive.py | |||
56 | +++ b/lib/lp/archivepublisher/model/ftparchive.py | |||
57 | @@ -6,7 +6,6 @@ import os | |||
58 | 6 | import re | 6 | import re |
59 | 7 | import time | 7 | import time |
60 | 8 | 8 | ||
61 | 9 | import scandir | ||
62 | 10 | import six | 9 | import six |
63 | 11 | from storm.expr import ( | 10 | from storm.expr import ( |
64 | 12 | Desc, | 11 | Desc, |
65 | @@ -61,7 +60,7 @@ def make_clean_dir(path, clean_pattern=".*"): | |||
66 | 61 | If omitted, all files are removed. | 60 | If omitted, all files are removed. |
67 | 62 | """ | 61 | """ |
68 | 63 | if os.path.isdir(path): | 62 | if os.path.isdir(path): |
70 | 64 | for entry in list(scandir.scandir(path)): | 63 | for entry in list(os.scandir(path)): |
71 | 65 | if (entry.name == "by-hash" or | 64 | if (entry.name == "by-hash" or |
72 | 66 | not re.match(clean_pattern, entry.name)): | 65 | not re.match(clean_pattern, entry.name)): |
73 | 67 | # Ignore existing by-hash directories; they will be cleaned | 66 | # Ignore existing by-hash directories; they will be cleaned |
74 | diff --git a/lib/lp/archivepublisher/publishing.py b/lib/lp/archivepublisher/publishing.py | |||
75 | index 0975176..daea42c 100644 | |||
76 | --- a/lib/lp/archivepublisher/publishing.py | |||
77 | +++ b/lib/lp/archivepublisher/publishing.py | |||
78 | @@ -36,7 +36,6 @@ from debian.deb822 import ( | |||
79 | 36 | _multivalued, | 36 | _multivalued, |
80 | 37 | Release, | 37 | Release, |
81 | 38 | ) | 38 | ) |
82 | 39 | import scandir | ||
83 | 40 | import six | 39 | import six |
84 | 41 | from storm.expr import Desc | 40 | from storm.expr import Desc |
85 | 42 | from zope.component import getUtility | 41 | from zope.component import getUtility |
86 | @@ -358,7 +357,7 @@ class ByHash: | |||
87 | 358 | hash_path = os.path.join(self.path, archive_hash.apt_name) | 357 | hash_path = os.path.join(self.path, archive_hash.apt_name) |
88 | 359 | if os.path.exists(hash_path): | 358 | if os.path.exists(hash_path): |
89 | 360 | prune_hash_directory = True | 359 | prune_hash_directory = True |
91 | 361 | for entry in list(scandir.scandir(hash_path)): | 360 | for entry in list(os.scandir(hash_path)): |
92 | 362 | if entry.name not in self.known_digests[ | 361 | if entry.name not in self.known_digests[ |
93 | 363 | archive_hash.apt_name]: | 362 | archive_hash.apt_name]: |
94 | 364 | self.log.debug( | 363 | self.log.debug( |
95 | @@ -1189,7 +1188,7 @@ class Publisher(object): | |||
96 | 1189 | distroseries, pocket, component, core_files) | 1188 | distroseries, pocket, component, core_files) |
97 | 1190 | dep11_dir = os.path.join(suite_dir, component, "dep11") | 1189 | dep11_dir = os.path.join(suite_dir, component, "dep11") |
98 | 1191 | try: | 1190 | try: |
100 | 1192 | for entry in scandir.scandir(dep11_dir): | 1191 | for entry in os.scandir(dep11_dir): |
101 | 1193 | if (entry.name.startswith("Components-") or | 1192 | if (entry.name.startswith("Components-") or |
102 | 1194 | entry.name.startswith("icons-")): | 1193 | entry.name.startswith("icons-")): |
103 | 1195 | dep11_path = os.path.join( | 1194 | dep11_path = os.path.join( |
104 | @@ -1355,7 +1354,7 @@ class Publisher(object): | |||
105 | 1355 | i18n_dir = os.path.join(self._config.distsroot, suite, i18n_subpath) | 1354 | i18n_dir = os.path.join(self._config.distsroot, suite, i18n_subpath) |
106 | 1356 | i18n_files = set() | 1355 | i18n_files = set() |
107 | 1357 | try: | 1356 | try: |
109 | 1358 | for entry in scandir.scandir(i18n_dir): | 1357 | for entry in os.scandir(i18n_dir): |
110 | 1359 | if not entry.name.startswith('Translation-'): | 1358 | if not entry.name.startswith('Translation-'): |
111 | 1360 | continue | 1359 | continue |
112 | 1361 | i18n_files.add(remove_suffix(entry.name)) | 1360 | i18n_files.add(remove_suffix(entry.name)) |
113 | @@ -1556,7 +1555,7 @@ class DirectoryHash: | |||
114 | 1556 | 1555 | ||
115 | 1557 | def add_dir(self, path): | 1556 | def add_dir(self, path): |
116 | 1558 | """Recursively add a directory path to be checksummed.""" | 1557 | """Recursively add a directory path to be checksummed.""" |
118 | 1559 | for dirpath, dirnames, filenames in scandir.walk(path): | 1558 | for dirpath, dirnames, filenames in os.walk(path): |
119 | 1560 | for filename in filenames: | 1559 | for filename in filenames: |
120 | 1561 | self.add(os.path.join(dirpath, filename)) | 1560 | self.add(os.path.join(dirpath, filename)) |
121 | 1562 | 1561 | ||
122 | diff --git a/lib/lp/archivepublisher/scripts/publish_ftpmaster.py b/lib/lp/archivepublisher/scripts/publish_ftpmaster.py | |||
123 | index 5326141..25c7a21 100644 | |||
124 | --- a/lib/lp/archivepublisher/scripts/publish_ftpmaster.py | |||
125 | +++ b/lib/lp/archivepublisher/scripts/publish_ftpmaster.py | |||
126 | @@ -14,7 +14,6 @@ import os | |||
127 | 14 | import shutil | 14 | import shutil |
128 | 15 | 15 | ||
129 | 16 | from pytz import utc | 16 | from pytz import utc |
130 | 17 | import scandir | ||
131 | 18 | import six | 17 | import six |
132 | 19 | from zope.component import getUtility | 18 | from zope.component import getUtility |
133 | 20 | 19 | ||
134 | @@ -471,7 +470,7 @@ class PublishFTPMaster(LaunchpadCronScript): | |||
135 | 471 | backup_top = os.path.join(get_backup_dists(archive_config), suite) | 470 | backup_top = os.path.join(get_backup_dists(archive_config), suite) |
136 | 472 | staging_top = os.path.join(archive_config.stagingroot, suite) | 471 | staging_top = os.path.join(archive_config.stagingroot, suite) |
137 | 473 | updated = False | 472 | updated = False |
139 | 474 | for staging_dir, _, filenames in scandir.walk(staging_top): | 473 | for staging_dir, _, filenames in os.walk(staging_top): |
140 | 475 | rel_dir = os.path.relpath(staging_dir, staging_top) | 474 | rel_dir = os.path.relpath(staging_dir, staging_top) |
141 | 476 | backup_dir = os.path.join(backup_top, rel_dir) | 475 | backup_dir = os.path.join(backup_top, rel_dir) |
142 | 477 | for filename in filenames: | 476 | for filename in filenames: |
143 | diff --git a/lib/lp/archivepublisher/signing.py b/lib/lp/archivepublisher/signing.py | |||
144 | index ec61b95..2a2f08d 100644 | |||
145 | --- a/lib/lp/archivepublisher/signing.py | |||
146 | +++ b/lib/lp/archivepublisher/signing.py | |||
147 | @@ -27,7 +27,6 @@ import tempfile | |||
148 | 27 | import textwrap | 27 | import textwrap |
149 | 28 | 28 | ||
150 | 29 | from pytz import utc | 29 | from pytz import utc |
151 | 30 | import scandir | ||
152 | 31 | from zope.component import getUtility | 30 | from zope.component import getUtility |
153 | 32 | 31 | ||
154 | 33 | from lp.archivepublisher.config import getPubConfig | 32 | from lp.archivepublisher.config import getPubConfig |
155 | @@ -282,7 +281,7 @@ class SigningUpload(CustomUpload): | |||
156 | 282 | SigningKeyType.FIT: self.signFit, | 281 | SigningKeyType.FIT: self.signFit, |
157 | 283 | } | 282 | } |
158 | 284 | 283 | ||
160 | 285 | for dirpath, dirnames, filenames in scandir.walk(self.tmpdir): | 284 | for dirpath, dirnames, filenames in os.walk(self.tmpdir): |
161 | 286 | for filename in filenames: | 285 | for filename in filenames: |
162 | 287 | file_path = os.path.join(dirpath, filename) | 286 | file_path = os.path.join(dirpath, filename) |
163 | 288 | if filename.endswith(".efi"): | 287 | if filename.endswith(".efi"): |
164 | diff --git a/lib/lp/archivepublisher/tests/test_publisher.py b/lib/lp/archivepublisher/tests/test_publisher.py | |||
165 | index f2c62cf..9000e9d 100644 | |||
166 | --- a/lib/lp/archivepublisher/tests/test_publisher.py | |||
167 | +++ b/lib/lp/archivepublisher/tests/test_publisher.py | |||
168 | @@ -32,7 +32,6 @@ from unittest import mock | |||
169 | 32 | from debian.deb822 import Release | 32 | from debian.deb822 import Release |
170 | 33 | from fixtures import MonkeyPatch | 33 | from fixtures import MonkeyPatch |
171 | 34 | import pytz | 34 | import pytz |
172 | 35 | import scandir | ||
173 | 36 | import six | 35 | import six |
174 | 37 | from testscenarios import ( | 36 | from testscenarios import ( |
175 | 38 | load_tests_apply_scenarios, | 37 | load_tests_apply_scenarios, |
176 | @@ -512,7 +511,7 @@ class ByHashesHaveContents(Matcher): | |||
177 | 512 | 511 | ||
178 | 513 | def match(self, root): | 512 | def match(self, root): |
179 | 514 | children = set() | 513 | children = set() |
181 | 515 | for dirpath, dirnames, _ in scandir.walk(root): | 514 | for dirpath, dirnames, _ in os.walk(root): |
182 | 516 | if "by-hash" in dirnames: | 515 | if "by-hash" in dirnames: |
183 | 517 | children.add(os.path.relpath(dirpath, root)) | 516 | children.add(os.path.relpath(dirpath, root)) |
184 | 518 | mismatch = MatchesSetwise( | 517 | mismatch = MatchesSetwise( |
185 | diff --git a/lib/lp/archivepublisher/tests/test_signing.py b/lib/lp/archivepublisher/tests/test_signing.py | |||
186 | index 95e314a..20ba90e 100644 | |||
187 | --- a/lib/lp/archivepublisher/tests/test_signing.py | |||
188 | +++ b/lib/lp/archivepublisher/tests/test_signing.py | |||
189 | @@ -18,7 +18,6 @@ from fixtures import ( | |||
190 | 18 | MonkeyPatch, | 18 | MonkeyPatch, |
191 | 19 | ) | 19 | ) |
192 | 20 | from pytz import utc | 20 | from pytz import utc |
193 | 21 | import scandir | ||
194 | 22 | import six | 21 | import six |
195 | 23 | from testtools.matchers import ( | 22 | from testtools.matchers import ( |
196 | 24 | Contains, | 23 | Contains, |
197 | @@ -79,7 +78,7 @@ class SignedMatches(Matcher): | |||
198 | 79 | 78 | ||
199 | 80 | def match(self, base): | 79 | def match(self, base): |
200 | 81 | content = [] | 80 | content = [] |
202 | 82 | for root, dirs, files in scandir.walk(base): | 81 | for root, dirs, files in os.walk(base): |
203 | 83 | content.extend( | 82 | content.extend( |
204 | 84 | [os.path.relpath(os.path.join(root, f), base) for f in files]) | 83 | [os.path.relpath(os.path.join(root, f), base) for f in files]) |
205 | 85 | 84 | ||
206 | diff --git a/lib/lp/archiveuploader/charmrecipeupload.py b/lib/lp/archiveuploader/charmrecipeupload.py | |||
207 | index d31e8f1..e4da3e7 100644 | |||
208 | --- a/lib/lp/archiveuploader/charmrecipeupload.py | |||
209 | +++ b/lib/lp/archiveuploader/charmrecipeupload.py | |||
210 | @@ -10,7 +10,6 @@ __all__ = [ | |||
211 | 10 | 10 | ||
212 | 11 | import os | 11 | import os |
213 | 12 | 12 | ||
214 | 13 | import scandir | ||
215 | 14 | from zope.component import getUtility | 13 | from zope.component import getUtility |
216 | 15 | 14 | ||
217 | 16 | from lp.archiveuploader.utils import UploadError | 15 | from lp.archiveuploader.utils import UploadError |
218 | @@ -39,7 +38,7 @@ class CharmRecipeUpload: | |||
219 | 39 | 38 | ||
220 | 40 | found_charm = False | 39 | found_charm = False |
221 | 41 | charm_paths = [] | 40 | charm_paths = [] |
223 | 42 | for dirpath, _, filenames in scandir.walk(self.upload_path): | 41 | for dirpath, _, filenames in os.walk(self.upload_path): |
224 | 43 | if dirpath == self.upload_path: | 42 | if dirpath == self.upload_path: |
225 | 44 | # All relevant files will be in a subdirectory. | 43 | # All relevant files will be in a subdirectory. |
226 | 45 | continue | 44 | continue |
227 | diff --git a/lib/lp/archiveuploader/dscfile.py b/lib/lp/archiveuploader/dscfile.py | |||
228 | index ba47bd3..7efbc85 100644 | |||
229 | --- a/lib/lp/archiveuploader/dscfile.py | |||
230 | +++ b/lib/lp/archiveuploader/dscfile.py | |||
231 | @@ -30,7 +30,6 @@ from debian.deb822 import ( | |||
232 | 30 | Deb822Dict, | 30 | Deb822Dict, |
233 | 31 | PkgRelation, | 31 | PkgRelation, |
234 | 32 | ) | 32 | ) |
235 | 33 | import scandir | ||
236 | 34 | import six | 33 | import six |
237 | 35 | from zope.component import getUtility | 34 | from zope.component import getUtility |
238 | 36 | 35 | ||
239 | @@ -617,7 +616,7 @@ class DSCFile(SourceUploadFile, SignableTagFile): | |||
240 | 617 | 616 | ||
241 | 618 | # Check if 'dpkg-source' created only one directory. | 617 | # Check if 'dpkg-source' created only one directory. |
242 | 619 | temp_directories = [ | 618 | temp_directories = [ |
244 | 620 | entry.name for entry in scandir.scandir(unpacked_dir) | 619 | entry.name for entry in os.scandir(unpacked_dir) |
245 | 621 | if entry.is_dir()] | 620 | if entry.is_dir()] |
246 | 622 | if len(temp_directories) > 1: | 621 | if len(temp_directories) > 1: |
247 | 623 | yield UploadError( | 622 | yield UploadError( |
248 | diff --git a/lib/lp/archiveuploader/livefsupload.py b/lib/lp/archiveuploader/livefsupload.py | |||
249 | index 4034db4..7eedbe3 100644 | |||
250 | --- a/lib/lp/archiveuploader/livefsupload.py | |||
251 | +++ b/lib/lp/archiveuploader/livefsupload.py | |||
252 | @@ -7,7 +7,6 @@ __metaclass__ = type | |||
253 | 7 | 7 | ||
254 | 8 | import os | 8 | import os |
255 | 9 | 9 | ||
256 | 10 | import scandir | ||
257 | 11 | from zope.component import getUtility | 10 | from zope.component import getUtility |
258 | 12 | 11 | ||
259 | 13 | from lp.buildmaster.enums import BuildStatus | 12 | from lp.buildmaster.enums import BuildStatus |
260 | @@ -37,7 +36,7 @@ class LiveFSUpload: | |||
261 | 37 | """Process this upload, loading it into the database.""" | 36 | """Process this upload, loading it into the database.""" |
262 | 38 | self.logger.debug("Beginning processing.") | 37 | self.logger.debug("Beginning processing.") |
263 | 39 | 38 | ||
265 | 40 | for dirpath, _, filenames in scandir.walk(self.upload_path): | 39 | for dirpath, _, filenames in os.walk(self.upload_path): |
266 | 41 | if dirpath == self.upload_path: | 40 | if dirpath == self.upload_path: |
267 | 42 | # All relevant files will be in a subdirectory. | 41 | # All relevant files will be in a subdirectory. |
268 | 43 | continue | 42 | continue |
269 | diff --git a/lib/lp/archiveuploader/ocirecipeupload.py b/lib/lp/archiveuploader/ocirecipeupload.py | |||
270 | index cd99962..516ef90 100644 | |||
271 | --- a/lib/lp/archiveuploader/ocirecipeupload.py | |||
272 | +++ b/lib/lp/archiveuploader/ocirecipeupload.py | |||
273 | @@ -10,7 +10,6 @@ __all__ = ['OCIRecipeUpload'] | |||
274 | 10 | import json | 10 | import json |
275 | 11 | import os | 11 | import os |
276 | 12 | 12 | ||
277 | 13 | import scandir | ||
278 | 14 | from zope.component import getUtility | 13 | from zope.component import getUtility |
279 | 15 | 14 | ||
280 | 16 | from lp.archiveuploader.utils import UploadError | 15 | from lp.archiveuploader.utils import UploadError |
281 | @@ -39,7 +38,7 @@ class OCIRecipeUpload: | |||
282 | 39 | self.logger.debug("Beginning processing.") | 38 | self.logger.debug("Beginning processing.") |
283 | 40 | 39 | ||
284 | 41 | # Find digest file | 40 | # Find digest file |
286 | 42 | for dirpath, _, filenames in scandir.walk(self.upload_path): | 41 | for dirpath, _, filenames in os.walk(self.upload_path): |
287 | 43 | if dirpath == self.upload_path: | 42 | if dirpath == self.upload_path: |
288 | 44 | # All relevant files will be in a subdirectory. | 43 | # All relevant files will be in a subdirectory. |
289 | 45 | continue | 44 | continue |
290 | diff --git a/lib/lp/archiveuploader/snapupload.py b/lib/lp/archiveuploader/snapupload.py | |||
291 | index e8b7bff..a2b4059 100644 | |||
292 | --- a/lib/lp/archiveuploader/snapupload.py | |||
293 | +++ b/lib/lp/archiveuploader/snapupload.py | |||
294 | @@ -7,7 +7,6 @@ __metaclass__ = type | |||
295 | 7 | 7 | ||
296 | 8 | import os | 8 | import os |
297 | 9 | 9 | ||
298 | 10 | import scandir | ||
299 | 11 | from zope.component import getUtility | 10 | from zope.component import getUtility |
300 | 12 | 11 | ||
301 | 13 | from lp.archiveuploader.utils import UploadError | 12 | from lp.archiveuploader.utils import UploadError |
302 | @@ -40,7 +39,7 @@ class SnapUpload: | |||
303 | 40 | 39 | ||
304 | 41 | found_snap = False | 40 | found_snap = False |
305 | 42 | snap_paths = [] | 41 | snap_paths = [] |
307 | 43 | for dirpath, _, filenames in scandir.walk(self.upload_path): | 42 | for dirpath, _, filenames in os.walk(self.upload_path): |
308 | 44 | if dirpath == self.upload_path: | 43 | if dirpath == self.upload_path: |
309 | 45 | # All relevant files will be in a subdirectory. | 44 | # All relevant files will be in a subdirectory. |
310 | 46 | continue | 45 | continue |
311 | diff --git a/lib/lp/archiveuploader/uploadprocessor.py b/lib/lp/archiveuploader/uploadprocessor.py | |||
312 | index 54510c7..0c8911b 100644 | |||
313 | --- a/lib/lp/archiveuploader/uploadprocessor.py | |||
314 | +++ b/lib/lp/archiveuploader/uploadprocessor.py | |||
315 | @@ -51,7 +51,6 @@ import os | |||
316 | 51 | import shutil | 51 | import shutil |
317 | 52 | import sys | 52 | import sys |
318 | 53 | 53 | ||
319 | 54 | import scandir | ||
320 | 55 | from sqlobject import SQLObjectNotFound | 54 | from sqlobject import SQLObjectNotFound |
321 | 56 | from zope.component import getUtility | 55 | from zope.component import getUtility |
322 | 57 | 56 | ||
323 | @@ -215,7 +214,7 @@ class UploadProcessor: | |||
324 | 215 | alphabetically sorted. | 214 | alphabetically sorted. |
325 | 216 | """ | 215 | """ |
326 | 217 | return sorted( | 216 | return sorted( |
328 | 218 | entry.name for entry in scandir.scandir(fsroot) if entry.is_dir()) | 217 | entry.name for entry in os.scandir(fsroot) if entry.is_dir()) |
329 | 219 | 218 | ||
330 | 220 | 219 | ||
331 | 221 | class UploadHandler: | 220 | class UploadHandler: |
332 | @@ -262,7 +261,7 @@ class UploadHandler: | |||
333 | 262 | """ | 261 | """ |
334 | 263 | changes_files = [] | 262 | changes_files = [] |
335 | 264 | 263 | ||
337 | 265 | for dirpath, dirnames, filenames in scandir.walk(self.upload_path): | 264 | for dirpath, dirnames, filenames in os.walk(self.upload_path): |
338 | 266 | relative_path = dirpath[len(self.upload_path) + 1:] | 265 | relative_path = dirpath[len(self.upload_path) + 1:] |
339 | 267 | for filename in filenames: | 266 | for filename in filenames: |
340 | 268 | if filename.endswith(".changes"): | 267 | if filename.endswith(".changes"): |
341 | diff --git a/lib/lp/bugs/tests/test_doc.py b/lib/lp/bugs/tests/test_doc.py | |||
342 | index 627025b..78f8cbf 100644 | |||
343 | --- a/lib/lp/bugs/tests/test_doc.py | |||
344 | +++ b/lib/lp/bugs/tests/test_doc.py | |||
345 | @@ -9,8 +9,6 @@ import logging | |||
346 | 9 | import os | 9 | import os |
347 | 10 | import unittest | 10 | import unittest |
348 | 11 | 11 | ||
349 | 12 | import scandir | ||
350 | 13 | |||
351 | 14 | from lp.code.tests.test_doc import branchscannerSetUp | 12 | from lp.code.tests.test_doc import branchscannerSetUp |
352 | 15 | from lp.services.config import config | 13 | from lp.services.config import config |
353 | 16 | from lp.services.features.testing import FeatureFixture | 14 | from lp.services.features.testing import FeatureFixture |
354 | @@ -484,7 +482,7 @@ def test_suite(): | |||
355 | 484 | stories_dir = os.path.join(os.path.pardir, 'stories') | 482 | stories_dir = os.path.join(os.path.pardir, 'stories') |
356 | 485 | suite.addTest(PageTestSuite(stories_dir)) | 483 | suite.addTest(PageTestSuite(stories_dir)) |
357 | 486 | stories_path = os.path.join(here, stories_dir) | 484 | stories_path = os.path.join(here, stories_dir) |
359 | 487 | for story_entry in scandir.scandir(stories_path): | 485 | for story_entry in os.scandir(stories_path): |
360 | 488 | if not story_entry.is_dir(): | 486 | if not story_entry.is_dir(): |
361 | 489 | continue | 487 | continue |
362 | 490 | story_path = os.path.join(stories_dir, story_entry.name) | 488 | story_path = os.path.join(stories_dir, story_entry.name) |
363 | diff --git a/lib/lp/registry/model/codeofconduct.py b/lib/lp/registry/model/codeofconduct.py | |||
364 | index 7fae872..f4eca01 100644 | |||
365 | --- a/lib/lp/registry/model/codeofconduct.py | |||
366 | +++ b/lib/lp/registry/model/codeofconduct.py | |||
367 | @@ -14,7 +14,6 @@ from datetime import datetime | |||
368 | 14 | import os | 14 | import os |
369 | 15 | 15 | ||
370 | 16 | import pytz | 16 | import pytz |
371 | 17 | import scandir | ||
372 | 18 | import six | 17 | import six |
373 | 19 | from storm.locals import ( | 18 | from storm.locals import ( |
374 | 20 | Bool, | 19 | Bool, |
375 | @@ -154,7 +153,7 @@ class CodeOfConductSet: | |||
376 | 154 | cocs_path = getUtility(ICodeOfConductConf).path | 153 | cocs_path = getUtility(ICodeOfConductConf).path |
377 | 155 | 154 | ||
378 | 156 | # iter through files and store the CoC Object | 155 | # iter through files and store the CoC Object |
380 | 157 | for entry in scandir.scandir(cocs_path): | 156 | for entry in os.scandir(cocs_path): |
381 | 158 | # Select the correct filenames | 157 | # Select the correct filenames |
382 | 159 | if entry.name.endswith('.txt'): | 158 | if entry.name.endswith('.txt'): |
383 | 160 | # Extract the version from filename | 159 | # Extract the version from filename |
384 | diff --git a/lib/lp/registry/scripts/productreleasefinder/walker.py b/lib/lp/registry/scripts/productreleasefinder/walker.py | |||
385 | index 6dff7de..9dfbbf0 100644 | |||
386 | --- a/lib/lp/registry/scripts/productreleasefinder/walker.py | |||
387 | +++ b/lib/lp/registry/scripts/productreleasefinder/walker.py | |||
388 | @@ -13,6 +13,7 @@ __all__ = [ | |||
389 | 13 | ] | 13 | ] |
390 | 14 | 14 | ||
391 | 15 | import ftplib | 15 | import ftplib |
392 | 16 | import os | ||
393 | 16 | import socket | 17 | import socket |
394 | 17 | 18 | ||
395 | 18 | from lazr.uri import ( | 19 | from lazr.uri import ( |
396 | @@ -20,7 +21,6 @@ from lazr.uri import ( | |||
397 | 20 | URI, | 21 | URI, |
398 | 21 | ) | 22 | ) |
399 | 22 | import requests | 23 | import requests |
400 | 23 | import scandir | ||
401 | 24 | from six.moves.urllib.parse import ( | 24 | from six.moves.urllib.parse import ( |
402 | 25 | unquote_plus, | 25 | unquote_plus, |
403 | 26 | urljoin, | 26 | urljoin, |
404 | @@ -55,7 +55,7 @@ class WalkerBase: | |||
405 | 55 | """Base class for URL walkers. | 55 | """Base class for URL walkers. |
406 | 56 | 56 | ||
407 | 57 | This class is a base class for those wishing to implement protocol | 57 | This class is a base class for those wishing to implement protocol |
409 | 58 | specific walkers. Walkers behave much like the scandir.walk() function, | 58 | specific walkers. Walkers behave much like the os.walk() function, |
410 | 59 | but taking a URL and working remotely. | 59 | but taking a URL and working remotely. |
411 | 60 | 60 | ||
412 | 61 | A typical usage would be: | 61 | A typical usage would be: |
413 | @@ -108,7 +108,7 @@ class WalkerBase: | |||
414 | 108 | """Walk through the URL. | 108 | """Walk through the URL. |
415 | 109 | 109 | ||
416 | 110 | Yields (dirpath, dirnames, filenames) for each path under the base; | 110 | Yields (dirpath, dirnames, filenames) for each path under the base; |
418 | 111 | dirnames can be modified as with scandir.walk. | 111 | dirnames can be modified as with os.walk. |
419 | 112 | """ | 112 | """ |
420 | 113 | try: | 113 | try: |
421 | 114 | self.open() | 114 | self.open() |
422 | @@ -384,7 +384,7 @@ def walk(url, log_parent=None): | |||
423 | 384 | elif scheme in ["http", "https"]: | 384 | elif scheme in ["http", "https"]: |
424 | 385 | return HTTPWalker(url, log_parent) | 385 | return HTTPWalker(url, log_parent) |
425 | 386 | elif scheme in ["file"]: | 386 | elif scheme in ["file"]: |
427 | 387 | return scandir.walk(path) | 387 | return os.walk(path) |
428 | 388 | else: | 388 | else: |
429 | 389 | raise WalkerError("Unknown scheme: %s" % scheme) | 389 | raise WalkerError("Unknown scheme: %s" % scheme) |
430 | 390 | 390 | ||
431 | diff --git a/lib/lp/scripts/utilities/js/jsbuild.py b/lib/lp/scripts/utilities/js/jsbuild.py | |||
432 | index 5b7bde8..77ce702 100644 | |||
433 | --- a/lib/lp/scripts/utilities/js/jsbuild.py | |||
434 | +++ b/lib/lp/scripts/utilities/js/jsbuild.py | |||
435 | @@ -16,7 +16,6 @@ import sys | |||
436 | 16 | 16 | ||
437 | 17 | import cssutils | 17 | import cssutils |
438 | 18 | from cssutils import settings | 18 | from cssutils import settings |
439 | 19 | import scandir | ||
440 | 20 | 19 | ||
441 | 21 | 20 | ||
442 | 22 | HERE = os.path.dirname(__file__) | 21 | HERE = os.path.dirname(__file__) |
443 | @@ -256,7 +255,7 @@ class Builder: | |||
444 | 256 | return | 255 | return |
445 | 257 | 256 | ||
446 | 258 | # Process sub-skins. | 257 | # Process sub-skins. |
448 | 259 | for entry in scandir.scandir(src_skins_dir): | 258 | for entry in os.scandir(src_skins_dir): |
449 | 260 | self.build_skin(component_name, entry.name) | 259 | self.build_skin(component_name, entry.name) |
450 | 261 | 260 | ||
451 | 262 | def link_directory_content(self, src_dir, target_dir, link_filter=None): | 261 | def link_directory_content(self, src_dir, target_dir, link_filter=None): |
452 | @@ -269,7 +268,7 @@ class Builder: | |||
453 | 269 | If the filter returns False, no symlink will be created. By | 268 | If the filter returns False, no symlink will be created. By |
454 | 270 | default a symlink is created for everything. | 269 | default a symlink is created for everything. |
455 | 271 | """ | 270 | """ |
457 | 272 | for entry in scandir.scandir(src_dir): | 271 | for entry in os.scandir(src_dir): |
458 | 273 | if entry.name.endswith('~'): | 272 | if entry.name.endswith('~'): |
459 | 274 | continue | 273 | continue |
460 | 275 | if link_filter and not link_filter(entry.path): | 274 | if link_filter and not link_filter(entry.path): |
461 | @@ -334,7 +333,7 @@ class Builder: | |||
462 | 334 | def do_build(self): | 333 | def do_build(self): |
463 | 335 | # We need this to be both repeatable and in the desired order | 334 | # We need this to be both repeatable and in the desired order |
464 | 336 | dir_list = sorted( | 335 | dir_list = sorted( |
466 | 337 | scandir.scandir(self.src_dir), | 336 | os.scandir(self.src_dir), |
467 | 338 | key=lambda x: x.name.lower(), | 337 | key=lambda x: x.name.lower(), |
468 | 339 | reverse=True) | 338 | reverse=True) |
469 | 340 | for entry in dir_list: | 339 | for entry in dir_list: |
470 | diff --git a/lib/lp/services/config/fixture.py b/lib/lp/services/config/fixture.py | |||
471 | index 9be9e0b..698ceea 100644 | |||
472 | --- a/lib/lp/services/config/fixture.py | |||
473 | +++ b/lib/lp/services/config/fixture.py | |||
474 | @@ -18,7 +18,6 @@ import shutil | |||
475 | 18 | from textwrap import dedent | 18 | from textwrap import dedent |
476 | 19 | 19 | ||
477 | 20 | from fixtures import Fixture | 20 | from fixtures import Fixture |
478 | 21 | import scandir | ||
479 | 22 | 21 | ||
480 | 23 | from lp.services.config import config | 22 | from lp.services.config import config |
481 | 24 | 23 | ||
482 | @@ -125,7 +124,7 @@ class ConfigFixture(Fixture): | |||
483 | 125 | self.absroot = os.path.abspath(root) | 124 | self.absroot = os.path.abspath(root) |
484 | 126 | self.addCleanup(shutil.rmtree, self.absroot) | 125 | self.addCleanup(shutil.rmtree, self.absroot) |
485 | 127 | source = os.path.join(config.root, 'configs', self.copy_from_instance) | 126 | source = os.path.join(config.root, 'configs', self.copy_from_instance) |
487 | 128 | for entry in scandir.scandir(source): | 127 | for entry in os.scandir(source): |
488 | 129 | if entry.name == 'launchpad-lazr.conf': | 128 | if entry.name == 'launchpad-lazr.conf': |
489 | 130 | self.add_section(self._extend_str % self.copy_from_instance) | 129 | self.add_section(self._extend_str % self.copy_from_instance) |
490 | 131 | continue | 130 | continue |
491 | diff --git a/lib/lp/services/config/tests/test_config.py b/lib/lp/services/config/tests/test_config.py | |||
492 | index 519d634..2906e4b 100644 | |||
493 | --- a/lib/lp/services/config/tests/test_config.py | |||
494 | +++ b/lib/lp/services/config/tests/test_config.py | |||
495 | @@ -18,7 +18,6 @@ import unittest | |||
496 | 18 | from fixtures import TempDir | 18 | from fixtures import TempDir |
497 | 19 | from lazr.config import ConfigSchema | 19 | from lazr.config import ConfigSchema |
498 | 20 | from lazr.config.interfaces import ConfigErrors | 20 | from lazr.config.interfaces import ConfigErrors |
499 | 21 | import scandir | ||
500 | 22 | import testtools | 21 | import testtools |
501 | 23 | 22 | ||
502 | 24 | import lp.services.config | 23 | import lp.services.config |
503 | @@ -136,7 +135,7 @@ def test_suite(): | |||
504 | 136 | load_testcase = unittest.defaultTestLoader.loadTestsFromTestCase | 135 | load_testcase = unittest.defaultTestLoader.loadTestsFromTestCase |
505 | 137 | # Add a test for every launchpad[.lazr].conf file in our tree. | 136 | # Add a test for every launchpad[.lazr].conf file in our tree. |
506 | 138 | for config_dir in lp.services.config.CONFIG_ROOT_DIRS: | 137 | for config_dir in lp.services.config.CONFIG_ROOT_DIRS: |
508 | 139 | for dirpath, dirnames, filenames in scandir.walk(config_dir): | 138 | for dirpath, dirnames, filenames in os.walk(config_dir): |
509 | 140 | if os.path.basename(dirpath) in EXCLUDED_CONFIGS: | 139 | if os.path.basename(dirpath) in EXCLUDED_CONFIGS: |
510 | 141 | del dirnames[:] # Don't look in subdirectories. | 140 | del dirnames[:] # Don't look in subdirectories. |
511 | 142 | continue | 141 | continue |
512 | diff --git a/lib/lp/services/librarianserver/librariangc.py b/lib/lp/services/librarianserver/librariangc.py | |||
513 | index 71c3355..936ef3a 100644 | |||
514 | --- a/lib/lp/services/librarianserver/librariangc.py | |||
515 | +++ b/lib/lp/services/librarianserver/librariangc.py | |||
516 | @@ -20,7 +20,6 @@ from time import time | |||
517 | 20 | 20 | ||
518 | 21 | import iso8601 | 21 | import iso8601 |
519 | 22 | import pytz | 22 | import pytz |
520 | 23 | import scandir | ||
521 | 24 | import six | 23 | import six |
522 | 25 | from swiftclient import client as swiftclient | 24 | from swiftclient import client as swiftclient |
523 | 26 | from zope.interface import implementer | 25 | from zope.interface import implementer |
524 | @@ -662,8 +661,8 @@ def delete_unwanted_disk_files(con): | |||
525 | 662 | hex_content_id_re = re.compile(r'^([0-9a-f]{8})(\.migrated)?$') | 661 | hex_content_id_re = re.compile(r'^([0-9a-f]{8})(\.migrated)?$') |
526 | 663 | ONE_DAY = 24 * 60 * 60 | 662 | ONE_DAY = 24 * 60 * 60 |
527 | 664 | 663 | ||
530 | 665 | for dirpath, dirnames, filenames in scandir.walk( | 664 | for dirpath, dirnames, filenames in os.walk( |
531 | 666 | get_storage_root(), followlinks=True): | 665 | get_storage_root(), followlinks=True): |
532 | 667 | 666 | ||
533 | 668 | # Ignore known and harmless noise in the Librarian storage area. | 667 | # Ignore known and harmless noise in the Librarian storage area. |
534 | 669 | if 'incoming' in dirnames: | 668 | if 'incoming' in dirnames: |
535 | diff --git a/lib/lp/services/librarianserver/swift.py b/lib/lp/services/librarianserver/swift.py | |||
536 | index 3f0c6eb..5460448 100644 | |||
537 | --- a/lib/lp/services/librarianserver/swift.py | |||
538 | +++ b/lib/lp/services/librarianserver/swift.py | |||
539 | @@ -21,7 +21,6 @@ import os.path | |||
540 | 21 | import re | 21 | import re |
541 | 22 | import time | 22 | import time |
542 | 23 | 23 | ||
543 | 24 | import scandir | ||
544 | 25 | import six | 24 | import six |
545 | 26 | from six.moves.urllib.parse import quote | 25 | from six.moves.urllib.parse import quote |
546 | 27 | from swiftclient import client as swiftclient | 26 | from swiftclient import client as swiftclient |
547 | @@ -90,8 +89,7 @@ def to_swift(log, start_lfc_id=None, end_lfc_id=None, | |||
548 | 90 | # Walk the Librarian on disk file store, searching for matching | 89 | # Walk the Librarian on disk file store, searching for matching |
549 | 91 | # files that may need to be copied into Swift. We need to follow | 90 | # files that may need to be copied into Swift. We need to follow |
550 | 92 | # symlinks as they are being used span disk partitions. | 91 | # symlinks as they are being used span disk partitions. |
553 | 93 | for dirpath, dirnames, filenames in scandir.walk( | 92 | for dirpath, dirnames, filenames in os.walk(fs_root, followlinks=True): |
552 | 94 | fs_root, followlinks=True): | ||
554 | 95 | 93 | ||
555 | 96 | # Don't recurse if we know this directory contains no matching | 94 | # Don't recurse if we know this directory contains no matching |
556 | 97 | # files. | 95 | # files. |
557 | diff --git a/lib/lp/services/mail/mailbox.py b/lib/lp/services/mail/mailbox.py | |||
558 | index 5ec49fe..2118176 100644 | |||
559 | --- a/lib/lp/services/mail/mailbox.py | |||
560 | +++ b/lib/lp/services/mail/mailbox.py | |||
561 | @@ -16,7 +16,6 @@ import poplib | |||
562 | 16 | import socket | 16 | import socket |
563 | 17 | import threading | 17 | import threading |
564 | 18 | 18 | ||
565 | 19 | import scandir | ||
566 | 20 | from zope.interface import ( | 19 | from zope.interface import ( |
567 | 21 | implementer, | 20 | implementer, |
568 | 22 | Interface, | 21 | Interface, |
569 | @@ -170,7 +169,7 @@ class DirectoryMailBox: | |||
570 | 170 | 169 | ||
571 | 171 | def items(self): | 170 | def items(self): |
572 | 172 | """See IMailBox.""" | 171 | """See IMailBox.""" |
574 | 173 | for entry in scandir.scandir(self.mail_dir): | 172 | for entry in os.scandir(self.mail_dir): |
575 | 174 | if entry.is_file(): | 173 | if entry.is_file(): |
576 | 175 | with open(entry.path, "rb") as mail_file: | 174 | with open(entry.path, "rb") as mail_file: |
577 | 176 | yield (entry.path, mail_file.read()) | 175 | yield (entry.path, mail_file.read()) |
578 | diff --git a/lib/lp/services/scripts/tests/__init__.py b/lib/lp/services/scripts/tests/__init__.py | |||
579 | index 8ca2036..3bd81ba 100644 | |||
580 | --- a/lib/lp/services/scripts/tests/__init__.py | |||
581 | +++ b/lib/lp/services/scripts/tests/__init__.py | |||
582 | @@ -10,8 +10,6 @@ __all__ = [ | |||
583 | 10 | import os | 10 | import os |
584 | 11 | import subprocess | 11 | import subprocess |
585 | 12 | 12 | ||
586 | 13 | import scandir | ||
587 | 14 | |||
588 | 15 | import lp | 13 | import lp |
589 | 16 | from lp.services.config import config | 14 | from lp.services.config import config |
590 | 17 | 15 | ||
591 | @@ -34,7 +32,7 @@ def find_lp_scripts(): | |||
592 | 34 | scripts = [] | 32 | scripts = [] |
593 | 35 | for script_location in SCRIPT_LOCATIONS: | 33 | for script_location in SCRIPT_LOCATIONS: |
594 | 36 | location = os.path.join(LP_TREE, script_location) | 34 | location = os.path.join(LP_TREE, script_location) |
596 | 37 | for path, dirs, filenames in scandir.walk(location): | 35 | for path, dirs, filenames in os.walk(location): |
597 | 38 | for filename in filenames: | 36 | for filename in filenames: |
598 | 39 | script_path = os.path.join(path, filename) | 37 | script_path = os.path.join(path, filename) |
599 | 40 | if (filename.startswith('_') or | 38 | if (filename.startswith('_') or |
600 | diff --git a/lib/lp/services/testing/__init__.py b/lib/lp/services/testing/__init__.py | |||
601 | index 0cc4713..41ede34 100644 | |||
602 | --- a/lib/lp/services/testing/__init__.py | |||
603 | +++ b/lib/lp/services/testing/__init__.py | |||
604 | @@ -21,8 +21,6 @@ import logging | |||
605 | 21 | import os | 21 | import os |
606 | 22 | import unittest | 22 | import unittest |
607 | 23 | 23 | ||
608 | 24 | import scandir | ||
609 | 25 | |||
610 | 26 | from lp.testing.systemdocs import ( | 24 | from lp.testing.systemdocs import ( |
611 | 27 | LayeredDocFileSuite, | 25 | LayeredDocFileSuite, |
612 | 28 | setUp, | 26 | setUp, |
613 | @@ -100,7 +98,7 @@ def build_test_suite(base_dir, special_tests={}, | |||
614 | 100 | if os.path.exists(stories_path): | 98 | if os.path.exists(stories_path): |
615 | 101 | suite.addTest(PageTestSuite( | 99 | suite.addTest(PageTestSuite( |
616 | 102 | stories_dir, package, setUp=pageTestsSetUp)) | 100 | stories_dir, package, setUp=pageTestsSetUp)) |
618 | 103 | for story_entry in scandir.scandir(stories_path): | 101 | for story_entry in os.scandir(stories_path): |
619 | 104 | if not story_entry.is_dir(): | 102 | if not story_entry.is_dir(): |
620 | 105 | continue | 103 | continue |
621 | 106 | story_path = os.path.join(stories_dir, story_entry.name) | 104 | story_path = os.path.join(stories_dir, story_entry.name) |
622 | diff --git a/lib/lp/services/webservice/tests/test_wadllib.py b/lib/lp/services/webservice/tests/test_wadllib.py | |||
623 | index bda0f27..382942c 100644 | |||
624 | --- a/lib/lp/services/webservice/tests/test_wadllib.py | |||
625 | +++ b/lib/lp/services/webservice/tests/test_wadllib.py | |||
626 | @@ -9,7 +9,6 @@ __all__ = ['test_suite'] | |||
627 | 9 | import os | 9 | import os |
628 | 10 | import unittest | 10 | import unittest |
629 | 11 | 11 | ||
630 | 12 | import scandir | ||
631 | 13 | import wadllib | 12 | import wadllib |
632 | 14 | 13 | ||
633 | 15 | from lp.testing.systemdocs import LayeredDocFileSuite | 14 | from lp.testing.systemdocs import LayeredDocFileSuite |
634 | @@ -23,7 +22,7 @@ def test_suite(): | |||
635 | 23 | 22 | ||
636 | 24 | # Find all the doctests in wadllib. | 23 | # Find all the doctests in wadllib. |
637 | 25 | packages = [] | 24 | packages = [] |
639 | 26 | for dirpath, dirnames, filenames in scandir.walk(topdir): | 25 | for dirpath, dirnames, filenames in os.walk(topdir): |
640 | 27 | if 'docs' in dirnames: | 26 | if 'docs' in dirnames: |
641 | 28 | docsdir = os.path.join(dirpath, 'docs')[len(topdir) + 1:] | 27 | docsdir = os.path.join(dirpath, 'docs')[len(topdir) + 1:] |
642 | 29 | packages.append(docsdir) | 28 | packages.append(docsdir) |
643 | diff --git a/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt b/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt | |||
644 | index 5dcf121..92a08af 100644 | |||
645 | --- a/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt | |||
646 | +++ b/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt | |||
647 | @@ -116,12 +116,11 @@ Firstly, we need a way to copy a test upload into the queue (but skip | |||
648 | 116 | lock files, which have names starting with a dot). | 116 | lock files, which have names starting with a dot). |
649 | 117 | 117 | ||
650 | 118 | >>> import shutil | 118 | >>> import shutil |
651 | 119 | >>> import scandir | ||
652 | 120 | >>> from lp.archiveuploader.tests import datadir | 119 | >>> from lp.archiveuploader.tests import datadir |
653 | 121 | >>> def punt_upload_into_queue(leaf, distro): | 120 | >>> def punt_upload_into_queue(leaf, distro): |
654 | 122 | ... inc_dir = os.path.join(incoming_dir, leaf, distro) | 121 | ... inc_dir = os.path.join(incoming_dir, leaf, distro) |
655 | 123 | ... os.makedirs(inc_dir) | 122 | ... os.makedirs(inc_dir) |
657 | 124 | ... for entry in scandir.scandir(datadir(os.path.join("suite", leaf))): | 123 | ... for entry in os.scandir(datadir(os.path.join("suite", leaf))): |
658 | 125 | ... shutil.copy(entry.path, inc_dir) | 124 | ... shutil.copy(entry.path, inc_dir) |
659 | 126 | 125 | ||
660 | 127 | We need a way to count the items in a queue directory | 126 | We need a way to count the items in a queue directory |
661 | @@ -614,7 +613,6 @@ release files in the way bug-54039 infected code would. | |||
662 | 614 | 613 | ||
663 | 615 | First a couple helpers. | 614 | First a couple helpers. |
664 | 616 | 615 | ||
665 | 617 | >>> import os | ||
666 | 618 | >>> import stat | 616 | >>> import stat |
667 | 619 | >>> from lp.testing.script import run_script | 617 | >>> from lp.testing.script import run_script |
668 | 620 | 618 | ||
669 | diff --git a/lib/lp/soyuz/doc/soyuz-upload.txt b/lib/lp/soyuz/doc/soyuz-upload.txt | |||
670 | index bace025..6f049e9 100644 | |||
671 | --- a/lib/lp/soyuz/doc/soyuz-upload.txt | |||
672 | +++ b/lib/lp/soyuz/doc/soyuz-upload.txt | |||
673 | @@ -101,10 +101,9 @@ files match the uploaded ones. | |||
674 | 101 | ... with open(filename, 'rb') as f: | 101 | ... with open(filename, 'rb') as f: |
675 | 102 | ... return hashlib.md5(f.read()).digest() | 102 | ... return hashlib.md5(f.read()).digest() |
676 | 103 | 103 | ||
677 | 104 | >>> import scandir | ||
678 | 105 | >>> def get_upload_dir(num, dir=incoming_dir): | 104 | >>> def get_upload_dir(num, dir=incoming_dir): |
679 | 106 | ... """Return the path to the upload, if found in the dir.""" | 105 | ... """Return the path to the upload, if found in the dir.""" |
681 | 107 | ... for upload_entry in scandir.scandir(dir): | 106 | ... for upload_entry in os.scandir(dir): |
682 | 108 | ... if upload_entry.name.endswith("%06d" % num): | 107 | ... if upload_entry.name.endswith("%06d" % num): |
683 | 109 | ... return upload_entry.path | 108 | ... return upload_entry.path |
684 | 110 | ... return None | 109 | ... return None |
685 | diff --git a/lib/lp/soyuz/scripts/gina/packages.py b/lib/lp/soyuz/scripts/gina/packages.py | |||
686 | index 5feb27c..646b060 100644 | |||
687 | --- a/lib/lp/soyuz/scripts/gina/packages.py | |||
688 | +++ b/lib/lp/soyuz/scripts/gina/packages.py | |||
689 | @@ -28,7 +28,6 @@ import re | |||
690 | 28 | import shutil | 28 | import shutil |
691 | 29 | import tempfile | 29 | import tempfile |
692 | 30 | 30 | ||
693 | 31 | import scandir | ||
694 | 32 | import six | 31 | import six |
695 | 33 | 32 | ||
696 | 34 | from lp.app.validators.version import valid_debian_version | 33 | from lp.app.validators.version import valid_debian_version |
697 | @@ -92,7 +91,7 @@ def get_dsc_path(name, version, component, archive_root): | |||
698 | 92 | return filename, fullpath, component | 91 | return filename, fullpath, component |
699 | 93 | 92 | ||
700 | 94 | # Do a second pass, scrubbing through all components in the pool. | 93 | # Do a second pass, scrubbing through all components in the pool. |
702 | 95 | for alt_component_entry in scandir.scandir(pool_root): | 94 | for alt_component_entry in os.scandir(pool_root): |
703 | 96 | if not alt_component_entry.is_dir(): | 95 | if not alt_component_entry.is_dir(): |
704 | 97 | continue | 96 | continue |
705 | 98 | pool_dir = poolify(name, alt_component_entry.name) | 97 | pool_dir = poolify(name, alt_component_entry.name) |
706 | diff --git a/lib/lp/soyuz/tests/fakepackager.py b/lib/lp/soyuz/tests/fakepackager.py | |||
707 | index 8106d50..9500ac8 100644 | |||
708 | --- a/lib/lp/soyuz/tests/fakepackager.py | |||
709 | +++ b/lib/lp/soyuz/tests/fakepackager.py | |||
710 | @@ -18,7 +18,6 @@ import tarfile | |||
711 | 18 | import tempfile | 18 | import tempfile |
712 | 19 | import time | 19 | import time |
713 | 20 | 20 | ||
714 | 21 | import scandir | ||
715 | 22 | from zope.component import getUtility | 21 | from zope.component import getUtility |
716 | 23 | 22 | ||
717 | 24 | from lp.archiveuploader.nascentupload import NascentUpload | 23 | from lp.archiveuploader.nascentupload import NascentUpload |
718 | @@ -377,7 +376,7 @@ class FakePackager: | |||
719 | 377 | 376 | ||
720 | 378 | def listAvailableUploads(self): | 377 | def listAvailableUploads(self): |
721 | 379 | """Return the path for all available changesfiles.""" | 378 | """Return the path for all available changesfiles.""" |
723 | 380 | changes = [entry.path for entry in scandir.scandir(self.sandbox_path) | 379 | changes = [entry.path for entry in os.scandir(self.sandbox_path) |
724 | 381 | if entry.name.endswith('.changes')] | 380 | if entry.name.endswith('.changes')] |
725 | 382 | 381 | ||
726 | 383 | return sorted(changes) | 382 | return sorted(changes) |
727 | diff --git a/lib/lp/soyuz/tests/test_doc.py b/lib/lp/soyuz/tests/test_doc.py | |||
728 | index 0096084..dc1b5eb 100644 | |||
729 | --- a/lib/lp/soyuz/tests/test_doc.py | |||
730 | +++ b/lib/lp/soyuz/tests/test_doc.py | |||
731 | @@ -9,7 +9,6 @@ import logging | |||
732 | 9 | import os | 9 | import os |
733 | 10 | import unittest | 10 | import unittest |
734 | 11 | 11 | ||
735 | 12 | import scandir | ||
736 | 13 | import transaction | 12 | import transaction |
737 | 14 | 13 | ||
738 | 15 | from lp.services.config import config | 14 | from lp.services.config import config |
739 | @@ -167,7 +166,7 @@ def test_suite(): | |||
740 | 167 | stories_dir = os.path.join(os.path.pardir, 'stories') | 166 | stories_dir = os.path.join(os.path.pardir, 'stories') |
741 | 168 | suite.addTest(PageTestSuite(stories_dir)) | 167 | suite.addTest(PageTestSuite(stories_dir)) |
742 | 169 | stories_path = os.path.join(here, stories_dir) | 168 | stories_path = os.path.join(here, stories_dir) |
744 | 170 | for story_entry in scandir.scandir(stories_path): | 169 | for story_entry in os.scandir(stories_path): |
745 | 171 | if not story_entry.is_dir(): | 170 | if not story_entry.is_dir(): |
746 | 172 | continue | 171 | continue |
747 | 173 | story_path = os.path.join(stories_dir, story_entry.name) | 172 | story_path = os.path.join(stories_dir, story_entry.name) |
748 | diff --git a/lib/lp/soyuz/tests/test_publishing.py b/lib/lp/soyuz/tests/test_publishing.py | |||
749 | index 1d4a1b5..d3d085e 100644 | |||
750 | --- a/lib/lp/soyuz/tests/test_publishing.py | |||
751 | +++ b/lib/lp/soyuz/tests/test_publishing.py | |||
752 | @@ -11,7 +11,6 @@ import shutil | |||
753 | 11 | import tempfile | 11 | import tempfile |
754 | 12 | 12 | ||
755 | 13 | import pytz | 13 | import pytz |
756 | 14 | import scandir | ||
757 | 15 | from storm.store import Store | 14 | from storm.store import Store |
758 | 16 | from testtools.matchers import Equals | 15 | from testtools.matchers import Equals |
759 | 17 | import transaction | 16 | import transaction |
760 | @@ -501,7 +500,7 @@ class SoyuzTestPublisher: | |||
761 | 501 | 500 | ||
762 | 502 | def _findChangesFile(self, top, name_fragment): | 501 | def _findChangesFile(self, top, name_fragment): |
763 | 503 | """File with given name fragment in directory tree starting at top.""" | 502 | """File with given name fragment in directory tree starting at top.""" |
765 | 504 | for root, dirs, files in scandir.walk(top, topdown=False): | 503 | for root, dirs, files in os.walk(top, topdown=False): |
766 | 505 | for name in files: | 504 | for name in files: |
767 | 506 | if (name.endswith('.changes') and | 505 | if (name.endswith('.changes') and |
768 | 507 | name.find(name_fragment) > -1): | 506 | name.find(name_fragment) > -1): |
769 | diff --git a/lib/lp/testing/__init__.py b/lib/lp/testing/__init__.py | |||
770 | index 8fbd261..b74f3b9 100644 | |||
771 | --- a/lib/lp/testing/__init__.py | |||
772 | +++ b/lib/lp/testing/__init__.py | |||
773 | @@ -82,7 +82,6 @@ from lazr.restful.testing.webservice import FakeRequest | |||
774 | 82 | import lp_sitecustomize | 82 | import lp_sitecustomize |
775 | 83 | import oops_datedir_repo.serializer_rfc822 | 83 | import oops_datedir_repo.serializer_rfc822 |
776 | 84 | import pytz | 84 | import pytz |
777 | 85 | import scandir | ||
778 | 86 | import simplejson | 85 | import simplejson |
779 | 87 | import six | 86 | import six |
780 | 88 | from storm.store import Store | 87 | from storm.store import Store |
781 | @@ -1162,7 +1161,7 @@ def build_yui_unittest_suite(app_testing_path, yui_test_class): | |||
782 | 1162 | 1161 | ||
783 | 1163 | 1162 | ||
784 | 1164 | def _harvest_yui_test_files(file_path): | 1163 | def _harvest_yui_test_files(file_path): |
786 | 1165 | for dirpath, dirnames, filenames in scandir.walk(file_path): | 1164 | for dirpath, dirnames, filenames in os.walk(file_path): |
787 | 1166 | for filename in filenames: | 1165 | for filename in filenames: |
788 | 1167 | if fnmatchcase(filename, "test_*.html"): | 1166 | if fnmatchcase(filename, "test_*.html"): |
789 | 1168 | yield os.path.join(dirpath, filename) | 1167 | yield os.path.join(dirpath, filename) |
790 | diff --git a/lib/lp/testing/gpgkeys/__init__.py b/lib/lp/testing/gpgkeys/__init__.py | |||
791 | index a1d0378..8387e33 100644 | |||
792 | --- a/lib/lp/testing/gpgkeys/__init__.py | |||
793 | +++ b/lib/lp/testing/gpgkeys/__init__.py | |||
794 | @@ -23,7 +23,6 @@ from io import BytesIO | |||
795 | 23 | import os | 23 | import os |
796 | 24 | 24 | ||
797 | 25 | import gpgme | 25 | import gpgme |
798 | 26 | import scandir | ||
799 | 27 | import six | 26 | import six |
800 | 28 | from zope.component import getUtility | 27 | from zope.component import getUtility |
801 | 29 | 28 | ||
802 | @@ -113,7 +112,7 @@ def test_pubkey_from_email(email_addr): | |||
803 | 113 | 112 | ||
804 | 114 | def test_keyrings(): | 113 | def test_keyrings(): |
805 | 115 | """Iterate over the filenames for test keyrings.""" | 114 | """Iterate over the filenames for test keyrings.""" |
807 | 116 | for entry in scandir.scandir(gpgkeysdir): | 115 | for entry in os.scandir(gpgkeysdir): |
808 | 117 | if entry.name.endswith('.gpg'): | 116 | if entry.name.endswith('.gpg'): |
809 | 118 | yield entry.path | 117 | yield entry.path |
810 | 119 | 118 | ||
811 | diff --git a/lib/lp/testing/yuixhr.py b/lib/lp/testing/yuixhr.py | |||
812 | index f66295b..beb8c07 100644 | |||
813 | --- a/lib/lp/testing/yuixhr.py | |||
814 | +++ b/lib/lp/testing/yuixhr.py | |||
815 | @@ -20,7 +20,6 @@ import unittest | |||
816 | 20 | 20 | ||
817 | 21 | from lazr.restful import ResourceJSONEncoder | 21 | from lazr.restful import ResourceJSONEncoder |
818 | 22 | from lazr.restful.utils import get_current_browser_request | 22 | from lazr.restful.utils import get_current_browser_request |
819 | 23 | import scandir | ||
820 | 24 | import simplejson | 23 | import simplejson |
821 | 25 | from six.moves import reload_module | 24 | from six.moves import reload_module |
822 | 26 | from zope.component import getUtility | 25 | from zope.component import getUtility |
823 | @@ -451,7 +450,7 @@ class YUITestFixtureControllerView(LaunchpadView): | |||
824 | 451 | 450 | ||
825 | 452 | 451 | ||
826 | 453 | def find_tests(root): | 452 | def find_tests(root): |
828 | 454 | for dirpath, dirnames, filenames in scandir.walk(root): | 453 | for dirpath, dirnames, filenames in os.walk(root): |
829 | 455 | dirpath = os.path.relpath(dirpath, root) | 454 | dirpath = os.path.relpath(dirpath, root) |
830 | 456 | for filename in filenames: | 455 | for filename in filenames: |
831 | 457 | if fnmatchcase(filename, 'test_*.js'): | 456 | if fnmatchcase(filename, 'test_*.js'): |
832 | diff --git a/lib/lp/testopenid/stories/tests.py b/lib/lp/testopenid/stories/tests.py | |||
833 | index 0c0d88e..88034e9 100644 | |||
834 | --- a/lib/lp/testopenid/stories/tests.py | |||
835 | +++ b/lib/lp/testopenid/stories/tests.py | |||
836 | @@ -4,8 +4,6 @@ | |||
837 | 4 | import os | 4 | import os |
838 | 5 | import unittest | 5 | import unittest |
839 | 6 | 6 | ||
840 | 7 | import scandir | ||
841 | 8 | |||
842 | 9 | from lp.testing.pages import PageTestSuite | 7 | from lp.testing.pages import PageTestSuite |
843 | 10 | 8 | ||
844 | 11 | 9 | ||
845 | @@ -14,7 +12,7 @@ here = os.path.dirname(os.path.realpath(__file__)) | |||
846 | 14 | 12 | ||
847 | 15 | def test_suite(): | 13 | def test_suite(): |
848 | 16 | stories = sorted( | 14 | stories = sorted( |
850 | 17 | entry.name for entry in scandir.scandir(here) | 15 | entry.name for entry in os.scandir(here) |
851 | 18 | if not entry.name.startswith('.') and entry.is_dir()) | 16 | if not entry.name.startswith('.') and entry.is_dir()) |
852 | 19 | 17 | ||
853 | 20 | suite = unittest.TestSuite() | 18 | suite = unittest.TestSuite() |
854 | diff --git a/lib/lp/tests/test_opensource.py b/lib/lp/tests/test_opensource.py | |||
855 | index 11fefc5..a3d67ef 100644 | |||
856 | --- a/lib/lp/tests/test_opensource.py | |||
857 | +++ b/lib/lp/tests/test_opensource.py | |||
858 | @@ -21,7 +21,6 @@ import os | |||
859 | 21 | import unittest | 21 | import unittest |
860 | 22 | 22 | ||
861 | 23 | import launchpadlib | 23 | import launchpadlib |
862 | 24 | import scandir | ||
863 | 25 | import wadllib | 24 | import wadllib |
864 | 26 | 25 | ||
865 | 27 | from lp.testing.layers import AppServerLayer | 26 | from lp.testing.layers import AppServerLayer |
866 | @@ -33,7 +32,7 @@ def add_testable_opensource_package(suite, package): | |||
867 | 33 | topdir = os.path.dirname(package.__file__) | 32 | topdir = os.path.dirname(package.__file__) |
868 | 34 | 33 | ||
869 | 35 | packages = [] | 34 | packages = [] |
871 | 36 | for dirpath, dirnames, filenames in scandir.walk(topdir): | 35 | for dirpath, dirnames, filenames in os.walk(topdir): |
872 | 37 | if 'docs' in dirnames: | 36 | if 'docs' in dirnames: |
873 | 38 | docsdir = os.path.join(dirpath, 'docs')[len(topdir) + 1:] | 37 | docsdir = os.path.join(dirpath, 'docs')[len(topdir) + 1:] |
874 | 39 | packages.append(docsdir) | 38 | packages.append(docsdir) |
875 | diff --git a/lib/lp/translations/tests/test_doc.py b/lib/lp/translations/tests/test_doc.py | |||
876 | index 9229590..2ec46ee 100644 | |||
877 | --- a/lib/lp/translations/tests/test_doc.py | |||
878 | +++ b/lib/lp/translations/tests/test_doc.py | |||
879 | @@ -9,8 +9,6 @@ import logging | |||
880 | 9 | import os | 9 | import os |
881 | 10 | import unittest | 10 | import unittest |
882 | 11 | 11 | ||
883 | 12 | import scandir | ||
884 | 13 | |||
885 | 14 | from lp.testing.layers import ( | 12 | from lp.testing.layers import ( |
886 | 15 | LaunchpadFunctionalLayer, | 13 | LaunchpadFunctionalLayer, |
887 | 16 | LaunchpadZopelessLayer, | 14 | LaunchpadZopelessLayer, |
888 | @@ -62,7 +60,7 @@ def test_suite(): | |||
889 | 62 | stories_dir = os.path.join(os.path.pardir, 'stories') | 60 | stories_dir = os.path.join(os.path.pardir, 'stories') |
890 | 63 | suite.addTest(PageTestSuite(stories_dir)) | 61 | suite.addTest(PageTestSuite(stories_dir)) |
891 | 64 | stories_path = os.path.join(here, stories_dir) | 62 | stories_path = os.path.join(here, stories_dir) |
893 | 65 | for story_entry in scandir.scandir(stories_path): | 63 | for story_entry in os.scandir(stories_path): |
894 | 66 | if not story_entry.is_dir(): | 64 | if not story_entry.is_dir(): |
895 | 67 | continue | 65 | continue |
896 | 68 | story_path = os.path.join(stories_dir, story_entry.name) | 66 | story_path = os.path.join(stories_dir, story_entry.name) |
897 | diff --git a/requirements/launchpad.txt b/requirements/launchpad.txt | |||
898 | index e05a33f..12a04b1 100644 | |||
899 | --- a/requirements/launchpad.txt | |||
900 | +++ b/requirements/launchpad.txt | |||
901 | @@ -128,7 +128,6 @@ requests-file==1.4.3 | |||
902 | 128 | requests-toolbelt==0.9.1 | 128 | requests-toolbelt==0.9.1 |
903 | 129 | responses==0.9.0 | 129 | responses==0.9.0 |
904 | 130 | s3transfer==0.3.6 | 130 | s3transfer==0.3.6 |
905 | 131 | scandir==1.7 | ||
906 | 132 | secure-cookie==0.1.0 | 131 | secure-cookie==0.1.0 |
907 | 133 | service-identity==18.1.0 | 132 | service-identity==18.1.0 |
908 | 134 | setproctitle==1.1.7 | 133 | setproctitle==1.1.7 |
909 | diff --git a/scripts/migrate-librarian-content-md5.py b/scripts/migrate-librarian-content-md5.py | |||
910 | index 9caaf62..0031a73 100755 | |||
911 | --- a/scripts/migrate-librarian-content-md5.py | |||
912 | +++ b/scripts/migrate-librarian-content-md5.py | |||
913 | @@ -13,8 +13,6 @@ import os | |||
914 | 13 | import subprocess | 13 | import subprocess |
915 | 14 | import sys | 14 | import sys |
916 | 15 | 15 | ||
917 | 16 | import scandir | ||
918 | 17 | |||
919 | 18 | 16 | ||
920 | 19 | SQL = "UPDATE LibraryFileContent SET md5 = '%s' WHERE id = %d;" | 17 | SQL = "UPDATE LibraryFileContent SET md5 = '%s' WHERE id = %d;" |
921 | 20 | 18 | ||
922 | @@ -23,7 +21,7 @@ def main(path, minimumID=0): | |||
923 | 23 | if not path.endswith('/'): | 21 | if not path.endswith('/'): |
924 | 24 | path += '/' | 22 | path += '/' |
925 | 25 | 23 | ||
927 | 26 | for dirpath, dirname, filenames in scandir.walk(path): | 24 | for dirpath, dirname, filenames in os.walk(path): |
928 | 27 | dirname.sort() | 25 | dirname.sort() |
929 | 28 | databaseID = dirpath[len(path):] | 26 | databaseID = dirpath[len(path):] |
930 | 29 | if not len(databaseID) == 8: # "xx/xx/xx" | 27 | if not len(databaseID) == 8: # "xx/xx/xx" |
931 | diff --git a/setup.py b/setup.py | |||
932 | index c10e833..6e945a8 100644 | |||
933 | --- a/setup.py | |||
934 | +++ b/setup.py | |||
935 | @@ -214,7 +214,6 @@ setup( | |||
936 | 214 | 'requests-file', | 214 | 'requests-file', |
937 | 215 | 'requests-toolbelt', | 215 | 'requests-toolbelt', |
938 | 216 | 'responses', | 216 | 'responses', |
939 | 217 | 'scandir', | ||
940 | 218 | 'secure-cookie', | 217 | 'secure-cookie', |
941 | 219 | 'setproctitle', | 218 | 'setproctitle', |
942 | 220 | 'setuptools', | 219 | 'setuptools', |
Looks good!