git: a5973fce3b0a - main - textproc/yq: update 3.4.3 → 4.1.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 07 Jul 2026 08:56:33 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=a5973fce3b0a68534e6dad235d46f60b0485117c
commit a5973fce3b0a68534e6dad235d46f60b0485117c
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-07 08:55:50 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-07 08:56:25 +0000
textproc/yq: update 3.4.3 → 4.1.1
---
textproc/yq/Makefile | 23 ++++++++++++-----------
textproc/yq/distinfo | 6 +++---
textproc/yq/files/patch-test_test.py | 27 +++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/textproc/yq/Makefile b/textproc/yq/Makefile
index dcd786e51fb6..cda38e4a9d4a 100644
--- a/textproc/yq/Makefile
+++ b/textproc/yq/Makefile
@@ -1,5 +1,5 @@
PORTNAME= yq
-DISTVERSION= 3.4.3
+DISTVERSION= 4.1.1
CATEGORIES= textproc python
MASTER_SITES= PYPI
@@ -11,19 +11,18 @@ WWW= https://kislyuk.github.io/yq/ \
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= ${PY_SETUPTOOLS} \
- ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=7:devel/py-setuptools-scm@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
-RUN_DEPENDS= jq:textproc/jq \
- ${PYTHON_PKGNAMEPREFIX}argcomplete>=1.8.1:devel/py-argcomplete@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}pyaml>=5.3.1:textproc/py-pyaml@${PY_FLAVOR} \
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0:devel/py-hatch-vcs@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}argcomplete>=1.8.1:devel/py-argcomplete@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pyyaml>=5.3.1:devel/py-pyyaml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tomlkit>=0.11.6:textproc/py-tomlkit@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.11.0:devel/py-xmltodict@${PY_FLAVOR}
+ ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.11.0:devel/py-xmltodict@${PY_FLAVOR} \
+ jq:textproc/jq
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}coverage>0:devel/py-coverage@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mypy>0:devel/py-mypy@${PY_FLAVOR} \
- ruff:devel/ruff \
- ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
+ ruff:devel/ruff
USES= python shebangfix
USE_PYTHON= pep517 noflavors autoplist
@@ -36,7 +35,9 @@ CONFLICTS_INSTALL= go-yq
NO_ARCH= yes
-do-test: # tests fail: https://github.com/mikefarah/yq/issues/2016
+do-test:
@cd ${WRKSRC}/test && ${SETENV} ${TEST_ENV} ./test.py
+# tests as of 4.1.1: Ran 27 tests in 0.576s OK
+
.include <bsd.port.mk>
diff --git a/textproc/yq/distinfo b/textproc/yq/distinfo
index 477f0e2bb980..0759b7d804ab 100644
--- a/textproc/yq/distinfo
+++ b/textproc/yq/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1714532096
-SHA256 (yq-3.4.3.tar.gz) = ba586a1a6f30cf705b2f92206712df2281cd320280210e7b7b80adcb8f256e3b
-SIZE (yq-3.4.3.tar.gz) = 33214
+TIMESTAMP = 1783414220
+SHA256 (yq-4.1.1.tar.gz) = ab3fc344dc4a39d833d328f080a6e794c1cb7243b05c0076ac1edce3d22caabd
+SIZE (yq-4.1.1.tar.gz) = 32987
diff --git a/textproc/yq/files/patch-test_test.py b/textproc/yq/files/patch-test_test.py
new file mode 100644
index 000000000000..efa28fd25a2d
--- /dev/null
+++ b/textproc/yq/files/patch-test_test.py
@@ -0,0 +1,27 @@
+-- Add builtins.open wrapper to support /dev/fd/N paths on FreeBSD when fdescfs is not mounted.
+-- This ensures that unit tests can run successfully in environments where /dev/fd is unavailable.
+
+--- test/test.py.orig 2026-07-07 08:53:12 UTC
++++ test/test.py
+@@ -11,6 +11,21 @@ from yq import cli, yq # noqa
+ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
+ from yq import cli, yq # noqa
+
++import builtins
++original_open = builtins.open
++def patched_open(file, *args, **kwargs):
++ if isinstance(file, str) and file.startswith('/dev/fd/'):
++ try:
++ fd = int(file.split('/')[-1])
++ dup_fd = os.dup(fd)
++ mode = args[0] if args else kwargs.get('mode', 'r')
++ return os.fdopen(dup_fd, mode, *args[1:], **{k: v for k, v in kwargs.items() if k != 'mode'})
++ except Exception:
++ pass
++ return original_open(file, *args, **kwargs)
++builtins.open = patched_open
++
++
+ USING_PYPY = True if platform.python_implementation() == "PyPy" else False
+
+ yaml_with_tags = """