0s autopkgtest [14:20:23]: starting date and time: 2025-06-19 14:20:23+0000 0s autopkgtest [14:20:23]: git checkout: 9986aa8c Merge branch 'skia/fix_network_interface' into 'ubuntu/production' 0s autopkgtest [14:20:23]: host juju-7f2275-prod-proposed-migration-environment-21; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.5unbwya9/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:requests --apt-upgrade rdflib --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=requests/2.32.3+dfsg-5ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-arm64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-21@sto01-arm64-15.secgroup --name adt-questing-arm64-rdflib-20250619-142022-juju-7f2275-prod-proposed-migration-environment-21-c4e6d927-8264-46e3-a151-5df4e63f8b91 --image adt/ubuntu-questing-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-21 --net-id=net_prod-autopkgtest-workers-arm64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 128s autopkgtest [14:22:31]: testbed dpkg architecture: arm64 128s autopkgtest [14:22:31]: testbed apt version: 3.1.2 129s autopkgtest [14:22:32]: @@@@@@@@@@@@@@@@@@@@ test bed setup 129s autopkgtest [14:22:32]: testbed release detected to be: None 134s autopkgtest [14:22:37]: updating testbed package index (apt update) 134s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [249 kB] 134s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 134s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 134s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 134s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [17.4 kB] 134s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [426 kB] 134s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/restricted Sources [4716 B] 134s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [38.3 kB] 134s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/main arm64 Packages [65.9 kB] 134s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/restricted arm64 Packages [18.4 kB] 134s Get:11 http://ftpmaster.internal/ubuntu questing-proposed/universe arm64 Packages [364 kB] 134s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/multiverse arm64 Packages [23.9 kB] 134s Fetched 1208 kB in 0s (2740 kB/s) 135s Reading package lists... 137s autopkgtest [14:22:40]: upgrading testbed (apt dist-upgrade and autopurge) 138s Reading package lists... 138s Building dependency tree... 138s Reading state information... 138s Calculating upgrade... 139s The following packages will be upgraded: 139s python3-requests 139s 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 139s Need to get 53.1 kB of archives. 139s After this operation, 0 B of additional disk space will be used. 139s Get:1 http://ftpmaster.internal/ubuntu questing-proposed/main arm64 python3-requests all 2.32.3+dfsg-5ubuntu2 [53.1 kB] 139s Fetched 53.1 kB in 0s (4491 kB/s) 139s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 86180 files and directories currently installed.) 139s Preparing to unpack .../python3-requests_2.32.3+dfsg-5ubuntu2_all.deb ... 139s Unpacking python3-requests (2.32.3+dfsg-5ubuntu2) over (2.32.3+dfsg-5ubuntu1) ... 139s Setting up python3-requests (2.32.3+dfsg-5ubuntu2) ... 140s Reading package lists... 140s Building dependency tree... 140s Reading state information... 140s Solving dependencies... 141s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 151s autopkgtest [14:22:54]: testbed running kernel: Linux 6.14.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 14:37:51 UTC 2025 151s autopkgtest [14:22:54]: @@@@@@@@@@@@@@@@@@@@ apt-source rdflib 154s Get:1 http://ftpmaster.internal/ubuntu questing/universe rdflib 7.1.1-2 (dsc) [2899 B] 154s Get:2 http://ftpmaster.internal/ubuntu questing/universe rdflib 7.1.1-2 (tar) [5025 kB] 154s Get:3 http://ftpmaster.internal/ubuntu questing/universe rdflib 7.1.1-2 (diff) [35.0 kB] 154s gpgv: Signature made Sat Nov 9 15:22:27 2024 UTC 154s gpgv: using RSA key 724D609337113C710550D7473C26763F6C67E6E2 154s gpgv: Can't check signature: No public key 154s dpkg-source: warning: cannot verify inline signature for ./rdflib_7.1.1-2.dsc: no acceptable signature found 155s autopkgtest [14:22:58]: testing package rdflib version 7.1.1-2 155s autopkgtest [14:22:58]: build not needed 162s autopkgtest [14:23:05]: test python3: preparing testbed 163s Reading package lists... 163s Building dependency tree... 163s Reading state information... 163s Solving dependencies... 163s The following NEW packages will be installed: 163s libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 163s libjs-jquery-metadata libjs-jquery-tablesorter 163s libjs-jquery-throttle-debounce libjs-sphinxdoc libjs-underscore libxslt1.1 163s python-rdflib-doc python-rdflib-tools python3-bsddb3 python3-coverage 163s python3-html5rdf python3-iniconfig python3-lxml python3-networkx 163s python3-orjson python3-pip python3-pluggy python3-pytest python3-pytest-cov 163s python3-rdflib python3-sparqlwrapper python3-wheel 164s 0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded. 164s Need to get 17.8 MB of archives. 164s After this operation, 123 MB of additional disk space will be used. 164s Get:1 http://ftpmaster.internal/ubuntu questing/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 164s Get:2 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-metadata all 12-4 [6582 B] 164s Get:3 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 164s Get:4 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 164s Get:5 http://ftpmaster.internal/ubuntu questing/main arm64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 164s Get:6 http://ftpmaster.internal/ubuntu questing/main arm64 libjs-sphinxdoc all 8.2.3-1ubuntu2 [28.0 kB] 164s Get:7 http://ftpmaster.internal/ubuntu questing/main arm64 libxslt1.1 arm64 1.1.43-0exp1 [161 kB] 164s Get:8 http://ftpmaster.internal/ubuntu questing/universe arm64 python-rdflib-doc all 7.1.1-2 [1376 kB] 164s Get:9 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-rdflib all 7.1.1-2 [426 kB] 164s Get:10 http://ftpmaster.internal/ubuntu questing/universe arm64 python-rdflib-tools all 7.1.1-2 [9628 B] 164s Get:11 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-bsddb3 arm64 6.2.9-4build1 [114 kB] 164s Get:12 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-coverage arm64 7.8.2+dfsg1-1 [157 kB] 164s Get:13 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-html5rdf all 1.2.1-2 [84.1 kB] 164s Get:14 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-iniconfig all 1.1.1-2 [6024 B] 164s Get:15 http://ftpmaster.internal/ubuntu questing/main arm64 python3-lxml arm64 5.4.0-1build1 [1297 kB] 164s Get:16 http://ftpmaster.internal/ubuntu questing/main arm64 python3-networkx all 3.2.1-4ubuntu1 [11.5 MB] 164s Get:17 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-orjson arm64 3.10.7-2build1 [267 kB] 164s Get:18 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-wheel all 0.46.1-2 [22.1 kB] 164s Get:19 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pip all 25.1.1+dfsg-1 [1416 kB] 164s Get:20 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pluggy all 1.5.0-1 [21.0 kB] 164s Get:21 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pytest all 8.3.5-2 [252 kB] 164s Get:22 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-hotkeys all 0.2.0-1 [13.3 kB] 164s Get:23 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 164s Get:24 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pytest-cov all 5.0.0-1 [21.3 kB] 164s Get:25 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-sparqlwrapper all 2.0.0-2 [37.0 kB] 164s Fetched 17.8 MB in 1s (33.9 MB/s) 164s Selecting previously unselected package libjs-jquery. 164s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 86180 files and directories currently installed.) 164s Preparing to unpack .../00-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 164s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 164s Selecting previously unselected package libjs-jquery-metadata. 164s Preparing to unpack .../01-libjs-jquery-metadata_12-4_all.deb ... 164s Unpacking libjs-jquery-metadata (12-4) ... 164s Selecting previously unselected package libjs-jquery-tablesorter. 164s Preparing to unpack .../02-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 164s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 165s Selecting previously unselected package libjs-jquery-throttle-debounce. 165s Preparing to unpack .../03-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 165s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 165s Selecting previously unselected package libjs-underscore. 165s Preparing to unpack .../04-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 165s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 165s Selecting previously unselected package libjs-sphinxdoc. 165s Preparing to unpack .../05-libjs-sphinxdoc_8.2.3-1ubuntu2_all.deb ... 165s Unpacking libjs-sphinxdoc (8.2.3-1ubuntu2) ... 165s Selecting previously unselected package libxslt1.1:arm64. 165s Preparing to unpack .../06-libxslt1.1_1.1.43-0exp1_arm64.deb ... 165s Unpacking libxslt1.1:arm64 (1.1.43-0exp1) ... 165s Selecting previously unselected package python-rdflib-doc. 165s Preparing to unpack .../07-python-rdflib-doc_7.1.1-2_all.deb ... 165s Unpacking python-rdflib-doc (7.1.1-2) ... 165s Selecting previously unselected package python3-rdflib. 165s Preparing to unpack .../08-python3-rdflib_7.1.1-2_all.deb ... 165s Unpacking python3-rdflib (7.1.1-2) ... 165s Selecting previously unselected package python-rdflib-tools. 165s Preparing to unpack .../09-python-rdflib-tools_7.1.1-2_all.deb ... 165s Unpacking python-rdflib-tools (7.1.1-2) ... 165s Selecting previously unselected package python3-bsddb3. 165s Preparing to unpack .../10-python3-bsddb3_6.2.9-4build1_arm64.deb ... 165s Unpacking python3-bsddb3 (6.2.9-4build1) ... 165s Selecting previously unselected package python3-coverage. 165s Preparing to unpack .../11-python3-coverage_7.8.2+dfsg1-1_arm64.deb ... 165s Unpacking python3-coverage (7.8.2+dfsg1-1) ... 165s Selecting previously unselected package python3-html5rdf. 165s Preparing to unpack .../12-python3-html5rdf_1.2.1-2_all.deb ... 165s Unpacking python3-html5rdf (1.2.1-2) ... 165s Selecting previously unselected package python3-iniconfig. 165s Preparing to unpack .../13-python3-iniconfig_1.1.1-2_all.deb ... 165s Unpacking python3-iniconfig (1.1.1-2) ... 165s Selecting previously unselected package python3-lxml:arm64. 165s Preparing to unpack .../14-python3-lxml_5.4.0-1build1_arm64.deb ... 165s Unpacking python3-lxml:arm64 (5.4.0-1build1) ... 165s Selecting previously unselected package python3-networkx. 165s Preparing to unpack .../15-python3-networkx_3.2.1-4ubuntu1_all.deb ... 165s Unpacking python3-networkx (3.2.1-4ubuntu1) ... 165s Selecting previously unselected package python3-orjson. 165s Preparing to unpack .../16-python3-orjson_3.10.7-2build1_arm64.deb ... 165s Unpacking python3-orjson (3.10.7-2build1) ... 165s Selecting previously unselected package python3-wheel. 165s Preparing to unpack .../17-python3-wheel_0.46.1-2_all.deb ... 165s Unpacking python3-wheel (0.46.1-2) ... 165s Selecting previously unselected package python3-pip. 166s Preparing to unpack .../18-python3-pip_25.1.1+dfsg-1_all.deb ... 166s Unpacking python3-pip (25.1.1+dfsg-1) ... 166s Selecting previously unselected package python3-pluggy. 166s Preparing to unpack .../19-python3-pluggy_1.5.0-1_all.deb ... 166s Unpacking python3-pluggy (1.5.0-1) ... 166s Selecting previously unselected package python3-pytest. 166s Preparing to unpack .../20-python3-pytest_8.3.5-2_all.deb ... 166s Unpacking python3-pytest (8.3.5-2) ... 166s Selecting previously unselected package libjs-jquery-hotkeys. 166s Preparing to unpack .../21-libjs-jquery-hotkeys_0.2.0-1_all.deb ... 166s Unpacking libjs-jquery-hotkeys (0.2.0-1) ... 166s Selecting previously unselected package libjs-jquery-isonscreen. 166s Preparing to unpack .../22-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 166s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 166s Selecting previously unselected package python3-pytest-cov. 166s Preparing to unpack .../23-python3-pytest-cov_5.0.0-1_all.deb ... 166s Unpacking python3-pytest-cov (5.0.0-1) ... 166s Selecting previously unselected package python3-sparqlwrapper. 166s Preparing to unpack .../24-python3-sparqlwrapper_2.0.0-2_all.deb ... 166s Unpacking python3-sparqlwrapper (2.0.0-2) ... 166s Setting up python3-iniconfig (1.1.1-2) ... 166s Setting up python3-orjson (3.10.7-2build1) ... 166s Setting up python3-html5rdf (1.2.1-2) ... 166s Setting up python3-coverage (7.8.2+dfsg1-1) ... 166s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 166s Setting up python3-networkx (3.2.1-4ubuntu1) ... 167s Setting up python3-wheel (0.46.1-2) ... 168s Setting up python3-bsddb3 (6.2.9-4build1) ... 168s Setting up python3-pip (25.1.1+dfsg-1) ... 169s Setting up python3-pluggy (1.5.0-1) ... 169s Setting up python3-rdflib (7.1.1-2) ... 169s Setting up libxslt1.1:arm64 (1.1.43-0exp1) ... 169s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 169s Setting up libjs-jquery-hotkeys (0.2.0-1) ... 169s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 169s Setting up python-rdflib-tools (7.1.1-2) ... 169s Setting up python3-sparqlwrapper (2.0.0-2) ... 169s Setting up python3-pytest (8.3.5-2) ... 169s Setting up libjs-jquery-metadata (12-4) ... 169s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 169s Setting up libjs-sphinxdoc (8.2.3-1ubuntu2) ... 169s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 170s Setting up python3-lxml:arm64 (5.4.0-1build1) ... 170s Setting up python-rdflib-doc (7.1.1-2) ... 170s Setting up python3-pytest-cov (5.0.0-1) ... 170s Processing triggers for libc-bin (2.41-6ubuntu2) ... 170s Processing triggers for man-db (2.13.1-1) ... 172s autopkgtest [14:23:15]: test python3: [----------------------- 172s ************************************************************************** 172s # A new feature in cloud-init identified possible datasources for # 172s # this system as: # 172s # [] # 172s # However, the datasource used was: OpenStack # 172s # # 172s # In the future, cloud-init will only attempt to use datasources that # 172s # are identified or specifically configured. # 172s # For more information see # 172s # https://bugs.launchpad.net/bugs/1669675 # 172s # # 172s # If you are seeing this message, please file a bug against # 172s # cloud-init at # 172s # https://github.com/canonical/cloud-init/issues # 172s # Make sure to include the cloud provider your instance is # 172s # running on. # 172s # # 172s # After you have filed a bug, you can disable this warning by launching # 172s # your instance with the cloud-config below, or putting that content # 172s # into /etc/cloud/cloud.cfg.d/99-warnings.cfg # 172s # # 172s # #cloud-config # 172s # warnings: # 172s # dsid_missing_source: off # 172s ************************************************************************** 172s 172s Disable the warnings above by: 172s touch /home/ubuntu/.cloud-warnings.skip 172s or 172s touch /var/lib/cloud/instance/warnings/.skip 177s ============================= test session starts ============================== 177s platform linux -- Python 3.13.5, pytest-8.3.5, pluggy-1.5.0 177s rootdir: /tmp/autopkgtest.MLbFml/build.tad/src 177s configfile: pyproject.toml 177s plugins: typeguard-4.4.2, cov-5.0.0 177s collected 7927 items / 1 deselected / 1 skipped / 7926 selected 177s 177s docs/namespaces_and_bindings.rst . [ 0%] 177s docs/rdf_terms.rst . [ 0%] 178s test/data/suites/trix/test_trix.py ..........x....xxx..xxx.xxx.......... [ 0%] 178s ......x..x.x...................xxxxxxxxx [ 0%] 178s test/jsonld/test_api.py . [ 1%] 178s test/jsonld/test_compaction.py ........... [ 1%] 178s test/jsonld/test_context.py .................... [ 1%] 178s test/jsonld/test_localsuite.py ... [ 1%] 178s test/jsonld/test_named_graphs.py ... [ 1%] 178s test/jsonld/test_nested_arrays.py .. [ 1%] 178s test/jsonld/test_norm_urn.py . [ 1%] 178s test/jsonld/test_onedotone.py .......................................... [ 2%] 178s ........................................................................ [ 2%] 179s ........................................................................ [ 3%] 180s ........................................................................ [ 4%] 180s ..................................... [ 5%] 180s test/jsonld/test_pythonparse.py . [ 5%] 180s test/jsonld/test_reassign_id.py . [ 5%] 180s test/jsonld/test_testsuite.py .......................................... [ 5%] 180s ........................................................................ [ 6%] 180s .............. [ 6%] 180s test/jsonld/test_util.py x................. [ 7%] 180s test/test_conjunctivegraph/test_conjunctive_graph.py ...... [ 7%] 180s test/test_conjunctivegraph/test_conjunctivegraph_generators.py ........ [ 7%] 180s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py . [ 7%] 180s ..... [ 7%] 180s test/test_dataset/test_dataset.py ...... [ 7%] 180s test/test_dataset/test_dataset_default_graph.py .................... [ 7%] 180s test/test_dataset/test_dataset_generators.py ........ [ 7%] 192s test/test_examples.py ...s.................. [ 8%] 192s test/test_extras/test_extras_external_graph_libs.py .s [ 8%] 192s test/test_extras/test_infixowl/test_annotatableterms.py ... [ 8%] 193s test/test_extras/test_infixowl/test_basic.py .... [ 8%] 193s test/test_extras/test_infixowl/test_booleanclass.py xx...... [ 8%] 193s test/test_extras/test_infixowl/test_class.py ....... [ 8%] 193s test/test_extras/test_infixowl/test_componentterms.py ... [ 8%] 194s test/test_extras/test_infixowl/test_context.py . [ 8%] 194s test/test_extras/test_infixowl/test_cover.py ................... [ 8%] 194s test/test_extras/test_infixowl/test_enumerated_class.py .. [ 8%] 194s test/test_extras/test_infixowl/test_individual.py ..... [ 8%] 194s test/test_extras/test_infixowl/test_logic_structuring.py . [ 8%] 195s test/test_extras/test_infixowl/test_manchester_syntax.py .. [ 8%] 195s test/test_extras/test_infixowl/test_ontology.py .. [ 8%] 195s test/test_extras/test_infixowl/test_property.py . [ 8%] 195s test/test_extras/test_infixowl/test_restriction.py ...............x [ 9%] 195s test/test_extras/test_infixowl/test_rubric.py ........ [ 9%] 195s test/test_extras/test_shacl_extras.py .................. [ 9%] 195s test/test_graph/test_aggregate_graphs.py .. [ 9%] 195s test/test_graph/test_batch_add.py .......... [ 9%] 195s test/test_graph/test_canonicalization.py ..........x [ 9%] 195s test/test_graph/test_container.py .................. [ 9%] 195s test/test_graph/test_diff.py ..x..x [ 9%] 197s test/test_graph/test_graph.py ...........FFFFFF.. [ 10%] 197s test/test_graph/test_graph_cbd.py .... [ 10%] 197s test/test_graph/test_graph_context.py .......... [ 10%] 197s test/test_graph/test_graph_formula.py .. [ 10%] 197s test/test_graph/test_graph_generators.py ....... [ 10%] 199s test/test_graph/test_graph_http.py FFFFFFF [ 10%] 199s test/test_graph/test_graph_items.py .. [ 10%] 199s test/test_graph/test_graph_operator.py ... [ 10%] 200s test/test_graph/test_graph_redirect.py F [ 10%] 200s test/test_graph/test_graph_store.py ................................... [ 11%] 200s test/test_graph/test_namespace_rebinding.py ....x......... [ 11%] 200s test/test_graph/test_skolemization.py ......... [ 11%] 200s test/test_graph/test_slice.py . [ 11%] 200s test/test_graph/test_variants.py ........................x.x..x..x...x.. [ 11%] 200s .................... [ 12%] 200s test/test_having.py ... [ 12%] 200s test/test_issues/test_issue084.py ........ [ 12%] 201s test/test_issues/test_issue1003.py ......... [ 12%] 201s test/test_issues/test_issue1043.py . [ 12%] 201s test/test_issues/test_issue1141.py ... [ 12%] 201s test/test_issues/test_issue1160.py . [ 12%] 201s test/test_issues/test_issue1404.py . [ 12%] 201s test/test_issues/test_issue1484.py .. [ 12%] 201s test/test_issues/test_issue160.py . [ 12%] 201s test/test_issues/test_issue161.py . [ 12%] 201s test/test_issues/test_issue1808.py . [ 12%] 201s test/test_issues/test_issue184.py . [ 12%] 201s test/test_issues/test_issue1873.py .. [ 12%] 201s test/test_issues/test_issue190.py xx [ 12%] 201s test/test_issues/test_issue1998.py . [ 12%] 201s test/test_issues/test_issue200.py . [ 12%] 201s test/test_issues/test_issue209.py . [ 12%] 201s test/test_issues/test_issue223.py . [ 12%] 201s test/test_issues/test_issue247.py . [ 12%] 201s test/test_issues/test_issue248.py . [ 12%] 201s test/test_issues/test_issue274.py ................................. [ 13%] 201s test/test_issues/test_issue363.py .. [ 13%] 201s test/test_issues/test_issue379.py .. [ 13%] 201s test/test_issues/test_issue381.py ....... [ 13%] 201s test/test_issues/test_issue432.py . [ 13%] 201s test/test_issues/test_issue446.py . [ 13%] 201s test/test_issues/test_issue492.py . [ 13%] 201s test/test_issues/test_issue523.py . [ 13%] 201s test/test_issues/test_issue532.py . [ 13%] 201s test/test_issues/test_issue535.py . [ 13%] 201s test/test_issues/test_issue545.py . [ 13%] 201s test/test_issues/test_issue554.py . [ 13%] 201s test/test_issues/test_issue563.py .. [ 13%] 201s test/test_issues/test_issue579.py . [ 13%] 201s test/test_issues/test_issue604.py . [ 13%] 201s test/test_issues/test_issue655.py . [ 13%] 201s test/test_issues/test_issue715.py . [ 13%] 201s test/test_issues/test_issue733.py .. [ 13%] 201s test/test_issues/test_issue801.py . [ 13%] 201s test/test_issues/test_issue893.py . [ 13%] 201s test/test_issues/test_issue910.py .... [ 13%] 201s test/test_issues/test_issue920.py . [ 13%] 201s test/test_issues/test_issue923.py . [ 13%] 201s test/test_issues/test_issue953.py . [ 13%] 201s test/test_issues/test_issue977.py .. [ 13%] 201s test/test_issues/test_issue980.py . [ 13%] 201s test/test_issues/test_issue_git_200.py . [ 13%] 201s test/test_issues/test_issue_git_336.py . [ 13%] 201s test/test_literal/test_datetime.py ....... [ 13%] 201s test/test_literal/test_duration.py ........ [ 13%] 201s test/test_literal/test_hex_binary.py .. [ 13%] 201s test/test_literal/test_literal.py ...................................... [ 14%] 201s ........................................................................ [ 15%] 201s ........................................................................ [ 16%] 201s .xxxxxxxxxx................ [ 16%] 201s test/test_literal/test_literal_html5lib.py ....... [ 16%] 201s test/test_literal/test_normalized_string.py .... [ 16%] 201s test/test_literal/test_term.py ....... [ 16%] 201s test/test_literal/test_tokendatatype.py ..... [ 16%] 201s test/test_literal/test_uriref_literal_comparison.py .......... [ 16%] 201s test/test_literal/test_xmlliterals.py ...... [ 16%] 201s test/test_misc/test_b64_binary.py . [ 16%] 202s test/test_misc/test_collection.py .. [ 16%] 202s test/test_misc/test_conventions.py . [ 16%] 202s test/test_misc/test_events.py . [ 16%] 202s test/test_misc/test_input_source.py .................................... [ 17%] 202s ........................................................................ [ 18%] 204s ...................FFFFFFFFFFFF......................................... [ 19%] 204s ..........................F. [ 19%] 204s test/test_misc/test_networking_redirect.py ..................... [ 19%] 204s test/test_misc/test_parse_file_guess_format.py .... [ 19%] 204s test/test_misc/test_path_div_future.py . [ 19%] 206s test/test_misc/test_plugins.py .. [ 19%] 206s test/test_misc/test_prefix_types.py . [ 19%] 206s test/test_misc/test_resource.py . [ 19%] 206s test/test_misc/test_security.py ..F..... [ 20%] 207s test/test_n3.py ................ [ 20%] 208s test/test_namespace/test_definednamespace.py ........................... [ 20%] 208s ........................................................................ [ 21%] 208s ......................................... [ 22%] 209s test/test_namespace/test_definednamespace_creator.py ..... [ 22%] 209s test/test_namespace/test_definednamespace_dir.py . [ 22%] 209s test/test_namespace/test_namespace.py ......x........................... [ 22%] 209s ............ [ 22%] 209s test/test_namespace/test_namespacemanager.py ........................... [ 23%] 209s ...x......... [ 23%] 209s test/test_nt_misc.py ...................... [ 23%] 210s test/test_parsers/test_broken_parse_data_from_jena.py xx.xxx.x [ 23%] 210s test/test_parsers/test_empty_xml_base.py .. [ 23%] 210s test/test_parsers/test_n3parse_of_rdf_lists.py .. [ 23%] 210s test/test_parsers/test_nquads.py ........... [ 23%] 210s test/test_parsers/test_parse_with_skolemize.py .... [ 23%] 210s test/test_parsers/test_parser.py .... [ 23%] 210s test/test_parsers/test_parser_helpers.py . [ 23%] 210s test/test_parsers/test_parser_hext.py ........ [ 24%] 210s test/test_parsers/test_parser_patch.py ......X.... [ 24%] 210s test/test_parsers/test_parser_reads_from_pathlike_object.py . [ 24%] 210s test/test_parsers/test_parser_structure.py . [ 24%] 211s test/test_parsers/test_parser_turtlelike.py ............................ [ 24%] 211s ...........................................................x.x.......... [ 25%] 211s ........................................................................ [ 26%] 211s ........................................ [ 26%] 211s test/test_parsers/test_swap_n3.py ..xx...xx.x...xx.xx.x.x.x...x [ 27%] 211s test/test_parsers/test_trix_parse.py ... [ 27%] 211s test/test_path.py ..................... [ 27%] 211s test/test_roundtrip.py ................................................. [ 28%] 211s ........................................................................ [ 29%] 211s ........................................................................ [ 29%] 212s ........................................................................ [ 30%] 212s .................x...................x.................................. [ 31%] 212s ........................................................................ [ 32%] 212s ........................................................................ [ 33%] 212s ........................................................................ [ 34%] 212s ........................................................................ [ 35%] 213s ........................................................................ [ 36%] 213s ........................................................................ [ 37%] 213s .........................x.............................................. [ 38%] 213s ...................................x.............................x...... [ 39%] 213s ........................................................................ [ 39%] 214s ..................................................................x..... [ 40%] 214s ............x........................x.................................. [ 41%] 215s ........................x............................................... [ 42%] 215s ........................................................................ [ 43%] 215s ........................................................................ [ 44%] 215s ........................................................................ [ 45%] 215s ........................................................................ [ 46%] 216s ...............................X....X....................x...X.x..X..... [ 47%] 216s ..X..................................................................... [ 48%] 216s .........xx.......x................................x.................... [ 49%] 217s .x.x.........x.......................................................... [ 49%] 217s ..................Xx. [ 50%] 217s test/test_serializers/test_finalnewline.py . [ 50%] 217s test/test_serializers/test_prettyxml.py ....... [ 50%] 217s test/test_serializers/test_serializer.py .................x.x.x.x.x.x.x. [ 50%] 218s x.x.x.x.x........................XXXXXXXXXXXXXXXXXXXXXXXX............... [ 51%] 218s .....................................................................x.x [ 52%] 218s .x.x.x.x.x.x.x.x.x.x.................................................... [ 53%] 218s ....................... [ 53%] 218s test/test_serializers/test_serializer_hext.py ...... [ 53%] 218s test/test_serializers/test_serializer_jsonld.py .. [ 53%] 218s test/test_serializers/test_serializer_longturtle.py . [ 53%] 218s test/test_serializers/test_serializer_n3.py .... [ 53%] 218s test/test_serializers/test_serializer_patch.py ......... [ 53%] 218s test/test_serializers/test_serializer_trix.py .. [ 54%] 218s test/test_serializers/test_serializer_turtle.py ..... [ 54%] 218s test/test_serializers/test_serializer_xml.py ..... [ 54%] 218s test/test_serializers/test_xmlwriter_qname.py ..... [ 54%] 218s test/test_skolem_genid.py . [ 54%] 218s test/test_sparql/test_agg_distinct.py ..... [ 54%] 219s test/test_sparql/test_agg_undef.py ........ [ 54%] 219s test/test_sparql/test_construct_bindings.py . [ 54%] 219s test/test_sparql/test_dataset_exclusive.py .... [ 54%] 219s test/test_sparql/test_dataset_inclusive.py ........ [ 54%] 219s test/test_sparql/test_datetime_processing.py .... [ 54%] 219s test/test_sparql/test_evaluate_bind.py ... [ 54%] 219s test/test_sparql/test_expressions.py ...... [ 54%] 219s test/test_sparql/test_forward_slash_escapes.py .x.x.x [ 54%] 219s test/test_sparql/test_functions.py ..................................... [ 55%] 219s ................................................. [ 55%] 220s test/test_sparql/test_initbindings.py .......................... [ 56%] 220s test/test_sparql/test_nested_filters.py .. [ 56%] 220s test/test_sparql/test_operators.py ... [ 56%] 220s test/test_sparql/test_prefixed_name.py ................................. [ 56%] 220s ..................... [ 56%] 220s test/test_sparql/test_prepare.py .. [ 56%] 220s test/test_sparql/test_result.py ........................................ [ 57%] 220s .x.......x......................... [ 57%] 233s test/test_sparql/test_service.py ..........FF [ 58%] 233s test/test_sparql/test_sparql.py ...X..........x...x..................... [ 58%] 233s ................ [ 58%] 235s test/test_sparql/test_sparql_parser.py .. [ 58%] 235s test/test_sparql/test_subselect.py .... [ 58%] 235s test/test_sparql/test_translate_algebra.py ............................. [ 59%] 238s ...x.........x.. [ 59%] 238s test/test_sparql/test_tsvresults.py . [ 59%] 238s test/test_sparql/test_update.py .......... [ 59%] 238s test/test_store/test_namespace_binding.py .............................. [ 59%] 239s .......................................x.x [ 60%] 239s test/test_store/test_nodepickler.py ... [ 60%] 239s test/test_store/test_store.py ... [ 60%] 239s test/test_store/test_store_auditable.py ........................ [ 60%] 239s test/test_store/test_store_berkeleydb.py ssssss [ 60%] 239s test/test_store/test_store_memorystore.py .. [ 60%] 240s test/test_store/test_store_sparqlstore.py .FFFFFFFF [ 61%] 241s test/test_store/test_store_sparqlstore_query.py FFFF [ 61%] 241s test/test_store/test_store_sparqlstore_sparqlconnector.py FF [ 61%] 242s test/test_store/test_store_sparqlupdatestore_mock.py FFF [ 61%] 242s test/test_store/test_store_triple_store.py ... [ 61%] 242s test/test_tools/test_chunk_serializer.py ........... [ 61%] 242s test/test_tools/test_csv2rdf.py ... [ 61%] 242s test/test_trig.py ............ [ 61%] 242s test/test_turtle_quoting.py ............................................ [ 62%] 242s ........................................................................ [ 62%] 242s ........................................................................ [ 63%] 242s ........................................................................ [ 64%] 243s ........................................................................ [ 65%] 243s ........................................................................ [ 66%] 243s ........................................................................ [ 67%] 243s ........................................................................ [ 68%] 243s ........................................................................ [ 69%] 243s ................. [ 69%] 243s test/test_turtle_sort_issue613.py .. [ 69%] 243s test/test_typing.py . [ 69%] 243s test/test_util.py ..............................................xxx..... [ 70%] 243s ............................... [ 70%] 243s test/test_w3c_spec/test_n3_w3c.py ......x...................x........... [ 71%] 243s ...........xxxxxxxxxx........xxxxxxxxxxxxx.............................. [ 72%] 243s .x.x.xx.........xxx..x.x................................................ [ 72%] 244s ..............................................................x......... [ 73%] 244s ................x................. [ 74%] 244s test/test_w3c_spec/test_nquads_w3c.py .................................. [ 74%] 244s ..xxxx.........xxs................................. [ 75%] 244s test/test_w3c_spec/test_nt_w3c.py ...................xxxx.........xxx... [ 75%] 244s .............................x [ 76%] 244s test/test_w3c_spec/test_rdfxml_w3c.py .................................. [ 76%] 244s ........................................................................ [ 77%] 245s ............................................................... [ 78%] 245s test/test_w3c_spec/test_sparql10_w3c.py ..................ss............ [ 78%] 245s ...........xx..............................x............................ [ 79%] 246s ....................................................x................... [ 80%] 247s ........................................................................ [ 81%] 247s ......................s.........................X......X..X............. [ 82%] 249s .................x............X......................................... [ 83%] 249s ........................x..............xxx...xxxxxxxx... [ 84%] 250s test/test_w3c_spec/test_sparql11_w3c.py ...............x.xxxx........... [ 84%] 250s .x...................................................................... [ 85%] 251s .............................x...x....x...xxxxxxx.xxx.....xxxxx......... [ 86%] 252s ..xx......xxxx..xxxxxxxxxxxxxxxx.....x.x................................ [ 87%] 253s ..............................xx........................................ [ 88%] 254s ...........xsssssss..................................................... [ 88%] 254s .xxx.............xxx..x................................................. [ 89%] 257s .................xx.....xxx.x.................ssssssssssssssssssssssssss [ 90%] 257s sssssssssss [ 90%] 257s test/test_w3c_spec/test_sparql_rdflib.py .........................xxxx [ 91%] 258s test/test_w3c_spec/test_trig_w3c.py ....xxxx............................ [ 91%] 258s ........................................................................ [ 92%] 258s ....x................................................................... [ 93%] 258s ........xxxxx..........xxxx...xx..xx.x.........x.xxxx..xxx........xx.... [ 94%] 259s ..............................xxxx.x.......xxxx......................... [ 95%] 259s ........... [ 95%] 259s test/test_w3c_spec/test_turtle_w3c.py .................................. [ 95%] 259s ...................................................................x.... [ 96%] 259s .......................................................................x [ 97%] 259s xxxx...........xxxx...xx..xx.x.............xxxx..xxx........xx.......... [ 98%] 260s ........................xxxx.x........... [ 99%] 260s test/utils/test/test_httpservermock.py FF [ 99%] 260s test/utils/test/test_iri.py ......... [ 99%] 260s test/utils/test/test_outcome.py ......... [ 99%] 260s test/utils/test/test_result.py ........... [ 99%] 262s test/utils/test/test_testutils.py ................................. [100%] 262s 262s =================================== FAILURES =================================== 262s ______________________ test_guess_format_for_parse[None] _______________________ 262s 262s make_graph = .make_graph at 0xf8948cf98040> 262s http_file_server = 262s 262s def test_guess_format_for_parse( 262s make_graph: GraphFactory, http_file_server: HTTPFileServer 262s ): 262s graph = make_graph() 262s 262s # files 262s with pytest.raises(ParserError): 262s graph.parse(__file__) # here we are trying to parse a Python file!! 262s 262s # .nt can be parsed by Turtle Parser 262s graph.parse(os.path.join(TEST_DATA_DIR, "suites", "nt_misc", "anons-01.nt")) 262s # RDF/XML 262s graph.parse( 262s os.path.join( 262s TEST_DATA_DIR, "suites", "w3c", "rdf-xml", "datatypes", "test001.rdf" 262s ) 262s ) # XML 262s # bad filename but set format 262s graph.parse( 262s os.path.join(TEST_DATA_DIR, "w3c-rdfxml-test001.borked"), 262s format="xml", 262s ) 262s 262s with pytest.raises(ParserError): 262s graph.parse(data="rubbish") 262s 262s # Turtle - default 262s graph.parse( 262s data=" ." 262s ) 262s 262s # Turtle - format given 262s graph.parse( 262s data=" .", 262s format="turtle", 262s ) 262s 262s # RDF/XML - format given 262s rdf = """ 262s 262s 262s 262s 262s 262s 262s 262s 262s 262s 262s 262s 262s 262s """ 262s graph.parse(data=rdf, format="xml") 262s 262s # URI 262s file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource( 262s (("Content-Type", "text/html; charset=UTF-8"),), 262s TEST_DATA_DIR / "html5lib_tests1.html", 262s ), 262s ) 262s 262s # only getting HTML 262s with pytest.raises(PluginException): 262s > graph.parse(location=file_info.request_url) 262s 262s test/test_graph/test_graph.py:346: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _____ test_guess_format_for_parse_http[None-file0-application/rdf+xml-132] _____ 262s 262s make_graph = .make_graph at 0xf8948cf9b240> 262s http_file_server = 262s file = PosixPath('/tmp/autopkgtest.MLbFml/build.tad/src/test/data/defined_namespaces/adms.rdf') 262s content_type = 'application/rdf+xml', expected_result = 132 262s 262s @pytest.mark.parametrize( 262s ("file", "content_type", "expected_result"), 262s ( 262s (TEST_DATA_DIR / "defined_namespaces/adms.rdf", "application/rdf+xml", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", "text/turtle", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", None, 132), 262s ( 262s TEST_DATA_DIR / "defined_namespaces/adms.rdf", 262s None, 262s ExceptionChecker( 262s ParserError, 262s r"Could not guess RDF format .* from file extension so tried Turtle", 262s ), 262s ), 262s ), 262s ) 262s def test_guess_format_for_parse_http( 262s make_graph: GraphFactory, 262s http_file_server: HTTPFileServer, 262s file: Path, 262s content_type: Optional[str], 262s expected_result: OutcomePrimitive[int], 262s ) -> None: 262s graph = make_graph() 262s headers: Tuple[Tuple[str, str], ...] = tuple() 262s if content_type is not None: 262s headers = (("Content-Type", content_type),) 262s 262s file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource(headers, file), 262s suffix=f"/{file.name}", 262s ) 262s checker = OutcomeChecker.from_primitive(expected_result) 262s assert 0 == len(graph) 262s with checker.context(): 262s > graph.parse(location=file_info.request_url) 262s 262s test/test_graph/test_graph.py:390: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _________ test_guess_format_for_parse_http[None-file1-text/turtle-132] _________ 262s 262s make_graph = .make_graph at 0xf8948cf9a840> 262s http_file_server = 262s file = PosixPath('/tmp/autopkgtest.MLbFml/build.tad/src/test/data/defined_namespaces/adms.ttl') 262s content_type = 'text/turtle', expected_result = 132 262s 262s @pytest.mark.parametrize( 262s ("file", "content_type", "expected_result"), 262s ( 262s (TEST_DATA_DIR / "defined_namespaces/adms.rdf", "application/rdf+xml", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", "text/turtle", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", None, 132), 262s ( 262s TEST_DATA_DIR / "defined_namespaces/adms.rdf", 262s None, 262s ExceptionChecker( 262s ParserError, 262s r"Could not guess RDF format .* from file extension so tried Turtle", 262s ), 262s ), 262s ), 262s ) 262s def test_guess_format_for_parse_http( 262s make_graph: GraphFactory, 262s http_file_server: HTTPFileServer, 262s file: Path, 262s content_type: Optional[str], 262s expected_result: OutcomePrimitive[int], 262s ) -> None: 262s graph = make_graph() 262s headers: Tuple[Tuple[str, str], ...] = tuple() 262s if content_type is not None: 262s headers = (("Content-Type", content_type),) 262s 262s file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource(headers, file), 262s suffix=f"/{file.name}", 262s ) 262s checker = OutcomeChecker.from_primitive(expected_result) 262s assert 0 == len(graph) 262s with checker.context(): 262s > graph.parse(location=file_info.request_url) 262s 262s test/test_graph/test_graph.py:390: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ____________ test_guess_format_for_parse_http[None-file2-None-132] _____________ 262s 262s make_graph = .make_graph at 0xf8948cf98d60> 262s http_file_server = 262s file = PosixPath('/tmp/autopkgtest.MLbFml/build.tad/src/test/data/defined_namespaces/adms.ttl') 262s content_type = None, expected_result = 132 262s 262s @pytest.mark.parametrize( 262s ("file", "content_type", "expected_result"), 262s ( 262s (TEST_DATA_DIR / "defined_namespaces/adms.rdf", "application/rdf+xml", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", "text/turtle", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", None, 132), 262s ( 262s TEST_DATA_DIR / "defined_namespaces/adms.rdf", 262s None, 262s ExceptionChecker( 262s ParserError, 262s r"Could not guess RDF format .* from file extension so tried Turtle", 262s ), 262s ), 262s ), 262s ) 262s def test_guess_format_for_parse_http( 262s make_graph: GraphFactory, 262s http_file_server: HTTPFileServer, 262s file: Path, 262s content_type: Optional[str], 262s expected_result: OutcomePrimitive[int], 262s ) -> None: 262s graph = make_graph() 262s headers: Tuple[Tuple[str, str], ...] = tuple() 262s if content_type is not None: 262s headers = (("Content-Type", content_type),) 262s 262s file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource(headers, file), 262s suffix=f"/{file.name}", 262s ) 262s checker = OutcomeChecker.from_primitive(expected_result) 262s assert 0 == len(graph) 262s with checker.context(): 262s > graph.parse(location=file_info.request_url) 262s 262s test/test_graph/test_graph.py:390: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ______ test_guess_format_for_parse_http[None-file3-None-expected_result3] ______ 262s 262s make_graph = .make_graph at 0xf8948cf98220> 262s http_file_server = 262s file = PosixPath('/tmp/autopkgtest.MLbFml/build.tad/src/test/data/defined_namespaces/adms.rdf') 262s content_type = None 262s expected_result = ExceptionChecker(type=, match='Could not guess RDF format .* from file extension so tried Turtle', attributes=None) 262s 262s @pytest.mark.parametrize( 262s ("file", "content_type", "expected_result"), 262s ( 262s (TEST_DATA_DIR / "defined_namespaces/adms.rdf", "application/rdf+xml", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", "text/turtle", 132), 262s (TEST_DATA_DIR / "defined_namespaces/adms.ttl", None, 132), 262s ( 262s TEST_DATA_DIR / "defined_namespaces/adms.rdf", 262s None, 262s ExceptionChecker( 262s ParserError, 262s r"Could not guess RDF format .* from file extension so tried Turtle", 262s ), 262s ), 262s ), 262s ) 262s def test_guess_format_for_parse_http( 262s make_graph: GraphFactory, 262s http_file_server: HTTPFileServer, 262s file: Path, 262s content_type: Optional[str], 262s expected_result: OutcomePrimitive[int], 262s ) -> None: 262s graph = make_graph() 262s headers: Tuple[Tuple[str, str], ...] = tuple() 262s if content_type is not None: 262s headers = (("Content-Type", content_type),) 262s 262s file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource(headers, file), 262s suffix=f"/{file.name}", 262s ) 262s checker = OutcomeChecker.from_primitive(expected_result) 262s assert 0 == len(graph) 262s with checker.context(): 262s > graph.parse(location=file_info.request_url) 262s 262s test/test_graph/test_graph.py:390: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _________________ test_guess_format_for_parse_http_text_plain __________________ 262s 262s @pytest.mark.webtest 262s def test_guess_format_for_parse_http_text_plain(): 262s # Any raw url of a file from GitHub will return the content-type with text/plain. 262s url = "https://raw.githubusercontent.com/AGLDWG/vocpub-profile/master/validators/validator.ttl" 262s graph = Graph().parse(url) 262s assert len(graph) > 0 262s 262s # A url that returns content-type text/html. 262s url = "https://github.com/RDFLib/rdflib/issues/2734" 262s with pytest.raises(PluginException): 262s > graph = Graph().parse(url) 262s 262s test/test_graph/test_graph.py:404: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 406 262s msg = 'Not Acceptable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 406: Not Acceptable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ____________________ TestGraphHTTP.test_content_negotiation ____________________ 262s 262s self = 262s 262s def test_content_negotiation(self) -> None: 262s expected = Graph() 262s expected.add((EGDO.a, EGDO.b, EGDO.c)) 262s expected_triples = GraphHelper.triple_set(expected) 262s 262s with ctx_http_handler(ContentNegotiationHandler) as server: 262s (host, port) = server.server_address 262s if isinstance(host, (bytes, bytearray)): 262s host = host.decode("utf-8") 262s url = f"http://{host}:{port}/foo" 262s for format in ("xml", "n3", "nt"): 262s graph = Graph() 262s > graph.parse(url, format=format) 262s 262s test/test_graph/test_graph_http.py:120: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _______________ TestGraphHTTP.test_content_negotiation_no_format _______________ 262s 262s self = 262s 262s def test_content_negotiation_no_format(self) -> None: 262s expected = Graph() 262s expected.add((EGDO.a, EGDO.b, EGDO.c)) 262s expected_triples = GraphHelper.triple_set(expected) 262s 262s with ctx_http_handler(ContentNegotiationHandler) as server: 262s (host, port) = server.server_address 262s if isinstance(host, (bytes, bytearray)): 262s host = host.decode("utf-8") 262s url = f"http://{host}:{port}/foo" 262s graph = Graph() 262s > graph.parse(url) 262s 262s test/test_graph/test_graph_http.py:134: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s __________________________ TestGraphHTTP.test_source ___________________________ 262s 262s self = 262s 262s def test_source(self) -> None: 262s expected = Graph() 262s expected.add((EGDO["a"], EGDO["b"], EGDO["c"])) 262s expected_triples = GraphHelper.triple_set(expected) 262s 262s with ServedBaseHTTPServerMock() as httpmock: 262s url = httpmock.url 262s 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s f"<{EGDO['a']}> <{EGDO['b']}> <{EGDO['c']}>.".encode(), 262s {"Content-Type": ["text/turtle"]}, 262s ) 262s ) 262s graph = Graph() 262s > graph.parse(source=url) 262s 262s test/test_graph/test_graph_http.py:154: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ____________________________ TestGraphHTTP.test_3xx ____________________________ 262s 262s self = 262s 262s def test_3xx(self) -> None: 262s expected = Graph() 262s expected.add((EGDO["a"], EGDO["b"], EGDO["c"])) 262s expected_triples = GraphHelper.triple_set(expected) 262s 262s with ServedBaseHTTPServerMock() as httpmock: 262s url = httpmock.url 262s 262s for idx in range(3): 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 302, 262s "FOUND", 262s b"", 262s {"Location": [f"{url}/loc/302/{idx}"]}, 262s ) 262s ) 262s for idx in range(3): 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 303, 262s "See Other", 262s b"", 262s {"Location": [f"{url}/loc/303/{idx}"]}, 262s ) 262s ) 262s for idx in range(3): 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 308, 262s "Permanent Redirect", 262s b"", 262s {"Location": [f"{url}/loc/308/{idx}"]}, 262s ) 262s ) 262s 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s f"<{EGDO['a']}> <{EGDO['b']}> <{EGDO['c']}>.".encode(), 262s {"Content-Type": ["text/turtle"]}, 262s ) 262s ) 262s 262s graph = Graph() 262s > graph.parse(location=url, format="turtle") 262s 262s test/test_graph/test_graph_http.py:203: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ____________________________ TestGraphHTTP.test_5xx ____________________________ 262s 262s self = 262s 262s def test_5xx(self): 262s with ServedBaseHTTPServerMock() as httpmock: 262s url = httpmock.url 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse(500, "Internal Server Error", b"", {}) 262s ) 262s 262s graph = Graph() 262s 262s with pytest.raises(HTTPError) as raised: 262s graph.parse(location=url, format="turtle") 262s 262s > assert raised.value.code == 500 262s E AssertionError: assert 503 == 500 262s E + where 503 = .code 262s E + where = tblen=12>.value 262s 262s test/test_graph/test_graph_http.py:240: AssertionError 262s ___________ test_iri_source[/resource/Almer\xeda-expected_request0] ____________ 262s 262s url_suffix = '/resource/Almería' 262s expected_request = MockHTTPRequest(method=EqWildcard(), path='/resource/Almer%C3%ADa', parsed_path=ParseResult(scheme=EqWildcard(), netlo...ldcard(), query=EqWildcard(), fragment=EqWildcard()), path_query=EqWildcard(), headers=EqWildcard(), body=EqWildcard()) 262s function_httpmock = 262s 262s @pytest.mark.parametrize( 262s ["url_suffix", "expected_request"], 262s [ 262s ( 262s "/resource/Almería", 262s MOCK_HTTP_REQUEST_WILDCARD._replace( 262s path="/resource/Almer%C3%ADa", 262s parsed_path=URL_PARSE_RESULT_WILDCARD._replace( 262s path="/resource/Almer%C3%ADa" 262s ), 262s ), 262s ), 262s ( 262s "/resource/Almería?foo=bar", 262s MOCK_HTTP_REQUEST_WILDCARD._replace( 262s parsed_path=URL_PARSE_RESULT_WILDCARD._replace( 262s path="/resource/Almer%C3%ADa" 262s ), 262s path_query={"foo": ["bar"]}, 262s ), 262s ), 262s ], 262s ) 262s def test_iri_source( 262s url_suffix: str, 262s expected_request: MockHTTPRequest, 262s function_httpmock: ServedBaseHTTPServerMock, 262s ) -> None: 262s diverse_triples_path = TEST_DATA_DIR / "variants/diverse_triples.ttl" 262s 262s function_httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s diverse_triples_path.read_bytes(), 262s {"Content-Type": ["text/turtle"]}, 262s ) 262s ) 262s g = Graph() 262s > g.parse(f"{function_httpmock.url}{url_suffix}") 262s 262s test/test_graph/test_graph_http.py:282: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _______ test_iri_source[/resource/Almer\xeda?foo=bar-expected_request1] ________ 262s 262s url_suffix = '/resource/Almería?foo=bar' 262s expected_request = MockHTTPRequest(method=EqWildcard(), path=EqWildcard(), parsed_path=ParseResult(scheme=EqWildcard(), netloc=EqWildcard...rd(), query=EqWildcard(), fragment=EqWildcard()), path_query={'foo': ['bar']}, headers=EqWildcard(), body=EqWildcard()) 262s function_httpmock = 262s 262s @pytest.mark.parametrize( 262s ["url_suffix", "expected_request"], 262s [ 262s ( 262s "/resource/Almería", 262s MOCK_HTTP_REQUEST_WILDCARD._replace( 262s path="/resource/Almer%C3%ADa", 262s parsed_path=URL_PARSE_RESULT_WILDCARD._replace( 262s path="/resource/Almer%C3%ADa" 262s ), 262s ), 262s ), 262s ( 262s "/resource/Almería?foo=bar", 262s MOCK_HTTP_REQUEST_WILDCARD._replace( 262s parsed_path=URL_PARSE_RESULT_WILDCARD._replace( 262s path="/resource/Almer%C3%ADa" 262s ), 262s path_query={"foo": ["bar"]}, 262s ), 262s ), 262s ], 262s ) 262s def test_iri_source( 262s url_suffix: str, 262s expected_request: MockHTTPRequest, 262s function_httpmock: ServedBaseHTTPServerMock, 262s ) -> None: 262s diverse_triples_path = TEST_DATA_DIR / "variants/diverse_triples.ttl" 262s 262s function_httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s diverse_triples_path.read_bytes(), 262s {"Content-Type": ["text/turtle"]}, 262s ) 262s ) 262s g = Graph() 262s > g.parse(f"{function_httpmock.url}{url_suffix}") 262s 262s test/test_graph/test_graph_http.py:282: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _________________________ test_graph_redirect_new_host _________________________ 262s 262s function_httpmocks = (, ) 262s 262s def test_graph_redirect_new_host( 262s function_httpmocks: Tuple[ServedBaseHTTPServerMock, ServedBaseHTTPServerMock] 262s ) -> None: 262s """ 262s Redirect to new host results in a request with the right Host header 262s parameter. 262s """ 262s 262s mock_a, mock_b = function_httpmocks 262s 262s mock_a.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 308, 262s "Permanent Redirect", 262s b"", 262s {"Location": [f"{mock_b.url}/b/data.ttl"]}, 262s ) 262s ) 262s 262s mock_b.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s (TEST_DATA_DIR / "variants" / "simple_triple.ttl").read_bytes(), 262s {"Content-Type": ["text/turtle"]}, 262s ) 262s ) 262s 262s graph = Graph() 262s > graph.parse(location=f"{mock_a.url}/a/data.ttl") 262s 262s test/test_graph/test_graph_redirect.py:42: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1475: in parse 262s source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=turtle:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.ttl'), source_param=None, public_id...8045/file/fa727c07dab846bf97c76e3b44d0b800', system_id='http://127.0.0.1:38045/file/fa727c07dab846bf97c76e3b44d0b800')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.hext:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=hext:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.hext'), source_param=None, public_i...8045/file/b137f26f01bc4d8e899645129cc3868e', system_id='http://127.0.0.1:38045/file/b137f26f01bc4d8e899645129cc3868e')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=None:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.ttl'), source_param=None, public_id...8045/file/fa727c07dab846bf97c76e3b44d0b800', system_id='http://127.0.0.1:38045/file/fa727c07dab846bf97c76e3b44d0b800')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.xml:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=xml:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.xml'), source_param=None, public_id...8045/file/86d37eca4d6f4b96a4eddaff11c90b90', system_id='http://127.0.0.1:38045/file/86d37eca4d6f4b96a4eddaff11c90b90')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.nt:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=nt:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.nt'), source_param=None, public_id=...8045/file/7c63f5f7230c45b1a2a53ac64f4d2417', system_id='http://127.0.0.1:38045/file/7c63f5f7230c45b1a2a53ac64f4d2417')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.jsonld:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=json-ld:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.jsonld'), source_param=None, public...8045/file/0e19d17cac874f439887e02cb53f3862', system_id='http://127.0.0.1:38045/file/0e19d17cac874f439887e02cb53f3862')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=turtle:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.ttl'), source_param=None, public_id...8045/file/fa727c07dab846bf97c76e3b44d0b800', system_id='http://127.0.0.1:38045/file/fa727c07dab846bf97c76e3b44d0b800')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.hext:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=hext:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.hext'), source_param=None, public_i...8045/file/b137f26f01bc4d8e899645129cc3868e', system_id='http://127.0.0.1:38045/file/b137f26f01bc4d8e899645129cc3868e')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=None:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.ttl'), source_param=None, public_id...8045/file/fa727c07dab846bf97c76e3b44d0b800', system_id='http://127.0.0.1:38045/file/fa727c07dab846bf97c76e3b44d0b800')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.xml:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=xml:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.xml'), source_param=None, public_id...8045/file/86d37eca4d6f4b96a4eddaff11c90b90', system_id='http://127.0.0.1:38045/file/86d37eca4d6f4b96a4eddaff11c90b90')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.nt:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=nt:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.nt'), source_param=None, public_id=...8045/file/7c63f5f7230c45b1a2a53ac64f4d2417', system_id='http://127.0.0.1:38045/file/7c63f5f7230c45b1a2a53ac64f4d2417')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.jsonld:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=json-ld:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.jsonld'), source_param=None, public...8045/file/0e19d17cac874f439887e02cb53f3862', system_id='http://127.0.0.1:38045/file/0e19d17cac874f439887e02cb53f3862')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _ test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=https://example.com/explicit_public_id:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=turtle:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id='https://example.com/explicit_public_id', system_id=None)] _ 262s 262s test_params = CreateInputSourceTestParams(input_path=PosixPath('test/data/variants/simple_triple.ttl'), source_param=None, public_id...id='https://example.com/explicit_public_id', system_id='http://127.0.0.1:38045/file/fa727c07dab846bf97c76e3b44d0b800')) 262s http_file_server = 262s 262s @pytest.mark.parametrize( 262s ["test_params"], 262s generate_create_input_source_cases(), 262s ) 262s def test_create_input_source( 262s test_params: CreateInputSourceTestParams, 262s http_file_server: HTTPFileServer, 262s ) -> None: 262s """ 262s A given set of parameters results in an input source matching specified 262s invariants. 262s 262s :param test_params: The parameters to use for the test. This specifies what 262s parameters should be passed to func:`create_input_source` and what 262s invariants the resulting input source should match. 262s :param http_file_server: The HTTP file server to use for the test. 262s """ 262s logging.debug("test_params = %s", test_params) 262s input_path = test_params.input_path 262s input: Union[HTTPFileInfo, Path] 262s if test_params.requires_http: 262s http_file_info = http_file_server.add_file_with_caching( 262s ProtoFileResource((), test_params.input_path), 262s (ProtoRedirectResource((), 300, LocationType.URL),), 262s ) 262s logging.debug("http_file_info = %s", http_file_info) 262s input = http_file_info 262s else: 262s input = test_params.input_path 262s 262s if isinstance(test_params.expected_result, InputSourceChecker): 262s expected_result = test_params.expected_result 262s param = test_params.input_param 262s if expected_result.public_id is None: 262s if param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s ): 262s expected_result.public_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.public_id = http_file_info.effective_url 262s else: 262s expected_result.public_id = "" 262s 262s if expected_result.system_id is None: 262s if param in ( 262s SourceParam.BINARY_IO, 262s SourceParam.TEXT_IO, 262s ): 262s expected_result.system_id = f"{input_path}" 262s elif param in ( 262s SourceParam.INPUT_SOURCE, 262s SourceParam.BYTES, 262s DataParam.STRING, 262s DataParam.BYTES, 262s ): 262s expected_result.system_id = None 262s elif param in ( 262s SourceParam.PATH, 262s SourceParam.PATH_STRING, 262s SourceParam.FILE_URI, 262s LocationParam.FILE_URI, 262s FileParam.BINARY_IO, 262s FileParam.TEXT_IO, 262s ): 262s expected_result.system_id = input_path.absolute().as_uri() 262s elif param in (LocationParam.HTTP_URI,): 262s expected_result.system_id = http_file_info.effective_url 262s else: 262s raise ValueError( 262s f"cannot determine expected_result.system_id for param={param!r}" 262s ) 262s 262s logging.info("expected_result = %s", test_params.expected_result) 262s 262s catcher: Optional[pytest.ExceptionInfo[Exception]] = None 262s input_source: Optional[InputSource] = None 262s with ExitStack() as xstack: 262s if isinstance(test_params.expected_result, ExceptionChecker): 262s catcher = xstack.enter_context(test_params.expected_result.context()) 262s 262s > input_source = xstack.enter_context( 262s call_create_input_source( 262s input, 262s test_params.source_param, 262s test_params.public_id, 262s test_params.location_param, 262s test_params.file_param, 262s test_params.data_param, 262s test_params.format, 262s ) 262s ) 262s 262s test/test_misc/test_input_source.py:654: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/contextlib.py:530: in enter_context 262s result = _enter(cm) 262s /usr/lib/python3.13/contextlib.py:141: in __enter__ 262s return next(self.gen) 262s test/test_misc/test_input_source.py:244: in call_create_input_source 262s input_source = create_input_source( 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s __________________ test_block_file[Defence.NONE-URIKind.HTTP] __________________ 262s 262s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_block_file_Defence_NONE_U1') 262s audit_hook_dispatcher = AuditHookDispatcher(handlers=defaultdict(, {'object.__getattr__': [], 'os.putenv': [], 'open': [], 'impo...util.copytree': [], 'shutil.copyfile': [], 'shutil.copystat': [], 'os.utime': [], 'os.listxattr': [], 'os.chmod': []})) 262s http_file_server = 262s exit_stack = 262s defence = , uri_kind = 262s 262s @pytest.mark.parametrize(["defence", "uri_kind"], generate_make_block_file_cases()) 262s def test_block_file( 262s tmp_path: Path, 262s audit_hook_dispatcher: AuditHookDispatcher, 262s http_file_server: HTTPFileServer, 262s exit_stack: ExitStack, 262s defence: Defence, 262s uri_kind: URIKind, 262s ) -> None: 262s context_file = tmp_path / "context.jsonld" 262s context_file.write_text(dedent(JSONLD_CONTEXT)) 262s context_file_served = http_file_server.add_file_with_caching( 262s ProtoFileResource((), context_file) 262s ) 262s 262s context_uri: str 262s if uri_kind == URIKind.FILE: 262s context_uri = context_file.as_uri() 262s elif uri_kind == URIKind.HTTP: 262s context_uri = context_file_served.request_url 262s elif uri_kind == URIKind.RELATIVE: 262s context_uri = context_file.name 262s exit_stack.enter_context(ctx_chdir(tmp_path)) 262s else: 262s raise ValueError(f"unknown URI kind: {uri_kind}") 262s 262s data = f""" 262s {{ 262s "@context": "{context_uri}", 262s "@id": "ex:subject", 262s "ex:predicate": {{ "@id": "ex:object" }} 262s }} 262s """ 262s 262s data_file = tmp_path / "data.jsonld" 262s data_file.write_text(dedent(data)) 262s 262s if defence == Defence.AUDIT_HOOK and uri_kind == URIKind.FILE: 262s 262s def audit_hook(name: str, args: Tuple[Any, ...]) -> None: 262s logging.info("block_file_access: name = %s, args = %s", name, args) 262s if name == "open" and args[0] == f"{context_file.absolute()}": 262s raise PermissionError("access blocked") 262s 262s exit_stack.enter_context(audit_hook_dispatcher.ctx_hook("open", audit_hook)) 262s 262s elif defence == Defence.AUDIT_HOOK and uri_kind == URIKind.RELATIVE: 262s 262s def audit_hook(name: str, args: Tuple[Any, ...]) -> None: 262s logging.info("block_file_access: name = %s, args = %s", name, args) 262s if name == "open" and args[0] == f"{Path.cwd() / context_file.name}": 262s raise PermissionError("access blocked") 262s 262s exit_stack.enter_context(audit_hook_dispatcher.ctx_hook("open", audit_hook)) 262s 262s elif defence == Defence.AUDIT_HOOK and uri_kind == URIKind.HTTP: 262s 262s def audit_hook(name: str, args: Tuple[Any, ...]) -> None: 262s logging.info("block_file_access: name = %s, args = %s", name, args) 262s if name == "urllib.Request" and args[0] == context_file_served.request_url: 262s raise PermissionError("access blocked") 262s 262s exit_stack.enter_context( 262s audit_hook_dispatcher.ctx_hook("urllib.Request", audit_hook) 262s ) 262s 262s elif defence == Defence.URL_OPENER and uri_kind == URIKind.HTTP: 262s opener = OpenerDirector() 262s 262s class SecuredHTTPHandler(HTTPHandler): 262s def http_open(self, req: Request) -> http.client.HTTPResponse: 262s if req.get_full_url() == context_file_served.request_url: 262s raise PermissionError("access blocked") 262s return super().http_open(req) 262s 262s opener.add_handler(SecuredHTTPHandler()) 262s 262s exit_stack.enter_context(context_urlopener(opener)) 262s 262s elif defence == Defence.NONE: 262s pass 262s else: 262s raise ValueError( 262s f"unsupported defence {defence} and uri_kind {uri_kind} combination" 262s ) 262s 262s graph = Graph() 262s if defence != Defence.NONE: 262s with pytest.raises(PermissionError): 262s graph.parse(format="json-ld", data=data) 262s assert len(graph) == 0 262s else: 262s > graph.parse(format="json-ld", data=data) 262s 262s test/test_misc/test_security.py:166: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1510: in parse 262s parser.parse(source, self, **args) 262s rdflib/plugins/parsers/jsonld.py:171: in parse 262s to_rdf( 262s rdflib/plugins/parsers/jsonld.py:207: in to_rdf 262s return parser.parse(data, context, dataset) 262s rdflib/plugins/parsers/jsonld.py:233: in parse 262s context.load(local_context, context.base) 262s rdflib/plugins/shared/jsonld/context.py:410: in load 262s self._prep_sources(base, source, sources, referenced_contexts) 262s rdflib/plugins/shared/jsonld/context.py:440: in _prep_sources 262s new_ctx = self._fetch_context( 262s rdflib/plugins/shared/jsonld/context.py:484: in _fetch_context 262s source_json, _ = source_to_json(source_url) 262s rdflib/plugins/shared/jsonld/util.py:100: in source_to_json 262s source = create_input_source(source, format="json-ld") 262s rdflib/parser.py:735: in create_input_source 262s ) = _create_input_source_from_location( 262s rdflib/parser.py:797: in _create_input_source_from_location 262s input_source = URLInputSource(absolute_location, format) 262s rdflib/parser.py:594: in __init__ 262s response: addinfourl = _urlopen(req) 262s rdflib/_networking.py:106: in _urlopen 262s return urlopen(request) 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s _____________ test_with_mock[response_bindings0-expected_result0] ______________ 262s 262s function_httpmock = 262s response_bindings = [{'type': 'uri', 'value': 'http://example.org/uri'}, {'type': 'literal', 'value': 'literal without type or lang'}, {'t...MLSchema#string', 'type': 'literal', 'value': 'literal with datatype'}, {'type': 'bnode', 'value': 'ohci6Te6aidooNgo'}] 262s expected_result = [rdflib.term.URIRef('http://example.org/uri'), rdflib.term.Literal('literal without type or lang'), rdflib.term.Litera...atype', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#string')), rdflib.term.BNode('ohci6Te6aidooNgo')] 262s 262s @pytest.mark.parametrize( 262s ("response_bindings", "expected_result"), 262s [ 262s ( 262s [ 262s {"type": "uri", "value": "http://example.org/uri"}, 262s {"type": "literal", "value": "literal without type or lang"}, 262s {"type": "literal", "value": "literal with lang", "xml:lang": "en"}, 262s { 262s "type": "typed-literal", 262s "value": "typed-literal with datatype", 262s "datatype": f"{XSD.string}", 262s }, 262s { 262s "type": "literal", 262s "value": "literal with datatype", 262s "datatype": f"{XSD.string}", 262s }, 262s {"type": "bnode", "value": "ohci6Te6aidooNgo"}, 262s ], 262s [ 262s URIRef("http://example.org/uri"), 262s Literal("literal without type or lang"), 262s Literal("literal with lang", lang="en"), 262s Literal( 262s "typed-literal with datatype", 262s datatype=URIRef("http://www.w3.org/2001/XMLSchema#string"), 262s ), 262s Literal("literal with datatype", datatype=XSD.string), 262s BNode("ohci6Te6aidooNgo"), 262s ], 262s ), 262s ( 262s [ 262s {"type": "invalid-type"}, 262s ], 262s ValueError, 262s ), 262s ], 262s ) 262s def test_with_mock( 262s function_httpmock: ServedBaseHTTPServerMock, 262s response_bindings: List[Dict[str, str]], 262s expected_result: Union[List[Identifier], Type[Exception]], 262s ) -> None: 262s """ 262s This tests that bindings for a variable named var 262s """ 262s graph = Graph() 262s query = """ 262s PREFIX ex: 262s SELECT ?var 262s WHERE { 262s SERVICE { 262s ex:s ex:p ?var 262s } 262s } 262s """ 262s query = query.replace("REMOTE_URL", function_httpmock.url) 262s response = { 262s "head": {"vars": ["var"]}, 262s "results": {"bindings": [{"var": item} for item in response_bindings]}, 262s } 262s mock_response = MockHTTPResponse( 262s 200, 262s "OK", 262s json.dumps(response).encode("utf-8"), 262s {"Content-Type": ["application/sparql-results+json"]}, 262s ) 262s # Adding the same response for GET and POST as the method used by RDFLib is 262s # dependent on the size of the service query. 262s function_httpmock.responses[MethodName.GET].append(mock_response) 262s function_httpmock.responses[MethodName.POST].append(mock_response) 262s 262s checker = OutcomeChecker[Sequence[Mapping[Variable, Identifier]]].from_primitive( 262s [{Variable("var"): item} for item in expected_result] 262s if isinstance(expected_result, List) 262s else expected_result 262s ) 262s with checker.context(): 262s > bindings = graph.query(query).bindings 262s 262s test/test_sparql/test_service.py:370: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/query.py:240: in bindings 262s self._bindings += list(self._genbindings) 262s rdflib/plugins/sparql/evaluate.py:574: in 262s return (row.project(project.PV) for row in res) 262s rdflib/plugins/sparql/evaluate.py:368: in evalServiceQuery 262s response = urlopen( 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ________________ test_with_mock[response_bindings1-ValueError] _________________ 262s 262s function_httpmock = 262s response_bindings = [{'type': 'invalid-type'}] 262s expected_result = 262s 262s @pytest.mark.parametrize( 262s ("response_bindings", "expected_result"), 262s [ 262s ( 262s [ 262s {"type": "uri", "value": "http://example.org/uri"}, 262s {"type": "literal", "value": "literal without type or lang"}, 262s {"type": "literal", "value": "literal with lang", "xml:lang": "en"}, 262s { 262s "type": "typed-literal", 262s "value": "typed-literal with datatype", 262s "datatype": f"{XSD.string}", 262s }, 262s { 262s "type": "literal", 262s "value": "literal with datatype", 262s "datatype": f"{XSD.string}", 262s }, 262s {"type": "bnode", "value": "ohci6Te6aidooNgo"}, 262s ], 262s [ 262s URIRef("http://example.org/uri"), 262s Literal("literal without type or lang"), 262s Literal("literal with lang", lang="en"), 262s Literal( 262s "typed-literal with datatype", 262s datatype=URIRef("http://www.w3.org/2001/XMLSchema#string"), 262s ), 262s Literal("literal with datatype", datatype=XSD.string), 262s BNode("ohci6Te6aidooNgo"), 262s ], 262s ), 262s ( 262s [ 262s {"type": "invalid-type"}, 262s ], 262s ValueError, 262s ), 262s ], 262s ) 262s def test_with_mock( 262s function_httpmock: ServedBaseHTTPServerMock, 262s response_bindings: List[Dict[str, str]], 262s expected_result: Union[List[Identifier], Type[Exception]], 262s ) -> None: 262s """ 262s This tests that bindings for a variable named var 262s """ 262s graph = Graph() 262s query = """ 262s PREFIX ex: 262s SELECT ?var 262s WHERE { 262s SERVICE { 262s ex:s ex:p ?var 262s } 262s } 262s """ 262s query = query.replace("REMOTE_URL", function_httpmock.url) 262s response = { 262s "head": {"vars": ["var"]}, 262s "results": {"bindings": [{"var": item} for item in response_bindings]}, 262s } 262s mock_response = MockHTTPResponse( 262s 200, 262s "OK", 262s json.dumps(response).encode("utf-8"), 262s {"Content-Type": ["application/sparql-results+json"]}, 262s ) 262s # Adding the same response for GET and POST as the method used by RDFLib is 262s # dependent on the size of the service query. 262s function_httpmock.responses[MethodName.GET].append(mock_response) 262s function_httpmock.responses[MethodName.POST].append(mock_response) 262s 262s checker = OutcomeChecker[Sequence[Mapping[Variable, Identifier]]].from_primitive( 262s [{Variable("var"): item} for item in expected_result] 262s if isinstance(expected_result, List) 262s else expected_result 262s ) 262s with checker.context(): 262s > bindings = graph.query(query).bindings 262s 262s test/test_sparql/test_service.py:370: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/query.py:240: in bindings 262s self._bindings += list(self._genbindings) 262s rdflib/plugins/sparql/evaluate.py:574: in 262s return (row.project(project.PV) for row in res) 262s rdflib/plugins/sparql/evaluate.py:368: in evalServiceQuery 262s response = urlopen( 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ____________________ TestSPARQLStoreFakeDBPedia.test_query _____________________ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: \nPREFIX dc: \n\nselect distinct ?Concept where {[] a ?Concept} LIMIT 1' 262s default_graph = rdflib.term.BNode('N67cbd77a63f4464abb26af3a2f4a184a') 262s named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s self = 262s 262s def test_query(self): 262s query = "select distinct ?Concept where {[] a ?Concept} LIMIT 1" 262s _query = SPARQLConnector.query 262s self.httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s b"""\ 262s 262s 262s 262s 262s 262s 262s http://www.w3.org/2000/01/rdf-schema#Datatype 262s 262s 262s """, 262s {"Content-Type": ["application/sparql-results+xml; charset=UTF-8"]}, 262s ) 262s ) 262s with patch("rdflib.plugins.stores.sparqlstore.SPARQLConnector.query") as mock: 262s SPARQLConnector.query.side_effect = lambda *args, **kwargs: _query( 262s self.graph.store, *args, **kwargs 262s ) 262s > res = self.graph.query(query, initNs={}) 262s 262s test/test_store/test_store_sparqlstore.py:106: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s /usr/lib/python3.13/unittest/mock.py:1169: in __call__ 262s return self._mock_call(*args, **kwargs) 262s /usr/lib/python3.13/unittest/mock.py:1173: in _mock_call 262s return self._execute_mock_call(*args, **kwargs) 262s /usr/lib/python3.13/unittest/mock.py:1234: in _execute_mock_call 262s result = effect(*args, **kwargs) 262s test/test_store/test_store_sparqlstore.py:103: in 262s SPARQLConnector.query.side_effect = lambda *args, **kwargs: _query( 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: \nPREFIX dc: \n\nselect distinct ?Concept where {[] a ?Concept} LIMIT 1' 262s default_graph = rdflib.term.BNode('N67cbd77a63f4464abb26af3a2f4a184a') 262s named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s ___________________ TestSPARQLStoreFakeDBPedia.test_init_ns ____________________ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: \n\n SELECT ?label WHERE\n { ?s a xyzzy:Concept ; xyzzy:prefLabel ?label . } LIMIT 10\n ' 262s default_graph = rdflib.term.BNode('Nb5e2e0b636624aaea78e12223f116db2') 262s named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s self = 262s 262s def test_init_ns(self): 262s query = """\ 262s SELECT ?label WHERE 262s { ?s a xyzzy:Concept ; xyzzy:prefLabel ?label . } LIMIT 10 262s """ 262s self.httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s """\ 262s 262s 262s 262s 262s 262s 262s 189 262s 262s 262s 1899–1900 Scottish Football League 262s 262s 262s 1899–1900 United States collegiate men's ice hockey season 262s 262s 262s 1899–1900 Western Conference men's basketball season 262s 262s 262s 1899–1900 collegiate men's basketball independents season in the United States 262s 262s 262s 1899–1900 domestic association football cups 262s 262s 262s 1899–1900 domestic association football leagues 262s 262s 262s 1899–1900 in American ice hockey by league 262s 262s 262s 1899–1900 in American ice hockey by team 262s 262s 262s 1899–1900 in Belgian football 262s 262s 262s """.encode(), 262s {"Content-Type": ["application/sparql-results+xml; charset=UTF-8"]}, 262s ) 262s ) 262s > res = self.graph.query( 262s query, initNs={"xyzzy": "http://www.w3.org/2004/02/skos/core#"} 262s ) 262s 262s test/test_store/test_store_sparqlstore.py:176: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: \n\n SELECT ?label WHERE\n { ?s a xyzzy:Concept ; xyzzy:prefLabel ?label . } LIMIT 10\n ' 262s default_graph = rdflib.term.BNode('Nb5e2e0b636624aaea78e12223f116db2') 262s named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s __________________ TestSPARQLStoreFakeDBPedia.test_noinit_ns ___________________ 262s 262s self = 262s 262s def test_noinit_ns(self): 262s query = """\ 262s SELECT ?label WHERE 262s { ?s a xyzzy:Concept ; xyzzy:prefLabel ?label . } LIMIT 10 262s """ 262s self.httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 400, 262s "Bad Request", 262s b"""\ 262s Virtuoso 37000 Error SP030: SPARQL compiler, line 1: Undefined namespace prefix in prefix:localpart notation at 'xyzzy:Concept' before ';' 262s 262s SPARQL query: 262s SELECT ?label WHERE { ?s a xyzzy:Concept ; xyzzy:prefLabel ?label . } LIMIT 10""", 262s {"Content-Type": ["text/plain"]}, 262s ) 262s ) 262s with pytest.raises(ValueError): 262s self.graph.query(query) 262s > assert self.httpmock.mocks[MethodName.GET].call_count == 1 262s E AssertionError: assert 0 == 1 262s E + where 0 = .call_count 262s 262s test/test_store/test_store_sparqlstore.py:206: AssertionError 262s ___________ TestSPARQLStoreFakeDBPedia.test_query_with_added_prolog ____________ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s self = 262s 262s def test_query_with_added_prolog(self): 262s prologue = """\ 262s PREFIX xyzzy: 262s """ 262s query = """\ 262s SELECT ?label WHERE 262s { ?s a xyzzy:Concept ; xyzzy:prefLabel ?label . } LIMIT 10 262s """ 262s self.httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s """\ 262s 262s 262s 262s 262s 262s 262s 189 262s 262s 262s 1899–1900 Scottish Football League 262s 262s 262s 1899–1900 United States collegiate men's ice hockey season 262s 262s 262s 1899–1900 Western Conference men's basketball season 262s 262s 262s 1899–1900 collegiate men's basketball independents season in the United States 262s 262s 262s 1899–1900 domestic association football cups 262s 262s 262s 1899–1900 domestic association football leagues 262s 262s 262s 1899–1900 in American ice hockey by league 262s 262s 262s 1899–1900 in American ice hockey by team 262s 262s 262s 1899–1900 in Belgian football 262s 262s 262s """.encode(), 262s {"Content-Type": ["application/sparql-results+xml; charset=UTF-8"]}, 262s ) 262s ) 262s > res = helper.query_with_retry(self.graph, prologue + query) 262s 262s test/test_store/test_store_sparqlstore.py:264: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s test/utils/helper.py:42: in query_with_retry 262s result = graph.query(query, **kwargs) 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s _________ TestSPARQLStoreFakeDBPedia.test_query_with_added_rdf_prolog __________ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s self = 262s 262s def test_query_with_added_rdf_prolog(self): 262s prologue = """\ 262s PREFIX rdf: 262s PREFIX xyzzy: 262s """ 262s query = """\ 262s SELECT ?label WHERE 262s { ?s a xyzzy:Concept ; xyzzy:prefLabel ?label . } LIMIT 10 262s """ 262s self.httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s """\ 262s 262s 262s 262s 262s 262s 262s 189 262s 262s 262s 1899–1900 Scottish Football League 262s 262s 262s 1899–1900 United States collegiate men's ice hockey season 262s 262s 262s 1899–1900 Western Conference men's basketball season 262s 262s 262s 1899–1900 collegiate men's basketball independents season in the United States 262s 262s 262s 1899–1900 domestic association football cups 262s 262s 262s 1899–1900 domestic association football leagues 262s 262s 262s 1899–1900 in American ice hockey by league 262s 262s 262s 1899–1900 in American ice hockey by team 262s 262s 262s 1899–1900 in Belgian football 262s 262s 262s """.encode(), 262s {"Content-Type": ["application/sparql-results+xml; charset=UTF-8"]}, 262s ) 262s ) 262s > res = helper.query_with_retry(self.graph, prologue + query) 262s 262s test/test_store/test_store_sparqlstore.py:326: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s test/utils/helper.py:42: in query_with_retry 262s result = graph.query(query, **kwargs) 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s _______ TestSPARQLStoreFakeDBPedia.test_counting_graph_and_store_queries _______ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s self = 262s 262s def test_counting_graph_and_store_queries(self): 262s query = """ 262s SELECT ?s 262s WHERE { 262s ?s ?p ?o . 262s } 262s LIMIT 5 262s """ 262s g = Graph("SPARQLStore") 262s g.open(self.path) 262s count = 0 262s response = MockHTTPResponse( 262s 200, 262s "OK", 262s b"""\ 262s 262s 262s 262s 262s 262s 262s http://www.openlinksw.com/virtrdf-data-formats#default-iid 262s 262s 262s http://www.openlinksw.com/virtrdf-data-formats#default-iid-nullable 262s 262s 262s http://www.openlinksw.com/virtrdf-data-formats#default-iid-blank 262s 262s 262s http://www.openlinksw.com/virtrdf-data-formats#default-iid-blank-nullable 262s 262s 262s http://www.openlinksw.com/virtrdf-data-formats#default-iid-nonblank 262s 262s 262s """, 262s {"Content-Type": ["application/sparql-results+xml; charset=UTF-8"]}, 262s ) 262s 262s self.httpmock.responses[MethodName.GET].append(response) 262s 262s > result = g.query(query) 262s 262s test/test_store/test_store_sparqlstore.py:376: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s _______________________ TestSPARQLStoreUpdate.test_query _______________________ 262s 262s self = 262s 262s def test_query(self): 262s query = "insert data { }" 262s > res = self.graph.update(query) 262s 262s test/test_store/test_store_sparqlstore.py:439: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1628: in update 262s return self.store.update( 262s rdflib/plugins/stores/sparqlstore.py:877: in update 262s self.commit() 262s rdflib/plugins/stores/sparqlstore.py:709: in commit 262s self._update("\n;\n".join(self._edits)) 262s rdflib/plugins/stores/sparqlstore.py:804: in _update 262s SPARQLConnector.update(self, update) 262s rdflib/plugins/stores/sparqlconnector.py:185: in update 262s res = urlopen( # noqa: F841 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ---------------------------- Captured stdout setup ----------------------------- 262s Started mocked sparql endpoint on http://localhost:34435/ 262s __________________________ TestSPARQLMock.test_query ___________________________ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: \nPREFIX dc: \n\nSELECT ?s ?p ?o WHERE { ?s ?p ?o }' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s self = 262s 262s def test_query(self): 262s triples = { 262s (RDFS.Resource, RDF.type, RDFS.Class), 262s (RDFS.Resource, RDFS.isDefinedBy, URIRef(RDFS)), 262s (RDFS.Resource, RDFS.label, Literal("Resource")), 262s (RDFS.Resource, RDFS.comment, Literal("The class resource, everything.")), 262s } 262s rows = "\n".join([f'"{s}","{p}","{o}"' for s, p, o in triples]) 262s response_body = f"s,p,o\n{rows}".encode() 262s response = MockHTTPResponse( 262s 200, "OK", response_body, {"Content-Type": ["text/csv; charset=utf-8"]} 262s ) 262s 262s graph = Graph(store="SPARQLStore", identifier="http://example.com") 262s graph.bind("xsd", XSD) 262s graph.bind("xml", XMLNS) 262s graph.bind("foaf", FOAF) 262s graph.bind("rdf", RDF) 262s 262s assert len(list(graph.namespaces())) >= 4 262s 262s with ServedBaseHTTPServerMock() as httpmock: 262s httpmock.responses[MethodName.GET].append(response) 262s url = f"{httpmock.url}/query" 262s graph.open(url) 262s > query_result = graph.query("SELECT ?s ?p ?o WHERE { ?s ?p ?o }") 262s 262s test/test_store/test_store_sparqlstore.py:514: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = 'PREFIX org: \nPREFIX rdfs: \nPREFIX time: \nPREFIX dc: \n\nSELECT ?s ?p ?o WHERE { ?s ?p ?o }' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s _ test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml; charset=utf-8] _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s function_httpmock = 262s expected_graph = )> 262s response_body = b'\n\n \n\n' 262s response_headers = {'Content-Type': ['application/rdf+xml; charset=utf-8']} 262s 262s @pytest.mark.parametrize( 262s [ 262s "expected_graph", 262s "response_body", 262s "response_headers", 262s ], 262s make_test_query_construct_format_cases(), 262s ) 262s def test_query_construct_format( 262s function_httpmock: ServedBaseHTTPServerMock, 262s expected_graph: Graph, 262s response_body: bytes, 262s response_headers: Dict[str, List[str]], 262s ) -> None: 262s """ 262s This tests that bindings for a variable named var 262s """ 262s logging.debug("response_headers = %s", response_headers) 262s graph = Graph( 262s # store_factory(mime_type), 262s "SPARQLStore", 262s identifier="http://example.com", 262s bind_namespaces="none", 262s ) 262s url = f"{function_httpmock.url}/query" 262s logging.debug("opening %s", url) 262s graph.open(url) 262s query = """ 262s CONSTRUCT { 262s ?s ?p ?o 262s } 262s WHERE { 262s ?s ?p ?o 262s } 262s """ 262s 262s function_httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s response_body, 262s response_headers, 262s ) 262s ) 262s 262s logging.debug("sending query %s", query) 262s > result = graph.query(query) 262s 262s test/test_store/test_store_sparqlstore_query.py:120: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s _ test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml; charset=UTF-8] _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s function_httpmock = 262s expected_graph = )> 262s response_body = b'\n\n \n\n' 262s response_headers = {'Content-Type': ['application/rdf+xml; charset=UTF-8']} 262s 262s @pytest.mark.parametrize( 262s [ 262s "expected_graph", 262s "response_body", 262s "response_headers", 262s ], 262s make_test_query_construct_format_cases(), 262s ) 262s def test_query_construct_format( 262s function_httpmock: ServedBaseHTTPServerMock, 262s expected_graph: Graph, 262s response_body: bytes, 262s response_headers: Dict[str, List[str]], 262s ) -> None: 262s """ 262s This tests that bindings for a variable named var 262s """ 262s logging.debug("response_headers = %s", response_headers) 262s graph = Graph( 262s # store_factory(mime_type), 262s "SPARQLStore", 262s identifier="http://example.com", 262s bind_namespaces="none", 262s ) 262s url = f"{function_httpmock.url}/query" 262s logging.debug("opening %s", url) 262s graph.open(url) 262s query = """ 262s CONSTRUCT { 262s ?s ?p ?o 262s } 262s WHERE { 262s ?s ?p ?o 262s } 262s """ 262s 262s function_httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s response_body, 262s response_headers, 262s ) 262s ) 262s 262s logging.debug("sending query %s", query) 262s > result = graph.query(query) 262s 262s test/test_store/test_store_sparqlstore_query.py:120: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s _ test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml] _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s function_httpmock = 262s expected_graph = )> 262s response_body = b'\n\n \n\n' 262s response_headers = {'Content-Type': ['application/rdf+xml']} 262s 262s @pytest.mark.parametrize( 262s [ 262s "expected_graph", 262s "response_body", 262s "response_headers", 262s ], 262s make_test_query_construct_format_cases(), 262s ) 262s def test_query_construct_format( 262s function_httpmock: ServedBaseHTTPServerMock, 262s expected_graph: Graph, 262s response_body: bytes, 262s response_headers: Dict[str, List[str]], 262s ) -> None: 262s """ 262s This tests that bindings for a variable named var 262s """ 262s logging.debug("response_headers = %s", response_headers) 262s graph = Graph( 262s # store_factory(mime_type), 262s "SPARQLStore", 262s identifier="http://example.com", 262s bind_namespaces="none", 262s ) 262s url = f"{function_httpmock.url}/query" 262s logging.debug("opening %s", url) 262s graph.open(url) 262s query = """ 262s CONSTRUCT { 262s ?s ?p ?o 262s } 262s WHERE { 262s ?s ?p ?o 262s } 262s """ 262s 262s function_httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s response_body, 262s response_headers, 262s ) 262s ) 262s 262s logging.debug("sending query %s", query) 262s > result = graph.query(query) 262s 262s test/test_store/test_store_sparqlstore_query.py:120: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s _ test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml;charset=utf-8] _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s > res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s 262s rdflib/plugins/stores/sparqlconnector.py:113: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s 262s During handling of the above exception, another exception occurred: 262s 262s function_httpmock = 262s expected_graph = )> 262s response_body = b'\n\n \n\n' 262s response_headers = {'Content-Type': ['application/rdf+xml;charset=utf-8']} 262s 262s @pytest.mark.parametrize( 262s [ 262s "expected_graph", 262s "response_body", 262s "response_headers", 262s ], 262s make_test_query_construct_format_cases(), 262s ) 262s def test_query_construct_format( 262s function_httpmock: ServedBaseHTTPServerMock, 262s expected_graph: Graph, 262s response_body: bytes, 262s response_headers: Dict[str, List[str]], 262s ) -> None: 262s """ 262s This tests that bindings for a variable named var 262s """ 262s logging.debug("response_headers = %s", response_headers) 262s graph = Graph( 262s # store_factory(mime_type), 262s "SPARQLStore", 262s identifier="http://example.com", 262s bind_namespaces="none", 262s ) 262s url = f"{function_httpmock.url}/query" 262s logging.debug("opening %s", url) 262s graph.open(url) 262s query = """ 262s CONSTRUCT { 262s ?s ?p ?o 262s } 262s WHERE { 262s ?s ?p ?o 262s } 262s """ 262s 262s function_httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s response_body, 262s response_headers, 262s ) 262s ) 262s 262s logging.debug("sending query %s", query) 262s > result = graph.query(query) 262s 262s test/test_store/test_store_sparqlstore_query.py:120: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1573: in query 262s return self.store.query( 262s rdflib/plugins/stores/sparqlstore.py:246: in query 262s return self._query( 262s rdflib/plugins/stores/sparqlstore.py:205: in _query 262s return super(SPARQLStore, self).query(*args, **kwargs) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s query = '\n CONSTRUCT {\n ?s ?p ?o\n }\n WHERE {\n ?s ?p ?o\n }\n ' 262s default_graph = rdflib.term.URIRef('http://example.com'), named_graph = None 262s 262s def query( 262s self, 262s query: str, 262s default_graph: Optional[str] = None, 262s named_graph: Optional[str] = None, 262s ) -> Result: 262s if not self.query_endpoint: 262s raise SPARQLConnectorException("Query endpoint not set!") 262s 262s params = {} 262s # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add 262s if default_graph is not None and type(default_graph) is not BNode: 262s params["default-graph-uri"] = default_graph 262s 262s headers = {"Accept": _response_mime_types[self.returnFormat]} 262s 262s args = copy.deepcopy(self.kwargs) 262s 262s # merge params/headers dicts 262s args.setdefault("params", {}) 262s 262s args.setdefault("headers", {}) 262s args["headers"].update(headers) 262s 262s if self.method == "GET": 262s params["query"] = query 262s args["params"].update(params) 262s qsa = "?" + urlencode(args["params"]) 262s try: 262s res = urlopen( 262s Request(self.query_endpoint + qsa, headers=args["headers"]) 262s ) 262s except Exception as e: # noqa: F841 262s > raise ValueError( 262s "You did something wrong formulating either the URI or your SPARQL query" 262s E ValueError: You did something wrong formulating either the URI or your SPARQL query 262s 262s rdflib/plugins/stores/sparqlconnector.py:117: ValueError 262s ____________________ test_query_url_construct_format[None] _____________________ 262s 262s function_httpmock = 262s graph_identifier = None 262s 262s @pytest.mark.parametrize( 262s ["graph_identifier"], 262s [ 262s (None,), 262s ("http://example.com",), 262s ], 262s ) 262s def test_query_url_construct_format( 262s function_httpmock: ServedBaseHTTPServerMock, graph_identifier: Optional[str] 262s ) -> None: 262s """ 262s This tests that query string params (foo & bar) are appended to the endpoint 262s """ 262s endpoint = f"{function_httpmock.url}/query" 262s 262s store: SPARQLStore = SPARQLStore( 262s sparql11=True, 262s returnFormat="json", 262s method="POST", 262s params={"foo": "1", "bar": "2"}, 262s ) 262s graph: Graph = Graph(store=store, identifier=graph_identifier) 262s graph.open(endpoint, create=True) 262s 262s query = """ 262s SELECT { 262s ?s ?p ?o 262s } 262s WHERE { 262s ?s ?p ?o 262s } 262s """ 262s 262s function_httpmock.responses[MethodName.POST].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s json.dumps({"head": {"vars": []}, "results": {"bindings": []}}).encode( 262s encoding="utf-8" 262s ), 262s {"Content-Type": ["application/sparql-results+json"]}, 262s ) 262s ) 262s 262s result = graph.query(query) 262s 262s > request = function_httpmock.requests[MethodName.POST].pop() 262s E IndexError: pop from empty list 262s 262s test/test_store/test_store_sparqlstore_sparqlconnector.py:61: IndexError 262s _____________ test_query_url_construct_format[http://example.com] ______________ 262s 262s function_httpmock = 262s graph_identifier = 'http://example.com' 262s 262s @pytest.mark.parametrize( 262s ["graph_identifier"], 262s [ 262s (None,), 262s ("http://example.com",), 262s ], 262s ) 262s def test_query_url_construct_format( 262s function_httpmock: ServedBaseHTTPServerMock, graph_identifier: Optional[str] 262s ) -> None: 262s """ 262s This tests that query string params (foo & bar) are appended to the endpoint 262s """ 262s endpoint = f"{function_httpmock.url}/query" 262s 262s store: SPARQLStore = SPARQLStore( 262s sparql11=True, 262s returnFormat="json", 262s method="POST", 262s params={"foo": "1", "bar": "2"}, 262s ) 262s graph: Graph = Graph(store=store, identifier=graph_identifier) 262s graph.open(endpoint, create=True) 262s 262s query = """ 262s SELECT { 262s ?s ?p ?o 262s } 262s WHERE { 262s ?s ?p ?o 262s } 262s """ 262s 262s function_httpmock.responses[MethodName.POST].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s json.dumps({"head": {"vars": []}, "results": {"bindings": []}}).encode( 262s encoding="utf-8" 262s ), 262s {"Content-Type": ["application/sparql-results+json"]}, 262s ) 262s ) 262s 262s result = graph.query(query) 262s 262s > request = function_httpmock.requests[MethodName.POST].pop() 262s E IndexError: pop from empty list 262s 262s test/test_store/test_store_sparqlstore_sparqlconnector.py:61: IndexError 262s ____________________ TestSPARQLConnector.test_graph_update _____________________ 262s 262s self = 262s 262s def test_graph_update(self): 262s graph = ConjunctiveGraph("SPARQLUpdateStore") 262s graph.open((self.query_endpoint, self.update_endpoint)) 262s update_statement = ( 262s f"INSERT DATA {{ {EGDO['subj']} {EGDO['pred']} {EGDO['obj']}. }}" 262s ) 262s 262s self.httpmock.responses[MethodName.POST].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s b"Update succeeded", 262s {"Content-Type": ["text/plain; charset=UTF-8"]}, 262s ) 262s ) 262s 262s # This test assumes that updates are performed using POST 262s # at the moment this is the only supported way for SPARQLUpdateStore 262s # to do updates. 262s > graph.update(update_statement) 262s 262s test/test_store/test_store_sparqlupdatestore_mock.py:54: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1628: in update 262s return self.store.update( 262s rdflib/plugins/stores/sparqlstore.py:877: in update 262s self.commit() 262s rdflib/plugins/stores/sparqlstore.py:709: in commit 262s self._update("\n;\n".join(self._edits)) 262s rdflib/plugins/stores/sparqlstore.py:804: in _update 262s SPARQLConnector.update(self, update) 262s rdflib/plugins/stores/sparqlconnector.py:185: in update 262s res = urlopen( # noqa: F841 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ___________________ TestSPARQLConnector.test_update_encoding ___________________ 262s 262s self = 262s 262s def test_update_encoding(self): 262s graph = ConjunctiveGraph("SPARQLUpdateStore") 262s graph.open((self.query_endpoint, self.update_endpoint)) 262s update_statement = ( 262s f"INSERT DATA {{ {EGDO['subj']} {EGDO['pred']} {EGDO['obj']}. }}" 262s ) 262s 262s self.httpmock.responses[MethodName.POST].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s b"Update succeeded", 262s {"Content-Type": ["text/plain; charset=UTF-8"]}, 262s ) 262s ) 262s 262s # This test assumes that updates are performed using POST 262s # at the moment this is the only supported way for SPARQLUpdateStore 262s # to do updates. 262s > graph.update(update_statement) 262s 262s test/test_store/test_store_sparqlupdatestore_mock.py:79: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/graph.py:1628: in update 262s return self.store.update( 262s rdflib/plugins/stores/sparqlstore.py:877: in update 262s self.commit() 262s rdflib/plugins/stores/sparqlstore.py:709: in commit 262s self._update("\n;\n".join(self._edits)) 262s rdflib/plugins/stores/sparqlstore.py:804: in _update 262s SPARQLConnector.update(self, update) 262s rdflib/plugins/stores/sparqlconnector.py:185: in update 262s res = urlopen( # noqa: F841 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s ____________________ TestSPARQLConnector.test_content_type _____________________ 262s 262s self = 262s 262s def test_content_type(self): 262s store = SPARQLUpdateStore( 262s self.query_endpoint, self.update_endpoint, auth=("admin", "admin") 262s ) 262s update_statement = ( 262s f"INSERT DATA {{ {EGDO['subj']} {EGDO['pred']} {EGDO['obj']}. }}" 262s ) 262s 262s for _ in range(2): 262s # run it twice so we can pick up issues with order both ways. 262s self.httpmock.responses[MethodName.POST].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s b"Update succeeded", 262s {"Content-Type": ["text/plain; charset=UTF-8"]}, 262s ) 262s ) 262s 262s self.httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse( 262s 200, 262s "OK", 262s b""" 262s 262s true 262s 262s """, 262s {"Content-Type": ["application/sparql-results+xml"]}, 262s ) 262s ) 262s 262s # First make update request and check if Content-Type header is set 262s > store.update(update_statement) 262s 262s test/test_store/test_store_sparqlupdatestore_mock.py:120: 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s rdflib/plugins/stores/sparqlstore.py:877: in update 262s self.commit() 262s rdflib/plugins/stores/sparqlstore.py:709: in commit 262s self._update("\n;\n".join(self._edits)) 262s rdflib/plugins/stores/sparqlstore.py:804: in _update 262s SPARQLConnector.update(self, update) 262s rdflib/plugins/stores/sparqlconnector.py:185: in update 262s res = urlopen( # noqa: F841 262s /usr/lib/python3.13/urllib/request.py:189: in urlopen 262s return opener.open(url, data, timeout) 262s /usr/lib/python3.13/urllib/request.py:495: in open 262s response = meth(req, response) 262s /usr/lib/python3.13/urllib/request.py:604: in http_response 262s response = self.parent.error( 262s /usr/lib/python3.13/urllib/request.py:533: in error 262s return self._call_chain(*args) 262s /usr/lib/python3.13/urllib/request.py:466: in _call_chain 262s result = func(*args) 262s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 262s 262s self = 262s req = 262s fp = , code = 503 262s msg = 'Service Unavailable' 262s hdrs = 262s 262s def http_error_default(self, req, fp, code, msg, hdrs): 262s > raise HTTPError(req.full_url, code, msg, hdrs, fp) 262s E urllib.error.HTTPError: HTTP Error 503: Service Unavailable 262s 262s /usr/lib/python3.13/urllib/request.py:613: HTTPError 262s __________________________________ test_base ___________________________________ 262s 262s def test_base() -> None: 262s httpmock = BaseHTTPServerMock() 262s with ctx_http_handler(httpmock.Handler) as server: 262s url = "http://{}:{}".format(*server.server_address) 262s # add two responses the server should give: 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse(404, "Not Found", b"gone away", {}) 262s ) 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse(200, "OK", b"here it is", {}) 262s ) 262s 262s # send a request to get the first response 262s with pytest.raises(HTTPError) as raised: 262s urlopen(f"{url}/bad/path") 262s > assert raised.value.code == 404 262s E AssertionError: assert 503 == 404 262s E + where 503 = .code 262s E + where = tblen=7>.value 262s 262s test/utils/test/test_httpservermock.py:25: AssertionError 262s _________________________________ test_served __________________________________ 262s 262s def test_served() -> None: 262s with ServedBaseHTTPServerMock() as httpmock: 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse(404, "Not Found", b"gone away", {}) 262s ) 262s httpmock.responses[MethodName.GET].append( 262s MockHTTPResponse(200, "OK", b"here it is", {}) 262s ) 262s 262s # send a request to get the first response 262s with pytest.raises(HTTPError) as raised: 262s urlopen(f"{httpmock.url}/bad/path") 262s > assert raised.value.code == 404 262s E AssertionError: assert 503 == 404 262s E + where 503 = .code 262s E + where = tblen=7>.value 262s 262s test/utils/test/test_httpservermock.py:74: AssertionError 262s =============================== warnings summary =============================== 262s rdflib/plugins/parsers/notation3.py:2050: 3 warnings 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py: 2 warnings 262s test/test_dataset/test_dataset_default_graph.py: 2 warnings 262s test/test_dataset/test_dataset_generators.py: 2 warnings 262s test/test_graph/test_aggregate_graphs.py: 7 warnings 262s test/test_graph/test_graph_formula.py: 2 warnings 262s test/test_graph/test_graph_generators.py: 1 warning 262s test/test_graph/test_namespace_rebinding.py: 6 warnings 262s test/test_graph/test_variants.py: 2 warnings 262s test/test_issues/test_issue084.py: 5 warnings 262s test/test_issues/test_issue1160.py: 1 warning 262s test/test_issues/test_issue161.py: 1 warning 262s test/test_issues/test_issue184.py: 1 warning 262s test/test_issues/test_issue379.py: 2 warnings 262s test/test_issues/test_issue532.py: 1 warning 262s test/test_issues/test_issue920.py: 3 warnings 262s test/test_literal/test_xmlliterals.py: 1 warning 262s test/test_misc/test_parse_file_guess_format.py: 1 warning 262s test/test_n3.py: 17 warnings 262s test/test_parsers/test_broken_parse_data_from_jena.py: 8 warnings 262s test/test_parsers/test_parser_turtlelike.py: 33 warnings 262s test/test_parsers/test_swap_n3.py: 16 warnings 262s test/test_roundtrip.py: 1085 warnings 262s test/test_serializers/test_prettyxml.py: 7 warnings 262s test/test_serializers/test_serializer.py: 15 warnings 262s test/test_serializers/test_serializer_n3.py: 8 warnings 262s test/test_serializers/test_serializer_xml.py: 5 warnings 262s test/test_sparql/test_datetime_processing.py: 4 warnings 262s test/test_sparql/test_prepare.py: 1 warning 262s test/test_sparql/test_sparql.py: 2 warnings 262s test/test_util.py: 11 warnings 262s test/test_w3c_spec/test_n3_w3c.py: 252 warnings 262s test/utils/test/test_testutils.py: 12 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/plugins/parsers/notation3.py:2050: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s conj_graph = ConjunctiveGraph(store=graph.store) 262s 262s test/test_sparql/test_initbindings.py:5 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_initbindings.py:5: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_sparql/test_initbindings.py:300 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_initbindings.py:300: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g2 = ConjunctiveGraph() 262s 262s test/data/suites/trix/test_trix.py: 55 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/data/suites/trix/test_trix.py:22: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/data/suites/trix/test_trix.py: 32 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/data/suites/trix/test_trix.py:34: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s res = ConjunctiveGraph() 262s 262s test/jsonld/test_api.py: 1 warning 262s test/jsonld/test_named_graphs.py: 3 warnings 262s test/jsonld/test_nested_arrays.py: 2 warnings 262s test/jsonld/test_onedotone.py: 20 warnings 262s test/jsonld/test_pythonparse.py: 2 warnings 262s test/jsonld/test_reassign_id.py: 1 warning 262s test/test_dataset/test_dataset_default_graph.py: 4 warnings 262s test/test_graph/test_variants.py: 10 warnings 262s test/test_issues/test_issue1484.py: 2 warnings 262s test/test_misc/test_input_source.py: 12 warnings 262s test/test_misc/test_parse_file_guess_format.py: 4 warnings 262s test/test_misc/test_security.py: 8 warnings 262s test/test_parsers/test_parse_with_skolemize.py: 1 warning 262s test/test_roundtrip.py: 144 warnings 262s test/test_serializers/test_serializer.py: 24 warnings 262s test/test_serializers/test_serializer_longturtle.py: 1 warning 262s test/test_sparql/test_forward_slash_escapes.py: 1 warning 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/plugins/parsers/jsonld.py:167: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s conj_sink = ConjunctiveGraph(store=sink.store, identifier=sink.identifier) 262s 262s test/jsonld/test_localsuite.py: 3 warnings 262s test/jsonld/test_onedotone.py: 275 warnings 262s test/jsonld/test_testsuite.py: 128 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/jsonld/runner.py:227: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/jsonld/test_localsuite.py: 3 warnings 262s test/jsonld/test_onedotone.py: 262 warnings 262s test/jsonld/test_testsuite.py: 110 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/jsonld/runner.py:125: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s result_graph = ConjunctiveGraph() 262s 262s test/jsonld/test_named_graphs.py::test_conjunctive_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/jsonld/test_named_graphs.py:34: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = ConjunctiveGraph() 262s 262s test/jsonld/test_onedotone.py: 33 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/jsonld/runner.py:182: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s input_graph = ConjunctiveGraph() 262s 262s test/jsonld/test_onedotone.py: 20 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/jsonld/runner.py:208: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s expected_graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctive_graph.py::test_bnode_publicid 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctive_graph.py:20: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctive_graph.py::test_quad_contexts 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctive_graph.py:38: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctive_graph.py::test_context_namespaces 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctive_graph.py:50: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctive_graph.py::test_graph_ids[check-kws0] 262s test/test_conjunctivegraph/test_conjunctive_graph.py::test_graph_ids[check-kws1] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctive_graph.py:69: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_unique_subjects 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:33: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_unique_predicates 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:40: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_unique_objects 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:47: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_unique_subject_predicates 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:54: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_unique_predicate_objects 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:61: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_unique_subject_objects 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:68: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_parse_berners_lee_card_into_conjunctivegraph_default 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:81: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_generators.py::test_parse_berners_lee_card_into_named_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_generators.py:90: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph(identifier=URIRef("context-1")) 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_conjunctivegraph_and_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:10: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_conjunctivegraph_and_graph 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_conjunctivegraph_and_graph 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs_one_with_contexts 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs_one_with_contexts 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_returning_correct_type 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_returning_correct_type 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/graph.py:751: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s retval = type(self)() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py: 13 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/graph.py:778: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s retval = type(self)() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_conjunctivegraph_and_graph 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs_one_with_contexts 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_returning_correct_type 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/graph.py:766: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s retval = type(self)() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_reversed_operators_with_conjunctivegraph_and_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:28: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_reversed_operators_with_conjunctivegraph_with_contexts_and_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:46: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py: 2 warnings 262s test/test_dataset/test_dataset_default_graph.py: 4 warnings 262s test/test_graph/test_diff.py: 2 warnings 262s test/test_graph/test_variants.py: 5 warnings 262s test/test_issues/test_issue1141.py: 2 warnings 262s test/test_issues/test_issue432.py: 1 warning 262s test/test_parsers/test_parser_turtlelike.py: 60 warnings 262s test/test_roundtrip.py: 183 warnings 262s test/test_serializers/test_serializer.py: 28 warnings 262s test/test_serializers/test_serializer_hext.py: 3 warnings 262s test/test_trig.py: 10 warnings 262s test/test_w3c_spec/test_trig_w3c.py: 335 warnings 262s test/utils/test/test_testutils.py: 10 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/plugins/parsers/trig.py:155: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s conj_graph = ConjunctiveGraph(store=graph.store, identifier=graph.identifier) 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:67: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg1 = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:71: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg2 = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs_one_with_contexts 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:87: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg1 = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_with_two_conjunctivegraphs_one_with_contexts 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:91: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg2 = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_returning_correct_type 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:106: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g1 = ConjunctiveGraph() 262s 262s test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py::test_operators_returning_correct_type 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py:107: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g2 = ConjunctiveGraph() 262s 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_and_named[ConjunctiveGraph-trig] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_and_named[ConjunctiveGraph-nq] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_and_named[ConjunctiveGraph-jsonld] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_dataset/test_dataset_default_graph.py:44: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s container = container_type() 262s 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_only[ConjunctiveGraph-trig] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_only[ConjunctiveGraph-ttl] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_only[ConjunctiveGraph-nq] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_only[ConjunctiveGraph-nt] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_only[ConjunctiveGraph-jsonld] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_only[ConjunctiveGraph-hext] 262s test/test_dataset/test_dataset_default_graph.py::test_load_default_only[ConjunctiveGraph-n3] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_dataset/test_dataset_default_graph.py:111: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s container = container_type() 262s 262s test/test_extras/test_infixowl/test_rubric.py::test_generateqname_using_conjunctivegraph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_extras/test_infixowl/test_rubric.py:117: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_graph/test_aggregate_graphs.py::test_aggregate2 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_aggregate_graphs.py:111: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph(mem_store) 262s 262s test/test_graph/test_canonicalization.py::test_issue682_signing_named_graphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_canonicalization.py:276: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph(store=store) 262s 262s test/test_graph/test_graph_context.py: 10 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_graph_context.py:23: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s self.graph = ConjunctiveGraph(store=self.store) 262s 262s test/test_graph/test_graph_formula.py::test_formula_stores[checkFormulaStore-default] 262s test/test_graph/test_graph_formula.py::test_formula_stores[checkFormulaStore-Memory] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_graph_formula.py:24: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph(store=store) 262s 262s test/test_graph/test_graph_formula.py::test_formula_stores[checkFormulaStore-default] 262s test/test_graph/test_graph_formula.py::test_formula_stores[checkFormulaStore-Memory] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_graph_formula.py:51: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s universe = ConjunctiveGraph(g.store) 262s 262s test/test_graph/test_graph_store.py::test_query_query_graph[ConjunctiveGraph-__UNION__] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_graph_store.py:254: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = graph_factory(store) 262s 262s test/test_graph/test_graph_store.py::test_update_query_graph[ConjunctiveGraph-__UNION__] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_graph_store.py:302: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = graph_factory(store) 262s 262s test/test_graph/test_namespace_rebinding.py::test_multigraph_bindings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_graph/test_namespace_rebinding.py:295: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = ConjunctiveGraph(store=store) 262s 262s test/test_issues/test_issue1160.py::test_named_graph_with_fragment 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue1160.py:21: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_issues/test_issue160.py::test_collection_render 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue160.py:51: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s target1 = ConjunctiveGraph() 262s 262s test/test_issues/test_issue160.py::test_collection_render 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue160.py:53: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s target2 = ConjunctiveGraph() 262s 262s test/test_issues/test_issue160.py::test_collection_render 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue160.py:56: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_issues/test_issue161.py::test_turtle_namespace_prefixes 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue161.py:5: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_issues/test_issue161.py::test_turtle_namespace_prefixes 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue161.py:22: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_issues/test_issue184.py::test_escaping_of_triple_doublequotes 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue184.py:13: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_issues/test_issue184.py::test_escaping_of_triple_doublequotes 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue184.py:16: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g2 = ConjunctiveGraph() 262s 262s test/test_issues/test_issue190.py::test1 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue190.py:47: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_issues/test_issue190.py::test2 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue190.py:64: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_issues/test_issue200.py::test_bnode_id_differs_in_fork 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue200.py:17: DeprecationWarning: This process (pid=2216) is multi-threaded, use of fork() may lead to deadlocks in the child. 262s pid = os.fork() 262s 262s test/test_issues/test_issue432.py::test_trig_default_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue432.py:5: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s ds = rdflib.ConjunctiveGraph() 262s 262s test/test_issues/test_issue535.py::test_nquads_default_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_issues/test_issue535.py:5: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s ds = ConjunctiveGraph() 262s 262s test/test_literal/test_literal.py::test_ill_typed_literals[yes-http://www.w3.org/2001/XMLSchema#boolean-True] 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/term.py:1760: UserWarning: Parsing weird boolean, 'yes' does not map to True or False 262s warnings.warn( 262s 262s test/test_n3.py::TestN3Case::test_base_serialize 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_n3.py:128: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g2 = ConjunctiveGraph() 262s 262s test/test_n3.py::TestN3Case::test_model 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_n3.py:198: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_n3.py::TestN3Case::test_quoted_serialization 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_n3.py:210: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_n3.py::TestN3Case::test_parse 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_n3.py:215: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_n3.py::TestN3Case::test_single_quoted_literals 262s test/test_n3.py::TestN3Case::test_single_quoted_literals 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_n3.py:232: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_n3.py::TestN3Case::test_single_quoted_literals 262s test/test_n3.py::TestN3Case::test_single_quoted_literals 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_n3.py:236: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DFNSNoNS-defined-True] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: defined is not defined in namespace DFNSNoNS 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DFNSNoNS-_defined-True] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: _defined is not defined in namespace DFNSNoNS 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DFNSNoNS-notdefined-False] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: notdefined is not defined in namespace DFNSNoNS 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DFNSNoNS-_notdefined-False] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: _notdefined is not defined in namespace DFNSNoNS 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_definednamespace.py::test_dir[DFNSNoNS] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:410: UserWarning: Code: defined is not defined in namespace DFNSNoNS 262s attrs = list(dir(dfns)) 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DefinedNamespace-defined-True] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: defined is not defined in namespace DefinedNamespace 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DefinedNamespace-_defined-True] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: _defined is not defined in namespace DefinedNamespace 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DefinedNamespace-notdefined-False] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: notdefined is not defined in namespace DefinedNamespace 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_definednamespace.py::test_hasattr[DefinedNamespace-_notdefined-False] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_definednamespace.py:395: UserWarning: Code: _notdefined is not defined in namespace DefinedNamespace 262s has_attr = hasattr(dfns, attr_name) 262s 262s test/test_namespace/test_namespace.py::TestNamespacePrefix::test_closed_namespace 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_namespace/test_namespace.py:230: UserWarning: DefinedNamespace does not address deprecated properties 262s warn("DefinedNamespace does not address deprecated properties") 262s 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[rdf-test-10.n3] 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[n3-writer-test-25.n3] 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[n3-writer-test-27.n3] 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[n3-writer-test-02.n3] 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[rdf-test-24.n3] 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[rdf-test-01.n3] 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[rdf-test-25.n3] 262s test/test_parsers/test_broken_parse_data_from_jena.py::test_n3_serializer_roundtrip[rdf-test-08.n3] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_broken_parse_data_from_jena.py:36: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g1 = rdflib.ConjunctiveGraph() 262s 262s test/test_parsers/test_empty_xml_base.py::TestEmptyBase::test_empty_base_ref 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_empty_xml_base.py:39: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s self.graph = ConjunctiveGraph() 262s 262s test/test_parsers/test_empty_xml_base.py::TestRelativeBase::test_relative_base_ref 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_empty_xml_base.py:53: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s self.graph = ConjunctiveGraph() 262s 262s test/test_parsers/test_n3parse_of_rdf_lists.py::TestOWLCollectionTest::test_collection_rdfxml 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/plugins/serializers/rdfxml.py:291: UserWarning: Assertions on rdflib.term.BNode('N489ac79783aa4fe79ff239aab10e41a6') other than RDF.first and RDF.rest are ignored ... including RDF.List 262s self.predicate(predicate, object, depth + 1) # type: ignore[arg-type] 262s 262s test/test_parsers/test_nquads.py::TestNQuadsParser::test_01_simple_open 262s test/test_parsers/test_nquads.py::TestNQuadsParser::test_02_contexts 262s test/test_parsers/test_nquads.py::TestNQuadsParser::test_03_get_value 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:11: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestNQuadsParser::test_context_is_optional 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:43: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestNQuadsParser::test_serialize 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:52: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestNQuadsParser::test_serialize 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:66: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g2 = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_shared_bnode_context 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:92: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_shared_bnode_context 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:93: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s h = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_shared_bnode_context_same_graph 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:101: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_distinct_bnode_context 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:110: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_distinct_bnode_contexts_between_graphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:119: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_distinct_bnode_contexts_between_graphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:120: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s h = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_distinct_bnode_contexts_named_graphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:129: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_distinct_bnode_contexts_named_graphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:130: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s h = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_shared_bnode_contexts_named_graphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:138: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_nquads.py::TestBnodeContext::test_parse_shared_bnode_contexts_named_graphs 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_nquads.py:139: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s h = ConjunctiveGraph() 262s 262s test/test_parsers/test_parser_hext.py::test_small_string_cg 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_parser_hext.py:100: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s d = ConjunctiveGraph(identifier=DATASET_DEFAULT_GRAPH_ID) 262s 262s test/test_parsers/test_parser_hext.py::test_small_file_multigraph_cg 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_parser_hext.py:143: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s d = ConjunctiveGraph() 262s 262s test/test_parsers/test_trix_parse.py::TestTrixParse::testAperture 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_trix_parse.py:15: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_trix_parse.py::TestTrixParse::testSpec 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_trix_parse.py:32: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_parsers/test_trix_parse.py::TestTrixParse::testNG4j 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_parsers/test_trix_parse.py:43: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_roundtrip.py: 1704 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_roundtrip.py:241: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g1 = graph_type() 262s 262s test/test_roundtrip.py: 1701 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_roundtrip.py:260: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g2 = graph_type() 262s 262s test/test_roundtrip.py: 13 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/term.py:1620: UserWarning: Serializing weird numerical rdflib.term.Literal('ab.c', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#double')) 262s warnings.warn(f"Serializing weird numerical {self!r}") 262s 262s test/test_roundtrip.py: 13 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/term.py:1620: UserWarning: Serializing weird numerical rdflib.term.Literal('xy.z', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#double')) 262s warnings.warn(f"Serializing weird numerical {self!r}") 262s 262s test/test_roundtrip.py: 13 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/term.py:1620: UserWarning: Serializing weird numerical rdflib.term.Literal('+1.0z', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#double')) 262s warnings.warn(f"Serializing weird numerical {self!r}") 262s 262s test/test_serializers/test_finalnewline.py::test_finalnewline 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_finalnewline.py:10: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_serialize_and_reparse 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_multiple 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_result_fragments 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_result_fragments_with_base 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_subclass_of_objects 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_pretty_xmlliteral 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_pretty_broken_xmlliteral 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_prettyxml.py:13: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_prettyxml.py: 10 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_prettyxml.py:70: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s reparsed_graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_prettyxml.py: 36 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_prettyxml.py:44: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s gcopy = ConjunctiveGraph() 262s 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_pretty_xmlliteral 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_prettyxml.py:173: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_serializers/test_prettyxml.py::TestPrettyXmlSerializer::test_pretty_broken_xmlliteral 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_prettyxml.py:194: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer.py: 10 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer.py:57: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer.py: 10 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer.py:71: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s parsed_graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer.py: 10 warnings 262s test/test_tools/test_chunk_serializer.py: 4 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/plugins/serializers/nt.py:41: UserWarning: NTSerializer always uses UTF-8 encoding. Given encoding was: None 262s warnings.warn( 262s 262s test/test_serializers/test_serializer_hext.py::test_hext_cg 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer_hext.py:93: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s d = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer_trix.py::test_serialize 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer_trix.py:22: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer_trix.py::test_serialize 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer_trix.py:31: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g3 = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer_trix.py::test_issue_250 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer_trix.py:77: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer_xml.py::TestXMLSerializer::test_serialize_and_reparse 262s test/test_serializers/test_serializer_xml.py::TestXMLSerializer::test_multiple 262s test/test_serializers/test_serializer_xml.py::TestXMLSerializer::test_result_fragments 262s test/test_serializers/test_serializer_xml.py::TestXMLSerializer::test_result_fragments_with_base 262s test/test_serializers/test_serializer_xml.py::TestXMLSerializer::test_subslass_of_objects 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer_xml.py:13: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer_xml.py: 10 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer_xml.py:70: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s reparsed_graph = ConjunctiveGraph() 262s 262s test/test_serializers/test_serializer_xml.py: 36 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_serializers/test_serializer_xml.py:44: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s gcopy = ConjunctiveGraph() 262s 262s test/test_sparql/test_functions.py: 1 warning 262s test/test_w3c_spec/test_sparql11_w3c.py: 10 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/plugins/sparql/operators.py:258: DeprecationWarning: 'count' is passed as positional argument 262s re.sub(str(pattern), replacement, text, cFlag), 262s 262s test/test_sparql/test_initbindings.py::test_data 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_initbindings.py:275: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s data = ConjunctiveGraph() 262s 262s test/test_sparql/test_sparql.py::test_named_filter_graph_query 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_sparql.py:185: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_sparql/test_update.py::test_load_into_default[ConjunctiveGraph-GS(variants/simple_triple.ttl, turtle, None)] 262s test/test_sparql/test_update.py::test_load_into_default[ConjunctiveGraph-GS(variants/relative_triple.ttl, turtle, None)] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_update.py:32: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s expected_graph = graph_factory() 262s 262s test/test_sparql/test_update.py::test_load_into_default[ConjunctiveGraph-GS(variants/simple_triple.ttl, turtle, None)] 262s test/test_sparql/test_update.py::test_load_into_default[ConjunctiveGraph-GS(variants/relative_triple.ttl, turtle, None)] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_update.py:35: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s actual_graph = graph_factory() 262s 262s test/test_sparql/test_update.py::test_load_into_named[ConjunctiveGraph-GS(variants/simple_triple.ttl, turtle, None)] 262s test/test_sparql/test_update.py::test_load_into_named[ConjunctiveGraph-GS(variants/relative_triple.ttl, turtle, None)] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_update.py:74: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s expected_graph = graph_factory() 262s 262s test/test_sparql/test_update.py::test_load_into_named[ConjunctiveGraph-GS(variants/simple_triple.ttl, turtle, None)] 262s test/test_sparql/test_update.py::test_load_into_named[ConjunctiveGraph-GS(variants/relative_triple.ttl, turtle, None)] 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_sparql/test_update.py:77: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s actual_graph = graph_factory() 262s 262s test/test_store/test_store_sparqlupdatestore_mock.py::TestSPARQLConnector::test_graph_update 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_store/test_store_sparqlupdatestore_mock.py:36: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph("SPARQLUpdateStore") 262s 262s test/test_store/test_store_sparqlupdatestore_mock.py::TestSPARQLConnector::test_update_encoding 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_store/test_store_sparqlupdatestore_mock.py:61: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph("SPARQLUpdateStore") 262s 262s test/test_trig.py::test_repeat_triples 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:19: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_same_subject 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:36: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_remember_namespace 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:57: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_graph_qname_syntax 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:68: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_graph_uri_syntax 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:75: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_blank_graph_identifier 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:84: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_graph_parsing 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:97: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_graph_parsing 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:107: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_graph_parsing 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:121: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_round_trips 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:136: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_default_graph_serializes_without_name 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:157: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = rdflib.ConjunctiveGraph() 262s 262s test/test_trig.py::test_prefixes 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_trig.py:177: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s cg = rdflib.ConjunctiveGraph() 262s 262s test/test_turtle_quoting.py: 354 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_turtle_quoting.py:150: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s graph = ConjunctiveGraph() 262s 262s test/test_util.py::TestUtilTermConvert::test_util_from_n3_expectliteralandlangdtype 262s /usr/lib/python3/dist-packages/_pytest/python.py:159: UserWarning: Code: fr is not defined in namespace XSD 262s result = testfunction(**testargs) 262s 262s test/test_util.py: 11 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/test/test_util.py:265: DeprecationWarning: ConjunctiveGraph is deprecated, use Dataset instead. 262s g = ConjunctiveGraph() 262s 262s test/test_util.py::TestUtilTermConvert::test_util_from_n3_not_escapes[\\I] 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/util.py:214: DeprecationWarning: invalid escape sequence '\I' 262s value = value.encode("raw-unicode-escape").decode("unicode-escape") 262s 262s test/test_w3c_spec/test_sparql10_w3c.py: 18 warnings 262s test/test_w3c_spec/test_sparql11_w3c.py: 44 warnings 262s /tmp/autopkgtest.MLbFml/build.tad/src/rdflib/term.py:1182: DeprecationWarning: NotImplemented should not be used in a boolean context 262s return not self.__gt__(other) and not self.eq(other) 262s 262s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 262s =========================== short test summary info ============================ 262s FAILED test/test_graph/test_graph.py::test_guess_format_for_parse[None] - url... 262s FAILED test/test_graph/test_graph.py::test_guess_format_for_parse_http[None-file0-application/rdf+xml-132] 262s FAILED test/test_graph/test_graph.py::test_guess_format_for_parse_http[None-file1-text/turtle-132] 262s FAILED test/test_graph/test_graph.py::test_guess_format_for_parse_http[None-file2-None-132] 262s FAILED test/test_graph/test_graph.py::test_guess_format_for_parse_http[None-file3-None-expected_result3] 262s FAILED test/test_graph/test_graph.py::test_guess_format_for_parse_http_text_plain 262s FAILED test/test_graph/test_graph_http.py::TestGraphHTTP::test_content_negotiation 262s FAILED test/test_graph/test_graph_http.py::TestGraphHTTP::test_content_negotiation_no_format 262s FAILED test/test_graph/test_graph_http.py::TestGraphHTTP::test_source - urlli... 262s FAILED test/test_graph/test_graph_http.py::TestGraphHTTP::test_3xx - urllib.e... 262s FAILED test/test_graph/test_graph_http.py::TestGraphHTTP::test_5xx - Assertio... 262s FAILED test/test_graph/test_graph_http.py::test_iri_source[/resource/Almer\xeda-expected_request0] 262s FAILED test/test_graph/test_graph_http.py::test_iri_source[/resource/Almer\xeda?foo=bar-expected_request1] 262s FAILED test/test_graph/test_graph_redirect.py::test_graph_redirect_new_host 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=turtle:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.hext:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=hext:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=None:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.xml:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=xml:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.nt:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=nt:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.jsonld:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=json-ld:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=turtle:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.hext:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=hext:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=None:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.xml:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=xml:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.nt:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=nt:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.jsonld:source_param=None:public_id=None:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=json-ld:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id=None, system_id=None)] 262s FAILED test/test_misc/test_input_source.py::test_create_input_source[test/data/variants/simple_triple.ttl:source_param=None:public_id=https://example.com/explicit_public_id:location_param=LocationParam.HTTP_URI:file_param=None:data_param=None:format=turtle:InputSourceChecker(type=, stream_check=, encoding=Holder(value=None), public_id='https://example.com/explicit_public_id', system_id=None)] 262s FAILED test/test_misc/test_security.py::test_block_file[Defence.NONE-URIKind.HTTP] 262s FAILED test/test_sparql/test_service.py::test_with_mock[response_bindings0-expected_result0] 262s FAILED test/test_sparql/test_service.py::test_with_mock[response_bindings1-ValueError] 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLStoreFakeDBPedia::test_query 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLStoreFakeDBPedia::test_init_ns 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLStoreFakeDBPedia::test_noinit_ns 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLStoreFakeDBPedia::test_query_with_added_prolog 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLStoreFakeDBPedia::test_query_with_added_rdf_prolog 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLStoreFakeDBPedia::test_counting_graph_and_store_queries 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLStoreUpdate::test_query 262s FAILED test/test_store/test_store_sparqlstore.py::TestSPARQLMock::test_query 262s FAILED test/test_store/test_store_sparqlstore_query.py::test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml; charset=utf-8] 262s FAILED test/test_store/test_store_sparqlstore_query.py::test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml; charset=UTF-8] 262s FAILED test/test_store/test_store_sparqlstore_query.py::test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml] 262s FAILED test/test_store/test_store_sparqlstore_query.py::test_query_construct_format[application/rdf+xml-utf-8-basic-ContentType_application/rdf+xml;charset=utf-8] 262s FAILED test/test_store/test_store_sparqlstore_sparqlconnector.py::test_query_url_construct_format[None] 262s FAILED test/test_store/test_store_sparqlstore_sparqlconnector.py::test_query_url_construct_format[http://example.com] 262s FAILED test/test_store/test_store_sparqlupdatestore_mock.py::TestSPARQLConnector::test_graph_update 262s FAILED test/test_store/test_store_sparqlupdatestore_mock.py::TestSPARQLConnector::test_update_encoding 262s FAILED test/test_store/test_store_sparqlupdatestore_mock.py::TestSPARQLConnector::test_content_type 262s FAILED test/utils/test/test_httpservermock.py::test_base - AssertionError: as... 262s FAILED test/utils/test/test_httpservermock.py::test_served - AssertionError: ... 262s = 49 failed, 7456 passed, 57 skipped, 1 deselected, 329 xfailed, 36 xpassed, 7523 warnings in 89.37s (0:01:29) = 264s autopkgtest [14:24:47]: test python3: -----------------------] 264s autopkgtest [14:24:47]: test python3: - - - - - - - - - - results - - - - - - - - - - 264s python3 FAIL non-zero exit status 1 264s autopkgtest [14:24:47]: @@@@@@@@@@@@@@@@@@@@ summary 264s python3 FAIL non-zero exit status 1 271s nova [W] Using flock in prodstack7-arm64 271s Creating nova instance adt-questing-arm64-rdflib-20250619-142022-juju-7f2275-prod-proposed-migration-environment-21-c4e6d927-8264-46e3-a151-5df4e63f8b91 from image adt/ubuntu-questing-arm64-server-20250619.img (UUID 7b84bb89-224c-4e23-be96-b5e4f0293f0f)... 271s nova [W] Timed out waiting for 36e7f65f-5bec-48c9-9480-f1e6c894647f to get deleted.