1 |
commit: b0100b46b9541905c4a1e58a83a32439cd0494d6 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 17 12:55:38 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 17 12:55:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0100b46 |
7 |
|
8 |
dev-python/bsddb3: enable py3.10 |
9 |
|
10 |
- fix DISTUTILS_USE_SETUPTOOLS |
11 |
- ported patch from upstream to this version for py3.10 |
12 |
- enable more verbose output (instead of just dots) |
13 |
|
14 |
Closes: https://bugs.gentoo.org/746302 |
15 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
16 |
|
17 |
dev-python/bsddb3/bsddb3-6.2.9.ebuild | 9 +- |
18 |
.../bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch | 546 +++++++++++++++++++++ |
19 |
2 files changed, 552 insertions(+), 3 deletions(-) |
20 |
|
21 |
diff --git a/dev-python/bsddb3/bsddb3-6.2.9.ebuild b/dev-python/bsddb3/bsddb3-6.2.9.ebuild |
22 |
index 06f089aafd6..f77d531a559 100644 |
23 |
--- a/dev-python/bsddb3/bsddb3-6.2.9.ebuild |
24 |
+++ b/dev-python/bsddb3/bsddb3-6.2.9.ebuild |
25 |
@@ -3,9 +3,8 @@ |
26 |
|
27 |
EAPI=7 |
28 |
|
29 |
-PYTHON_COMPAT=( python3_{8..9} ) |
30 |
+PYTHON_COMPAT=( python3_{8..10} ) |
31 |
PYTHON_REQ_USE="threads(+)" |
32 |
-DISTUTILS_USE_SETUPTOOLS=no |
33 |
DISTUTILS_IN_SOURCE_BUILD=1 |
34 |
inherit db-use distutils-r1 |
35 |
|
36 |
@@ -29,6 +28,10 @@ RDEPEND=" |
37 |
)" |
38 |
DEPEND="${RDEPEND}" |
39 |
|
40 |
+PATCHES=( |
41 |
+ "${FILESDIR}/${P}-fix-py3.10.patch" |
42 |
+) |
43 |
+ |
44 |
python_prepare_all() { |
45 |
# This list should be kept in sync with setup.py. |
46 |
if [[ -z ${DB_VER} ]]; then |
47 |
@@ -58,5 +61,5 @@ python_configure_all() { |
48 |
} |
49 |
|
50 |
python_test() { |
51 |
- PYTHONPATH=Lib3 "${EPYTHON}" test3.py -v || die "Testing failed with ${EPYTHON}" |
52 |
+ PYTHONPATH=Lib3 "${EPYTHON}" test3.py -vv || die "Testing failed with ${EPYTHON}" |
53 |
} |
54 |
|
55 |
diff --git a/dev-python/bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch b/dev-python/bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch |
56 |
new file mode 100644 |
57 |
index 00000000000..9e3ab6ba3a9 |
58 |
--- /dev/null |
59 |
+++ b/dev-python/bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch |
60 |
@@ -0,0 +1,546 @@ |
61 |
+Based on upstream commit 43fc626bff3e by Jesus Cea <jcea@××××.es> |
62 |
+https://hg.jcea.es/pybsddb/rev/43fc626bff3e |
63 |
+ |
64 |
+Ported to v6.2.9 by Arthur Zamarin <arthurzam@g.o> |
65 |
+ |
66 |
+--- a/Lib3/bsddb/test/test_all.py |
67 |
++++ b/Lib3/bsddb/test/test_all.py |
68 |
+@@ -473,11 +473,15 @@ if sys.version_info[0] >= 3 : |
69 |
+ from bsddb3 import db, dbtables, dbutils, dbshelve, \ |
70 |
+ hashopen, btopen, rnopen, dbobj |
71 |
+ |
72 |
+-if sys.version_info[0] < 3 : |
73 |
+- from test import test_support |
74 |
+-else : |
75 |
+- from test import support as test_support |
76 |
++if sys.version_info >= (3, 9): |
77 |
++ from test.support.socket_helper import find_unused_port |
78 |
++else: |
79 |
++ from test.support import find_unused_port |
80 |
+ |
81 |
++if sys.version_info >= (3, 10): |
82 |
++ from test.support.os_helper import rmtree, unlink |
83 |
++else: |
84 |
++ from test.support import rmtree, unlink |
85 |
+ |
86 |
+ try: |
87 |
+ if sys.version_info[0] < 3 : |
88 |
+@@ -540,7 +544,7 @@ def get_new_environment_path() : |
89 |
+ try: |
90 |
+ os.makedirs(path,mode=0o700) |
91 |
+ except os.error: |
92 |
+- test_support.rmtree(path) |
93 |
++ rmtree(path) |
94 |
+ os.makedirs(path) |
95 |
+ return path |
96 |
+ |
97 |
+@@ -565,7 +569,7 @@ def set_test_path_prefix(path) : |
98 |
+ get_new_path.prefix=path |
99 |
+ |
100 |
+ def remove_test_path_directory() : |
101 |
+- test_support.rmtree(get_new_path.prefix) |
102 |
++ rmtree(get_new_path.prefix) |
103 |
+ |
104 |
+ if have_threads : |
105 |
+ import threading |
106 |
+--- a/Lib3/bsddb/test/test_associate.py |
107 |
++++ b/Lib3/bsddb/test/test_associate.py |
108 |
+@@ -42,7 +42,7 @@ import time |
109 |
+ from pprint import pprint |
110 |
+ |
111 |
+ import unittest |
112 |
+-from .test_all import db, dbshelve, test_support, verbose, have_threads, \ |
113 |
++from .test_all import db, dbshelve, rmtree, verbose, have_threads, \ |
114 |
+ get_new_environment_path |
115 |
+ |
116 |
+ |
117 |
+@@ -120,7 +120,7 @@ class AssociateErrorTestCase(unittest.TestCase): |
118 |
+ def tearDown(self): |
119 |
+ self.env.close() |
120 |
+ self.env = None |
121 |
+- test_support.rmtree(self.homeDir) |
122 |
++ rmtree(self.homeDir) |
123 |
+ |
124 |
+ def test00_associateDBError(self): |
125 |
+ if verbose: |
126 |
+@@ -170,7 +170,7 @@ class AssociateTestCase(unittest.TestCase): |
127 |
+ self.closeDB() |
128 |
+ self.env.close() |
129 |
+ self.env = None |
130 |
+- test_support.rmtree(self.homeDir) |
131 |
++ rmtree(self.homeDir) |
132 |
+ |
133 |
+ def addDataToDB(self, d, txn=None): |
134 |
+ for key, value in list(musicdata.items()): |
135 |
+--- a/Lib3/bsddb/test/test_basics.py |
136 |
++++ b/Lib3/bsddb/test/test_basics.py |
137 |
+@@ -46,7 +46,7 @@ import unittest |
138 |
+ import time |
139 |
+ import sys |
140 |
+ |
141 |
+-from .test_all import db, test_support, verbose, get_new_environment_path, \ |
142 |
++from .test_all import db, rmtree, verbose, get_new_environment_path, \ |
143 |
+ get_new_database_path |
144 |
+ |
145 |
+ DASH = '-' |
146 |
+@@ -94,7 +94,7 @@ class BasicTestCase(unittest.TestCase): |
147 |
+ self.filename = "test" |
148 |
+ # Yes, a bare except is intended, since we're re-raising the exc. |
149 |
+ except: |
150 |
+- test_support.rmtree(self.homeDir) |
151 |
++ rmtree(self.homeDir) |
152 |
+ raise |
153 |
+ else: |
154 |
+ self.env = None |
155 |
+@@ -131,7 +131,7 @@ class BasicTestCase(unittest.TestCase): |
156 |
+ self.d.close() |
157 |
+ if self.env is not None: |
158 |
+ self.env.close() |
159 |
+- test_support.rmtree(self.homeDir) |
160 |
++ rmtree(self.homeDir) |
161 |
+ else: |
162 |
+ os.remove(self.filename) |
163 |
+ |
164 |
+--- a/Lib3/bsddb/test/test_compare.py |
165 |
++++ b/Lib3/bsddb/test/test_compare.py |
166 |
+@@ -43,7 +43,7 @@ from io import StringIO |
167 |
+ |
168 |
+ import unittest |
169 |
+ |
170 |
+-from .test_all import db, dbshelve, test_support, \ |
171 |
++from .test_all import db, dbshelve, rmtree, \ |
172 |
+ get_new_environment_path, get_new_database_path |
173 |
+ |
174 |
+ |
175 |
+@@ -119,7 +119,7 @@ class AbstractBtreeKeyCompareTestCase(unittest.TestCase) : |
176 |
+ if self.env is not None: |
177 |
+ self.env.close() |
178 |
+ self.env = None |
179 |
+- test_support.rmtree(self.homeDir) |
180 |
++ rmtree(self.homeDir) |
181 |
+ |
182 |
+ def addDataToDB(self, data) : |
183 |
+ i = 0 |
184 |
+@@ -304,7 +304,7 @@ class AbstractDuplicateCompareTestCase(unittest.TestCase) : |
185 |
+ if self.env is not None: |
186 |
+ self.env.close() |
187 |
+ self.env = None |
188 |
+- test_support.rmtree(self.homeDir) |
189 |
++ rmtree(self.homeDir) |
190 |
+ |
191 |
+ def addDataToDB(self, data) : |
192 |
+ for item in data: |
193 |
+--- a/Lib3/bsddb/test/test_cursor_pget_bug.py |
194 |
++++ b/Lib3/bsddb/test/test_cursor_pget_bug.py |
195 |
+@@ -36,7 +36,7 @@ are met: |
196 |
+ import unittest |
197 |
+ import os, glob |
198 |
+ |
199 |
+-from .test_all import db, test_support, get_new_environment_path, \ |
200 |
++from .test_all import db, rmtree, get_new_environment_path, \ |
201 |
+ get_new_database_path |
202 |
+ |
203 |
+ #---------------------------------------------------------------------- |
204 |
+@@ -67,7 +67,7 @@ class pget_bugTestCase(unittest.TestCase): |
205 |
+ del self.secondary_db |
206 |
+ del self.primary_db |
207 |
+ del self.env |
208 |
+- test_support.rmtree(self.homeDir) |
209 |
++ rmtree(self.homeDir) |
210 |
+ |
211 |
+ def test_pget(self): |
212 |
+ cursor = self.secondary_db.cursor() |
213 |
+--- a/Lib3/bsddb/test/test_db.py |
214 |
++++ b/Lib3/bsddb/test/test_db.py |
215 |
+@@ -36,7 +36,7 @@ are met: |
216 |
+ import unittest |
217 |
+ import os, glob |
218 |
+ |
219 |
+-from .test_all import db, test_support, get_new_environment_path, \ |
220 |
++from .test_all import db, rmtree, unlink, get_new_environment_path, \ |
221 |
+ get_new_database_path |
222 |
+ |
223 |
+ #---------------------------------------------------------------------- |
224 |
+@@ -49,7 +49,7 @@ class DB(unittest.TestCase): |
225 |
+ def tearDown(self): |
226 |
+ self.db.close() |
227 |
+ del self.db |
228 |
+- test_support.unlink(self.path) |
229 |
++ unlink(self.path) |
230 |
+ |
231 |
+ class DB_general(DB) : |
232 |
+ def test_get_open_flags(self) : |
233 |
+@@ -133,7 +133,7 @@ class DB_txn(DB) : |
234 |
+ del self.db |
235 |
+ self.env.close() |
236 |
+ del self.env |
237 |
+- test_support.rmtree(self.homeDir) |
238 |
++ rmtree(self.homeDir) |
239 |
+ |
240 |
+ def test_flags(self) : |
241 |
+ self.db.set_flags(db.DB_CHKSUM) |
242 |
+--- a/Lib3/bsddb/test/test_dbenv.py |
243 |
++++ b/Lib3/bsddb/test/test_dbenv.py |
244 |
+@@ -36,7 +36,7 @@ are met: |
245 |
+ import unittest |
246 |
+ import os, glob |
247 |
+ |
248 |
+-from .test_all import db, test_support, get_new_environment_path, \ |
249 |
++from .test_all import db, rmtree, get_new_environment_path, \ |
250 |
+ get_new_database_path |
251 |
+ |
252 |
+ #---------------------------------------------------------------------- |
253 |
+@@ -49,7 +49,7 @@ class DBEnv(unittest.TestCase): |
254 |
+ def tearDown(self): |
255 |
+ self.env.close() |
256 |
+ del self.env |
257 |
+- test_support.rmtree(self.homeDir) |
258 |
++ rmtree(self.homeDir) |
259 |
+ |
260 |
+ class DBEnv_general(DBEnv) : |
261 |
+ def test_get_open_flags(self) : |
262 |
+--- a/Lib3/bsddb/test/test_dbobj.py |
263 |
++++ b/Lib3/bsddb/test/test_dbobj.py |
264 |
+@@ -37,7 +37,7 @@ are met: |
265 |
+ import os, string |
266 |
+ import unittest |
267 |
+ |
268 |
+-from .test_all import db, dbobj, test_support, get_new_environment_path, \ |
269 |
++from .test_all import db, dbobj, rmtree, get_new_environment_path, \ |
270 |
+ get_new_database_path |
271 |
+ |
272 |
+ #---------------------------------------------------------------------- |
273 |
+@@ -54,7 +54,7 @@ class dbobjTestCase(unittest.TestCase): |
274 |
+ del self.db |
275 |
+ if hasattr(self, 'env'): |
276 |
+ del self.env |
277 |
+- test_support.rmtree(self.homeDir) |
278 |
++ rmtree(self.homeDir) |
279 |
+ |
280 |
+ def test01_both(self): |
281 |
+ class TestDBEnv(dbobj.DBEnv): pass |
282 |
+--- a/Lib3/bsddb/test/test_dbshelve.py |
283 |
++++ b/Lib3/bsddb/test/test_dbshelve.py |
284 |
+@@ -42,7 +42,7 @@ import random |
285 |
+ import unittest |
286 |
+ |
287 |
+ |
288 |
+-from .test_all import db, dbshelve, test_support, verbose, \ |
289 |
++from .test_all import db, dbshelve, rmtree, unlink, verbose, \ |
290 |
+ get_new_environment_path, get_new_database_path |
291 |
+ |
292 |
+ |
293 |
+@@ -82,7 +82,7 @@ class DBShelveTestCase(unittest.TestCase): |
294 |
+ from .test_all import do_proxy_db_py3k |
295 |
+ do_proxy_db_py3k(self._flag_proxy_db_py3k) |
296 |
+ self.do_close() |
297 |
+- test_support.unlink(self.filename) |
298 |
++ unlink(self.filename) |
299 |
+ |
300 |
+ def mk(self, key): |
301 |
+ """Turn key into an appropriate key type for this db""" |
302 |
+@@ -338,7 +338,7 @@ class BasicEnvShelveTestCase(DBShelveTestCase): |
303 |
+ from .test_all import do_proxy_db_py3k |
304 |
+ do_proxy_db_py3k(self._flag_proxy_db_py3k) |
305 |
+ self.do_close() |
306 |
+- test_support.rmtree(self.homeDir) |
307 |
++ rmtree(self.homeDir) |
308 |
+ |
309 |
+ |
310 |
+ class EnvBTreeShelveTestCase(BasicEnvShelveTestCase): |
311 |
+--- a/Lib3/bsddb/test/test_dbtables.py |
312 |
++++ b/Lib3/bsddb/test/test_dbtables.py |
313 |
+@@ -31,7 +31,7 @@ else : |
314 |
+ import pickle |
315 |
+ |
316 |
+ import unittest |
317 |
+-from .test_all import db, dbtables, test_support, verbose, \ |
318 |
++from .test_all import db, dbtables, rmtree, verbose, \ |
319 |
+ get_new_environment_path, get_new_database_path |
320 |
+ |
321 |
+ #---------------------------------------------------------------------- |
322 |
+@@ -55,7 +55,7 @@ class TableDBTestCase(unittest.TestCase): |
323 |
+ if sys.version_info[0] >= 3 : |
324 |
+ from .test_all import do_proxy_db_py3k |
325 |
+ do_proxy_db_py3k(self._flag_proxy_db_py3k) |
326 |
+- test_support.rmtree(self.testHomeDir) |
327 |
++ rmtree(self.testHomeDir) |
328 |
+ |
329 |
+ def test01(self): |
330 |
+ tabname = "test01" |
331 |
+--- a/Lib3/bsddb/test/test_distributed_transactions.py |
332 |
++++ b/Lib3/bsddb/test/test_distributed_transactions.py |
333 |
+@@ -39,7 +39,7 @@ are met: |
334 |
+ import os |
335 |
+ import unittest |
336 |
+ |
337 |
+-from .test_all import db, test_support, get_new_environment_path, \ |
338 |
++from .test_all import db, rmtree, get_new_environment_path, \ |
339 |
+ get_new_database_path |
340 |
+ |
341 |
+ from .test_all import verbose |
342 |
+@@ -84,7 +84,7 @@ class DBTxn_distributed(unittest.TestCase): |
343 |
+ |
344 |
+ def tearDown(self): |
345 |
+ self._destroy_env() |
346 |
+- test_support.rmtree(self.homeDir) |
347 |
++ rmtree(self.homeDir) |
348 |
+ |
349 |
+ def _recreate_env(self,must_open_db) : |
350 |
+ self._destroy_env() |
351 |
+--- a/Lib3/bsddb/test/test_early_close.py |
352 |
++++ b/Lib3/bsddb/test/test_early_close.py |
353 |
+@@ -40,7 +40,7 @@ is closed before its DB objects. |
354 |
+ import os, sys |
355 |
+ import unittest |
356 |
+ |
357 |
+-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path |
358 |
++from .test_all import db, rmtree, verbose, get_new_environment_path, get_new_database_path |
359 |
+ |
360 |
+ # We're going to get warnings in this module about trying to close the db when |
361 |
+ # its env is already closed. Let's just ignore those. |
362 |
+@@ -62,7 +62,7 @@ class DBEnvClosedEarlyCrash(unittest.TestCase): |
363 |
+ self.filename = "test" |
364 |
+ |
365 |
+ def tearDown(self): |
366 |
+- test_support.rmtree(self.homeDir) |
367 |
++ rmtree(self.homeDir) |
368 |
+ |
369 |
+ def test01_close_dbenv_before_db(self): |
370 |
+ dbenv = db.DBEnv() |
371 |
+--- a/Lib3/bsddb/test/test_fileid.py |
372 |
++++ b/Lib3/bsddb/test/test_fileid.py |
373 |
+@@ -40,7 +40,7 @@ import os |
374 |
+ import shutil |
375 |
+ import unittest |
376 |
+ |
377 |
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path |
378 |
++from .test_all import db, rmtree, unlink, get_new_environment_path, get_new_database_path |
379 |
+ |
380 |
+ class FileidResetTestCase(unittest.TestCase): |
381 |
+ def setUp(self): |
382 |
+@@ -82,9 +82,9 @@ class FileidResetTestCase(unittest.TestCase): |
383 |
+ self.db_env.close() |
384 |
+ |
385 |
+ def tearDown(self): |
386 |
+- test_support.unlink(self.db_path_1) |
387 |
+- test_support.unlink(self.db_path_2) |
388 |
+- test_support.rmtree(self.db_env_path) |
389 |
++ unlink(self.db_path_1) |
390 |
++ unlink(self.db_path_2) |
391 |
++ rmtree(self.db_env_path) |
392 |
+ |
393 |
+ def test_suite(): |
394 |
+ suite = unittest.TestSuite() |
395 |
+--- a/Lib3/bsddb/test/test_join.py |
396 |
++++ b/Lib3/bsddb/test/test_join.py |
397 |
+@@ -40,7 +40,7 @@ import os |
398 |
+ |
399 |
+ import unittest |
400 |
+ |
401 |
+-from .test_all import db, dbshelve, test_support, verbose, \ |
402 |
++from .test_all import db, dbshelve, rmtree, verbose, \ |
403 |
+ get_new_environment_path, get_new_database_path |
404 |
+ |
405 |
+ #---------------------------------------------------------------------- |
406 |
+@@ -75,7 +75,7 @@ class JoinTestCase(unittest.TestCase): |
407 |
+ |
408 |
+ def tearDown(self): |
409 |
+ self.env.close() |
410 |
+- test_support.rmtree(self.homeDir) |
411 |
++ rmtree(self.homeDir) |
412 |
+ |
413 |
+ def test01_join(self): |
414 |
+ if verbose: |
415 |
+--- a/Lib3/bsddb/test/test_lock.py |
416 |
++++ b/Lib3/bsddb/test/test_lock.py |
417 |
+@@ -40,7 +40,7 @@ TestCases for testing the locking sub-system. |
418 |
+ import time |
419 |
+ |
420 |
+ import unittest |
421 |
+-from .test_all import db, test_support, verbose, have_threads, \ |
422 |
++from .test_all import db, rmtree, verbose, have_threads, \ |
423 |
+ get_new_environment_path, get_new_database_path |
424 |
+ |
425 |
+ if have_threads : |
426 |
+@@ -63,7 +63,7 @@ class LockingTestCase(unittest.TestCase): |
427 |
+ |
428 |
+ def tearDown(self): |
429 |
+ self.env.close() |
430 |
+- test_support.rmtree(self.homeDir) |
431 |
++ rmtree(self.homeDir) |
432 |
+ |
433 |
+ |
434 |
+ def test01_simple(self): |
435 |
+--- a/Lib3/bsddb/test/test_misc.py |
436 |
++++ b/Lib3/bsddb/test/test_misc.py |
437 |
+@@ -39,7 +39,7 @@ are met: |
438 |
+ import os, sys |
439 |
+ import unittest |
440 |
+ |
441 |
+-from .test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path |
442 |
++from .test_all import db, dbshelve, hashopen, rmtree, unlink, get_new_environment_path, get_new_database_path |
443 |
+ |
444 |
+ #---------------------------------------------------------------------- |
445 |
+ |
446 |
+@@ -49,8 +49,8 @@ class MiscTestCase(unittest.TestCase): |
447 |
+ self.homeDir = get_new_environment_path() |
448 |
+ |
449 |
+ def tearDown(self): |
450 |
+- test_support.unlink(self.filename) |
451 |
+- test_support.rmtree(self.homeDir) |
452 |
++ unlink(self.filename) |
453 |
++ rmtree(self.homeDir) |
454 |
+ |
455 |
+ def test01_badpointer(self): |
456 |
+ dbs = dbshelve.open(self.filename) |
457 |
+@@ -104,7 +104,7 @@ class MiscTestCase(unittest.TestCase): |
458 |
+ # double free happened during exit from DBC_get |
459 |
+ finally: |
460 |
+ db1.close() |
461 |
+- test_support.unlink(self.filename) |
462 |
++ unlink(self.filename) |
463 |
+ |
464 |
+ def test06_key_with_null_bytes(self): |
465 |
+ try: |
466 |
+@@ -123,7 +123,7 @@ class MiscTestCase(unittest.TestCase): |
467 |
+ self.assertEqual(db1['aaa'], 'eh eh eh!') |
468 |
+ finally: |
469 |
+ db1.close() |
470 |
+- test_support.unlink(self.filename) |
471 |
++ unlink(self.filename) |
472 |
+ |
473 |
+ def test07_DB_set_flags_persists(self): |
474 |
+ try: |
475 |
+@@ -147,7 +147,7 @@ class MiscTestCase(unittest.TestCase): |
476 |
+ self.assertEqual([('a', 'new A')], list(db1.items())) |
477 |
+ finally: |
478 |
+ db1.close() |
479 |
+- test_support.unlink(self.filename) |
480 |
++ unlink(self.filename) |
481 |
+ |
482 |
+ |
483 |
+ def test08_ExceptionTypes(self) : |
484 |
+--- a/Lib3/bsddb/test/test_pickle.py |
485 |
++++ b/Lib3/bsddb/test/test_pickle.py |
486 |
+@@ -47,7 +47,7 @@ else : |
487 |
+ |
488 |
+ import unittest |
489 |
+ |
490 |
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path |
491 |
++from .test_all import db, rmtree, get_new_environment_path, get_new_database_path |
492 |
+ |
493 |
+ #---------------------------------------------------------------------- |
494 |
+ |
495 |
+@@ -63,7 +63,7 @@ class pickleTestCase(unittest.TestCase): |
496 |
+ del self.db |
497 |
+ if hasattr(self, 'env'): |
498 |
+ del self.env |
499 |
+- test_support.rmtree(self.homeDir) |
500 |
++ rmtree(self.homeDir) |
501 |
+ |
502 |
+ def _base_test_pickle_DBError(self, pickle): |
503 |
+ self.env = db.DBEnv() |
504 |
+--- a/Lib3/bsddb/test/test_recno.py |
505 |
++++ b/Lib3/bsddb/test/test_recno.py |
506 |
+@@ -42,7 +42,7 @@ from pprint import pprint |
507 |
+ import string |
508 |
+ import unittest |
509 |
+ |
510 |
+-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path |
511 |
++from .test_all import db, rmtree, unlink, verbose, get_new_environment_path, get_new_database_path |
512 |
+ |
513 |
+ |
514 |
+ #---------------------------------------------------------------------- |
515 |
+@@ -60,9 +60,9 @@ class SimpleRecnoTestCase(unittest.TestCase): |
516 |
+ self.homeDir = None |
517 |
+ |
518 |
+ def tearDown(self): |
519 |
+- test_support.unlink(self.filename) |
520 |
++ unlink(self.filename) |
521 |
+ if self.homeDir: |
522 |
+- test_support.rmtree(self.homeDir) |
523 |
++ rmtree(self.homeDir) |
524 |
+ |
525 |
+ def test01_basic(self): |
526 |
+ d = db.DB() |
527 |
+--- a/Lib3/bsddb/test/test_replication.py |
528 |
++++ b/Lib3/bsddb/test/test_replication.py |
529 |
+@@ -41,7 +41,7 @@ import time |
530 |
+ import unittest |
531 |
+ import sys |
532 |
+ |
533 |
+-from .test_all import db, test_support, have_threads, verbose, \ |
534 |
++from .test_all import db, rmtree, find_unused_port, have_threads, verbose, \ |
535 |
+ get_new_environment_path, get_new_database_path |
536 |
+ |
537 |
+ |
538 |
+@@ -101,15 +101,11 @@ class DBReplication(unittest.TestCase) : |
539 |
+ |
540 |
+ self.dbenvClient.close() |
541 |
+ self.dbenvMaster.close() |
542 |
+- test_support.rmtree(self.homeDirClient) |
543 |
+- test_support.rmtree(self.homeDirMaster) |
544 |
++ rmtree(self.homeDirClient) |
545 |
++ rmtree(self.homeDirMaster) |
546 |
+ |
547 |
+ class DBReplicationManager(DBReplication) : |
548 |
+ def test01_basic_replication(self) : |
549 |
+- if sys.version_info < (3, 9): |
550 |
+- find_unused_port = test_support.find_unused_port |
551 |
+- else: |
552 |
+- from test.support.socket_helper import find_unused_port |
553 |
+ master_port = find_unused_port() |
554 |
+ client_port = find_unused_port() |
555 |
+ |
556 |
+@@ -373,8 +369,8 @@ class DBBaseReplication(DBReplication) : |
557 |
+ |
558 |
+ self.dbenvClient.close() |
559 |
+ self.dbenvMaster.close() |
560 |
+- test_support.rmtree(self.homeDirClient) |
561 |
+- test_support.rmtree(self.homeDirMaster) |
562 |
++ rmtree(self.homeDirClient) |
563 |
++ rmtree(self.homeDirMaster) |
564 |
+ |
565 |
+ def basic_rep_threading(self) : |
566 |
+ self.dbenvMaster.rep_start(flags=db.DB_REP_MASTER) |
567 |
+--- a/Lib3/bsddb/test/test_sequence.py |
568 |
++++ b/Lib3/bsddb/test/test_sequence.py |
569 |
+@@ -36,7 +36,7 @@ are met: |
570 |
+ import unittest |
571 |
+ import os |
572 |
+ |
573 |
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path |
574 |
++from .test_all import db, rmtree, get_new_environment_path, get_new_database_path |
575 |
+ |
576 |
+ |
577 |
+ class DBSequenceTest(unittest.TestCase): |
578 |
+@@ -61,7 +61,7 @@ class DBSequenceTest(unittest.TestCase): |
579 |
+ self.dbenv.close() |
580 |
+ del self.dbenv |
581 |
+ |
582 |
+- test_support.rmtree(self.homeDir) |
583 |
++ rmtree(self.homeDir) |
584 |
+ |
585 |
+ def test_get(self): |
586 |
+ self.seq = db.DBSequence(self.d, flags=0) |
587 |
+--- a/Lib3/bsddb/test/test_thread.py |
588 |
++++ b/Lib3/bsddb/test/test_thread.py |
589 |
+@@ -51,7 +51,7 @@ except NameError: |
590 |
+ pass |
591 |
+ |
592 |
+ import unittest |
593 |
+-from .test_all import db, dbutils, test_support, verbose, have_threads, \ |
594 |
++from .test_all import db, dbutils, rmtree, verbose, have_threads, \ |
595 |
+ get_new_environment_path, get_new_database_path |
596 |
+ |
597 |
+ if have_threads : |
598 |
+@@ -88,7 +88,7 @@ class BaseThreadedTestCase(unittest.TestCase): |
599 |
+ def tearDown(self): |
600 |
+ self.d.close() |
601 |
+ self.env.close() |
602 |
+- test_support.rmtree(self.homeDir) |
603 |
++ rmtree(self.homeDir) |
604 |
+ |
605 |
+ def setEnvOpts(self): |
606 |
+ pass |