summaryrefslogtreecommitdiff
path: root/dev-python/pymongo
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-10 12:25:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-10 12:25:06 +0100
commite810ac4a0e6af9f763f4433863042b34609075a7 (patch)
tree6fe0b3ff24f3b875be1564e273049c1e301d205b /dev-python/pymongo
parentc218398bbbe70a616790cf146c28c1066b9284bf (diff)
gentoo auto-resync : 10:07:2024 - 12:25:06
Diffstat (limited to 'dev-python/pymongo')
-rw-r--r--dev-python/pymongo/Manifest2
-rw-r--r--dev-python/pymongo/pymongo-4.7.2.ebuild97
2 files changed, 60 insertions, 39 deletions
diff --git a/dev-python/pymongo/Manifest b/dev-python/pymongo/Manifest
index fb15f06ae261..2fe51114198f 100644
--- a/dev-python/pymongo/Manifest
+++ b/dev-python/pymongo/Manifest
@@ -1,3 +1,3 @@
DIST mongo-python-driver-4.7.2.gh.tar.gz 1548375 BLAKE2B a40dbe153f36cdf2836583aa0116f447d08376ce7980a09d0f21cea37a34ab318e5ff0b34b7fe1721cf7fc5d5443a1dbe0982d59cb941b0da8a4a99abdc7b19d SHA512 1de8bd14301e365eb53252dedaaaf8c9056dd534662543e2a500511e5f5f67a69e1f11a8a8575efdbd8852bb47b632d59762f66024d32973d20dc17c4448b9be
-EBUILD pymongo-4.7.2.ebuild 4698 BLAKE2B 9ab94a4d0dab8368e931fc66c353356e61e31fdac6d22aa48c557bcc5dc48494ac6f59a0adb894bae943317bb5451f56facfe9f74d0b188f0de149d97ff347b4 SHA512 0e69de39df590c74cbb7deb67f1d63dd23479162b5f8c8ea1bed569fa695b5dc3b6df6e385bd4df81e8f7a810c2f3f6eaf34d70c2e65348366ec9f3a1592f3b4
+EBUILD pymongo-4.7.2.ebuild 5273 BLAKE2B 744a546bd65aeade14cb29ed09c7819eb626fd9a951f6f7436ae71a51542d0485915e68d42d561937e4214a7395a40fd367fe938a1f2d04b32cfd5acdcf94357 SHA512 446fea553ce9072735563be260aa2288567853442a8bec4439c11fb3d4a093de3e751b67ff82154a1e01d4ead1ba46af76392ec28004b07c49d61fe357c003a6
MISC metadata.xml 880 BLAKE2B 024d83cdf3d8cf94cdc98153a6b429550579d494b053becfe5cda0a7a7f3852632d7155e71116a9ab751e6542fe63985755f4eeb147914bc8dbb1e9fac560434 SHA512 c6110fd18fa7f7819299b5de919bfc0ce407d653115d34d297513ce3a4acd2e16399d6f327c61bc5d4ef8aa6776f84750cff37798415ca4bd59c6fd19961d891
diff --git a/dev-python/pymongo/pymongo-4.7.2.ebuild b/dev-python/pymongo/pymongo-4.7.2.ebuild
index fedcb4086de1..4977d22bf9a4 100644
--- a/dev-python/pymongo/pymongo-4.7.2.ebuild
+++ b/dev-python/pymongo/pymongo-4.7.2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
inherit check-reqs distutils-r1
@@ -99,6 +99,17 @@ python_test() {
# fragile to timing? fails because we're getting too many logs
test/test_connection_logging.py::TestConnectionLoggingConnectionPoolOptions::test_maxConnecting_should_be_included_in_connection_pool_created_message_when_specified
)
+ local run_separately=(
+ # need to run some tests separately and then restart mongodb
+ # to prevent it from crashing
+ # https://bugs.gentoo.org/934389
+ # note that this list must not overlap with EPYTEST_DESELECT
+ test/test_change_stream.py
+ test/test_collation.py
+ test/test_database.py
+ test/test_gridfs.py
+ test/test_gridfs_bucket.py
+ )
if ! use test-full; then
# .invalid is guaranteed to return NXDOMAIN per RFC 6761
@@ -114,45 +125,55 @@ python_test() {
local dbpath=${TMPDIR}/mongo.db
local logpath=${TMPDIR}/mongod.log
- # Now, the hard part: we need to find a free port for mongod.
- # We're just trying to run it random port numbers and check the log
- # for bind errors. It shall be noted that 'mongod --fork' does not
- # return failure when it fails to bind.
-
- mkdir -p "${dbpath}" || die
- while true; do
- ebegin "Trying to start mongod on port ${DB_PORT}"
-
- LC_ALL=C \
- mongod --dbpath "${dbpath}" --nojournal \
- --bind_ip ${DB_IP} --port ${DB_PORT} \
- --unixSocketPrefix "${TMPDIR}" \
- --logpath "${logpath}" --fork \
- && sleep 2
-
- # Now we need to check if the server actually started...
- if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then
- # yay!
- eend 0
- break
- elif grep -q 'Address already in use' "${logpath}"; then
- # ay, someone took our port!
- eend 1
- : $(( DB_PORT += 1 ))
- continue
- else
- eend 1
- eerror "Unable to start mongod for tests. See the server log:"
- eerror " ${logpath}"
- die "Unable to start mongod for tests."
- fi
+ local stage failed=
+ for stage in 1 2; do
+ # Now, the hard part: we need to find a free port for mongod.
+ # We're just trying to run it random port numbers and check the log
+ # for bind errors. It shall be noted that 'mongod --fork' does not
+ # return failure when it fails to bind.
+
+ mkdir -p "${dbpath}" || die
+ while true; do
+ ebegin "Trying to start mongod on port ${DB_PORT}"
+
+ LC_ALL=C \
+ mongod --dbpath "${dbpath}" --nojournal \
+ --bind_ip ${DB_IP} --port ${DB_PORT} \
+ --unixSocketPrefix "${TMPDIR}" \
+ --logpath "${logpath}" --fork \
+ && sleep 2
+
+ # Now we need to check if the server actually started...
+ if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then
+ # yay!
+ eend 0
+ break
+ elif grep -q 'Address already in use' "${logpath}"; then
+ # ay, someone took our port!
+ eend 1
+ : $(( DB_PORT += 1 ))
+ continue
+ else
+ eend 1
+ eerror "Unable to start mongod for tests. See the server log:"
+ eerror " ${logpath}"
+ die "Unable to start mongod for tests."
+ fi
+ done
+
+ case ${stage} in
+ 1)
+ nonfatal epytest "${run_separately[@]}" || failed=1
+ ;;
+ 2)
+ EPYTEST_DESELECT+=( "${run_separately[@]}" )
+ nonfatal epytest || failed=1
+ ;;
+ esac
+
+ mongod --dbpath "${dbpath}" --shutdown || die
done
- local failed
- nonfatal epytest || failed=1
-
- mongod --dbpath "${dbpath}" --shutdown || die
-
[[ ${failed} ]] && die "Tests fail with ${EPYTHON}"
rm -rf "${dbpath}" || die