Date: Thu, 2 Jan 2025 20:12:03 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: afce14fe6550 - main - net/py-pook: New port: HTTP traffic mocking and expectations made easy Message-ID: <202501022012.502KC3n2073039@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=afce14fe655055cb9e19cfcc3b9883fc8888d597 commit afce14fe655055cb9e19cfcc3b9883fc8888d597 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2025-01-02 15:09:02 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2025-01-02 20:11:58 +0000 net/py-pook: New port: HTTP traffic mocking and expectations made easy --- net/Makefile | 1 + net/py-pook/Makefile | 26 ++++++++++++++++++++++++++ net/py-pook/distinfo | 3 +++ net/py-pook/pkg-descr | 18 ++++++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/net/Makefile b/net/Makefile index df002d497cb8..151a98fa8881 100644 --- a/net/Makefile +++ b/net/Makefile @@ -1106,6 +1106,7 @@ SUBDIR += py-pamqp SUBDIR += py-pcapy SUBDIR += py-pcapy-ng + SUBDIR += py-pook SUBDIR += py-port-for SUBDIR += py-portend SUBDIR += py-pychromecast diff --git a/net/py-pook/Makefile b/net/py-pook/Makefile new file mode 100644 index 000000000000..b37d028100ce --- /dev/null +++ b/net/py-pook/Makefile @@ -0,0 +1,26 @@ +PORTNAME= pook +PORTVERSION= 2.1.3 +CATEGORIES= net python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= HTTP traffic mocking and expectations made easy +WWW= https://pook \ + https://github.com/h2non/pook + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}furl>=0.5.6:devel/py-furl@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jsonschema>=2.5.1:devel/py-jsonschema@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.11.0:devel/py-xmltodict@${PY_FLAVOR} +# some test dependencies aren't ported yet, particularly pytest-pook + +USES= python +USE_PYTHON= pep517 autoplist + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/net/py-pook/distinfo b/net/py-pook/distinfo new file mode 100644 index 000000000000..a43106d9a862 --- /dev/null +++ b/net/py-pook/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1735843228 +SHA256 (pook-2.1.3.tar.gz) = 441191c0f3d014b141ca71430a0c2bfa6d2369ac24703a3fdfbbf5a25146d8c0 +SIZE (pook-2.1.3.tar.gz) = 32872 diff --git a/net/py-pook/pkg-descr b/net/py-pook/pkg-descr new file mode 100644 index 000000000000..55046f8c04fa --- /dev/null +++ b/net/py-pook/pkg-descr @@ -0,0 +1,18 @@ +Duet takes inspiration from the amazing trio library and the structured +concurrency approach to async programming that it uses. However, duet differs +from trio in two major ways: +* Instead of a full-blown implementation of asynchronous IO, duet relies on the + Future interface for parallelism, and provides a way to run async/await + coroutines around those Futures. This is useful if you are using an API that + returns futures, such as RPC libraries like gRPC. The standard Future + interface does not implement __await__ directly, so Future instances must be + wrapped in duet.AwaitableFuture. + +* duet is re-entrant. At the top level, you run async code by calling + duet.run(foo). Inside foo suppose you call a function that has not yet been + fully refactored to be asynchronous, but itself calls duet.run(bar). Most + async libraries, including trio and asyncio, will raise an exception if you + try to "re-enter" the event loop in this way, but duet allows it. We have + found that this can simplify the process of refactoring code to be + asynchronous because you don't have to completely separate the sync and async + parts of your codebase all at once.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501022012.502KC3n2073039>