Gentoo Archives: gentoo-commits

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