aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesús Daniel Colmenares Oviedo <DtxdF@disroot.org>2025-05-27 22:03:23 +0000
committerVladimir Druzenko <vvd@FreeBSD.org>2025-05-27 22:14:43 +0000
commit39e75f7802a14126715b2a70007dc107c9954f0b (patch)
treebd08dbb8c8ab92e19c526f9b6b3ab100b2af0e03
parent62afc582dbc070c9d9243ec8d92f25e2dab2bb42 (diff)
devel/py-wait-for2: New port: Handle simultaneous cancellation and future completion
Alternate implementation of asyncio.wait_for(). It handles several edge cases like simultaneous cancellation of wait and completion of future differently and consistently across Python versions 3.7+. https://github.com/Traktormaster/wait-for2 Required for www/py-nicegui 2.18.0. PR: 287082
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-wait-for2/Makefile21
-rw-r--r--devel/py-wait-for2/distinfo3
-rw-r--r--devel/py-wait-for2/pkg-descr4
4 files changed, 29 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 3c6d1f44cce4..eb8be7ecbab1 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -6161,6 +6161,7 @@
SUBDIR += py-vsts-cd-manager
SUBDIR += py-vulture
SUBDIR += py-wadllib
+ SUBDIR += py-wait-for2
SUBDIR += py-warlock
SUBDIR += py-watchdog
SUBDIR += py-watchfiles
diff --git a/devel/py-wait-for2/Makefile b/devel/py-wait-for2/Makefile
new file mode 100644
index 000000000000..dbde6407eabd
--- /dev/null
+++ b/devel/py-wait-for2/Makefile
@@ -0,0 +1,21 @@
+PORTNAME= wait-for2
+DISTVERSION= 0.3.2
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= wait_for2-${DISTVERSION}
+
+MAINTAINER= DtxdF@disroot.org
+COMMENT= Handle simultaneous cancellation and future completion
+WWW= https://pypi.org/project/${PORTNAME} \
+ https://github.com/Traktormaster/${PORTNAME}
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= python
+USE_PYTHON= autoplist distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-wait-for2/distinfo b/devel/py-wait-for2/distinfo
new file mode 100644
index 000000000000..83ec7bb55dd2
--- /dev/null
+++ b/devel/py-wait-for2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1748292412
+SHA256 (wait_for2-0.3.2.tar.gz) = 93863026dc35f3471104ecf7de1f4a0b31f4c8b12a2241c0d6ee26dcc0c2092a
+SIZE (wait_for2-0.3.2.tar.gz) = 16673
diff --git a/devel/py-wait-for2/pkg-descr b/devel/py-wait-for2/pkg-descr
new file mode 100644
index 000000000000..bf3aa0286dfd
--- /dev/null
+++ b/devel/py-wait-for2/pkg-descr
@@ -0,0 +1,4 @@
+wait_for2 is an alternate implementation of asyncio.wait_for(). It
+handles several edge cases like simultaneous cancellation of wait
+and completion of future differently and consistently across Python
+versions 3.7+.