From 7977766ee1928ae255192f0d0590b7e79af8771f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:56:46 +0000 Subject: [PATCH 01/57] Bump typer from 0.27.3 to 0.28.0 Bumps [typer](https://github.com/fastapi/typer) from 0.27.3 to 0.28.0. - [Release notes](https://github.com/fastapi/typer/releases) - [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md) - [Commits](https://github.com/fastapi/typer/compare/0.27.3...0.28.0) --- updated-dependencies: - dependency-name: typer dependency-version: 0.28.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index 70f42d045..af661ddf8 100644 --- a/uv.lock +++ b/uv.lock @@ -2290,7 +2290,7 @@ wheels = [ [[package]] name = "typer" -version = "0.27.3" +version = "0.28.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-doc" }, @@ -2298,9 +2298,9 @@ dependencies = [ { name = "rich" }, { name = "shellingham" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/03/51/d33db42cc72ffd8c30777547b42d01f0cbf9d95a770457698d0174b3ed71/typer-0.27.3.tar.gz", hash = "sha256:d0396f770a560ab1b0a8504e13b5f254b728cedb05c61cf0359e944e50ce8901", size = 205303, upload-time = "2026-10-06T17:24:16.61Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ad/8f/21021859316f44289101638dc74d82e13d722d8533e4b8708a3ab7c8461a/typer-0.28.0.tar.gz", hash = "sha256:69ab84ef79fd601cff071bbd2566d855ecadfd93adbc4b3360b9924359bdd857", size = 205415, upload-time = "2026-11-06T08:37:19.779Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/07/ea/2e31b67051e91a133189e9c000c222502ddc6969856416de0d095de4c0b0/typer-0.27.3-py3-none-any.whl", hash = "sha256:e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff", size = 123312, upload-time = "2026-10-06T17:24:15.054Z" }, + { url = "https://files.pythonhosted.org/packages/19/98/8ef60c7cd773dbab9d276a4c7bff505913a25b61acd8a9ef01ceeb70f554/typer-0.28.0-py3-none-any.whl", hash = "sha256:afd18929180b706c5e9a239f53c3c8136903553c0c2d460598bbaa924191d4ab", size = 123253, upload-time = "2026-11-06T08:37:18.611Z" }, ] [[package]] From fe5f89fb2a191847065f81acac5316b9dea017d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:57:06 +0000 Subject: [PATCH 02/57] Bump ruff from 0.17.3 to 0.17.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.17.3 to 0.17.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.17.3...0.17.4) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.17.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- uv.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/uv.lock b/uv.lock index af661ddf8..2ef95879c 100644 --- a/uv.lock +++ b/uv.lock @@ -2160,27 +2160,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.17.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/59/73/81f140c4edd9cc323de5478e6bbd3bbcfae9a82692df1a258de8cec6a6d2/ruff-0.17.3.tar.gz", hash = "sha256:a57049c8addb3662073859bb55a7ad35aa54f8a7c9ed268911d1333c5aadaaa9", size = 5339444, upload-time = "2026-10-27T00:34:05.914Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9e/8c/083365310c4e79c842f25bf5a842facbd9b0c0ec336f96dffa5074fe723d/ruff-0.17.3-py3-none-linux_armv6l.whl", hash = "sha256:ab86b84cd9d05e56d329742c0cabdcbe2d1d56c98f4a04aab9b5b66196febfb4", size = 10216522, upload-time = "2026-10-27T00:33:29.822Z" }, - { url = "https://files.pythonhosted.org/packages/72/26/4b2edf31cfebe9605d8f6ed8f1d6f376d3a53d4c9a123e62661c64c440f0/ruff-0.17.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e407b4a6852853a9a2cdce96963e94ad9775578bb44e7561a0f2829f3cc04b11", size = 10217786, upload-time = "2026-10-27T00:33:33.949Z" }, - { url = "https://files.pythonhosted.org/packages/a2/7e/537aba4b7f54397a374d2f6a6fc93e9c8015e18553f31a4a7b7dbced48b5/ruff-0.17.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b75cc113b3aca388933d8296b667b1ac401a80317ea3074c9b0a66541199da29", size = 9440362, upload-time = "2026-10-27T00:33:35.784Z" }, - { url = "https://files.pythonhosted.org/packages/3d/66/283e39734f66c8a5ebaa93c22eb7b7515779a0b1d5a5c0ad20e05c0edb41/ruff-0.17.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab5fa7ed5ce18554ea69d850ad162cbaa0c85fc47c08d83a569f806681c9a6ad", size = 10094281, upload-time = "2026-10-27T00:33:38.216Z" }, - { url = "https://files.pythonhosted.org/packages/21/4c/1ffc768497bd025a32c72152771e40c0b99bddc5cc6e4f50c7949a395346/ruff-0.17.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c673c170e27834d1262e3a9c1e97bdc9b9c3b180c63d89173ce69747232474c1", size = 10022543, upload-time = "2026-10-27T00:33:40.181Z" }, - { url = "https://files.pythonhosted.org/packages/73/c3/f90db547301080fcb82c92abf914c8bd57b89911d9b65a6c4cc6b52d0635/ruff-0.17.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a754c0341bc9ca151b7b335988b3263921c08859f84ca219b70cee825571b6f", size = 10683921, upload-time = "2026-10-27T00:33:42.182Z" }, - { url = "https://files.pythonhosted.org/packages/e5/98/92d4a8a26c6c96cf1a5b34dd59036d8a71e52d650aab065c58867e964e63/ruff-0.17.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4590b9d86c0b1543ebb09094254e191cd43fe8edaf330baa035aab03da251532", size = 11373408, upload-time = "2026-10-27T00:33:44.19Z" }, - { url = "https://files.pythonhosted.org/packages/43/02/1f24d2e3064c9753926deeb901afa57777b37ee46799b09ddd7aee6e5145/ruff-0.17.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bbde18beccd98c29a227c63c99022e3443b99258e08326df6425dfe0443705ef", size = 10977469, upload-time = "2026-10-27T00:33:46.179Z" }, - { url = "https://files.pythonhosted.org/packages/f0/20/fecedea2209f574ab92033b344e01a7f0c2dc76c6d6d19a14c9f8141173f/ruff-0.17.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7fa4b0f931cdbcb8a52044f370a3eb429fb42eb88807b0e800fcaa98dd42b24e", size = 10577491, upload-time = "2026-10-27T00:33:48.233Z" }, - { url = "https://files.pythonhosted.org/packages/33/36/b93fdf0bc6f84f0cd487aadfb0354deb40013669ea35ac3d26855de1e959/ruff-0.17.3-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:39405f341deec934b4289634324ad695f72df2970f9121582872eaf5b722f0f5", size = 10608748, upload-time = "2026-10-27T00:33:50.284Z" }, - { url = "https://files.pythonhosted.org/packages/5d/b7/7d3f5f14145daead1efb0b9a8289ed1daa100f419d60774375951723ce00/ruff-0.17.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:68074094f55ca3d29ab19491f640282f7a84061c4c7977aa5094b968ca457e9a", size = 10075057, upload-time = "2026-10-27T00:33:52.074Z" }, - { url = "https://files.pythonhosted.org/packages/b0/ed/93ff7a5909ee56e2bd4b982deae9e0efb2724417874a90c9e41ad66c6dd7/ruff-0.17.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:27bb571ac78fef178fe5118d2827df95c2aae74a48fff2b15f6acd03af5ff5bb", size = 10022431, upload-time = "2026-10-27T00:33:54.061Z" }, - { url = "https://files.pythonhosted.org/packages/9b/07/a83b9eeec8c1c3c0e4eda15f06c3a91001bfd2687ea2f07b750719bf9712/ruff-0.17.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:029c37cbd3de48ca37aa12117bead2d065f15da17d66bf84e0d4274013705db2", size = 10394903, upload-time = "2026-10-27T00:33:56.158Z" }, - { url = "https://files.pythonhosted.org/packages/af/b2/05c39857c2526fcbebe46ad93a8dc97424656dfef14d3ef933abe1ffd331/ruff-0.17.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:692fdb46d0fd9c71e380947dc5fc72f2c3f881073bc1f739e4579376231affbe", size = 10799780, upload-time = "2026-10-27T00:33:58.204Z" }, - { url = "https://files.pythonhosted.org/packages/ec/d9/47171a16739eb7a353936b31c20cf54340531e68c9af7d72fd7a784e235d/ruff-0.17.3-py3-none-win32.whl", hash = "sha256:46539cb031b01fd29ae0a02142483c46640b233ee12bb1c1b690bffa1555d5ca", size = 9908481, upload-time = "2026-10-27T00:34:00.087Z" }, - { url = "https://files.pythonhosted.org/packages/d0/a0/f08c1631bfd81faa6a90eaf70c37c786c11bed2046302b56bb506c25e1a0/ruff-0.17.3-py3-none-win_amd64.whl", hash = "sha256:56b8ffb3f3b3cbccb8b76b71b38261b7ed982ef5d20f5b447b1b61a7f4949b24", size = 10341333, upload-time = "2026-10-27T00:34:02.099Z" }, - { url = "https://files.pythonhosted.org/packages/99/d5/4ad4ed31413c301430918e70d3d38ae6f097af0766cb9ab8c9d502b2a4d6/ruff-0.17.3-py3-none-win_arm64.whl", hash = "sha256:81fce74bcd6be0e9da7c67c7553fd0f1f12964a2052cd728ef917b937a5ca1d9", size = 9854332, upload-time = "2026-10-27T00:34:03.847Z" }, +version = "0.17.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/84/0e/3d154514b5bad104f7e1c13169c2d09aa9959fccdc06eb47610ccdfa83ed/ruff-0.17.4.tar.gz", hash = "sha256:f32d178b50e826e00f6c6c1be3f56333068acb9b67fe167143527fa9b81e890d", size = 5357750, upload-time = "2026-11-05T18:52:17.638Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/61/c83c78bbb6108f6c6270a106cf12b54175f4f42da088b9bb880f18e31289/ruff-0.17.4-py3-none-linux_armv6l.whl", hash = "sha256:2b08c4ff98dc234f4a3871a3105353b922fa875ea1073ca31001eb8c06bb4d89", size = 10252195, upload-time = "2026-11-05T18:51:36.594Z" }, + { url = "https://files.pythonhosted.org/packages/0a/12/dd158708378866e8b53e145a465dbc51a7cccb9fa197a74d67eaedde7234/ruff-0.17.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:13e781c3c5f663e7fba737eaaeb70dd943dd55171daf316afb25cd5268cfe0c7", size = 10266044, upload-time = "2026-11-05T18:51:39.502Z" }, + { url = "https://files.pythonhosted.org/packages/28/32/89a94a8eb11fd505a381ae6f04e190d038d9958695209dc1786ce5cfcda3/ruff-0.17.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7ed2f416349944f908f9574215994602242b0836844eba48eec61473033afca0", size = 9432227, upload-time = "2026-11-05T18:51:41.968Z" }, + { url = "https://files.pythonhosted.org/packages/58/de/a392dc38b215798ae72e639d228b7f6c02d826a95d1c0ad7c4c0ee49ef5b/ruff-0.17.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ea6e0017c785f7282092b11e46338e4ebed1b9e575ebf2e55a8a1eda968241a", size = 10136900, upload-time = "2026-11-05T18:51:44.562Z" }, + { url = "https://files.pythonhosted.org/packages/b7/8f/a880f60f42005f6ffdf58f77af34c7ee327000b5607f48a2f6a69d8b242c/ruff-0.17.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7e061dcc0933c7031a616ac8d66ac540309b2aa21ab558101a8f53e9ac7a1185", size = 10051245, upload-time = "2026-11-05T18:51:46.7Z" }, + { url = "https://files.pythonhosted.org/packages/09/55/98844264108af7d5ec27ca3a9cd5a989094ca657a14599c4b69a537a0e9a/ruff-0.17.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f99e95a1515161138be3cbd1b06c06e739d8feb38ade35564556999fffc3686e", size = 10704341, upload-time = "2026-11-05T18:51:49.228Z" }, + { url = "https://files.pythonhosted.org/packages/28/a2/5edf97659c3ac7c73f978003bd314936f671037fdac6b978e9de3e4b2b65/ruff-0.17.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f28cf0dd37cb172fa5a8d2e92e6ada3a9dbd0609f094ed24039929eef0b7524", size = 11394465, upload-time = "2026-11-05T18:51:51.534Z" }, + { url = "https://files.pythonhosted.org/packages/f2/8f/51371ae856b2bef4d15a044a574695fbc0f6ae63aafa42a2a22428070fb6/ruff-0.17.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6b21c771b296888e8a35c6f48555f4b44e4483f61675d6ed51810a5203469ce6", size = 10988262, upload-time = "2026-11-05T18:51:53.91Z" }, + { url = "https://files.pythonhosted.org/packages/af/1b/62874f14c7873f27c7887d2b1ea41de990e14ba9518801ffe8eacb5d51a6/ruff-0.17.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cd025509b2e15721b426fc70fd946d71f43b3db3b08e946dfec2d696d911690", size = 10572829, upload-time = "2026-11-05T18:51:56.129Z" }, + { url = "https://files.pythonhosted.org/packages/98/30/860b9dae67432b16b88558a9cb2d3194825fa62838f8b9cc49f5d9022095/ruff-0.17.4-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:49b77f7b3921669466882a4881168801bdb06ec2cd83fb936049016cf5fdece1", size = 10617545, upload-time = "2026-11-05T18:51:58.172Z" }, + { url = "https://files.pythonhosted.org/packages/0f/08/781a4b41a1c83fd6e30fea610d6502a6f94e49cf94693fd37bdcbc6bfe11/ruff-0.17.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e3b84eb74f260d1c2dbd236fd9d4c011d4fdd0a52bdf8aea57a10e3a1b71fca5", size = 10111955, upload-time = "2026-11-05T18:52:00.59Z" }, + { url = "https://files.pythonhosted.org/packages/3c/e9/94b1c7b677120f30839254518924f73a8157e9bcfa200edcd5796fecdb99/ruff-0.17.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:20e43d7a08e712e33067ba887e6574546c79bd4831596ce8f16803ac7ff9ad90", size = 10058355, upload-time = "2026-11-05T18:52:03.61Z" }, + { url = "https://files.pythonhosted.org/packages/27/5f/a825910b9f309336dc33cb8c0774126662c1d2f765699b3e0a1bd538d01f/ruff-0.17.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:0d1f4848fd2ec0499be4046db9b7dfcc952666885f00233cc7033515282556a8", size = 10415932, upload-time = "2026-11-05T18:52:06.264Z" }, + { url = "https://files.pythonhosted.org/packages/8b/b8/0796468423413ea4df1a6e2442ae26cf49b8f7dda0eecf246e0d5d0dde54/ruff-0.17.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6007e7f3a0e55b0fbdb947af69cf24c21b4928df6be8ef3e767c69b5ccccf496", size = 10826033, upload-time = "2026-11-05T18:52:08.675Z" }, + { url = "https://files.pythonhosted.org/packages/b9/ab/d8e407669ffe5014429baf780c2df47e001968a6e4c17f615e2e7b13a9ba/ruff-0.17.4-py3-none-win32.whl", hash = "sha256:3971a78cba76298b284c8321e6d40d93045ed348bec5c369d85099efc97fb7cf", size = 9931993, upload-time = "2026-11-05T18:52:11.169Z" }, + { url = "https://files.pythonhosted.org/packages/bd/15/42af8a72d8946e3c9efd2bbf6641e462b6832783b0d043d63ef5b280ba7f/ruff-0.17.4-py3-none-win_amd64.whl", hash = "sha256:67c5a894fc054cf41f75f7afa24815de5a74329d97634126c2a1015740ff4e8c", size = 10292922, upload-time = "2026-11-05T18:52:13.436Z" }, + { url = "https://files.pythonhosted.org/packages/68/9e/f1dbffcfb8ff25dadbc21f87a8b73c3848abe4abada9d4b08ccef8bec40c/ruff-0.17.4-py3-none-win_arm64.whl", hash = "sha256:181ae38a9a8fb94925bf7d0794327b48d7fd7f4b50cfd84c0e999cc09ef8d131", size = 9889396, upload-time = "2026-11-05T18:52:15.549Z" }, ] [[package]] From 471ac2a727ca7d774d28ae87744495a135d26712 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:56:34 +0000 Subject: [PATCH 03/57] Bump cachetools from 7.2.8 to 7.3.0 Bumps [cachetools](https://github.com/tkem/cachetools) from 7.2.8 to 7.3.0. - [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst) - [Commits](https://github.com/tkem/cachetools/compare/v7.2.8...v7.3.0) --- updated-dependencies: - dependency-name: cachetools dependency-version: 7.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index 2ef95879c..e403ed06f 100644 --- a/uv.lock +++ b/uv.lock @@ -281,11 +281,11 @@ wheels = [ [[package]] name = "cachetools" -version = "7.2.8" +version = "7.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/93/6f/faa5e0606769105e70e0478031a8f9a6b729e329f42ce2462585c6d9aa52/cachetools-7.2.8.tar.gz", hash = "sha256:3f9b146b2160975da273e7c23ec882f3996b65df608150d52083c07de0682075", size = 47821, upload-time = "2026-10-31T21:37:51.986Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/6b/6c1553e1e8f672f9423344a1915aad1537439ad3d14a3fbc1a02159cfd94/cachetools-7.3.0.tar.gz", hash = "sha256:3f63fc208410f0c3a3b37883c4903ecdacd6f0b259134e6d2e82debd5b2e01de", size = 48563, upload-time = "2026-11-05T20:38:46.434Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0c/35/2fb720060bb278759da35f2076fab1af4e9d66e3add080e6b40d6e25ba48/cachetools-7.2.8-py3-none-any.whl", hash = "sha256:09b04a85741d0019b3fb7d02b7ee9933a422fa6923af92a0fd63b893b695830c", size = 19646, upload-time = "2026-10-31T21:37:50.278Z" }, + { url = "https://files.pythonhosted.org/packages/29/aa/e54a49d0927b2fa7b86bc94dbde57125e38e8cfca7a31b6764e8dbf35e9f/cachetools-7.3.0-py3-none-any.whl", hash = "sha256:2105787c94619bde7072624fec0fe7b8a08bb7bf6c757c318f8925573c6f07c9", size = 19575, upload-time = "2026-11-05T20:38:44.928Z" }, ] [[package]] From ba2ef160de75e2d0c009e2b0df98b4fdd4df437a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:54:14 +0000 Subject: [PATCH 04/57] Bump specifications/json-ld-api from `92f0770` to `5551473` Bumps [specifications/json-ld-api](https://github.com/w3c/json-ld-api) from `92f0770` to `5551473`. - [Commits](https://github.com/w3c/json-ld-api/compare/92f07705a0c0ac27aa9bc6fe1322dcc9fad0114d...55514738d854e56bb8bad4c53cda2f0e23be4a50) --- updated-dependencies: - dependency-name: specifications/json-ld-api dependency-version: 55514738d854e56bb8bad4c53cda2f0e23be4a50 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- specifications/json-ld-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/json-ld-api b/specifications/json-ld-api index 92f07705a..55514738d 160000 --- a/specifications/json-ld-api +++ b/specifications/json-ld-api @@ -1 +1 @@ -Subproject commit 92f07705a0c0ac27aa9bc6fe1322dcc9fad0114d +Subproject commit 55514738d854e56bb8bad4c53cda2f0e23be4a50 From 0e74c4ad77d076b3d4c89327facb63538041f811 Mon Sep 17 00:00:00 2001 From: Afeefa Date: Mon, 16 Nov 2026 19:06:50 +0530 Subject: [PATCH 05/57] Fix misspelled 'embedded' state key in reverse framing --- lib/pyld/jsonld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index cdc9159f8..4d57012a4 100644 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -4660,7 +4660,7 @@ def _match_frame(self, state, subjects, frame, parent, property): {'propertyIsArray': True}, ) self._match_frame( - {**state, 'embeded': True}, + {**state, 'embedded': True}, [subject], subframe, output['@reverse'][reverse_prop], From cdaf83273e5a1c93f2c9c618f6871d6c2838c1c9 Mon Sep 17 00:00:00 2001 From: Afeefa Date: Mon, 16 Nov 2026 19:07:01 +0530 Subject: [PATCH 06/57] Add regression test for @embed @never in reverse frames --- tests/jsonld/test_frame.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/jsonld/test_frame.py b/tests/jsonld/test_frame.py index 7258591b0..443859d9d 100644 --- a/tests/jsonld/test_frame.py +++ b/tests/jsonld/test_frame.py @@ -73,6 +73,41 @@ def test_frame_uses_identifier_issuer_option(): ] } +def test_frame_reverse_embed_never_is_respected(): + # Issue 378: a misspelled state key ignored @embed: @never in @reverse frames + ctx = { + "schema": "http://schema.org/", + "name": "schema:name", + "works_for": {"@id": "schema:worksFor", "@type": "@id"}, + "employees": {"@reverse": "schema:worksFor"}, + } + doc = { + "@context": ctx, + "@graph": [ + {"@id": "ex:org1", "@type": "schema:Organization", "name": "Acme"}, + { + "@id": "ex:p1", + "@type": "schema:Person", + "name": "Ada", + "works_for": "ex:org1", + }, + ], + } + nquads = jsonld.to_rdf(doc, {"format": "application/n-quads"}) + back = jsonld.from_rdf(nquads, {"format": "application/n-quads"}) + + result = jsonld.frame( + back, + { + "@context": ctx, + "@embed": "@once", + "@type": "schema:Organization", + "@reverse": {"schema:worksFor": {"@embed": "@never"}}, + }, + ) + + assert result["employees"] == {"@id": "ex:p1"} + # PR: https://github.com/digitalbazaar/pyld/pull/31 FRAME_0001_IN = { From 40ee36829a56f096191b9f9e51a279bc9474deda Mon Sep 17 00:00:00 2001 From: Afeefa Date: Tue, 17 Nov 2026 17:20:01 +0530 Subject: [PATCH 07/57] Add changelog entry for #378 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71166a9b0..a878c220c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - Preserved RDF literal lexical forms when converting through RDFLib, including canonical double output, large numeric values, and compound literal handling. - Fixed the active context clone dropping the default base direction: `@direction` now survives context layers like `@language`. Fixes [issue #337](https://github.com/digitalbazaar/pyld/issues/337). +- Fixed `@embed: @never` being ignored for reverse-framed properties because of a misspelled `embedded` framing state key. Fixes [issue #378](https://github.com/digitalbazaar/pyld/issues/378). - Fixed `KeyError` when a context sets `@direction: null` and no default base direction is in effect. - Fixed `iri_resolver.unresolve()` query/fragment reconstruction while cleaning up the resolver docstring. - Invalid IRI base values within lists are now skipped when serializing to RDF. Fixes [toRdf#tli12](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#tli12) and [toRdf#tli14](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#tli14). From 270be16ebc9f50170c39c5f709a712076c3b5e2b Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:22:30 +0100 Subject: [PATCH 08/57] fix: resolve references against a base without a path as RFC 3986 does Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 2090a68fa..5535391d5 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -193,11 +193,12 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: base_slash_after_colon_pos = base_iri.find("/", base_colon_pos + 3) if base_slash_after_colon_pos < 0: if len(base_iri) > base_colon_pos + 3: - return ( - base_iri - + "/" - + remove_dot_segments_of_path(relative_iri, value_colon_pos) - ) + # The base has an authority and an empty path: a path-relative + # reference is merged with "/" (RFC 3986, section 5.2.3), an + # absolute path is used as it is, and dot segments are removed. + if not relative_iri.startswith("/"): + relative_iri = "/" + relative_iri + return base_iri + remove_dot_segments(relative_iri) else: return base_scheme + remove_dot_segments_of_path( relative_iri, value_colon_pos From 1bdd30f8a86e84c203ada50eb1e27186cf5486ed Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:22:31 +0100 Subject: [PATCH 09/57] test: resolve absolute paths and dot segments against a base without a path Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 92082e33b..5e4a82695 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -80,6 +80,22 @@ def test_base_without_path_dot_segments(): assert resolve('abc/./', 'http://base.org') == 'http://base.org/abc/' +def test_base_without_path_absolute_path(): + assert resolve('/abc', 'http://base.org') == 'http://base.org/abc' + + +def test_base_without_path_absolute_path_with_dot_segments(): + assert resolve('/abc/../def', 'http://base.org') == 'http://base.org/def' + + +def test_base_without_path_parent_segment(): + assert resolve('../abc', 'http://base.org') == 'http://base.org/abc' + + +def test_base_without_path_query(): + assert resolve('abc?x=1', 'http://base.org') == 'http://base.org/abc?x=1' + + def test_base_only_scheme_slash_slash(): assert resolve('abc', 'http://') == 'http:abc' From b51a50cb71d37bfbc60a560f05b4dcf96eab31f2 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:22:31 +0100 Subject: [PATCH 10/57] docs: add the base without a path fix to the changelog Signed-off-by: jdsika --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a878c220c..f469867d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. +- `iri_resolver.resolve()` resolves a reference against a base with an authority and an empty path, such as `http://example.org`, as RFC 3986 does: `/x` became `http://example.org//x`, and dot segments in a path-relative reference were kept. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 39a4e8e1513604d2ff5235c8612bc12e7bb6848c Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:36:08 +0100 Subject: [PATCH 11/57] fix: drop the base query when resolving a path against a base without a path Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 5535391d5..277998fea 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -196,8 +196,12 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: # The base has an authority and an empty path: a path-relative # reference is merged with "/" (RFC 3986, section 5.2.3), an # absolute path is used as it is, and dot segments are removed. + # A query of the base does not apply to a path reference. if not relative_iri.startswith("/"): relative_iri = "/" + relative_iri + base_query_pos = base_iri.find("?") + if base_query_pos > 0: + base_iri = base_iri[:base_query_pos] return base_iri + remove_dot_segments(relative_iri) else: return base_scheme + remove_dot_segments_of_path( From fe870845c9b38b82aad5685cbd7e6ebbfa9047c5 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:36:09 +0100 Subject: [PATCH 12/57] test: resolve dot segments in queries and against a base with a query Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 5e4a82695..b121ff25f 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -96,6 +96,18 @@ def test_base_without_path_query(): assert resolve('abc?x=1', 'http://base.org') == 'http://base.org/abc?x=1' +def test_base_without_path_dot_segments_in_query(): + assert resolve('abc?x=/../y', 'http://base.org') == 'http://base.org/abc?x=/../y' + + +def test_base_without_path_double_dot(): + assert resolve('..', 'http://base.org') == 'http://base.org/' + + +def test_base_without_path_with_query(): + assert resolve('abc', 'http://base.org?q') == 'http://base.org/abc' + + def test_base_only_scheme_slash_slash(): assert resolve('abc', 'http://') == 'http:abc' From 86aeee423450087b5db01339088e274b7141bacb Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:36:09 +0100 Subject: [PATCH 13/57] docs: complete the base without a path changelog entry Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f469867d0..f8cfbb952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. -- `iri_resolver.resolve()` resolves a reference against a base with an authority and an empty path, such as `http://example.org`, as RFC 3986 does: `/x` became `http://example.org//x`, and dot segments in a path-relative reference were kept. +- `iri_resolver.resolve()` resolves a reference against a base with an authority and an empty path, such as `http://example.org`, as RFC 3986 does: `/x` became `http://example.org//x`, dot segments were kept in a path and removed from a query, and a base query was kept before the path. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 8ae23206dde417f85afaa697d417313184b89c3b Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 15:13:19 +0100 Subject: [PATCH 14/57] fix: ignore the query of the base IRI when resolving a path Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 277998fea..5989fd5b8 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -161,6 +161,12 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: if relative_iri.startswith("#"): return base_iri + relative_iri + # The query of the base IRI only applies to an empty value or a fragment + # (RFC 3986, section 5.2.2) + base_iri_query_pos = base_iri.find("?") + if base_iri_query_pos > 0: + base_iri = base_iri[:base_iri_query_pos] + # Ignore baseIRI if it is empty if not base_iri: relative_colon_pos = relative_iri.find(":") @@ -196,12 +202,8 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: # The base has an authority and an empty path: a path-relative # reference is merged with "/" (RFC 3986, section 5.2.3), an # absolute path is used as it is, and dot segments are removed. - # A query of the base does not apply to a path reference. if not relative_iri.startswith("/"): relative_iri = "/" + relative_iri - base_query_pos = base_iri.find("?") - if base_query_pos > 0: - base_iri = base_iri[:base_query_pos] return base_iri + remove_dot_segments(relative_iri) else: return base_scheme + remove_dot_segments_of_path( From bed7b96764892508216f9b0d1bd0dcf0dfa1349c Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 15:13:20 +0100 Subject: [PATCH 15/57] test: resolve paths against bases with a query that contains a slash Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index b121ff25f..256964a93 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -108,6 +108,18 @@ def test_base_without_path_with_query(): assert resolve('abc', 'http://base.org?q') == 'http://base.org/abc' +def test_base_without_path_relative_with_dot_segments(): + assert resolve('abc/../def', 'http://base.org') == 'http://base.org/def' + + +def test_base_without_path_with_slash_in_query(): + assert resolve('/', 'http://base.org?a/b') == 'http://base.org/' + + +def test_base_with_slash_in_query(): + assert resolve('jjj', 'http://abc/def?ghi/jkl') == 'http://abc/jjj' + + def test_base_only_scheme_slash_slash(): assert resolve('abc', 'http://') == 'http:abc' From 8f85f59e0fef623c3847f62a0ce0f0e1dc3718d0 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 15:13:20 +0100 Subject: [PATCH 16/57] docs: describe the base query fix in the changelog Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8cfbb952..1f2a54ea6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. -- `iri_resolver.resolve()` resolves a reference against a base with an authority and an empty path, such as `http://example.org`, as RFC 3986 does: `/x` became `http://example.org//x`, dot segments were kept in a path and removed from a query, and a base query was kept before the path. +- `iri_resolver.resolve()` resolves a reference against a base with an authority and an empty path, such as `http://example.org`, as RFC 3986 does: `/x` became `http://example.org//x`, and dot segments were kept in a path and removed from a query. The query of the base IRI no longer stays in front of a path, or counts as part of the base path when it contains a `/`. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 3cd7f87e98b00930b443e43fda5c2b02b7441144 Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 13:46:29 +0100 Subject: [PATCH 17/57] test: resolve dot references against a base without a path Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 256964a93..a8aa332fb 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -104,6 +104,18 @@ def test_base_without_path_double_dot(): assert resolve('..', 'http://base.org') == 'http://base.org/' +def test_base_without_path_dot(): + assert resolve('.', 'http://base.org') == 'http://base.org/' + + +def test_base_without_path_dot_slash(): + assert resolve('./', 'http://base.org') == 'http://base.org/' + + +def test_base_without_path_dot_slash_segment(): + assert resolve('./abc', 'http://base.org') == 'http://base.org/abc' + + def test_base_without_path_with_query(): assert resolve('abc', 'http://base.org?q') == 'http://base.org/abc' From bb919f4fb9ef06d4d01efd2b61e4ff3854531bf7 Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 13:46:29 +0100 Subject: [PATCH 18/57] docs: shorten the base without a path changelog entry Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f2a54ea6..2b85389fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. -- `iri_resolver.resolve()` resolves a reference against a base with an authority and an empty path, such as `http://example.org`, as RFC 3986 does: `/x` became `http://example.org//x`, and dot segments were kept in a path and removed from a query. The query of the base IRI no longer stays in front of a path, or counts as part of the base path when it contains a `/`. +- `iri_resolver.resolve()` now follows RFC 3986 §5.2 when the base IRI has an empty path or a query: `/x` against `http://example.org` gives `http://example.org/x` instead of `http://example.org//x`, dot segments are removed from the path and not the query, and the base query no longer carries over to a reference with a path. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From d31287a59fbfd4f1218a0f9ad64a3fcd0d988268 Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 14:14:39 +0100 Subject: [PATCH 19/57] fix: remove dot segments from the path of a reference only, not from its query or fragment Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 5989fd5b8..137274df5 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -7,6 +7,7 @@ .. moduleauthor:: Miel Vander Sande """ +import re from urllib.parse import ParseResult, urlparse, urlunparse @@ -194,31 +195,39 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: if relative_iri.startswith("//"): return base_scheme + remove_dot_segments_of_path(relative_iri, value_colon_pos) + # Dot segments are only removed from the path of the value, which ends at + # the first '?' or '#' (RFC 3986, section 5.2.2) + path_end = re.search(r"[?#]|\Z", relative_iri).start() + query_and_fragment = relative_iri[path_end:] + relative_iri = relative_iri[:path_end] + # Determine where the path of base starts if base_iri.find("//", base_colon_pos) == base_colon_pos + 1: base_slash_after_colon_pos = base_iri.find("/", base_colon_pos + 3) if base_slash_after_colon_pos < 0: if len(base_iri) > base_colon_pos + 3: - # The base has an authority and an empty path: a path-relative - # reference is merged with "/" (RFC 3986, section 5.2.3), an - # absolute path is used as it is, and dot segments are removed. - if not relative_iri.startswith("/"): - relative_iri = "/" + relative_iri - return base_iri + remove_dot_segments(relative_iri) + # The base has an authority and an empty path, so its path is + # taken as '/' (RFC 3986, section 5.2.3) + base_iri += "/" + base_slash_after_colon_pos = len(base_iri) - 1 else: return base_scheme + remove_dot_segments_of_path( - relative_iri, value_colon_pos + relative_iri + query_and_fragment, value_colon_pos ) else: base_slash_after_colon_pos = base_iri.find("/", base_colon_pos + 1) if base_slash_after_colon_pos < 0: return base_scheme + remove_dot_segments_of_path( - relative_iri, value_colon_pos + relative_iri + query_and_fragment, value_colon_pos ) # If relative starts with '/', append after base authority if relative_iri.startswith("/"): - return base_iri[:base_slash_after_colon_pos] + remove_dot_segments(relative_iri) + return ( + base_iri[:base_slash_after_colon_pos] + + remove_dot_segments(relative_iri) + + query_and_fragment + ) base_path = base_iri[base_slash_after_colon_pos:] last_slash = base_path.rfind("/") @@ -237,7 +246,7 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: relative_iri = base_path + relative_iri relative_iri = remove_dot_segments(relative_iri) - return base_iri[:base_slash_after_colon_pos] + relative_iri + return base_iri[:base_slash_after_colon_pos] + relative_iri + query_and_fragment def unresolve(absolute_iri: str, base_iri: str = ""): From 1c0604137dc391a6f0ae0fce614ceb2b1da7b60b Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 14:14:40 +0100 Subject: [PATCH 20/57] test: pin dot segments before a query or fragment and rename the base query tests Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index a8aa332fb..10d4662bd 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -92,7 +92,7 @@ def test_base_without_path_parent_segment(): assert resolve('../abc', 'http://base.org') == 'http://base.org/abc' -def test_base_without_path_query(): +def test_base_without_path_relative_with_query(): assert resolve('abc?x=1', 'http://base.org') == 'http://base.org/abc?x=1' @@ -116,7 +116,15 @@ def test_base_without_path_dot_slash_segment(): assert resolve('./abc', 'http://base.org') == 'http://base.org/abc' -def test_base_without_path_with_query(): +def test_base_without_path_dot_segment_before_query(): + assert resolve('abc/.?x', 'http://base.org') == 'http://base.org/abc/?x' + + +def test_base_without_path_double_dot_segment_before_fragment(): + assert resolve('abc/def/..#x', 'http://base.org') == 'http://base.org/abc/#x' + + +def test_base_without_path_ignores_base_query(): assert resolve('abc', 'http://base.org?q') == 'http://base.org/abc' @@ -132,6 +140,18 @@ def test_base_with_slash_in_query(): assert resolve('jjj', 'http://abc/def?ghi/jkl') == 'http://abc/jjj' +def test_base_dot_segment_before_query(): + assert resolve('abc/.?x', 'http://base.org/') == 'http://base.org/abc/?x' + + +def test_base_with_query_dot_before_query(): + assert resolve('.?y', 'http://abc/def/?x') == 'http://abc/def/?y' + + +def test_base_with_query_dot_before_fragment(): + assert resolve('.#y', 'http://abc/def/?x') == 'http://abc/def/#y' + + def test_base_only_scheme_slash_slash(): assert resolve('abc', 'http://') == 'http:abc' From 5eaa1340add82c826e38909558a7e401d041258f Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 14:14:40 +0100 Subject: [PATCH 21/57] docs: describe the exact resolver changes in the changelog Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b85389fe..678f4e15d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. -- `iri_resolver.resolve()` now follows RFC 3986 §5.2 when the base IRI has an empty path or a query: `/x` against `http://example.org` gives `http://example.org/x` instead of `http://example.org//x`, dot segments are removed from the path and not the query, and the base query no longer carries over to a reference with a path. +- `iri_resolver.resolve()` ignores the base IRI's query when the reference has a path. Against a base IRI with a host, it merges the reference with `/` when the base has no path, removes dot segments from the reference's path only, not from its query or fragment, and keeps the dot of a segment such as `.gh`. For example, `/x` and `./x` against `http://example.org` gave `http://example.org//x` and `http://example.org/./x`, `x` against `http://example.org?q` gave `http://example.org?q/x`, `a/.?x` against `http://example.org/` gave `http://example.org/a?x`, and `.gh` against `http://example.org/a` gave `http://example.org/gh`. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From c7c03147b33cfcef2ef237094d32e90977c8af6e Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 14:18:25 +0100 Subject: [PATCH 22/57] fix: keep the dot of a path segment that starts with a dot Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 137274df5..fe8bdd594 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -235,13 +235,6 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: # Ignore everything after last '/' in base path if last_slash >= 0 and last_slash < len(base_path) - 1: base_path = base_path[: last_slash + 1] - if ( - relative_iri.startswith(".") - and not relative_iri.startswith("..") - and not relative_iri.startswith("./") - and len(relative_iri) > 2 - ): - relative_iri = relative_iri[1:] relative_iri = base_path + relative_iri relative_iri = remove_dot_segments(relative_iri) From f57cc9b715484cc2526de8a4be3374036fe44377 Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 14:18:26 +0100 Subject: [PATCH 23/57] test: keep the dot of a path segment that starts with a dot Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 10d4662bd..3ea8b4ab8 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -152,6 +152,10 @@ def test_base_with_query_dot_before_fragment(): assert resolve('.#y', 'http://abc/def/?x') == 'http://abc/def/#y' +def test_base_segment_starting_with_dot(): + assert resolve('.gh', 'http://example.org/a') == 'http://example.org/.gh' + + def test_base_only_scheme_slash_slash(): assert resolve('abc', 'http://') == 'http:abc' From bb6e51de5e1ffa8dc08b4539846bdcb5e50ab873 Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 16:20:53 +0100 Subject: [PATCH 24/57] refactor: drop the base query in one place Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index fe8bdd594..e3871d9ac 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -151,22 +151,19 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: ) return base_iri - # If the value starts with a query character, concat directly (strip existing query) - if relative_iri.startswith("?"): - base_query_pos = base_iri.find("?") - if base_query_pos > 0: - base_iri = base_iri[:base_query_pos] - return base_iri + relative_iri - # If the value starts with a fragment character, concat directly if relative_iri.startswith("#"): return base_iri + relative_iri # The query of the base IRI only applies to an empty value or a fragment # (RFC 3986, section 5.2.2) - base_iri_query_pos = base_iri.find("?") - if base_iri_query_pos > 0: - base_iri = base_iri[:base_iri_query_pos] + base_query_pos = base_iri.find("?") + if base_query_pos > 0: + base_iri = base_iri[:base_query_pos] + + # If the value starts with a query character, concat directly + if relative_iri.startswith("?"): + return base_iri + relative_iri # Ignore baseIRI if it is empty if not base_iri: From 6bd3e8385c08cef9feec9a37a41e406def47e586 Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 16:32:20 +0100 Subject: [PATCH 25/57] refactor: split the reference only where its path is resolved Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index e3871d9ac..9dc631cab 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -192,12 +192,6 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: if relative_iri.startswith("//"): return base_scheme + remove_dot_segments_of_path(relative_iri, value_colon_pos) - # Dot segments are only removed from the path of the value, which ends at - # the first '?' or '#' (RFC 3986, section 5.2.2) - path_end = re.search(r"[?#]|\Z", relative_iri).start() - query_and_fragment = relative_iri[path_end:] - relative_iri = relative_iri[:path_end] - # Determine where the path of base starts if base_iri.find("//", base_colon_pos) == base_colon_pos + 1: base_slash_after_colon_pos = base_iri.find("/", base_colon_pos + 3) @@ -209,15 +203,21 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: base_slash_after_colon_pos = len(base_iri) - 1 else: return base_scheme + remove_dot_segments_of_path( - relative_iri + query_and_fragment, value_colon_pos + relative_iri, value_colon_pos ) else: base_slash_after_colon_pos = base_iri.find("/", base_colon_pos + 1) if base_slash_after_colon_pos < 0: return base_scheme + remove_dot_segments_of_path( - relative_iri + query_and_fragment, value_colon_pos + relative_iri, value_colon_pos ) + # Dot segments are only removed from the path of the value, which ends at + # the first '?' or '#' (RFC 3986, section 5.2.2) + path_end = re.search(r"[?#]|\Z", relative_iri).start() + query_and_fragment = relative_iri[path_end:] + relative_iri = relative_iri[:path_end] + # If relative starts with '/', append after base authority if relative_iri.startswith("/"): return ( From 54a422ac37f2d7c043db148bfd700424aa5eb07f Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 16:32:21 +0100 Subject: [PATCH 26/57] test: cover a root path and a first segment starting with a dot Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 3ea8b4ab8..b1b874029 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -80,6 +80,10 @@ def test_base_without_path_dot_segments(): assert resolve('abc/./', 'http://base.org') == 'http://base.org/abc/' +def test_base_without_path_root_path(): + assert resolve('/', 'http://base.org') == 'http://base.org/' + + def test_base_without_path_absolute_path(): assert resolve('/abc', 'http://base.org') == 'http://base.org/abc' @@ -156,6 +160,13 @@ def test_base_segment_starting_with_dot(): assert resolve('.gh', 'http://example.org/a') == 'http://example.org/.gh' +def test_base_first_segment_starting_with_dot(): + assert ( + resolve('.x/a', 'http://ex.org/x/yy/zzz/f.ttl') + == 'http://ex.org/x/yy/zzz/.x/a' + ) + + def test_base_only_scheme_slash_slash(): assert resolve('abc', 'http://') == 'http:abc' From ecd80d4ac8f7d87011e749bdca3d48be15940db0 Mon Sep 17 00:00:00 2001 From: jdsika Date: Tue, 10 Nov 2026 16:32:21 +0100 Subject: [PATCH 27/57] docs: shorten and scope the resolver changelog entry Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 678f4e15d..537639975 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. -- `iri_resolver.resolve()` ignores the base IRI's query when the reference has a path. Against a base IRI with a host, it merges the reference with `/` when the base has no path, removes dot segments from the reference's path only, not from its query or fragment, and keeps the dot of a segment such as `.gh`. For example, `/x` and `./x` against `http://example.org` gave `http://example.org//x` and `http://example.org/./x`, `x` against `http://example.org?q` gave `http://example.org?q/x`, `a/.?x` against `http://example.org/` gave `http://example.org/a?x`, and `.gh` against `http://example.org/a` gave `http://example.org/gh`. +- `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query. For those references, it also no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`a/.?x`), or the dot of a first segment such as `.gh`. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From a84f405b00faa3c4f8b72f8b3dc6529813f699a6 Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:25:51 +0100 Subject: [PATCH 28/57] fix: keep the slash of a final dot segment before a query or fragment remove_dot_segments() added the empty last segment after a final '/.' or '/..' only at the very end of the string, so it dropped the '/' when a '?' or '#' followed: '/abc/def/./ghi/../..#abc' gave '/abc#abc' instead of '/abc/#abc' (RFC 3986, section 5.2.4). resolve() worked around this for relative paths only, so absolute IRIs and network-path references still lost the '/' ('http://abc/def/.?x' gave 'http://abc/def?x'). Add the empty last segment whenever the dot segment is not followed by another '/'. This is the same fix as relative-to-absolute-iri.js#33. Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 10 ++++++---- tests/iri_resolver/test_remove_dot_segments.py | 18 +++++++++++++++++- tests/iri_resolver/test_resolve.py | 8 ++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 9dc631cab..d2416177a 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -47,8 +47,9 @@ def remove_dot_segments(path: str) -> str: if segment_buffers: segment_buffers.pop() - # Add trailing slash segment if ends with '/..' - if i + 3 >= length: + # Add trailing slash segment if the path ends with '/..', + # also before a query or fragment + if next_ch != '/': segment_buffers.append([]) i += 3 @@ -61,8 +62,9 @@ def remove_dot_segments(path: str) -> str: i += 1 continue - # Add trailing slash if ends with '/.' - if i + 2 >= length: + # Add trailing slash if the path ends with '/.', + # also before a query or fragment + if next_ch != '/': segment_buffers.append([]) # Stay in current directory — skip diff --git a/tests/iri_resolver/test_remove_dot_segments.py b/tests/iri_resolver/test_remove_dot_segments.py index 95a33681f..7300b6451 100644 --- a/tests/iri_resolver/test_remove_dot_segments.py +++ b/tests/iri_resolver/test_remove_dot_segments.py @@ -100,7 +100,7 @@ def test_not_modify_parent_paths_in_queries(): def test_mixed_current_and_parent_with_fragment(): - assert remove_dot_segments('/abc/def/./ghi/../..#abc') == '/abc#abc' + assert remove_dot_segments('/abc/def/./ghi/../..#abc') == '/abc/#abc' def test_fragment_without_another_path(): @@ -151,6 +151,22 @@ def test_end_with_slash_if_trailing_slash_dot(): assert remove_dot_segments('/a/bb/ccc/./g/.') == '/a/bb/ccc/g/' +def test_end_with_slash_if_slash_dot_before_query(): + assert remove_dot_segments('/abc/def/.?a=b') == '/abc/def/?a=b' + + +def test_end_with_slash_if_slash_dot_before_fragment(): + assert remove_dot_segments('/abc/def/.#abc') == '/abc/def/#abc' + + +def test_end_with_slash_if_slash_double_dot_before_query(): + assert remove_dot_segments('/abc/def/..?a=b') == '/abc/?a=b' + + +def test_end_with_slash_if_slash_double_dot_before_fragment(): + assert remove_dot_segments('/abc/def/..#abc') == '/abc/#abc' + + def test_triple_dots_as_normal_segment(): assert remove_dot_segments('/invalid/...') == '/invalid/...' diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index b1b874029..e86cce274 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -167,6 +167,14 @@ def test_base_first_segment_starting_with_dot(): ) +def test_absolute_dot_segment_before_query(): + assert resolve('http://abc/def/.?x') == 'http://abc/def/?x' + + +def test_network_path_double_dot_segment_before_fragment(): + assert resolve('//abc/def/ghi/..#x', 'http://base.org/') == 'http://abc/def/#x' + + def test_base_only_scheme_slash_slash(): assert resolve('abc', 'http://') == 'http:abc' From a58cafab7ded723ca976cc4d80fc03f3bff7fcd3 Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:26:44 +0100 Subject: [PATCH 29/57] refactor: stop splitting the reference before removing dot segments resolve() split the reference at its first '?' or '#' so that remove_dot_segments() would not drop the '/' of a final dot segment. remove_dot_segments() now keeps it, so the split is no longer needed. This changes no result. Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index d2416177a..3d6f17f10 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -7,7 +7,6 @@ .. moduleauthor:: Miel Vander Sande """ -import re from urllib.parse import ParseResult, urlparse, urlunparse @@ -214,19 +213,9 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: relative_iri, value_colon_pos ) - # Dot segments are only removed from the path of the value, which ends at - # the first '?' or '#' (RFC 3986, section 5.2.2) - path_end = re.search(r"[?#]|\Z", relative_iri).start() - query_and_fragment = relative_iri[path_end:] - relative_iri = relative_iri[:path_end] - # If relative starts with '/', append after base authority if relative_iri.startswith("/"): - return ( - base_iri[:base_slash_after_colon_pos] - + remove_dot_segments(relative_iri) - + query_and_fragment - ) + return base_iri[:base_slash_after_colon_pos] + remove_dot_segments(relative_iri) base_path = base_iri[base_slash_after_colon_pos:] last_slash = base_path.rfind("/") @@ -238,7 +227,7 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: relative_iri = base_path + relative_iri relative_iri = remove_dot_segments(relative_iri) - return base_iri[:base_slash_after_colon_pos] + relative_iri + query_and_fragment + return base_iri[:base_slash_after_colon_pos] + relative_iri def unresolve(absolute_iri: str, base_iri: str = ""): From 913918523a0d9b23e1d5f88acb113c1911702606 Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:26:58 +0100 Subject: [PATCH 30/57] test: cover a base IRI whose only colon is in its query Since the query of the base IRI is dropped before the scheme check, a base IRI such as 'def?x:y' has no scheme left and raises a ValueError for a path reference, as a base IRI without any ':' does. Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index e86cce274..adf3a165b 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -63,6 +63,13 @@ def test_non_absolute_base_error(): resolve('abc', 'def') +def test_base_without_scheme_colon_only_in_query_error(): + with pytest.raises( + ValueError, match=r"Found invalid baseIRI 'def' for value 'abc'" + ): + resolve('abc', 'def?x:y') + + def test_non_absolute_base_empty_value_error(): with pytest.raises(ValueError, match=r"Found invalid baseIRI 'def' for value ''"): resolve('', 'def') From b87fa3e3b382f9240ef06dbcc5e9181bc63c0da7 Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:28:04 +0100 Subject: [PATCH 31/57] docs: note the remove_dot_segments() slash fix in the changelog The fix now lives in remove_dot_segments(), so it applies to every reference, including absolute IRIs and network-path references. Signed-off-by: jdsika --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 537639975..1bcd912fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,8 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. -- `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query. For those references, it also no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`a/.?x`), or the dot of a first segment such as `.gh`. +- `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. +- `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 0404ae0ee5f2c871b2b295b6b0f54679a565daa6 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:21:54 +0100 Subject: [PATCH 32/57] fix: treat a reference with a slash before its first colon as a relative IRI Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 3d6f17f10..f13be92e7 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -175,10 +175,14 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: ) return remove_dot_segments_of_path(relative_iri, relative_colon_pos) - # Ignore baseIRI if the value is absolute + # Ignore baseIRI if the value is absolute. + # Per RFC 3986, a URI scheme cannot contain a '/', so if a '/' appears before + # the first ':', the IRI is a relative path (not an absolute IRI). value_colon_pos = relative_iri.find(":") if value_colon_pos >= 0: - return remove_dot_segments_of_path(relative_iri, value_colon_pos) + value_slash_pos = relative_iri.find("/") + if value_slash_pos < 0 or value_colon_pos < value_slash_pos: + return remove_dot_segments_of_path(relative_iri, value_colon_pos) # baseIRI must be absolute base_colon_pos = base_iri.find(":") From bae554f29f6be54a348e69ab51f72b3dbad047b5 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:21:54 +0100 Subject: [PATCH 33/57] test: resolve references with a slash before a colon Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index adf3a165b..214120f3e 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -480,3 +480,19 @@ def test_relative_with_triple_dot_segment_and_2x_double_dot_and_base(): def test_questionmark_prefix_relative_with_complex_base_with_dot(): assert resolve('?y', 'http://a/bb/ccc/./d;p?q') == 'http://a/bb/ccc/./d;p?y' + + +def test_relative_with_slash_before_colon_and_base_with_trailing_slash(): + assert resolve('x/y:z', 'http://base.org/path/') == 'http://base.org/path/x/y:z' + + +def test_relative_with_slash_before_colon_and_base_without_trailing_slash(): + assert resolve('x/y:z', 'http://base.org/path') == 'http://base.org/x/y:z' + + +def test_relative_with_multiple_colons_after_slash(): + assert resolve('x/y:z:w', 'http://base.org/path/') == 'http://base.org/path/x/y:z:w' + + +def test_absolute_path_with_colon_and_base(): + assert resolve('/a:b', 'http://base.org/path/') == 'http://base.org/a:b' From 0e64cc259fad2de812a0263b59eb6228eb4e5aec Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:21:52 +0100 Subject: [PATCH 34/57] docs: add the relative IRI colon fix to the changelog Signed-off-by: jdsika --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bcd912fd..367a11c49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. - `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). +- `iri_resolver.resolve()` treats a reference with a `/` before its first `:`, such as `/a:b` or `x/y:z`, as a relative IRI, as RFC 3986 and relative-to-absolute-iri.js do. It was returned unresolved, so `jsonld.to_rdf()` dropped it. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 34156f779fad2cb035033ac65df9e2087edcc295 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:35:18 +0100 Subject: [PATCH 35/57] fix: also treat a reference with ? or # before its first colon as relative Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index f13be92e7..5efa3fdbf 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -176,13 +176,14 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: return remove_dot_segments_of_path(relative_iri, relative_colon_pos) # Ignore baseIRI if the value is absolute. - # Per RFC 3986, a URI scheme cannot contain a '/', so if a '/' appears before - # the first ':', the IRI is a relative path (not an absolute IRI). + # Per RFC 3986, a URI scheme cannot contain a '/', '?' or '#', so if one of + # them appears before the first ':', the IRI is relative (not absolute). value_colon_pos = relative_iri.find(":") if value_colon_pos >= 0: - value_slash_pos = relative_iri.find("/") - if value_slash_pos < 0 or value_colon_pos < value_slash_pos: + if not any(ch in relative_iri[:value_colon_pos] for ch in "/?#"): return remove_dot_segments_of_path(relative_iri, value_colon_pos) + # The ':' is part of the relative IRI, not the end of a scheme. + value_colon_pos = -1 # baseIRI must be absolute base_colon_pos = base_iri.find(":") From 9c07761d98b6093d4cebbd95227de279f4a13e4f Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:35:19 +0100 Subject: [PATCH 36/57] test: resolve references with ? or # before a colon and dot segments Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 214120f3e..0c62dc984 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -496,3 +496,15 @@ def test_relative_with_multiple_colons_after_slash(): def test_absolute_path_with_colon_and_base(): assert resolve('/a:b', 'http://base.org/path/') == 'http://base.org/a:b' + + +def test_relative_with_question_mark_before_colon(): + assert resolve('a?b:c', 'http://base.org/path/x') == 'http://base.org/path/a?b:c' + + +def test_relative_with_hash_before_colon(): + assert resolve('a#b:c', 'http://base.org/path/x') == 'http://base.org/path/a#b:c' + + +def test_network_path_with_dot_segment_before_colon(): + assert resolve('//h/./a:b', 'http://base.org/path/') == 'http://h/a:b' From a01d4bbf042af0ac0a0809b62477de97d64ef627 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 14:35:19 +0100 Subject: [PATCH 37/57] docs: mention ? and # in the relative IRI colon changelog entry Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 367a11c49..a787588f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. - `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). -- `iri_resolver.resolve()` treats a reference with a `/` before its first `:`, such as `/a:b` or `x/y:z`, as a relative IRI, as RFC 3986 and relative-to-absolute-iri.js do. It was returned unresolved, so `jsonld.to_rdf()` dropped it. +- `iri_resolver.resolve()` treats a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 3d5dc39a3d1fd04b5785082e87899805dad6b39c Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 15:12:33 +0100 Subject: [PATCH 38/57] fix: start the path before any query or fragment when removing dot segments Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 5efa3fdbf..9351314ce 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -116,9 +116,18 @@ def remove_dot_segments_of_path(iri: str, colon_position: int) -> str: else: search_offset = 2 if len(iri) > 1 and iri[0] == '/' and iri[1] == '/' else 0 - # Find the start of the path + # Find the start of the path: the first '/', unless a query or fragment + # starts before it path_separator = iri.find('/', search_offset) - if path_separator < 0: + query_or_fragment = min( + ( + pos + for pos in (iri.find('?', search_offset), iri.find('#', search_offset)) + if pos >= 0 + ), + default=-1, + ) + if path_separator < 0 or 0 <= query_or_fragment < path_separator: return iri base = iri[:path_separator] From 908d12d1ef09c6a84958b17d32d9a26097c0cb7a Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 15:12:34 +0100 Subject: [PATCH 39/57] test: keep dot segments in a query or fragment Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 0c62dc984..37b189bd3 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -508,3 +508,15 @@ def test_relative_with_hash_before_colon(): def test_network_path_with_dot_segment_before_colon(): assert resolve('//h/./a:b', 'http://base.org/path/') == 'http://h/a:b' + + +def test_relative_with_dot_segments_and_colon_in_query(): + assert resolve('doc?next=/a/../b:c', 'urn:x:y') == 'urn:doc?next=/a/../b:c' + + +def test_relative_with_dot_segments_and_colon_in_fragment(): + assert resolve('doc#/a/../b:c', 'tag:example') == 'tag:doc#/a/../b:c' + + +def test_absolute_iri_with_dot_segments_in_query(): + assert resolve('urn:x?a/../b') == 'urn:x?a/../b' From 128b99db875622e584e38cc1d3b0f501e9d8e17c Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 4 Nov 2026 15:12:43 +0100 Subject: [PATCH 40/57] docs: mention dot segments in queries in the relative IRI colon changelog entry Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a787588f4..ac244b0b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. - `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). -- `iri_resolver.resolve()` treats a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. +- `iri_resolver.resolve()` treats a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. Dot segments in the query or fragment of an IRI are no longer removed. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 00888759d8e8fd49d06b20aa146b1483cbe3e8b8 Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:43:55 +0100 Subject: [PATCH 41/57] test: cover a colon and a dot segment before a query '//h/a:b/.?q' against 'http://x/' and 'z/a:b/.?' against 'urn:x' lost the '/' of the final dot segment on this branch before it built on pyld#372, the same regression that relative-to-absolute-iri.js#34 had. Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 37b189bd3..225348ba1 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -510,6 +510,14 @@ def test_network_path_with_dot_segment_before_colon(): assert resolve('//h/./a:b', 'http://base.org/path/') == 'http://h/a:b' +def test_network_path_with_colon_and_dot_segment_before_query(): + assert resolve('//h/a:b/.?q', 'http://x/') == 'http://h/a:b/?q' + + +def test_relative_with_colon_and_dot_segment_before_query_and_base_without_slash_slash(): + assert resolve('z/a:b/.?', 'urn:x') == 'urn:z/a:b/?' + + def test_relative_with_dot_segments_and_colon_in_query(): assert resolve('doc?next=/a/../b:c', 'urn:x:y') == 'urn:doc?next=/a/../b:c' From c537119fe0420d760bf46633019c5a43180f77cf Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:30:17 +0100 Subject: [PATCH 42/57] refactor: pass -1 once the reference is known to have no scheme After the scheme check, value_colon_pos was always -1, so pass -1 to remove_dot_segments_of_path() directly. Find the start of the path with one find() and a check for '?' or '#' before it, and document colon_position as the ':' that ends the scheme, or -1. This changes no result. It matches relative-to-absolute-iri.js#34. Signed-off-by: jdsika --- lib/pyld/iri_resolver.py | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/lib/pyld/iri_resolver.py b/lib/pyld/iri_resolver.py index 9351314ce..4389c8cbd 100644 --- a/lib/pyld/iri_resolver.py +++ b/lib/pyld/iri_resolver.py @@ -99,7 +99,8 @@ def remove_dot_segments_of_path(iri: str, colon_position: int) -> str: Remove dot segments from the path portion of an IRI (RFC 3986 §5.2.4). :param iri: an IRI (or part of IRI). - :param colonPosition: the position of the first ':' in the IRI. + :param colon_position: the position of the ':' that ends the scheme of the + IRI, or -1 if it has no scheme. :return: the IRI where dot segments were removed. """ @@ -119,15 +120,9 @@ def remove_dot_segments_of_path(iri: str, colon_position: int) -> str: # Find the start of the path: the first '/', unless a query or fragment # starts before it path_separator = iri.find('/', search_offset) - query_or_fragment = min( - ( - pos - for pos in (iri.find('?', search_offset), iri.find('#', search_offset)) - if pos >= 0 - ), - default=-1, - ) - if path_separator < 0 or 0 <= query_or_fragment < path_separator: + if path_separator < 0 or any( + ch in iri[search_offset:path_separator] for ch in '?#' + ): return iri base = iri[:path_separator] @@ -188,11 +183,11 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: # Per RFC 3986, a URI scheme cannot contain a '/', '?' or '#', so if one of # them appears before the first ':', the IRI is relative (not absolute). value_colon_pos = relative_iri.find(":") - if value_colon_pos >= 0: - if not any(ch in relative_iri[:value_colon_pos] for ch in "/?#"): - return remove_dot_segments_of_path(relative_iri, value_colon_pos) - # The ':' is part of the relative IRI, not the end of a scheme. - value_colon_pos = -1 + if value_colon_pos >= 0 and not any( + ch in relative_iri[:value_colon_pos] for ch in "/?#" + ): + return remove_dot_segments_of_path(relative_iri, value_colon_pos) + # From here on, the value has no scheme: a ':' in it does not end a scheme. # baseIRI must be absolute base_colon_pos = base_iri.find(":") @@ -205,7 +200,7 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: # Inherit base scheme if relative starts with '//' if relative_iri.startswith("//"): - return base_scheme + remove_dot_segments_of_path(relative_iri, value_colon_pos) + return base_scheme + remove_dot_segments_of_path(relative_iri, -1) # Determine where the path of base starts if base_iri.find("//", base_colon_pos) == base_colon_pos + 1: @@ -217,15 +212,11 @@ def resolve(relative_iri: str, base_iri: str = None) -> str: base_iri += "/" base_slash_after_colon_pos = len(base_iri) - 1 else: - return base_scheme + remove_dot_segments_of_path( - relative_iri, value_colon_pos - ) + return base_scheme + remove_dot_segments_of_path(relative_iri, -1) else: base_slash_after_colon_pos = base_iri.find("/", base_colon_pos + 1) if base_slash_after_colon_pos < 0: - return base_scheme + remove_dot_segments_of_path( - relative_iri, value_colon_pos - ) + return base_scheme + remove_dot_segments_of_path(relative_iri, -1) # If relative starts with '/', append after base authority if relative_iri.startswith("/"): From 7869e822548d21a4dfb96609475cd3c91ee57f7c Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:44:37 +0100 Subject: [PATCH 43/57] test: cover dot segments before a colon as relative-to-absolute-iri.js does Port the two cases of relative-to-absolute-iri.js#33 and #34 that had no twin here: '/a:b/../c' against 'http://base.org' and 'x/./y:z' against 'tag:example'. Signed-off-by: jdsika --- tests/iri_resolver/test_resolve.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/iri_resolver/test_resolve.py b/tests/iri_resolver/test_resolve.py index 225348ba1..af6434fc3 100644 --- a/tests/iri_resolver/test_resolve.py +++ b/tests/iri_resolver/test_resolve.py @@ -498,6 +498,10 @@ def test_absolute_path_with_colon_and_base(): assert resolve('/a:b', 'http://base.org/path/') == 'http://base.org/a:b' +def test_absolute_path_with_colon_and_dot_segments_and_base_without_path(): + assert resolve('/a:b/../c', 'http://base.org') == 'http://base.org/c' + + def test_relative_with_question_mark_before_colon(): assert resolve('a?b:c', 'http://base.org/path/x') == 'http://base.org/path/a?b:c' @@ -510,6 +514,10 @@ def test_network_path_with_dot_segment_before_colon(): assert resolve('//h/./a:b', 'http://base.org/path/') == 'http://h/a:b' +def test_relative_with_dot_segment_before_colon_and_base_without_slash_slash(): + assert resolve('x/./y:z', 'tag:example') == 'tag:x/y:z' + + def test_network_path_with_colon_and_dot_segment_before_query(): assert resolve('//h/a:b/.?q', 'http://x/') == 'http://h/a:b/?q' From c9290d49821acad20664c7f2ec65385372a1cb5c Mon Sep 17 00:00:00 2001 From: jdsika Date: Thu, 12 Nov 2026 17:44:37 +0100 Subject: [PATCH 44/57] docs: say that the colon fix applies against a base IRI Without a base IRI, such a reference is still returned unchanged, as in relative-to-absolute-iri.js. Signed-off-by: jdsika --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac244b0b5..f524fa4fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. - `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). -- `iri_resolver.resolve()` treats a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. Dot segments in the query or fragment of an IRI are no longer removed. +- `iri_resolver.resolve()` treats a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI and resolves it against the base IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. Dot segments in the query or fragment of an IRI are no longer removed. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From b2276dd3410fb3d8b7bbe0384c06ed98e60e6972 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Mon, 23 Nov 2026 09:34:10 +0100 Subject: [PATCH 45/57] Update CHANGELOG.md Co-authored-by: Miel Vander Sande --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f524fa4fe..61e5e6ed1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,9 @@ - Use a helper for generalized N-Quads normalization in the test runner, since rdflib cannot parse blank-node predicates. Fixes [toRdf#te075](https://w3c.github.io/json-ld-api/tests/toRdf-manifest#te075). - `jsonld.expand()`, `jsonld.to_rdf()` and the other operations no longer fail with an `OverflowError` for an integer too large for a double. `jsonld.to_rdf()` writes it as `INF` or `-INF`, the infinite `xsd:double` values, or, in `json-ld-1.0` mode and not typed as `xsd:double`, as an exact `xsd:integer`. Inside `@json` literals, `jsonld.to_rdf()` and `jsonld.normalize()` still raise `OverflowError` for such numbers, as RFC 8785 only allows numbers that fit in a double. - `jsonld.to_rdf()` writes the `xsd:double` NaN as `NaN`, its XSD canonical form, instead of `NAN`, so `jsonld.normalize()` output changes for documents with such a value. -- `iri_resolver.resolve()` fixes references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. +- Fixed `iri_resolver.resolve()` to + - fix references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. + - treat a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI and resolves it against the base IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). - `iri_resolver.resolve()` treats a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI and resolves it against the base IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. Dot segments in the query or fragment of an IRI are no longer removed. From 1fc4d1d14e228d80064d988a63bbd843cf81e6ea Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Mon, 23 Nov 2026 09:34:25 +0100 Subject: [PATCH 46/57] Update CHANGELOG.md Co-authored-by: Miel Vander Sande --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61e5e6ed1..b8dfd30a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,6 @@ - fix references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. - treat a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI and resolves it against the base IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). -- `iri_resolver.resolve()` treats a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI and resolves it against the base IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. Dot segments in the query or fragment of an IRI are no longer removed. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From c10d600bb0625e8f15f6a46c0df644fdecb53559 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 17:56:46 +0000 Subject: [PATCH 47/57] build(deps): bump cachetools from 7.3.0 to 7.3.2 Bumps [cachetools](https://github.com/tkem/cachetools) from 7.3.0 to 7.3.2. - [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst) - [Commits](https://github.com/tkem/cachetools/compare/v7.3.0...v7.3.2) --- updated-dependencies: - dependency-name: cachetools dependency-version: 7.3.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index e403ed06f..100db3ad1 100644 --- a/uv.lock +++ b/uv.lock @@ -281,11 +281,11 @@ wheels = [ [[package]] name = "cachetools" -version = "7.3.0" +version = "7.3.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5f/6b/6c1553e1e8f672f9423344a1915aad1537439ad3d14a3fbc1a02159cfd94/cachetools-7.3.0.tar.gz", hash = "sha256:3f63fc208410f0c3a3b37883c4903ecdacd6f0b259134e6d2e82debd5b2e01de", size = 48563, upload-time = "2026-11-05T20:38:46.434Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0a/d6/3b2743ae0662528e36b1002074909e4e73dc7407f1fc7da0d6a1b7401e72/cachetools-7.3.2.tar.gz", hash = "sha256:43e5db663b58c4337a9959069d93f54dd2e065fdd0438a504cd1100fbeb48beb", size = 50520, upload-time = "2026-11-14T21:19:07.523Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/29/aa/e54a49d0927b2fa7b86bc94dbde57125e38e8cfca7a31b6764e8dbf35e9f/cachetools-7.3.0-py3-none-any.whl", hash = "sha256:2105787c94619bde7072624fec0fe7b8a08bb7bf6c757c318f8925573c6f07c9", size = 19575, upload-time = "2026-11-05T20:38:44.928Z" }, + { url = "https://files.pythonhosted.org/packages/ed/8f/9d90e713bdaf06316184c7214a23177e0fe7b9a287932a5dcce643f6fd58/cachetools-7.3.2-py3-none-any.whl", hash = "sha256:afb4b563cb37e7a121a6ea45a0deec42916c64eed58875cc15d8cf9eaca89fb2", size = 19956, upload-time = "2026-11-14T21:19:05.777Z" }, ] [[package]] From 0647d36c579cf38297654357ae894b17dc259037 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 17:56:36 +0000 Subject: [PATCH 48/57] build(deps-dev): bump ruff from 0.17.4 to 0.17.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.17.4 to 0.17.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.17.4...0.17.5) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.17.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- uv.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/uv.lock b/uv.lock index 100db3ad1..203dca1d0 100644 --- a/uv.lock +++ b/uv.lock @@ -2160,27 +2160,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.17.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/84/0e/3d154514b5bad104f7e1c13169c2d09aa9959fccdc06eb47610ccdfa83ed/ruff-0.17.4.tar.gz", hash = "sha256:f32d178b50e826e00f6c6c1be3f56333068acb9b67fe167143527fa9b81e890d", size = 5357750, upload-time = "2026-11-05T18:52:17.638Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/61/c83c78bbb6108f6c6270a106cf12b54175f4f42da088b9bb880f18e31289/ruff-0.17.4-py3-none-linux_armv6l.whl", hash = "sha256:2b08c4ff98dc234f4a3871a3105353b922fa875ea1073ca31001eb8c06bb4d89", size = 10252195, upload-time = "2026-11-05T18:51:36.594Z" }, - { url = "https://files.pythonhosted.org/packages/0a/12/dd158708378866e8b53e145a465dbc51a7cccb9fa197a74d67eaedde7234/ruff-0.17.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:13e781c3c5f663e7fba737eaaeb70dd943dd55171daf316afb25cd5268cfe0c7", size = 10266044, upload-time = "2026-11-05T18:51:39.502Z" }, - { url = "https://files.pythonhosted.org/packages/28/32/89a94a8eb11fd505a381ae6f04e190d038d9958695209dc1786ce5cfcda3/ruff-0.17.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7ed2f416349944f908f9574215994602242b0836844eba48eec61473033afca0", size = 9432227, upload-time = "2026-11-05T18:51:41.968Z" }, - { url = "https://files.pythonhosted.org/packages/58/de/a392dc38b215798ae72e639d228b7f6c02d826a95d1c0ad7c4c0ee49ef5b/ruff-0.17.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ea6e0017c785f7282092b11e46338e4ebed1b9e575ebf2e55a8a1eda968241a", size = 10136900, upload-time = "2026-11-05T18:51:44.562Z" }, - { url = "https://files.pythonhosted.org/packages/b7/8f/a880f60f42005f6ffdf58f77af34c7ee327000b5607f48a2f6a69d8b242c/ruff-0.17.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7e061dcc0933c7031a616ac8d66ac540309b2aa21ab558101a8f53e9ac7a1185", size = 10051245, upload-time = "2026-11-05T18:51:46.7Z" }, - { url = "https://files.pythonhosted.org/packages/09/55/98844264108af7d5ec27ca3a9cd5a989094ca657a14599c4b69a537a0e9a/ruff-0.17.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f99e95a1515161138be3cbd1b06c06e739d8feb38ade35564556999fffc3686e", size = 10704341, upload-time = "2026-11-05T18:51:49.228Z" }, - { url = "https://files.pythonhosted.org/packages/28/a2/5edf97659c3ac7c73f978003bd314936f671037fdac6b978e9de3e4b2b65/ruff-0.17.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f28cf0dd37cb172fa5a8d2e92e6ada3a9dbd0609f094ed24039929eef0b7524", size = 11394465, upload-time = "2026-11-05T18:51:51.534Z" }, - { url = "https://files.pythonhosted.org/packages/f2/8f/51371ae856b2bef4d15a044a574695fbc0f6ae63aafa42a2a22428070fb6/ruff-0.17.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6b21c771b296888e8a35c6f48555f4b44e4483f61675d6ed51810a5203469ce6", size = 10988262, upload-time = "2026-11-05T18:51:53.91Z" }, - { url = "https://files.pythonhosted.org/packages/af/1b/62874f14c7873f27c7887d2b1ea41de990e14ba9518801ffe8eacb5d51a6/ruff-0.17.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cd025509b2e15721b426fc70fd946d71f43b3db3b08e946dfec2d696d911690", size = 10572829, upload-time = "2026-11-05T18:51:56.129Z" }, - { url = "https://files.pythonhosted.org/packages/98/30/860b9dae67432b16b88558a9cb2d3194825fa62838f8b9cc49f5d9022095/ruff-0.17.4-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:49b77f7b3921669466882a4881168801bdb06ec2cd83fb936049016cf5fdece1", size = 10617545, upload-time = "2026-11-05T18:51:58.172Z" }, - { url = "https://files.pythonhosted.org/packages/0f/08/781a4b41a1c83fd6e30fea610d6502a6f94e49cf94693fd37bdcbc6bfe11/ruff-0.17.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e3b84eb74f260d1c2dbd236fd9d4c011d4fdd0a52bdf8aea57a10e3a1b71fca5", size = 10111955, upload-time = "2026-11-05T18:52:00.59Z" }, - { url = "https://files.pythonhosted.org/packages/3c/e9/94b1c7b677120f30839254518924f73a8157e9bcfa200edcd5796fecdb99/ruff-0.17.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:20e43d7a08e712e33067ba887e6574546c79bd4831596ce8f16803ac7ff9ad90", size = 10058355, upload-time = "2026-11-05T18:52:03.61Z" }, - { url = "https://files.pythonhosted.org/packages/27/5f/a825910b9f309336dc33cb8c0774126662c1d2f765699b3e0a1bd538d01f/ruff-0.17.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:0d1f4848fd2ec0499be4046db9b7dfcc952666885f00233cc7033515282556a8", size = 10415932, upload-time = "2026-11-05T18:52:06.264Z" }, - { url = "https://files.pythonhosted.org/packages/8b/b8/0796468423413ea4df1a6e2442ae26cf49b8f7dda0eecf246e0d5d0dde54/ruff-0.17.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6007e7f3a0e55b0fbdb947af69cf24c21b4928df6be8ef3e767c69b5ccccf496", size = 10826033, upload-time = "2026-11-05T18:52:08.675Z" }, - { url = "https://files.pythonhosted.org/packages/b9/ab/d8e407669ffe5014429baf780c2df47e001968a6e4c17f615e2e7b13a9ba/ruff-0.17.4-py3-none-win32.whl", hash = "sha256:3971a78cba76298b284c8321e6d40d93045ed348bec5c369d85099efc97fb7cf", size = 9931993, upload-time = "2026-11-05T18:52:11.169Z" }, - { url = "https://files.pythonhosted.org/packages/bd/15/42af8a72d8946e3c9efd2bbf6641e462b6832783b0d043d63ef5b280ba7f/ruff-0.17.4-py3-none-win_amd64.whl", hash = "sha256:67c5a894fc054cf41f75f7afa24815de5a74329d97634126c2a1015740ff4e8c", size = 10292922, upload-time = "2026-11-05T18:52:13.436Z" }, - { url = "https://files.pythonhosted.org/packages/68/9e/f1dbffcfb8ff25dadbc21f87a8b73c3848abe4abada9d4b08ccef8bec40c/ruff-0.17.4-py3-none-win_arm64.whl", hash = "sha256:181ae38a9a8fb94925bf7d0794327b48d7fd7f4b50cfd84c0e999cc09ef8d131", size = 9889396, upload-time = "2026-11-05T18:52:15.549Z" }, +version = "0.17.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/86/cc/7b71512eb8b49926efb887cc66c74dd993642943c29eba51a877f6b85692/ruff-0.17.5.tar.gz", hash = "sha256:625e57d80cd43352d12ea81690f3eac46cddc8c0f35026d137fb0f157f94592e", size = 5368382, upload-time = "2026-11-12T17:54:55.04Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d4/f2/61df414cb4338617290a9023ad09486e207fb9a6d09357a7be34f2e369a4/ruff-0.17.5-py3-none-linux_armv6l.whl", hash = "sha256:d511dd302982e46a285528942fa6557d57730edc4bdb9def95e86a2603d77396", size = 10231309, upload-time = "2026-11-12T17:54:09.314Z" }, + { url = "https://files.pythonhosted.org/packages/d1/72/8ed970f3361f7c8d3f8e1b3b1af27cf086bc4b3a6b62ec20e21a1aaaaff5/ruff-0.17.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b72fbc232e328bdbb9cdddf4f1aedcd61bd1aa64d75fc012114b4add0bd7f26b", size = 10250018, upload-time = "2026-11-12T17:54:11.983Z" }, + { url = "https://files.pythonhosted.org/packages/dc/4b/8b10f6c9d0a18413301ae8dd2af9d180a81bb738b1b731d944a37404c523/ruff-0.17.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6f0db748508f04a04e3fbebcc636a5c8b3bd76274f8ed28f497c44d75c2ea2d7", size = 9504737, upload-time = "2026-11-12T17:54:14.567Z" }, + { url = "https://files.pythonhosted.org/packages/b7/ea/1b3afa3943239dede7a0755ea139bdb51879f0f3f96f92894081d5c7d2e5/ruff-0.17.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f6a7b138edf9cc402ca736a59d9525e6d766e5395760b72e7e146e6251ac963", size = 10168006, upload-time = "2026-11-12T17:54:17.195Z" }, + { url = "https://files.pythonhosted.org/packages/31/08/ee641daa45f83792f91274b65796cb011f1065f588911bfa3909ad9e31e7/ruff-0.17.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e52622ecf3a0df9d03e796fe3eed4aa085adda65520db7e0619cbd2192a97342", size = 10043751, upload-time = "2026-11-12T17:54:19.815Z" }, + { url = "https://files.pythonhosted.org/packages/f8/cf/1c59fdb42d0b5671ad5b160636fab4005ee28db72cb06aef6e3f3c04f377/ruff-0.17.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54c0f67d1be11b55d12c184a819fc229f5eee3ef45c16c4fcad41258e83b4882", size = 10690562, upload-time = "2026-11-12T17:54:22.789Z" }, + { url = "https://files.pythonhosted.org/packages/49/c5/578074716173fb0c1591e9648a9f85c469888d9530cb35b89b757dc1208b/ruff-0.17.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd0dfe7c6fe5a447fce467c58e69893be1d9a7e4378f5b9906432da33d94a97f", size = 11338465, upload-time = "2026-11-12T17:54:25.523Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b9/d6428bcf5ed88f4dc1d6e3417ee350236ed36e7a35f9477b727c00e437bf/ruff-0.17.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ec4ecf40fb4d6e1265b009dbe551727920926fc0f769070c452d6d84b422a74d", size = 10895501, upload-time = "2026-11-12T17:54:28.441Z" }, + { url = "https://files.pythonhosted.org/packages/f2/8a/1e29c0c3785ae7e5cd0d54ee8717a08867ef71545796340be4c653c57e24/ruff-0.17.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40ca8afaac309b41a5b2e09e4e7beb1f824826b93c25697c4d74f573324fba4e", size = 10613231, upload-time = "2026-11-12T17:54:30.862Z" }, + { url = "https://files.pythonhosted.org/packages/32/b6/88944350c14bb90651014d678ad554e233ae2a79c14ad52101845f93d15b/ruff-0.17.5-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:8e85601bd6d9b6c3e3b95c0e0dccdbac1d23c6bcef006d187fbcddaf8225a5df", size = 10562789, upload-time = "2026-11-12T17:54:33.869Z" }, + { url = "https://files.pythonhosted.org/packages/6f/fd/2792e955b0bf54295cdcdddc4bb3f380c0790d7e60e789f528a9e6e48a31/ruff-0.17.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f93d2b7d449ed9545304f6923699ca20d13c675b69f258481709a08ae61076db", size = 10069824, upload-time = "2026-11-12T17:54:36.663Z" }, + { url = "https://files.pythonhosted.org/packages/07/9c/d7cad341b4c19237948a6dd1fcea1c9c39c9d08b70f22f0e157d1236ebd6/ruff-0.17.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:0e5c125c5b31dc8efc948d41357496a4c4a312977565ccba740030efdff83580", size = 10038961, upload-time = "2026-11-12T17:54:39.452Z" }, + { url = "https://files.pythonhosted.org/packages/cc/a1/9cd0d4c371ddc70267d3bd557e718e2bdfb94c25e49d25605edfabb764bd/ruff-0.17.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:50dfc3c6b3ebd0a932f11dfd579bd42234b0b7137e68940eb6abdbfdb9d69697", size = 10385012, upload-time = "2026-11-12T17:54:41.808Z" }, + { url = "https://files.pythonhosted.org/packages/8f/a9/35f078ce98d4df318328ea5270382b5b65e680f7953b3db54f8e009c420c/ruff-0.17.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:86bd1f3b83c25f9b8055c6e796f0685b39d3127ce947322098c3108cf82fd586", size = 10793672, upload-time = "2026-11-12T17:54:44.342Z" }, + { url = "https://files.pythonhosted.org/packages/2c/a5/2e136dede2a88aaaf54498bbbdc81bc810f788ef6ef01efb97037d73cd1d/ruff-0.17.5-py3-none-win32.whl", hash = "sha256:e1546609b2ad73f1d6c5c076881b788672b7b3cc3283981182cbdbb6524ed88a", size = 9929908, upload-time = "2026-11-12T17:54:47.067Z" }, + { url = "https://files.pythonhosted.org/packages/ec/8c/e4db9ae1e0ee233c04df007ab6d0d42f799ae9abd95d352b6092ee7bc4bf/ruff-0.17.5-py3-none-win_amd64.whl", hash = "sha256:aa415d57c244299279901d776607fee3df7831c2a7435433fbfacde8632c6550", size = 10275454, upload-time = "2026-11-12T17:54:49.401Z" }, + { url = "https://files.pythonhosted.org/packages/e6/65/a1648bc1550e7683bf7bf1e2ce2485c9f8535cbca6cca9ec7b73cc12fb8e/ruff-0.17.5-py3-none-win_arm64.whl", hash = "sha256:64a6fd668a336df959c522991de33e9e3c8be463afc0c9ac8f029f9d19ef756e", size = 9849020, upload-time = "2026-11-12T17:54:52.055Z" }, ] [[package]] From fbb894e3709346564d66276b05ec3525e603bd6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 17:54:17 +0000 Subject: [PATCH 49/57] build(deps): bump specifications/json-ld-api from `5551473` to `a1732db` Bumps [specifications/json-ld-api](https://github.com/w3c/json-ld-api) from `5551473` to `a1732db`. - [Commits](https://github.com/w3c/json-ld-api/compare/55514738d854e56bb8bad4c53cda2f0e23be4a50...a1732db52b10222a7c39e79dc93b12f3b873ebfd) --- updated-dependencies: - dependency-name: specifications/json-ld-api dependency-version: a1732db52b10222a7c39e79dc93b12f3b873ebfd dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- specifications/json-ld-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/json-ld-api b/specifications/json-ld-api index 55514738d..a1732db52 160000 --- a/specifications/json-ld-api +++ b/specifications/json-ld-api @@ -1 +1 @@ -Subproject commit 55514738d854e56bb8bad4c53cda2f0e23be4a50 +Subproject commit a1732db52b10222a7c39e79dc93b12f3b873ebfd From c9a68bc3a150504bb0d602a7e71d7ee82619e17b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 17:54:21 +0000 Subject: [PATCH 50/57] build(deps): bump specifications/rdf-canon from `15619df` to `5ffaaa1` Bumps [specifications/rdf-canon](https://github.com/w3c/rdf-canon) from `15619df` to `5ffaaa1`. - [Commits](https://github.com/w3c/rdf-canon/compare/15619df2fda7a4ca88308733789b6774517f9638...5ffaaa13c0e19a2a2f9e60d0ecd9efaf3edab633) --- updated-dependencies: - dependency-name: specifications/rdf-canon dependency-version: 5ffaaa13c0e19a2a2f9e60d0ecd9efaf3edab633 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- specifications/rdf-canon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/rdf-canon b/specifications/rdf-canon index 15619df2f..5ffaaa13c 160000 --- a/specifications/rdf-canon +++ b/specifications/rdf-canon @@ -1 +1 @@ -Subproject commit 15619df2fda7a4ca88308733789b6774517f9638 +Subproject commit 5ffaaa13c0e19a2a2f9e60d0ecd9efaf3edab633 From e74dc6727260b2284dface560c12fba14d159b8e Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 25 Nov 2026 16:55:24 +0100 Subject: [PATCH 51/57] fix: use a term as a prefix only if its name has no colon or slash Signed-off-by: jdsika --- lib/pyld/jsonld.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index 4d57012a4..c47c2886d 100644 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -5802,9 +5802,12 @@ def _create_term_definition( ) mapping['@id'] = id_ + # only a simple term without ':' or '/' may be a prefix + # (Create Term Definition, step 14.2.5) mapping['_prefix'] = ( _simple_term - and not mapping['_term_has_colon'] + and ':' not in term + and '/' not in term and ( id_.startswith('_:') or bool(re.match(r'.*[:/\?#\[\]@]$', id_)) From 557a6734e5c6aadc34249d2f355b865005a8663e Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 25 Nov 2026 16:55:24 +0100 Subject: [PATCH 52/57] test: expand values after a term whose name contains a slash Signed-off-by: jdsika --- tests/jsonld/test_expand.py | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/jsonld/test_expand.py b/tests/jsonld/test_expand.py index 05af4999c..7dae1bc48 100644 --- a/tests/jsonld/test_expand.py +++ b/tests/jsonld/test_expand.py @@ -255,6 +255,51 @@ def test_base_does_not_expand_property_terms(): } ] +def test_term_with_slash_is_not_a_prefix(): + """ + A term whose name contains a '/' is not a prefix, so '/a/:b' is no + compact IRI: as an @id it is resolved against @base, and as a property + it is relative to @vocab. + + See: https://www.w3.org/TR/json-ld11-api/#create-term-definition + (step 14.2.5) + """ + doc = { + '@context': { + '@base': 'http://example.org/ns/doc', + '@vocab': 'http://other.org', + '/a/': 'http://other.org/a/', + }, + '@id': '/a/:b', + '/a/:b': {'@id': '/a/:b'}, + } + assert jsonld.expand(doc) == [ + { + '@id': 'http://example.org/a/:b', + 'http://other.org/a/:b': [{'@id': 'http://example.org/a/:b'}], + } + ] + +def test_term_name_with_slash_takes_iri_of_its_prefix_term(): + """ + A term such as '/a/:b' without an @id takes the IRI of the term before + its first ':', whether or not that term may be a prefix. + + See: https://www.w3.org/TR/json-ld11-api/#create-term-definition + (step 15) + """ + doc = { + '@context': { + '@vocab': 'http://other.org', + '/a/': 'http://other.org/a/', + '/a/:b': {'@type': '@id'}, + }, + '/a/:b': 'http://example.org/o', + } + assert jsonld.expand(doc) == [ + {'http://other.org/a/b': [{'@id': 'http://example.org/o'}]} + ] + # Issue 143 def test_expand_with_base_from_context(): """Expand with set or not should rely upon @base inside its @context.""" From 2aa67b832cab4458d5f53accb003cc690504520a Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 25 Nov 2026 16:55:25 +0100 Subject: [PATCH 53/57] test: do not compact to a prefix term whose name contains a slash Signed-off-by: jdsika --- tests/jsonld/test_compact.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/jsonld/test_compact.py b/tests/jsonld/test_compact.py index 16ee9bf66..de8de9491 100644 --- a/tests/jsonld/test_compact.py +++ b/tests/jsonld/test_compact.py @@ -319,3 +319,22 @@ def test_with_vocab_with_id(): compacted = jsonld.compact(input, ctx) assert compacted == expected + +def test_term_with_slash_is_not_used_as_a_prefix(): + """ + Compaction must not write a compact IRI with a term whose name contains + a '/': a reader resolves '/a/:b' as a relative IRI. + + See: https://www.w3.org/TR/json-ld11-api/#create-term-definition + (step 14.2.5) + """ + ctx = {'@vocab': 'http://example.org', '/a/': 'http://example.org/a/'} + input = { + '@id': 'http://example.org/s', + 'http://example.org/p': {'@id': 'http://example.org/a/b'}, + } + + compacted = jsonld.compact(input, ctx) + + assert compacted['/p'] == {'@id': 'http://example.org/a/b'} + From a50319e9c0cd8298aba5bc69a2b85b0112d31f4a Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 25 Nov 2026 16:55:36 +0100 Subject: [PATCH 54/57] docs: add the term with a slash prefix fix to the changelog Signed-off-by: jdsika --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8dfd30a8..0a44a6fb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ - fix references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. - treat a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI and resolves it against the base IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). +- A term whose name contains a `:` or a `/`, such as `/a/`, is no longer a prefix, as [Create Term Definition](https://www.w3.org/TR/json-ld11-api/#create-term-definition) step 14.2.5 requires. `jsonld.expand()` read `/a/:b` as a compact IRI with that term instead of as a relative IRI, and `jsonld.compact()` wrote such compact IRIs. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact From 0474030352ed58d00606637d7876790fd709e809 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 25 Nov 2026 17:14:17 +0100 Subject: [PATCH 55/57] fix: build a compact IRI only from a prefix term, also when it is a term Signed-off-by: jdsika --- lib/pyld/jsonld.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index c47c2886d..338229bd3 100644 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -5398,14 +5398,13 @@ def _compact_iri( ): continue - # a CURIE is usable if: + # a CURIE is usable if the term is a prefix and: # 1. it has no mapping, OR # 2. value is None, which means we're not compacting an @value, AND # the mapping matches the IRI curie = term + ':' + iri[len(definition['@id']) :] - is_usable_curie = ( - active_ctx['mappings'][term]['_prefix'] - and curie not in active_ctx['mappings'] + is_usable_curie = active_ctx['mappings'][term]['_prefix'] and ( + curie not in active_ctx['mappings'] or ( value is None and active_ctx['mappings'].get(curie, {}).get('@id') == iri From 7b2ef3a00553a80047451e9177b2758ee940b76a Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 25 Nov 2026 17:14:56 +0100 Subject: [PATCH 56/57] test: round-trip compact IRIs from terms that are no prefix Signed-off-by: jdsika --- tests/jsonld/test_compact.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/jsonld/test_compact.py b/tests/jsonld/test_compact.py index de8de9491..275ace9a5 100644 --- a/tests/jsonld/test_compact.py +++ b/tests/jsonld/test_compact.py @@ -338,3 +338,35 @@ def test_term_with_slash_is_not_used_as_a_prefix(): assert compacted['/p'] == {'@id': 'http://example.org/a/b'} +@pytest.mark.parametrize( + ('ctx', 'iri'), + [ + # '/a/:b' is a term for the IRI, but '/a/' is not a prefix + ( + { + '@vocab': 'http://other.org', + '/a/': 'http://other.org/a/', + '/a/:b': {'@type': '@id'}, + }, + 'http://other.org/a/b', + ), + # 'ex:foo' is a term for the IRI, but 'ex' is not a prefix + ( + {'ex': 'http://example.org/ns', 'ex:foo': {'@type': '@id'}}, + 'http://example.org/nsfoo', + ), + ], +) +def test_compact_iri_from_a_term_that_is_not_a_prefix_is_not_used(ctx, iri): + """ + A compact IRI is only built from a term with the prefix flag, also when + the compact IRI is itself a term for the IRI: otherwise it doesn't + expand back to the IRI. + + See: https://www.w3.org/TR/json-ld11-api/#iri-compaction (step 7.1) + """ + input = {'@id': iri, 'http://example.org/p': {'@id': iri}} + + compacted = jsonld.compact(input, ctx) + + assert jsonld.expand(compacted) == jsonld.expand(input) From eb5b575313165b91cb1c73c92911baece7ae3984 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 25 Nov 2026 17:15:06 +0100 Subject: [PATCH 57/57] docs: add the compact IRI prefix fix to the changelog Signed-off-by: jdsika --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a44a6fb8..b2c8acc1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,8 @@ - fix references without a scheme or host against a base IRI with a host and no path (`/x` against `http://example.org` gave `http://example.org//x`) or with a query, and keeps the dot of a first segment such as `.gh`. - treat a reference with a `/`, `?` or `#` before its first `:`, such as `/a:b`, `x/y:z` or `a?b:c`, as a relative IRI and resolves it against the base IRI, as RFC 3986 does. It was returned unresolved, so `jsonld.to_rdf()` dropped it. - `iri_resolver.remove_dot_segments()`, and with it `iri_resolver.resolve()`, no longer drops the `/` that a final `.` or `..` segment leaves before a query or fragment (`/a/.?x` gave `/a?x`). -- A term whose name contains a `:` or a `/`, such as `/a/`, is no longer a prefix, as [Create Term Definition](https://www.w3.org/TR/json-ld11-api/#create-term-definition) step 14.2.5 requires. `jsonld.expand()` read `/a/:b` as a compact IRI with that term instead of as a relative IRI, and `jsonld.compact()` wrote such compact IRIs. +- A term whose name contains a `:` or a `/`, such as `/a/`, is no longer a prefix, as [Create Term Definition](https://www.w3.org/TR/json-ld11-api/#create-term-definition) step 14.2.5 requires. `jsonld.expand()` read `/a/:b` as a compact IRI with that term instead of as a relative IRI, and `jsonld.compact()` wrote such compact IRIs. A context with a term such as `/a/:b` can now fail, or newly pass, the check that the term expands to its own IRI. +- `jsonld.compact()` builds a compact IRI only from a term with the prefix flag, as [IRI Compaction](https://www.w3.org/TR/json-ld11-api/#iri-compaction) step 7.1 requires, also when the compact IRI is itself a term for the IRI. With `{"ex": "http://example.org/ns", "ex:foo": {"@type": "@id"}}`, `http://example.org/nsfoo` was compacted to `ex:foo`, which doesn't expand back to it. ### Changed - **BREAKING**: Developer install, command execution, documentation, and release artifact