From nobody Thu Jan 2 20:12:03 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YPHtD2N2Jz5jvCl; Thu, 02 Jan 2025 20:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YPHtD0Phpz59FT; Thu, 2 Jan 2025 20:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735848724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmjW5+zoB1Xd0FqqrVUL5gaEA9mBXSz0brLevTDKpyQ=; b=HKzBUJNsyY7FqhRq7H7J0uABU1CskqPd/IW+YkT8ODmPUjw7ekG0DGychIkQaRMe5AvZJV Jfg7pRFkdEEys8EAaTt/zy824GGL8SUheMWsqJUJFhxm9YqKMZyXxatxcXWUZ8YXbi7FBH G3vTpIeXOjqW/2RsOl0WI3l+WszbI19quSXFQyfQWzWdENVAuTSr4iY17WBXuszVU9Lz9V 7omdBKGg7j4iJczhiLPaTQrQcJSee7MgWhHzCq8HylZUxpoGj02nj92teO2ZCGzFMfwfY3 XQmCVe1PEFT9oYWKscuLNgeWBF/hHEtzUmx4zkthXlk3PHjYfsNHU75rJlRgoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735848724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmjW5+zoB1Xd0FqqrVUL5gaEA9mBXSz0brLevTDKpyQ=; b=tPLt+Wa2izjo2rgc0FwZg3PKxRbtesnLPPujDFJHm1REuDXi5N2Xx5OcO7FaW3MPbY9ltb VuIJ0mj5Eno3tLn8fiXSyeOTQCZ9PUlFyNmameneCkvhXvwAOQ0WquEUXJ3Kql2jGcH37+ ZMBX7EuWhllpsjVmDMDkE0RKx2JKots0juJ5nWN6PMBgPrsPk2Y13l5ThHHMQtt3/KfkOd 0i8Jfc7//8cIwnrOb6VQplEtUJsxES+SroCLGgci9Ta/jTqQ+fTJRSMrhy4OgPXxIbyUXA EwGo/8XxpxnfvA7IPEGNc5qI/tCEH5eGdYtEUEwNDhqnfgumG8EaKjreZ9h/QA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735848724; a=rsa-sha256; cv=none; b=bP6CnrOZm4iyXTLZZ/onCY/iU/vEC1yG/5T5LLVP5PhqoNecF+Ddanlx7sDR80la8NNbFo Uo1MBE5jfNMXpTjvYfWPFRQJjqQBcwc4omJiwWjS9QR9Bxeq2WX31EIr8svcUQCDhwfex0 h+TacjxpFfsOTLpJPKvaxc43SC5dTZu3w6HOnKrY86+rUNwG1X0P7wKZY9OQyj6ziilWpT HqRREQolDvftKGn+n5SPg7dNq5vtQcL834cd0F4BgdKZ/B4Ct06FdfdFq5tP8b1PThmi0j 0Q6BrE7MSCN/AdCUs+Y+pQmDOWpOLyxhYTFx33Rq531ZqCZ93LmmSn6XGaFDeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YPHtC6zt5zry2; Thu, 02 Jan 2025 20:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 502KC3KG073042; Thu, 2 Jan 2025 20:12:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 502KC3n2073039; Thu, 2 Jan 2025 20:12:03 GMT (envelope-from git) Date: Thu, 2 Jan 2025 20:12:03 GMT Message-Id: <202501022012.502KC3n2073039@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: afce14fe6550 - main - net/py-pook: New port: HTTP traffic mocking and expectations made easy List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afce14fe655055cb9e19cfcc3b9883fc8888d597 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=afce14fe655055cb9e19cfcc3b9883fc8888d597 commit afce14fe655055cb9e19cfcc3b9883fc8888d597 Author: Yuri Victorovich AuthorDate: 2025-01-02 15:09:02 +0000 Commit: Yuri Victorovich 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 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.