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