public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/bsddb3/, dev-python/bsddb3/files/
@ 2020-06-18 12:22 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2020-06-18 12:22 UTC (permalink / raw
  To: gentoo-commits

commit:     3fec27b1999c4a84232065f2bb4cb74c3f8f2857
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 18 10:49:37 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 18 12:22:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fec27b1

dev-python/bsddb3: Port to py3.9

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/bsddb3/bsddb3-6.2.7.ebuild           | 11 +++++++----
 dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch | 19 +++++++++++++++++++
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/dev-python/bsddb3/bsddb3-6.2.7.ebuild b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
index 2636c7c14f5..d217d17a5f1 100644
--- a/dev-python/bsddb3/bsddb3-6.2.7.ebuild
+++ b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
+PYTHON_COMPAT=( python2_7 python3_{6..9} )
 PYTHON_REQ_USE="threads(+)"
 DISTUTILS_USE_SETUPTOOLS=no
 
@@ -27,11 +27,14 @@ RDEPEND="
 		sys-libs/db:4.8
 		sys-libs/db:4.7
 	)"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
 
 DISTUTILS_IN_SOURCE_BUILD=1
 
+PATCHES=(
+	"${FILESDIR}"/${P}-py39.patch
+)
+
 python_prepare_all() {
 	# This list should be kept in sync with setup.py.
 	if [[ -z ${DB_VER} ]]; then

diff --git a/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch b/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch
new file mode 100644
index 00000000000..77d4626912a
--- /dev/null
+++ b/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch
@@ -0,0 +1,19 @@
+diff --git a/Lib3/bsddb/test/test_replication.py b/Lib3/bsddb/test/test_replication.py
+index 2fd6aa0..9d78241 100644
+--- a/Lib3/bsddb/test/test_replication.py
++++ b/Lib3/bsddb/test/test_replication.py
+@@ -105,8 +105,12 @@ class DBReplication(unittest.TestCase) :
+ 
+ class DBReplicationManager(DBReplication) :
+     def test01_basic_replication(self) :
+-        master_port = test_support.find_unused_port()
+-        client_port = test_support.find_unused_port()
++        try:
++            from test.support.socket_helper import find_unused_port
++        except ImportError:
++            find_unused_port = test_support.find_unused_port
++        master_port = find_unused_port()
++        client_port = find_unused_port()
+         if db.version() >= (5, 2) :
+             self.site = self.dbenvMaster.repmgr_site("127.0.0.1", master_port)
+             self.site.set_config(db.DB_GROUP_CREATOR, True)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/bsddb3/, dev-python/bsddb3/files/
@ 2021-03-03 23:39 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-03-03 23:39 UTC (permalink / raw
  To: gentoo-commits

commit:     7e257ac6cc1a94fb08801f7326a7db5c959b5d89
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  3 23:15:16 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Mar  3 23:15:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e257ac6

dev-python/bsddb3: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/bsddb3/Manifest                      |  1 -
 dev-python/bsddb3/bsddb3-6.2.7.ebuild           | 68 -------------------------
 dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch | 19 -------
 3 files changed, 88 deletions(-)

diff --git a/dev-python/bsddb3/Manifest b/dev-python/bsddb3/Manifest
index 24805577e20..89e5bbf12b3 100644
--- a/dev-python/bsddb3/Manifest
+++ b/dev-python/bsddb3/Manifest
@@ -1,2 +1 @@
-DIST bsddb3-6.2.7.tar.gz 437325 BLAKE2B ed7931a32766338c5674cc017a8528d30acf9397443f270bf93974c9ed7ae4abdc6b704d85d48f68e0c4b6d85c4ad71edf891e342e5f9b9a597453140adde742 SHA512 edd85fb697142ac152a10a299899c52b637a3b1e3d28d913c61f9de91ef292fc2055daeb18fca62242284b4189a61d5bf318aca6e2966849879043a46db000e0
 DIST bsddb3-6.2.9.tar.gz 230475 BLAKE2B 68c7c498d581dd5ca860060a3152f7ae135bbc75d00714764446d071e8ea88d303a73d1aa411db1ff8fc922aa6d486632fe38bef3596550150ed511a97fc9c9c SHA512 9e878ef865cba608fafe4274b660234927b9106323c3e4ddd728682b0f11b3c7edb9a3dd56cdfe8665eba890df4121695c9710b95bb2f43b8a0be3ec4050f61e

diff --git a/dev-python/bsddb3/bsddb3-6.2.7.ebuild b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
deleted file mode 100644
index baea2b392f2..00000000000
--- a/dev-python/bsddb3/bsddb3-6.2.7.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-PYTHON_REQ_USE="threads(+)"
-DISTUTILS_USE_SETUPTOOLS=no
-
-inherit db-use distutils-r1
-
-DESCRIPTION="Python bindings for Berkeley DB"
-HOMEPAGE="https://www.jcea.es/programacion/pybsddb.htm https://pypi.org/project/bsddb3/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-
-RDEPEND="
-	<sys-libs/db-6.3:=
-	|| (
-		sys-libs/db:6.2
-		sys-libs/db:6.1
-		sys-libs/db:5.3
-		sys-libs/db:5.1
-		sys-libs/db:4.8
-		sys-libs/db:4.7
-	)"
-DEPEND="${RDEPEND}"
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=(
-	"${FILESDIR}"/${P}-py39.patch
-)
-
-python_prepare_all() {
-	# This list should be kept in sync with setup.py.
-	if [[ -z ${DB_VER} ]]; then
-		for DB_VER in 6.2 6.1 5.3 5.1 4.8 4.7; do
-			has_version "sys-libs/db:${DB_VER}" && break
-		done
-	fi
-
-	# Force version.
-	sed -e "s/db_ver = None/db_ver = (${DB_VER%.*}, ${DB_VER#*.})/" \
-		-e "s/dblib = 'db'/dblib = '$(db_libname ${DB_VER})'/" \
-		-i setup2.py setup3.py || die
-
-	# Adjust test.py to look in build/lib.
-	sed -e "s/'lib.%s' % PLAT_SPEC/'lib'/" \
-		-i test2.py test3.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_configure_all() {
-	# These are needed for both build and install.
-	export BERKELEYDB_DIR="${EPREFIX}/usr"
-	export BERKELEYDB_INCDIR="$(db_includedir ${DB_VER})"
-	export BERKELEYDB_LIBDIR="${EPREFIX}/usr/$(get_libdir)"
-	export YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=1
-}
-
-python_test() {
-	PYTHONPATH=Lib3 "${EPYTHON}" test3.py -v || die "Testing failed with ${EPYTHON}"
-}

diff --git a/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch b/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch
deleted file mode 100644
index 77d4626912a..00000000000
--- a/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/Lib3/bsddb/test/test_replication.py b/Lib3/bsddb/test/test_replication.py
-index 2fd6aa0..9d78241 100644
---- a/Lib3/bsddb/test/test_replication.py
-+++ b/Lib3/bsddb/test/test_replication.py
-@@ -105,8 +105,12 @@ class DBReplication(unittest.TestCase) :
- 
- class DBReplicationManager(DBReplication) :
-     def test01_basic_replication(self) :
--        master_port = test_support.find_unused_port()
--        client_port = test_support.find_unused_port()
-+        try:
-+            from test.support.socket_helper import find_unused_port
-+        except ImportError:
-+            find_unused_port = test_support.find_unused_port
-+        master_port = find_unused_port()
-+        client_port = find_unused_port()
-         if db.version() >= (5, 2) :
-             self.site = self.dbenvMaster.repmgr_site("127.0.0.1", master_port)
-             self.site.set_config(db.DB_GROUP_CREATOR, True)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/bsddb3/, dev-python/bsddb3/files/
@ 2021-09-17 12:57 Arthur Zamarin
  0 siblings, 0 replies; 4+ messages in thread
From: Arthur Zamarin @ 2021-09-17 12:57 UTC (permalink / raw
  To: gentoo-commits

commit:     b0100b46b9541905c4a1e58a83a32439cd0494d6
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 17 12:55:38 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 17 12:55:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0100b46

dev-python/bsddb3: enable py3.10

- fix DISTUTILS_USE_SETUPTOOLS
- ported patch from upstream to this version for py3.10
- enable more verbose output (instead of just dots)

Closes: https://bugs.gentoo.org/746302
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/bsddb3/bsddb3-6.2.9.ebuild              |   9 +-
 .../bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch     | 546 +++++++++++++++++++++
 2 files changed, 552 insertions(+), 3 deletions(-)

diff --git a/dev-python/bsddb3/bsddb3-6.2.9.ebuild b/dev-python/bsddb3/bsddb3-6.2.9.ebuild
index 06f089aafd6..f77d531a559 100644
--- a/dev-python/bsddb3/bsddb3-6.2.9.ebuild
+++ b/dev-python/bsddb3/bsddb3-6.2.9.ebuild
@@ -3,9 +3,8 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 PYTHON_REQ_USE="threads(+)"
-DISTUTILS_USE_SETUPTOOLS=no
 DISTUTILS_IN_SOURCE_BUILD=1
 inherit db-use distutils-r1
 
@@ -29,6 +28,10 @@ RDEPEND="
 	)"
 DEPEND="${RDEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/${P}-fix-py3.10.patch"
+)
+
 python_prepare_all() {
 	# This list should be kept in sync with setup.py.
 	if [[ -z ${DB_VER} ]]; then
@@ -58,5 +61,5 @@ python_configure_all() {
 }
 
 python_test() {
-	PYTHONPATH=Lib3 "${EPYTHON}" test3.py -v || die "Testing failed with ${EPYTHON}"
+	PYTHONPATH=Lib3 "${EPYTHON}" test3.py -vv || die "Testing failed with ${EPYTHON}"
 }

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
new file mode 100644
index 00000000000..9e3ab6ba3a9
--- /dev/null
+++ b/dev-python/bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch
@@ -0,0 +1,546 @@
+Based on upstream commit 43fc626bff3e by Jesus Cea <jcea@jcea.es>
+https://hg.jcea.es/pybsddb/rev/43fc626bff3e
+
+Ported to v6.2.9 by Arthur Zamarin <arthurzam@gentoo.org>
+
+--- a/Lib3/bsddb/test/test_all.py
++++ b/Lib3/bsddb/test/test_all.py
+@@ -473,11 +473,15 @@ if sys.version_info[0] >= 3 :
+ from bsddb3 import db, dbtables, dbutils, dbshelve, \
+         hashopen, btopen, rnopen, dbobj
+ 
+-if sys.version_info[0] < 3 :
+-    from test import test_support
+-else :
+-    from test import support as test_support
++if sys.version_info >= (3, 9):
++    from test.support.socket_helper import find_unused_port
++else:
++    from test.support import find_unused_port
+ 
++if sys.version_info >= (3, 10):
++    from test.support.os_helper import rmtree, unlink
++else:
++    from test.support import rmtree, unlink
+ 
+ try:
+     if sys.version_info[0] < 3 :
+@@ -540,7 +544,7 @@ def get_new_environment_path() :
+     try:
+         os.makedirs(path,mode=0o700)
+     except os.error:
+-        test_support.rmtree(path)
++        rmtree(path)
+         os.makedirs(path)
+     return path
+ 
+@@ -565,7 +569,7 @@ def set_test_path_prefix(path) :
+     get_new_path.prefix=path
+ 
+ def remove_test_path_directory() :
+-    test_support.rmtree(get_new_path.prefix)
++    rmtree(get_new_path.prefix)
+ 
+ if have_threads :
+     import threading
+--- a/Lib3/bsddb/test/test_associate.py
++++ b/Lib3/bsddb/test/test_associate.py
+@@ -42,7 +42,7 @@ import time
+ from pprint import pprint
+ 
+ import unittest
+-from .test_all import db, dbshelve, test_support, verbose, have_threads, \
++from .test_all import db, dbshelve, rmtree, verbose, have_threads, \
+         get_new_environment_path
+ 
+ 
+@@ -120,7 +120,7 @@ class AssociateErrorTestCase(unittest.TestCase):
+     def tearDown(self):
+         self.env.close()
+         self.env = None
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def test00_associateDBError(self):
+         if verbose:
+@@ -170,7 +170,7 @@ class AssociateTestCase(unittest.TestCase):
+         self.closeDB()
+         self.env.close()
+         self.env = None
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def addDataToDB(self, d, txn=None):
+         for key, value in list(musicdata.items()):
+--- a/Lib3/bsddb/test/test_basics.py
++++ b/Lib3/bsddb/test/test_basics.py
+@@ -46,7 +46,7 @@ import unittest
+ import time
+ import sys
+ 
+-from .test_all import db, test_support, verbose, get_new_environment_path, \
++from .test_all import db, rmtree, verbose, get_new_environment_path, \
+         get_new_database_path
+ 
+ DASH = '-'
+@@ -94,7 +94,7 @@ class BasicTestCase(unittest.TestCase):
+                 self.filename = "test"
+             # Yes, a bare except is intended, since we're re-raising the exc.
+             except:
+-                test_support.rmtree(self.homeDir)
++                rmtree(self.homeDir)
+                 raise
+         else:
+             self.env = None
+@@ -131,7 +131,7 @@ class BasicTestCase(unittest.TestCase):
+         self.d.close()
+         if self.env is not None:
+             self.env.close()
+-            test_support.rmtree(self.homeDir)
++            rmtree(self.homeDir)
+         else:
+             os.remove(self.filename)
+ 
+--- a/Lib3/bsddb/test/test_compare.py
++++ b/Lib3/bsddb/test/test_compare.py
+@@ -43,7 +43,7 @@ from io import StringIO
+ 
+ import unittest
+ 
+-from .test_all import db, dbshelve, test_support, \
++from .test_all import db, dbshelve, rmtree, \
+         get_new_environment_path, get_new_database_path
+ 
+ 
+@@ -119,7 +119,7 @@ class AbstractBtreeKeyCompareTestCase(unittest.TestCase) :
+         if self.env is not None:
+             self.env.close()
+             self.env = None
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def addDataToDB(self, data) :
+         i = 0
+@@ -304,7 +304,7 @@ class AbstractDuplicateCompareTestCase(unittest.TestCase) :
+         if self.env is not None:
+             self.env.close()
+             self.env = None
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def addDataToDB(self, data) :
+         for item in data:
+--- a/Lib3/bsddb/test/test_cursor_pget_bug.py
++++ b/Lib3/bsddb/test/test_cursor_pget_bug.py
+@@ -36,7 +36,7 @@ are met:
+ import unittest
+ import os, glob
+ 
+-from .test_all import db, test_support, get_new_environment_path, \
++from .test_all import db, rmtree, get_new_environment_path, \
+         get_new_database_path
+ 
+ #----------------------------------------------------------------------
+@@ -67,7 +67,7 @@ class pget_bugTestCase(unittest.TestCase):
+         del self.secondary_db
+         del self.primary_db
+         del self.env
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def test_pget(self):
+         cursor = self.secondary_db.cursor()
+--- a/Lib3/bsddb/test/test_db.py
++++ b/Lib3/bsddb/test/test_db.py
+@@ -36,7 +36,7 @@ are met:
+ import unittest
+ import os, glob
+ 
+-from .test_all import db, test_support, get_new_environment_path, \
++from .test_all import db, rmtree, unlink, get_new_environment_path, \
+         get_new_database_path
+ 
+ #----------------------------------------------------------------------
+@@ -49,7 +49,7 @@ class DB(unittest.TestCase):
+     def tearDown(self):
+         self.db.close()
+         del self.db
+-        test_support.unlink(self.path)
++        unlink(self.path)
+ 
+ class DB_general(DB) :
+     def test_get_open_flags(self) :
+@@ -133,7 +133,7 @@ class DB_txn(DB) :
+         del self.db
+         self.env.close()
+         del self.env
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def test_flags(self) :
+         self.db.set_flags(db.DB_CHKSUM)
+--- a/Lib3/bsddb/test/test_dbenv.py
++++ b/Lib3/bsddb/test/test_dbenv.py
+@@ -36,7 +36,7 @@ are met:
+ import unittest
+ import os, glob
+ 
+-from .test_all import db, test_support, get_new_environment_path, \
++from .test_all import db, rmtree, get_new_environment_path, \
+         get_new_database_path
+ 
+ #----------------------------------------------------------------------
+@@ -49,7 +49,7 @@ class DBEnv(unittest.TestCase):
+     def tearDown(self):
+         self.env.close()
+         del self.env
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+ class DBEnv_general(DBEnv) :
+     def test_get_open_flags(self) :
+--- a/Lib3/bsddb/test/test_dbobj.py
++++ b/Lib3/bsddb/test/test_dbobj.py
+@@ -37,7 +37,7 @@ are met:
+ import os, string
+ import unittest
+ 
+-from .test_all import db, dbobj, test_support, get_new_environment_path, \
++from .test_all import db, dbobj, rmtree, get_new_environment_path, \
+         get_new_database_path
+ 
+ #----------------------------------------------------------------------
+@@ -54,7 +54,7 @@ class dbobjTestCase(unittest.TestCase):
+             del self.db
+         if hasattr(self, 'env'):
+             del self.env
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def test01_both(self):
+         class TestDBEnv(dbobj.DBEnv): pass
+--- a/Lib3/bsddb/test/test_dbshelve.py
++++ b/Lib3/bsddb/test/test_dbshelve.py
+@@ -42,7 +42,7 @@ import random
+ import unittest
+ 
+ 
+-from .test_all import db, dbshelve, test_support, verbose, \
++from .test_all import db, dbshelve, rmtree, unlink, verbose, \
+         get_new_environment_path, get_new_database_path
+ 
+ 
+@@ -82,7 +82,7 @@ class DBShelveTestCase(unittest.TestCase):
+             from .test_all import do_proxy_db_py3k
+             do_proxy_db_py3k(self._flag_proxy_db_py3k)
+         self.do_close()
+-        test_support.unlink(self.filename)
++        unlink(self.filename)
+ 
+     def mk(self, key):
+         """Turn key into an appropriate key type for this db"""
+@@ -338,7 +338,7 @@ class BasicEnvShelveTestCase(DBShelveTestCase):
+             from .test_all import do_proxy_db_py3k
+             do_proxy_db_py3k(self._flag_proxy_db_py3k)
+         self.do_close()
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+ 
+ class EnvBTreeShelveTestCase(BasicEnvShelveTestCase):
+--- a/Lib3/bsddb/test/test_dbtables.py
++++ b/Lib3/bsddb/test/test_dbtables.py
+@@ -31,7 +31,7 @@ else :
+     import pickle
+ 
+ import unittest
+-from .test_all import db, dbtables, test_support, verbose, \
++from .test_all import db, dbtables, rmtree, verbose, \
+         get_new_environment_path, get_new_database_path
+ 
+ #----------------------------------------------------------------------
+@@ -55,7 +55,7 @@ class TableDBTestCase(unittest.TestCase):
+         if sys.version_info[0] >= 3 :
+             from .test_all import do_proxy_db_py3k
+             do_proxy_db_py3k(self._flag_proxy_db_py3k)
+-        test_support.rmtree(self.testHomeDir)
++        rmtree(self.testHomeDir)
+ 
+     def test01(self):
+         tabname = "test01"
+--- a/Lib3/bsddb/test/test_distributed_transactions.py
++++ b/Lib3/bsddb/test/test_distributed_transactions.py
+@@ -39,7 +39,7 @@ are met:
+ import os
+ import unittest
+ 
+-from .test_all import db, test_support, get_new_environment_path, \
++from .test_all import db, rmtree, get_new_environment_path, \
+         get_new_database_path
+ 
+ from .test_all import verbose
+@@ -84,7 +84,7 @@ class DBTxn_distributed(unittest.TestCase):
+ 
+     def tearDown(self):
+         self._destroy_env()
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def _recreate_env(self,must_open_db) :
+         self._destroy_env()
+--- a/Lib3/bsddb/test/test_early_close.py
++++ b/Lib3/bsddb/test/test_early_close.py
+@@ -40,7 +40,7 @@ is closed before its DB objects.
+ import os, sys
+ import unittest
+ 
+-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
++from .test_all import db, rmtree, verbose, get_new_environment_path, get_new_database_path
+ 
+ # We're going to get warnings in this module about trying to close the db when
+ # its env is already closed.  Let's just ignore those.
+@@ -62,7 +62,7 @@ class DBEnvClosedEarlyCrash(unittest.TestCase):
+         self.filename = "test"
+ 
+     def tearDown(self):
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def test01_close_dbenv_before_db(self):
+         dbenv = db.DBEnv()
+--- a/Lib3/bsddb/test/test_fileid.py
++++ b/Lib3/bsddb/test/test_fileid.py
+@@ -40,7 +40,7 @@ import os
+ import shutil
+ import unittest
+ 
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path
++from .test_all import db, rmtree, unlink, get_new_environment_path, get_new_database_path
+ 
+ class FileidResetTestCase(unittest.TestCase):
+     def setUp(self):
+@@ -82,9 +82,9 @@ class FileidResetTestCase(unittest.TestCase):
+         self.db_env.close()
+ 
+     def tearDown(self):
+-        test_support.unlink(self.db_path_1)
+-        test_support.unlink(self.db_path_2)
+-        test_support.rmtree(self.db_env_path)
++        unlink(self.db_path_1)
++        unlink(self.db_path_2)
++        rmtree(self.db_env_path)
+ 
+ def test_suite():
+     suite = unittest.TestSuite()
+--- a/Lib3/bsddb/test/test_join.py
++++ b/Lib3/bsddb/test/test_join.py
+@@ -40,7 +40,7 @@ import os
+ 
+ import unittest
+ 
+-from .test_all import db, dbshelve, test_support, verbose, \
++from .test_all import db, dbshelve, rmtree, verbose, \
+         get_new_environment_path, get_new_database_path
+ 
+ #----------------------------------------------------------------------
+@@ -75,7 +75,7 @@ class JoinTestCase(unittest.TestCase):
+ 
+     def tearDown(self):
+         self.env.close()
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def test01_join(self):
+         if verbose:
+--- a/Lib3/bsddb/test/test_lock.py
++++ b/Lib3/bsddb/test/test_lock.py
+@@ -40,7 +40,7 @@ TestCases for testing the locking sub-system.
+ import time
+ 
+ import unittest
+-from .test_all import db, test_support, verbose, have_threads, \
++from .test_all import db, rmtree, verbose, have_threads, \
+         get_new_environment_path, get_new_database_path
+ 
+ if have_threads :
+@@ -63,7 +63,7 @@ class LockingTestCase(unittest.TestCase):
+ 
+     def tearDown(self):
+         self.env.close()
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+ 
+     def test01_simple(self):
+--- a/Lib3/bsddb/test/test_misc.py
++++ b/Lib3/bsddb/test/test_misc.py
+@@ -39,7 +39,7 @@ are met:
+ import os, sys
+ import unittest
+ 
+-from .test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path
++from .test_all import db, dbshelve, hashopen, rmtree, unlink, get_new_environment_path, get_new_database_path
+ 
+ #----------------------------------------------------------------------
+ 
+@@ -49,8 +49,8 @@ class MiscTestCase(unittest.TestCase):
+         self.homeDir = get_new_environment_path()
+ 
+     def tearDown(self):
+-        test_support.unlink(self.filename)
+-        test_support.rmtree(self.homeDir)
++        unlink(self.filename)
++        rmtree(self.homeDir)
+ 
+     def test01_badpointer(self):
+         dbs = dbshelve.open(self.filename)
+@@ -104,7 +104,7 @@ class MiscTestCase(unittest.TestCase):
+             # double free happened during exit from DBC_get
+         finally:
+             db1.close()
+-            test_support.unlink(self.filename)
++            unlink(self.filename)
+ 
+     def test06_key_with_null_bytes(self):
+         try:
+@@ -123,7 +123,7 @@ class MiscTestCase(unittest.TestCase):
+             self.assertEqual(db1['aaa'], 'eh eh eh!')
+         finally:
+             db1.close()
+-            test_support.unlink(self.filename)
++            unlink(self.filename)
+ 
+     def test07_DB_set_flags_persists(self):
+         try:
+@@ -147,7 +147,7 @@ class MiscTestCase(unittest.TestCase):
+             self.assertEqual([('a', 'new A')], list(db1.items()))
+         finally:
+             db1.close()
+-            test_support.unlink(self.filename)
++            unlink(self.filename)
+ 
+ 
+     def test08_ExceptionTypes(self) :
+--- a/Lib3/bsddb/test/test_pickle.py
++++ b/Lib3/bsddb/test/test_pickle.py
+@@ -47,7 +47,7 @@ else :
+ 
+ import unittest
+ 
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path
++from .test_all import db, rmtree, get_new_environment_path, get_new_database_path
+ 
+ #----------------------------------------------------------------------
+ 
+@@ -63,7 +63,7 @@ class pickleTestCase(unittest.TestCase):
+             del self.db
+         if hasattr(self, 'env'):
+             del self.env
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def _base_test_pickle_DBError(self, pickle):
+         self.env = db.DBEnv()
+--- a/Lib3/bsddb/test/test_recno.py
++++ b/Lib3/bsddb/test/test_recno.py
+@@ -42,7 +42,7 @@ from pprint import pprint
+ import string
+ import unittest
+ 
+-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
++from .test_all import db, rmtree, unlink, verbose, get_new_environment_path, get_new_database_path
+ 
+ 
+ #----------------------------------------------------------------------
+@@ -60,9 +60,9 @@ class SimpleRecnoTestCase(unittest.TestCase):
+         self.homeDir = None
+ 
+     def tearDown(self):
+-        test_support.unlink(self.filename)
++        unlink(self.filename)
+         if self.homeDir:
+-            test_support.rmtree(self.homeDir)
++            rmtree(self.homeDir)
+ 
+     def test01_basic(self):
+         d = db.DB()
+--- a/Lib3/bsddb/test/test_replication.py
++++ b/Lib3/bsddb/test/test_replication.py
+@@ -41,7 +41,7 @@ import time
+ import unittest
+ import sys
+ 
+-from .test_all import db, test_support, have_threads, verbose, \
++from .test_all import db, rmtree, find_unused_port, have_threads, verbose, \
+         get_new_environment_path, get_new_database_path
+ 
+ 
+@@ -101,15 +101,11 @@ class DBReplication(unittest.TestCase) :
+ 
+         self.dbenvClient.close()
+         self.dbenvMaster.close()
+-        test_support.rmtree(self.homeDirClient)
+-        test_support.rmtree(self.homeDirMaster)
++        rmtree(self.homeDirClient)
++        rmtree(self.homeDirMaster)
+ 
+ class DBReplicationManager(DBReplication) :
+     def test01_basic_replication(self) :
+-        if sys.version_info < (3, 9):
+-            find_unused_port = test_support.find_unused_port
+-        else:
+-            from test.support.socket_helper import find_unused_port
+         master_port = find_unused_port()
+         client_port = find_unused_port()
+ 
+@@ -373,8 +369,8 @@ class DBBaseReplication(DBReplication) :
+ 
+         self.dbenvClient.close()
+         self.dbenvMaster.close()
+-        test_support.rmtree(self.homeDirClient)
+-        test_support.rmtree(self.homeDirMaster)
++        rmtree(self.homeDirClient)
++        rmtree(self.homeDirMaster)
+ 
+     def basic_rep_threading(self) :
+         self.dbenvMaster.rep_start(flags=db.DB_REP_MASTER)
+--- a/Lib3/bsddb/test/test_sequence.py
++++ b/Lib3/bsddb/test/test_sequence.py
+@@ -36,7 +36,7 @@ are met:
+ import unittest
+ import os
+ 
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path
++from .test_all import db, rmtree, get_new_environment_path, get_new_database_path
+ 
+ 
+ class DBSequenceTest(unittest.TestCase):
+@@ -61,7 +61,7 @@ class DBSequenceTest(unittest.TestCase):
+             self.dbenv.close()
+             del self.dbenv
+ 
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def test_get(self):
+         self.seq = db.DBSequence(self.d, flags=0)
+--- a/Lib3/bsddb/test/test_thread.py
++++ b/Lib3/bsddb/test/test_thread.py
+@@ -51,7 +51,7 @@ except NameError:
+         pass
+ 
+ import unittest
+-from .test_all import db, dbutils, test_support, verbose, have_threads, \
++from .test_all import db, dbutils, rmtree, verbose, have_threads, \
+         get_new_environment_path, get_new_database_path
+ 
+ if have_threads :
+@@ -88,7 +88,7 @@ class BaseThreadedTestCase(unittest.TestCase):
+     def tearDown(self):
+         self.d.close()
+         self.env.close()
+-        test_support.rmtree(self.homeDir)
++        rmtree(self.homeDir)
+ 
+     def setEnvOpts(self):
+         pass


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/bsddb3/, dev-python/bsddb3/files/
@ 2021-09-18  3:57 Arthur Zamarin
  0 siblings, 0 replies; 4+ messages in thread
From: Arthur Zamarin @ 2021-09-18  3:57 UTC (permalink / raw
  To: gentoo-commits

commit:     442b91c878b65ec9b6285c9cf795199a0f5d69ef
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 18 03:56:03 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 18 03:56:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=442b91c8

dev-python/bsddb3: use fetch for huge patch

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/bsddb3/Manifest                         |   1 +
 dev-python/bsddb3/bsddb3-6.2.9.ebuild              |   5 +-
 .../bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch     | 546 ---------------------
 .../bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch.gz  | Bin 0 -> 3153 bytes
 4 files changed, 4 insertions(+), 548 deletions(-)

diff --git a/dev-python/bsddb3/Manifest b/dev-python/bsddb3/Manifest
index 89e5bbf12b3..a291722f5c6 100644
--- a/dev-python/bsddb3/Manifest
+++ b/dev-python/bsddb3/Manifest
@@ -1 +1,2 @@
+DIST bsddb3-6.2.9-fix-py3.10.patch.gz 3153 BLAKE2B dfdd00e90c683557bafe7d5f0d5c9a6f944fb8495bf1baef8857f6e771cef58c8e5feac9b3d345ebf6403ba73ceaa7f9077f221ad6bad9916b756e6605b30d3d SHA512 3c6157110c94b842811301f4e48c0f1690d9c75379abe7a04bf76f7136d25decbf79673ca2940c5dbb97802acc8c7a9312a24a79e7dfcc3971f9dc250353d732
 DIST bsddb3-6.2.9.tar.gz 230475 BLAKE2B 68c7c498d581dd5ca860060a3152f7ae135bbc75d00714764446d071e8ea88d303a73d1aa411db1ff8fc922aa6d486632fe38bef3596550150ed511a97fc9c9c SHA512 9e878ef865cba608fafe4274b660234927b9106323c3e4ddd728682b0f11b3c7edb9a3dd56cdfe8665eba890df4121695c9710b95bb2f43b8a0be3ec4050f61e

diff --git a/dev-python/bsddb3/bsddb3-6.2.9.ebuild b/dev-python/bsddb3/bsddb3-6.2.9.ebuild
index f77d531a559..cbbd749168b 100644
--- a/dev-python/bsddb3/bsddb3-6.2.9.ebuild
+++ b/dev-python/bsddb3/bsddb3-6.2.9.ebuild
@@ -10,7 +10,8 @@ inherit db-use distutils-r1
 
 DESCRIPTION="Python bindings for Berkeley DB"
 HOMEPAGE="https://www.jcea.es/programacion/pybsddb.htm https://pypi.org/project/bsddb3/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+	https://dev.gentoo.org/~arthurzam/patches/dev-python/${P}-fix-py3.10.patch.gz"
 
 LICENSE="BSD"
 SLOT="0"
@@ -29,7 +30,7 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-	"${FILESDIR}/${P}-fix-py3.10.patch"
+	"${WORKDIR}/${P}-fix-py3.10.patch"
 )
 
 python_prepare_all() {

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
deleted file mode 100644
index 9e3ab6ba3a9..00000000000
--- a/dev-python/bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch
+++ /dev/null
@@ -1,546 +0,0 @@
-Based on upstream commit 43fc626bff3e by Jesus Cea <jcea@jcea.es>
-https://hg.jcea.es/pybsddb/rev/43fc626bff3e
-
-Ported to v6.2.9 by Arthur Zamarin <arthurzam@gentoo.org>
-
---- a/Lib3/bsddb/test/test_all.py
-+++ b/Lib3/bsddb/test/test_all.py
-@@ -473,11 +473,15 @@ if sys.version_info[0] >= 3 :
- from bsddb3 import db, dbtables, dbutils, dbshelve, \
-         hashopen, btopen, rnopen, dbobj
- 
--if sys.version_info[0] < 3 :
--    from test import test_support
--else :
--    from test import support as test_support
-+if sys.version_info >= (3, 9):
-+    from test.support.socket_helper import find_unused_port
-+else:
-+    from test.support import find_unused_port
- 
-+if sys.version_info >= (3, 10):
-+    from test.support.os_helper import rmtree, unlink
-+else:
-+    from test.support import rmtree, unlink
- 
- try:
-     if sys.version_info[0] < 3 :
-@@ -540,7 +544,7 @@ def get_new_environment_path() :
-     try:
-         os.makedirs(path,mode=0o700)
-     except os.error:
--        test_support.rmtree(path)
-+        rmtree(path)
-         os.makedirs(path)
-     return path
- 
-@@ -565,7 +569,7 @@ def set_test_path_prefix(path) :
-     get_new_path.prefix=path
- 
- def remove_test_path_directory() :
--    test_support.rmtree(get_new_path.prefix)
-+    rmtree(get_new_path.prefix)
- 
- if have_threads :
-     import threading
---- a/Lib3/bsddb/test/test_associate.py
-+++ b/Lib3/bsddb/test/test_associate.py
-@@ -42,7 +42,7 @@ import time
- from pprint import pprint
- 
- import unittest
--from .test_all import db, dbshelve, test_support, verbose, have_threads, \
-+from .test_all import db, dbshelve, rmtree, verbose, have_threads, \
-         get_new_environment_path
- 
- 
-@@ -120,7 +120,7 @@ class AssociateErrorTestCase(unittest.TestCase):
-     def tearDown(self):
-         self.env.close()
-         self.env = None
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def test00_associateDBError(self):
-         if verbose:
-@@ -170,7 +170,7 @@ class AssociateTestCase(unittest.TestCase):
-         self.closeDB()
-         self.env.close()
-         self.env = None
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def addDataToDB(self, d, txn=None):
-         for key, value in list(musicdata.items()):
---- a/Lib3/bsddb/test/test_basics.py
-+++ b/Lib3/bsddb/test/test_basics.py
-@@ -46,7 +46,7 @@ import unittest
- import time
- import sys
- 
--from .test_all import db, test_support, verbose, get_new_environment_path, \
-+from .test_all import db, rmtree, verbose, get_new_environment_path, \
-         get_new_database_path
- 
- DASH = '-'
-@@ -94,7 +94,7 @@ class BasicTestCase(unittest.TestCase):
-                 self.filename = "test"
-             # Yes, a bare except is intended, since we're re-raising the exc.
-             except:
--                test_support.rmtree(self.homeDir)
-+                rmtree(self.homeDir)
-                 raise
-         else:
-             self.env = None
-@@ -131,7 +131,7 @@ class BasicTestCase(unittest.TestCase):
-         self.d.close()
-         if self.env is not None:
-             self.env.close()
--            test_support.rmtree(self.homeDir)
-+            rmtree(self.homeDir)
-         else:
-             os.remove(self.filename)
- 
---- a/Lib3/bsddb/test/test_compare.py
-+++ b/Lib3/bsddb/test/test_compare.py
-@@ -43,7 +43,7 @@ from io import StringIO
- 
- import unittest
- 
--from .test_all import db, dbshelve, test_support, \
-+from .test_all import db, dbshelve, rmtree, \
-         get_new_environment_path, get_new_database_path
- 
- 
-@@ -119,7 +119,7 @@ class AbstractBtreeKeyCompareTestCase(unittest.TestCase) :
-         if self.env is not None:
-             self.env.close()
-             self.env = None
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def addDataToDB(self, data) :
-         i = 0
-@@ -304,7 +304,7 @@ class AbstractDuplicateCompareTestCase(unittest.TestCase) :
-         if self.env is not None:
-             self.env.close()
-             self.env = None
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def addDataToDB(self, data) :
-         for item in data:
---- a/Lib3/bsddb/test/test_cursor_pget_bug.py
-+++ b/Lib3/bsddb/test/test_cursor_pget_bug.py
-@@ -36,7 +36,7 @@ are met:
- import unittest
- import os, glob
- 
--from .test_all import db, test_support, get_new_environment_path, \
-+from .test_all import db, rmtree, get_new_environment_path, \
-         get_new_database_path
- 
- #----------------------------------------------------------------------
-@@ -67,7 +67,7 @@ class pget_bugTestCase(unittest.TestCase):
-         del self.secondary_db
-         del self.primary_db
-         del self.env
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def test_pget(self):
-         cursor = self.secondary_db.cursor()
---- a/Lib3/bsddb/test/test_db.py
-+++ b/Lib3/bsddb/test/test_db.py
-@@ -36,7 +36,7 @@ are met:
- import unittest
- import os, glob
- 
--from .test_all import db, test_support, get_new_environment_path, \
-+from .test_all import db, rmtree, unlink, get_new_environment_path, \
-         get_new_database_path
- 
- #----------------------------------------------------------------------
-@@ -49,7 +49,7 @@ class DB(unittest.TestCase):
-     def tearDown(self):
-         self.db.close()
-         del self.db
--        test_support.unlink(self.path)
-+        unlink(self.path)
- 
- class DB_general(DB) :
-     def test_get_open_flags(self) :
-@@ -133,7 +133,7 @@ class DB_txn(DB) :
-         del self.db
-         self.env.close()
-         del self.env
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def test_flags(self) :
-         self.db.set_flags(db.DB_CHKSUM)
---- a/Lib3/bsddb/test/test_dbenv.py
-+++ b/Lib3/bsddb/test/test_dbenv.py
-@@ -36,7 +36,7 @@ are met:
- import unittest
- import os, glob
- 
--from .test_all import db, test_support, get_new_environment_path, \
-+from .test_all import db, rmtree, get_new_environment_path, \
-         get_new_database_path
- 
- #----------------------------------------------------------------------
-@@ -49,7 +49,7 @@ class DBEnv(unittest.TestCase):
-     def tearDown(self):
-         self.env.close()
-         del self.env
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
- class DBEnv_general(DBEnv) :
-     def test_get_open_flags(self) :
---- a/Lib3/bsddb/test/test_dbobj.py
-+++ b/Lib3/bsddb/test/test_dbobj.py
-@@ -37,7 +37,7 @@ are met:
- import os, string
- import unittest
- 
--from .test_all import db, dbobj, test_support, get_new_environment_path, \
-+from .test_all import db, dbobj, rmtree, get_new_environment_path, \
-         get_new_database_path
- 
- #----------------------------------------------------------------------
-@@ -54,7 +54,7 @@ class dbobjTestCase(unittest.TestCase):
-             del self.db
-         if hasattr(self, 'env'):
-             del self.env
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def test01_both(self):
-         class TestDBEnv(dbobj.DBEnv): pass
---- a/Lib3/bsddb/test/test_dbshelve.py
-+++ b/Lib3/bsddb/test/test_dbshelve.py
-@@ -42,7 +42,7 @@ import random
- import unittest
- 
- 
--from .test_all import db, dbshelve, test_support, verbose, \
-+from .test_all import db, dbshelve, rmtree, unlink, verbose, \
-         get_new_environment_path, get_new_database_path
- 
- 
-@@ -82,7 +82,7 @@ class DBShelveTestCase(unittest.TestCase):
-             from .test_all import do_proxy_db_py3k
-             do_proxy_db_py3k(self._flag_proxy_db_py3k)
-         self.do_close()
--        test_support.unlink(self.filename)
-+        unlink(self.filename)
- 
-     def mk(self, key):
-         """Turn key into an appropriate key type for this db"""
-@@ -338,7 +338,7 @@ class BasicEnvShelveTestCase(DBShelveTestCase):
-             from .test_all import do_proxy_db_py3k
-             do_proxy_db_py3k(self._flag_proxy_db_py3k)
-         self.do_close()
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
- 
- class EnvBTreeShelveTestCase(BasicEnvShelveTestCase):
---- a/Lib3/bsddb/test/test_dbtables.py
-+++ b/Lib3/bsddb/test/test_dbtables.py
-@@ -31,7 +31,7 @@ else :
-     import pickle
- 
- import unittest
--from .test_all import db, dbtables, test_support, verbose, \
-+from .test_all import db, dbtables, rmtree, verbose, \
-         get_new_environment_path, get_new_database_path
- 
- #----------------------------------------------------------------------
-@@ -55,7 +55,7 @@ class TableDBTestCase(unittest.TestCase):
-         if sys.version_info[0] >= 3 :
-             from .test_all import do_proxy_db_py3k
-             do_proxy_db_py3k(self._flag_proxy_db_py3k)
--        test_support.rmtree(self.testHomeDir)
-+        rmtree(self.testHomeDir)
- 
-     def test01(self):
-         tabname = "test01"
---- a/Lib3/bsddb/test/test_distributed_transactions.py
-+++ b/Lib3/bsddb/test/test_distributed_transactions.py
-@@ -39,7 +39,7 @@ are met:
- import os
- import unittest
- 
--from .test_all import db, test_support, get_new_environment_path, \
-+from .test_all import db, rmtree, get_new_environment_path, \
-         get_new_database_path
- 
- from .test_all import verbose
-@@ -84,7 +84,7 @@ class DBTxn_distributed(unittest.TestCase):
- 
-     def tearDown(self):
-         self._destroy_env()
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def _recreate_env(self,must_open_db) :
-         self._destroy_env()
---- a/Lib3/bsddb/test/test_early_close.py
-+++ b/Lib3/bsddb/test/test_early_close.py
-@@ -40,7 +40,7 @@ is closed before its DB objects.
- import os, sys
- import unittest
- 
--from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
-+from .test_all import db, rmtree, verbose, get_new_environment_path, get_new_database_path
- 
- # We're going to get warnings in this module about trying to close the db when
- # its env is already closed.  Let's just ignore those.
-@@ -62,7 +62,7 @@ class DBEnvClosedEarlyCrash(unittest.TestCase):
-         self.filename = "test"
- 
-     def tearDown(self):
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def test01_close_dbenv_before_db(self):
-         dbenv = db.DBEnv()
---- a/Lib3/bsddb/test/test_fileid.py
-+++ b/Lib3/bsddb/test/test_fileid.py
-@@ -40,7 +40,7 @@ import os
- import shutil
- import unittest
- 
--from .test_all import db, test_support, get_new_environment_path, get_new_database_path
-+from .test_all import db, rmtree, unlink, get_new_environment_path, get_new_database_path
- 
- class FileidResetTestCase(unittest.TestCase):
-     def setUp(self):
-@@ -82,9 +82,9 @@ class FileidResetTestCase(unittest.TestCase):
-         self.db_env.close()
- 
-     def tearDown(self):
--        test_support.unlink(self.db_path_1)
--        test_support.unlink(self.db_path_2)
--        test_support.rmtree(self.db_env_path)
-+        unlink(self.db_path_1)
-+        unlink(self.db_path_2)
-+        rmtree(self.db_env_path)
- 
- def test_suite():
-     suite = unittest.TestSuite()
---- a/Lib3/bsddb/test/test_join.py
-+++ b/Lib3/bsddb/test/test_join.py
-@@ -40,7 +40,7 @@ import os
- 
- import unittest
- 
--from .test_all import db, dbshelve, test_support, verbose, \
-+from .test_all import db, dbshelve, rmtree, verbose, \
-         get_new_environment_path, get_new_database_path
- 
- #----------------------------------------------------------------------
-@@ -75,7 +75,7 @@ class JoinTestCase(unittest.TestCase):
- 
-     def tearDown(self):
-         self.env.close()
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def test01_join(self):
-         if verbose:
---- a/Lib3/bsddb/test/test_lock.py
-+++ b/Lib3/bsddb/test/test_lock.py
-@@ -40,7 +40,7 @@ TestCases for testing the locking sub-system.
- import time
- 
- import unittest
--from .test_all import db, test_support, verbose, have_threads, \
-+from .test_all import db, rmtree, verbose, have_threads, \
-         get_new_environment_path, get_new_database_path
- 
- if have_threads :
-@@ -63,7 +63,7 @@ class LockingTestCase(unittest.TestCase):
- 
-     def tearDown(self):
-         self.env.close()
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
- 
-     def test01_simple(self):
---- a/Lib3/bsddb/test/test_misc.py
-+++ b/Lib3/bsddb/test/test_misc.py
-@@ -39,7 +39,7 @@ are met:
- import os, sys
- import unittest
- 
--from .test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path
-+from .test_all import db, dbshelve, hashopen, rmtree, unlink, get_new_environment_path, get_new_database_path
- 
- #----------------------------------------------------------------------
- 
-@@ -49,8 +49,8 @@ class MiscTestCase(unittest.TestCase):
-         self.homeDir = get_new_environment_path()
- 
-     def tearDown(self):
--        test_support.unlink(self.filename)
--        test_support.rmtree(self.homeDir)
-+        unlink(self.filename)
-+        rmtree(self.homeDir)
- 
-     def test01_badpointer(self):
-         dbs = dbshelve.open(self.filename)
-@@ -104,7 +104,7 @@ class MiscTestCase(unittest.TestCase):
-             # double free happened during exit from DBC_get
-         finally:
-             db1.close()
--            test_support.unlink(self.filename)
-+            unlink(self.filename)
- 
-     def test06_key_with_null_bytes(self):
-         try:
-@@ -123,7 +123,7 @@ class MiscTestCase(unittest.TestCase):
-             self.assertEqual(db1['aaa'], 'eh eh eh!')
-         finally:
-             db1.close()
--            test_support.unlink(self.filename)
-+            unlink(self.filename)
- 
-     def test07_DB_set_flags_persists(self):
-         try:
-@@ -147,7 +147,7 @@ class MiscTestCase(unittest.TestCase):
-             self.assertEqual([('a', 'new A')], list(db1.items()))
-         finally:
-             db1.close()
--            test_support.unlink(self.filename)
-+            unlink(self.filename)
- 
- 
-     def test08_ExceptionTypes(self) :
---- a/Lib3/bsddb/test/test_pickle.py
-+++ b/Lib3/bsddb/test/test_pickle.py
-@@ -47,7 +47,7 @@ else :
- 
- import unittest
- 
--from .test_all import db, test_support, get_new_environment_path, get_new_database_path
-+from .test_all import db, rmtree, get_new_environment_path, get_new_database_path
- 
- #----------------------------------------------------------------------
- 
-@@ -63,7 +63,7 @@ class pickleTestCase(unittest.TestCase):
-             del self.db
-         if hasattr(self, 'env'):
-             del self.env
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def _base_test_pickle_DBError(self, pickle):
-         self.env = db.DBEnv()
---- a/Lib3/bsddb/test/test_recno.py
-+++ b/Lib3/bsddb/test/test_recno.py
-@@ -42,7 +42,7 @@ from pprint import pprint
- import string
- import unittest
- 
--from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
-+from .test_all import db, rmtree, unlink, verbose, get_new_environment_path, get_new_database_path
- 
- 
- #----------------------------------------------------------------------
-@@ -60,9 +60,9 @@ class SimpleRecnoTestCase(unittest.TestCase):
-         self.homeDir = None
- 
-     def tearDown(self):
--        test_support.unlink(self.filename)
-+        unlink(self.filename)
-         if self.homeDir:
--            test_support.rmtree(self.homeDir)
-+            rmtree(self.homeDir)
- 
-     def test01_basic(self):
-         d = db.DB()
---- a/Lib3/bsddb/test/test_replication.py
-+++ b/Lib3/bsddb/test/test_replication.py
-@@ -41,7 +41,7 @@ import time
- import unittest
- import sys
- 
--from .test_all import db, test_support, have_threads, verbose, \
-+from .test_all import db, rmtree, find_unused_port, have_threads, verbose, \
-         get_new_environment_path, get_new_database_path
- 
- 
-@@ -101,15 +101,11 @@ class DBReplication(unittest.TestCase) :
- 
-         self.dbenvClient.close()
-         self.dbenvMaster.close()
--        test_support.rmtree(self.homeDirClient)
--        test_support.rmtree(self.homeDirMaster)
-+        rmtree(self.homeDirClient)
-+        rmtree(self.homeDirMaster)
- 
- class DBReplicationManager(DBReplication) :
-     def test01_basic_replication(self) :
--        if sys.version_info < (3, 9):
--            find_unused_port = test_support.find_unused_port
--        else:
--            from test.support.socket_helper import find_unused_port
-         master_port = find_unused_port()
-         client_port = find_unused_port()
- 
-@@ -373,8 +369,8 @@ class DBBaseReplication(DBReplication) :
- 
-         self.dbenvClient.close()
-         self.dbenvMaster.close()
--        test_support.rmtree(self.homeDirClient)
--        test_support.rmtree(self.homeDirMaster)
-+        rmtree(self.homeDirClient)
-+        rmtree(self.homeDirMaster)
- 
-     def basic_rep_threading(self) :
-         self.dbenvMaster.rep_start(flags=db.DB_REP_MASTER)
---- a/Lib3/bsddb/test/test_sequence.py
-+++ b/Lib3/bsddb/test/test_sequence.py
-@@ -36,7 +36,7 @@ are met:
- import unittest
- import os
- 
--from .test_all import db, test_support, get_new_environment_path, get_new_database_path
-+from .test_all import db, rmtree, get_new_environment_path, get_new_database_path
- 
- 
- class DBSequenceTest(unittest.TestCase):
-@@ -61,7 +61,7 @@ class DBSequenceTest(unittest.TestCase):
-             self.dbenv.close()
-             del self.dbenv
- 
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def test_get(self):
-         self.seq = db.DBSequence(self.d, flags=0)
---- a/Lib3/bsddb/test/test_thread.py
-+++ b/Lib3/bsddb/test/test_thread.py
-@@ -51,7 +51,7 @@ except NameError:
-         pass
- 
- import unittest
--from .test_all import db, dbutils, test_support, verbose, have_threads, \
-+from .test_all import db, dbutils, rmtree, verbose, have_threads, \
-         get_new_environment_path, get_new_database_path
- 
- if have_threads :
-@@ -88,7 +88,7 @@ class BaseThreadedTestCase(unittest.TestCase):
-     def tearDown(self):
-         self.d.close()
-         self.env.close()
--        test_support.rmtree(self.homeDir)
-+        rmtree(self.homeDir)
- 
-     def setEnvOpts(self):
-         pass

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
new file mode 100644
index 00000000000..e8930026ccd
Binary files /dev/null and b/dev-python/bsddb3/files/bsddb3-6.2.9-fix-py3.10.patch.gz differ


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-18  3:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-03 23:39 [gentoo-commits] repo/gentoo:master commit in: dev-python/bsddb3/, dev-python/bsddb3/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2021-09-18  3:57 Arthur Zamarin
2021-09-17 12:57 Arthur Zamarin
2020-06-18 12:22 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox