0s autopkgtest [11:45:18]: starting date and time: 2025-05-06 11:45:18+0000 0s autopkgtest [11:45:18]: git checkout: 9986aa8c Merge branch 'skia/fix_network_interface' into 'ubuntu/production' 0s autopkgtest [11:45:18]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.9ppweaoa/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:tqdm,src:fsspec --apt-upgrade fsspec --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=tqdm/4.67.1-5 fsspec/2025.3.2-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-s390x-9.secgroup --name adt-questing-s390x-fsspec-20250506-114518-juju-7f2275-prod-proposed-migration-environment-2-7aa5ceb2-9cc6-4d4b-bcbc-87e4a81846a4 --image adt/ubuntu-questing-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-s390x -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 126s autopkgtest [11:47:24]: testbed dpkg architecture: s390x 126s autopkgtest [11:47:24]: testbed apt version: 3.0.0 127s autopkgtest [11:47:25]: @@@@@@@@@@@@@@@@@@@@ test bed setup 128s autopkgtest [11:47:26]: testbed release detected to be: None 130s autopkgtest [11:47:28]: updating testbed package index (apt update) 130s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [110 kB] 131s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 131s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 131s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 131s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [72.4 kB] 131s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [27.3 kB] 131s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [595 kB] 132s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main s390x Packages [136 kB] 132s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/universe s390x Packages [612 kB] 132s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/multiverse s390x Packages [15.0 kB] 133s Fetched 1567 kB in 3s (532 kB/s) 139s Reading package lists... 141s autopkgtest [11:47:39]: upgrading testbed (apt dist-upgrade and autopurge) 142s Reading package lists... 143s Building dependency tree... 143s Reading state information... 144s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 145s Starting 2 pkgProblemResolver with broken count: 0 145s Done 147s Entering ResolveByKeep 148s 149s Calculating upgrade... 150s The following packages will be upgraded: 150s libperl5.40 perl perl-base perl-modules-5.40 python3-dbus 150s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 150s Need to get 10.5 MB of archives. 150s After this operation, 3072 B of additional disk space will be used. 150s Get:1 http://ftpmaster.internal/ubuntu questing/main s390x libperl5.40 s390x 5.40.1-3 [4972 kB] 151s Get:2 http://ftpmaster.internal/ubuntu questing/main s390x perl s390x 5.40.1-3 [262 kB] 151s Get:3 http://ftpmaster.internal/ubuntu questing/main s390x perl-base s390x 5.40.1-3 [1954 kB] 151s Get:4 http://ftpmaster.internal/ubuntu questing/main s390x perl-modules-5.40 all 5.40.1-3 [3217 kB] 152s Get:5 http://ftpmaster.internal/ubuntu questing/main s390x python3-dbus s390x 1.4.0-1 [102 kB] 157s Fetched 10.5 MB in 2s (5665 kB/s) 165s (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 ... 59837 files and directories currently installed.) 165s Preparing to unpack .../libperl5.40_5.40.1-3_s390x.deb ... 165s Unpacking libperl5.40:s390x (5.40.1-3) over (5.40.1-2ubuntu0.1) ... 173s Preparing to unpack .../perl_5.40.1-3_s390x.deb ... 173s Unpacking perl (5.40.1-3) over (5.40.1-2ubuntu0.1) ... 174s Preparing to unpack .../perl-base_5.40.1-3_s390x.deb ... 174s Unpacking perl-base (5.40.1-3) over (5.40.1-2ubuntu0.1) ... 179s Setting up perl-base (5.40.1-3) ... 179s (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 ... 59837 files and directories currently installed.) 179s Preparing to unpack .../perl-modules-5.40_5.40.1-3_all.deb ... 179s Unpacking perl-modules-5.40 (5.40.1-3) over (5.40.1-2ubuntu0.1) ... 195s Preparing to unpack .../python3-dbus_1.4.0-1_s390x.deb ... 196s Unpacking python3-dbus (1.4.0-1) over (1.3.2-5build5) ... 196s Setting up python3-dbus (1.4.0-1) ... 198s Setting up perl-modules-5.40 (5.40.1-3) ... 198s Setting up libperl5.40:s390x (5.40.1-3) ... 198s Setting up perl (5.40.1-3) ... 198s Processing triggers for man-db (2.13.1-1) ... 210s Processing triggers for libc-bin (2.41-6ubuntu1) ... 213s Reading package lists... 213s Building dependency tree... 213s Reading state information... 215s Starting pkgProblemResolver with broken count: 0 215s Starting 2 pkgProblemResolver with broken count: 0 215s Done 216s Solving dependencies... 218s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 221s autopkgtest [11:48:59]: testbed running kernel: Linux 6.14.0-15-generic #15-Ubuntu SMP Sun Apr 6 13:39:00 UTC 2025 222s autopkgtest [11:49:00]: @@@@@@@@@@@@@@@@@@@@ apt-source fsspec 228s Get:1 http://ftpmaster.internal/ubuntu questing-proposed/universe fsspec 2025.3.2-1 (dsc) [2580 B] 228s Get:2 http://ftpmaster.internal/ubuntu questing-proposed/universe fsspec 2025.3.2-1 (tar) [432 kB] 228s Get:3 http://ftpmaster.internal/ubuntu questing-proposed/universe fsspec 2025.3.2-1 (diff) [7208 B] 232s gpgv: Signature made Fri Apr 4 17:43:51 2025 UTC 232s gpgv: using RSA key 13796755BBC72BB8ABE2AEB5FA9DEC5DE11C63F1 232s gpgv: issuer "eamanu@debian.org" 232s gpgv: Can't check signature: No public key 232s dpkg-source: warning: cannot verify inline signature for ./fsspec_2025.3.2-1.dsc: no acceptable signature found 233s autopkgtest [11:49:11]: testing package fsspec version 2025.3.2-1 234s autopkgtest [11:49:12]: build not needed 236s autopkgtest [11:49:14]: test fsspec-tests: preparing testbed 237s Reading package lists... 238s Building dependency tree... 238s Reading state information... 240s Starting pkgProblemResolver with broken count: 0 240s Starting 2 pkgProblemResolver with broken count: 0 240s Done 242s The following NEW packages will be installed: 242s fonts-font-awesome fonts-lato libblas3 libgfortran5 libjs-jquery 242s libjs-sphinxdoc libjs-underscore liblapack3 python-fsspec-doc 242s python3-aiohappyeyeballs python3-aiohttp python3-aiosignal python3-all 242s python3-async-generator python3-async-timeout python3-frozenlist 242s python3-fsspec python3-iniconfig python3-multidict python3-numpy 242s python3-numpy-dev python3-pluggy python3-pytest python3-pytest-asyncio 242s python3-pytest-mock python3-pytest-vcr python3-tqdm python3-vcr 242s python3-wrapt python3-yarl sphinx-rtd-theme-common 242s 0 upgraded, 31 newly installed, 0 to remove and 0 not upgraded. 242s Need to get 14.7 MB of archives. 242s After this operation, 66.8 MB of additional disk space will be used. 242s Get:1 http://ftpmaster.internal/ubuntu questing/main s390x fonts-lato all 2.015-1 [2781 kB] 243s Get:2 http://ftpmaster.internal/ubuntu questing/main s390x python3-numpy-dev s390x 1:2.2.4+ds-1 [147 kB] 243s Get:3 http://ftpmaster.internal/ubuntu questing/main s390x libblas3 s390x 3.12.1-2 [252 kB] 243s Get:4 http://ftpmaster.internal/ubuntu questing/main s390x libgfortran5 s390x 15-20250404-0ubuntu1 [621 kB] 243s Get:5 http://ftpmaster.internal/ubuntu questing/main s390x liblapack3 s390x 3.12.1-2 [2971 kB] 243s Get:6 http://ftpmaster.internal/ubuntu questing/main s390x python3-numpy s390x 1:2.2.4+ds-1 [4404 kB] 243s Get:7 http://ftpmaster.internal/ubuntu questing/main s390x fonts-font-awesome all 5.0.10+really4.7.0~dfsg-4.1 [516 kB] 243s Get:8 http://ftpmaster.internal/ubuntu questing/main s390x libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 243s Get:9 http://ftpmaster.internal/ubuntu questing/main s390x libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 243s Get:10 http://ftpmaster.internal/ubuntu questing/main s390x libjs-sphinxdoc all 8.1.3-5 [31.0 kB] 243s Get:11 http://ftpmaster.internal/ubuntu questing/main s390x sphinx-rtd-theme-common all 3.0.2+dfsg-2 [1014 kB] 243s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/universe s390x python-fsspec-doc all 2025.3.2-1 [321 kB] 243s Get:13 http://ftpmaster.internal/ubuntu questing/universe s390x python3-aiohappyeyeballs all 2.6.1-1 [11.1 kB] 243s Get:14 http://ftpmaster.internal/ubuntu questing/universe s390x python3-multidict s390x 6.4.3-1 [49.6 kB] 243s Get:15 http://ftpmaster.internal/ubuntu questing/universe s390x python3-yarl s390x 1.13.1-1build2 [96.1 kB] 243s Get:16 http://ftpmaster.internal/ubuntu questing/universe s390x python3-async-timeout all 5.0.1-1 [6830 B] 243s Get:17 http://ftpmaster.internal/ubuntu questing/universe s390x python3-frozenlist s390x 1.5.0-1build2 [50.3 kB] 243s Get:18 http://ftpmaster.internal/ubuntu questing/universe s390x python3-aiosignal all 1.3.2-1 [5182 B] 243s Get:19 http://ftpmaster.internal/ubuntu questing/universe s390x python3-aiohttp s390x 3.10.11-1build1 [313 kB] 243s Get:20 http://ftpmaster.internal/ubuntu questing/main s390x python3-all s390x 3.13.3-1 [882 B] 243s Get:21 http://ftpmaster.internal/ubuntu questing/universe s390x python3-async-generator all 1.10-4 [17.5 kB] 243s Get:22 http://ftpmaster.internal/ubuntu questing-proposed/universe s390x python3-fsspec all 2025.3.2-1 [217 kB] 244s Get:23 http://ftpmaster.internal/ubuntu questing/universe s390x python3-iniconfig all 1.1.1-2 [6024 B] 244s Get:24 http://ftpmaster.internal/ubuntu questing/universe s390x python3-pluggy all 1.5.0-1 [21.0 kB] 244s Get:25 http://ftpmaster.internal/ubuntu questing/universe s390x python3-pytest all 8.3.5-1 [252 kB] 244s Get:26 http://ftpmaster.internal/ubuntu questing/universe s390x python3-pytest-asyncio all 0.25.1-1 [17.0 kB] 244s Get:27 http://ftpmaster.internal/ubuntu questing/universe s390x python3-pytest-mock all 3.14.0-2 [11.7 kB] 244s Get:28 http://ftpmaster.internal/ubuntu questing/main s390x python3-wrapt s390x 1.15.0-4build1 [34.5 kB] 244s Get:29 http://ftpmaster.internal/ubuntu questing/universe s390x python3-vcr all 7.0.0-2 [33.3 kB] 244s Get:30 http://ftpmaster.internal/ubuntu questing/universe s390x python3-pytest-vcr all 1.0.2-4 [5228 B] 244s Get:31 http://ftpmaster.internal/ubuntu questing-proposed/universe s390x python3-tqdm all 4.67.1-5 [92.1 kB] 245s Fetched 14.7 MB in 1s (10.9 MB/s) 245s Selecting previously unselected package fonts-lato. 245s (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 ... 59837 files and directories currently installed.) 245s Preparing to unpack .../00-fonts-lato_2.015-1_all.deb ... 245s Unpacking fonts-lato (2.015-1) ... 248s Selecting previously unselected package python3-numpy-dev:s390x. 248s Preparing to unpack .../01-python3-numpy-dev_1%3a2.2.4+ds-1_s390x.deb ... 248s Unpacking python3-numpy-dev:s390x (1:2.2.4+ds-1) ... 248s Selecting previously unselected package libblas3:s390x. 248s Preparing to unpack .../02-libblas3_3.12.1-2_s390x.deb ... 248s Unpacking libblas3:s390x (3.12.1-2) ... 248s Selecting previously unselected package libgfortran5:s390x. 248s Preparing to unpack .../03-libgfortran5_15-20250404-0ubuntu1_s390x.deb ... 248s Unpacking libgfortran5:s390x (15-20250404-0ubuntu1) ... 248s Selecting previously unselected package liblapack3:s390x. 248s Preparing to unpack .../04-liblapack3_3.12.1-2_s390x.deb ... 248s Unpacking liblapack3:s390x (3.12.1-2) ... 249s Selecting previously unselected package python3-numpy. 249s Preparing to unpack .../05-python3-numpy_1%3a2.2.4+ds-1_s390x.deb ... 249s Unpacking python3-numpy (1:2.2.4+ds-1) ... 250s Selecting previously unselected package fonts-font-awesome. 250s Preparing to unpack .../06-fonts-font-awesome_5.0.10+really4.7.0~dfsg-4.1_all.deb ... 250s Unpacking fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1) ... 250s Selecting previously unselected package libjs-jquery. 250s Preparing to unpack .../07-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 250s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 250s Selecting previously unselected package libjs-underscore. 250s Preparing to unpack .../08-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 250s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 250s Selecting previously unselected package libjs-sphinxdoc. 250s Preparing to unpack .../09-libjs-sphinxdoc_8.1.3-5_all.deb ... 250s Unpacking libjs-sphinxdoc (8.1.3-5) ... 250s Selecting previously unselected package sphinx-rtd-theme-common. 250s Preparing to unpack .../10-sphinx-rtd-theme-common_3.0.2+dfsg-2_all.deb ... 250s Unpacking sphinx-rtd-theme-common (3.0.2+dfsg-2) ... 250s Selecting previously unselected package python-fsspec-doc. 250s Preparing to unpack .../11-python-fsspec-doc_2025.3.2-1_all.deb ... 250s Unpacking python-fsspec-doc (2025.3.2-1) ... 250s Selecting previously unselected package python3-aiohappyeyeballs. 250s Preparing to unpack .../12-python3-aiohappyeyeballs_2.6.1-1_all.deb ... 251s Unpacking python3-aiohappyeyeballs (2.6.1-1) ... 251s Selecting previously unselected package python3-multidict. 251s Preparing to unpack .../13-python3-multidict_6.4.3-1_s390x.deb ... 251s Unpacking python3-multidict (6.4.3-1) ... 251s Selecting previously unselected package python3-yarl. 251s Preparing to unpack .../14-python3-yarl_1.13.1-1build2_s390x.deb ... 251s Unpacking python3-yarl (1.13.1-1build2) ... 252s Selecting previously unselected package python3-async-timeout. 252s Preparing to unpack .../15-python3-async-timeout_5.0.1-1_all.deb ... 252s Unpacking python3-async-timeout (5.0.1-1) ... 252s Selecting previously unselected package python3-frozenlist. 252s Preparing to unpack .../16-python3-frozenlist_1.5.0-1build2_s390x.deb ... 252s Unpacking python3-frozenlist (1.5.0-1build2) ... 252s Selecting previously unselected package python3-aiosignal. 252s Preparing to unpack .../17-python3-aiosignal_1.3.2-1_all.deb ... 252s Unpacking python3-aiosignal (1.3.2-1) ... 252s Selecting previously unselected package python3-aiohttp. 252s Preparing to unpack .../18-python3-aiohttp_3.10.11-1build1_s390x.deb ... 252s Unpacking python3-aiohttp (3.10.11-1build1) ... 252s Selecting previously unselected package python3-all. 252s Preparing to unpack .../19-python3-all_3.13.3-1_s390x.deb ... 252s Unpacking python3-all (3.13.3-1) ... 252s Selecting previously unselected package python3-async-generator. 252s Preparing to unpack .../20-python3-async-generator_1.10-4_all.deb ... 252s Unpacking python3-async-generator (1.10-4) ... 252s Selecting previously unselected package python3-fsspec. 252s Preparing to unpack .../21-python3-fsspec_2025.3.2-1_all.deb ... 252s Unpacking python3-fsspec (2025.3.2-1) ... 252s Selecting previously unselected package python3-iniconfig. 253s Preparing to unpack .../22-python3-iniconfig_1.1.1-2_all.deb ... 253s Unpacking python3-iniconfig (1.1.1-2) ... 253s Selecting previously unselected package python3-pluggy. 253s Preparing to unpack .../23-python3-pluggy_1.5.0-1_all.deb ... 253s Unpacking python3-pluggy (1.5.0-1) ... 253s Selecting previously unselected package python3-pytest. 253s Preparing to unpack .../24-python3-pytest_8.3.5-1_all.deb ... 253s Unpacking python3-pytest (8.3.5-1) ... 253s Selecting previously unselected package python3-pytest-asyncio. 253s Preparing to unpack .../25-python3-pytest-asyncio_0.25.1-1_all.deb ... 253s Unpacking python3-pytest-asyncio (0.25.1-1) ... 253s Selecting previously unselected package python3-pytest-mock. 253s Preparing to unpack .../26-python3-pytest-mock_3.14.0-2_all.deb ... 253s Unpacking python3-pytest-mock (3.14.0-2) ... 253s Selecting previously unselected package python3-wrapt. 253s Preparing to unpack .../27-python3-wrapt_1.15.0-4build1_s390x.deb ... 253s Unpacking python3-wrapt (1.15.0-4build1) ... 253s Selecting previously unselected package python3-vcr. 253s Preparing to unpack .../28-python3-vcr_7.0.0-2_all.deb ... 253s Unpacking python3-vcr (7.0.0-2) ... 253s Selecting previously unselected package python3-pytest-vcr. 253s Preparing to unpack .../29-python3-pytest-vcr_1.0.2-4_all.deb ... 253s Unpacking python3-pytest-vcr (1.0.2-4) ... 253s Selecting previously unselected package python3-tqdm. 253s Preparing to unpack .../30-python3-tqdm_4.67.1-5_all.deb ... 253s Unpacking python3-tqdm (4.67.1-5) ... 254s Setting up python3-iniconfig (1.1.1-2) ... 254s Setting up fonts-lato (2.015-1) ... 254s Setting up python3-async-generator (1.10-4) ... 256s Setting up python3-fsspec (2025.3.2-1) ... 258s Setting up python3-tqdm (4.67.1-5) ... 259s Setting up python3-all (3.13.3-1) ... 259s Setting up python3-multidict (6.4.3-1) ... 260s Setting up python3-frozenlist (1.5.0-1build2) ... 261s Setting up python3-aiosignal (1.3.2-1) ... 261s Setting up python3-async-timeout (5.0.1-1) ... 262s Setting up libblas3:s390x (3.12.1-2) ... 262s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 262s Setting up python3-numpy-dev:s390x (1:2.2.4+ds-1) ... 262s Setting up python3-wrapt (1.15.0-4build1) ... 263s Setting up python3-aiohappyeyeballs (2.6.1-1) ... 264s Setting up libgfortran5:s390x (15-20250404-0ubuntu1) ... 264s Setting up python3-pluggy (1.5.0-1) ... 266s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 266s Setting up python3-yarl (1.13.1-1build2) ... 266s Setting up fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1) ... 266s Setting up sphinx-rtd-theme-common (3.0.2+dfsg-2) ... 266s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 266s Setting up liblapack3:s390x (3.12.1-2) ... 266s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 266s Setting up python3-pytest (8.3.5-1) ... 267s Setting up python3-aiohttp (3.10.11-1build1) ... 269s Setting up python3-vcr (7.0.0-2) ... 269s Setting up python3-numpy (1:2.2.4+ds-1) ... 281s Setting up libjs-sphinxdoc (8.1.3-5) ... 281s Setting up python3-pytest-asyncio (0.25.1-1) ... 282s Setting up python3-pytest-mock (3.14.0-2) ... 283s Setting up python3-pytest-vcr (1.0.2-4) ... 284s Setting up python-fsspec-doc (2025.3.2-1) ... 284s Processing triggers for man-db (2.13.1-1) ... 286s Processing triggers for libc-bin (2.41-6ubuntu1) ... 292s autopkgtest [11:50:10]: test fsspec-tests: [----------------------- 294s 'fsspec/tests' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests' 294s 'fsspec/tests/__init__.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/__init__.py' 294s 'fsspec/tests/abstract' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract' 294s 'fsspec/tests/abstract/__init__.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/__init__.py' 294s 'fsspec/tests/abstract/common.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/common.py' 294s 'fsspec/tests/abstract/copy.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/copy.py' 294s 'fsspec/tests/abstract/get.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/get.py' 294s 'fsspec/tests/abstract/mv.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/mv.py' 294s 'fsspec/tests/abstract/open.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/open.py' 294s 'fsspec/tests/abstract/pipe.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/pipe.py' 294s 'fsspec/tests/abstract/put.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/abstract/put.py' 294s 'fsspec/tests/data' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/data' 294s 'fsspec/tests/data/listing.html' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/data/listing.html' 294s 'fsspec/tests/test_api.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_api.py' 294s 'fsspec/tests/test_async.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_async.py' 294s 'fsspec/tests/test_caches.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_caches.py' 294s 'fsspec/tests/test_callbacks.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_callbacks.py' 294s 'fsspec/tests/test_compression.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_compression.py' 294s 'fsspec/tests/test_config.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_config.py' 294s 'fsspec/tests/test_core.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_core.py' 294s 'fsspec/tests/test_downstream.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_downstream.py' 294s 'fsspec/tests/test_file.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_file.py' 294s 'fsspec/tests/test_fuse.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_fuse.py' 294s 'fsspec/tests/test_generic.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_generic.py' 294s 'fsspec/tests/test_gui.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_gui.py' 294s 'fsspec/tests/test_mapping.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_mapping.py' 294s 'fsspec/tests/test_parquet.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_parquet.py' 294s 'fsspec/tests/test_registry.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_registry.py' 294s 'fsspec/tests/test_spec.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_spec.py' 294s 'fsspec/tests/test_utils.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/test_utils.py' 294s 'fsspec/tests/conftest.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/tests/conftest.py' 294s 'fsspec/implementations/tests' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests' 294s 'fsspec/implementations/tests/__init__.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/__init__.py' 294s 'fsspec/implementations/tests/cassettes' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes' 294s 'fsspec/implementations/tests/cassettes/test_dbfs' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs' 294s 'fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs_file_listing.yaml' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs/test_dbfs_file_listing.yaml' 294s 'fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs_mkdir.yaml' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs/test_dbfs_mkdir.yaml' 294s 'fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs_read_pyarrow_non_partitioned.yaml' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs/test_dbfs_read_pyarrow_non_partitioned.yaml' 294s 'fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs_read_range.yaml' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs/test_dbfs_read_range.yaml' 294s 'fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs_read_range_chunked.yaml' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs/test_dbfs_read_range_chunked.yaml' 294s 'fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs_write_and_read.yaml' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs/test_dbfs_write_and_read.yaml' 294s 'fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs_write_pyarrow_non_partitioned.yaml' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/cassettes/test_dbfs/test_dbfs_write_pyarrow_non_partitioned.yaml' 294s 'fsspec/implementations/tests/conftest.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/conftest.py' 294s 'fsspec/implementations/tests/ftp_tls.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/ftp_tls.py' 294s 'fsspec/implementations/tests/keycert.pem' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/keycert.pem' 294s 'fsspec/implementations/tests/local' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/local' 294s 'fsspec/implementations/tests/local/__init__.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/local/__init__.py' 294s 'fsspec/implementations/tests/local/local_fixtures.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/local/local_fixtures.py' 294s 'fsspec/implementations/tests/local/local_test.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/local/local_test.py' 294s 'fsspec/implementations/tests/memory' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/memory' 294s 'fsspec/implementations/tests/memory/__init__.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/memory/__init__.py' 294s 'fsspec/implementations/tests/memory/memory_fixtures.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/memory/memory_fixtures.py' 294s 'fsspec/implementations/tests/memory/memory_test.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/memory/memory_test.py' 294s 'fsspec/implementations/tests/out.zip' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/out.zip' 294s 'fsspec/implementations/tests/test_archive.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_archive.py' 294s 'fsspec/implementations/tests/test_arrow.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_arrow.py' 294s 'fsspec/implementations/tests/test_asyn_wrapper.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_asyn_wrapper.py' 294s 'fsspec/implementations/tests/test_cached.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_cached.py' 294s 'fsspec/implementations/tests/test_common.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_common.py' 294s 'fsspec/implementations/tests/test_dask.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_dask.py' 294s 'fsspec/implementations/tests/test_data.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_data.py' 294s 'fsspec/implementations/tests/test_dbfs.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_dbfs.py' 294s 'fsspec/implementations/tests/test_dirfs.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_dirfs.py' 294s 'fsspec/implementations/tests/test_ftp.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_ftp.py' 294s 'fsspec/implementations/tests/test_git.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_git.py' 294s 'fsspec/implementations/tests/test_github.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_github.py' 294s 'fsspec/implementations/tests/test_http.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http.py' 294s 'fsspec/implementations/tests/test_http_sync.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py' 294s 'fsspec/implementations/tests/test_jupyter.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_jupyter.py' 294s 'fsspec/implementations/tests/test_libarchive.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_libarchive.py' 294s 'fsspec/implementations/tests/test_local.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_local.py' 294s 'fsspec/implementations/tests/test_memory.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_memory.py' 294s 'fsspec/implementations/tests/test_reference.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_reference.py' 294s 'fsspec/implementations/tests/test_sftp.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_sftp.py' 294s 'fsspec/implementations/tests/test_smb.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_smb.py' 294s 'fsspec/implementations/tests/test_tar.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_tar.py' 294s 'fsspec/implementations/tests/test_webhdfs.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_webhdfs.py' 294s 'fsspec/implementations/tests/test_zip.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_zip.py' 294s 'fsspec/conftest.py' -> '/tmp/autopkgtest.Yc84zM/autopkgtest_tmp/conftest.py' 294s === python3.13 === 304s /usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:207: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. 304s The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" 304s 304s warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) 309s ============================= test session starts ============================== 309s platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0 309s rootdir: /tmp/autopkgtest.Yc84zM/autopkgtest_tmp 309s plugins: asyncio-0.25.1, typeguard-4.4.2, mock-3.14.0, vcr-1.0.2 309s asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=None 309s collected 790 items / 2 skipped 309s 310s tests/test_api.py ...............x...... [ 2%] 316s tests/test_async.py .........s... [ 4%] 317s tests/test_caches.py ................................................... [ 10%] 317s ........................................................................ [ 20%] 318s ....................... [ 22%] 318s tests/test_callbacks.py ........ [ 23%] 318s tests/test_compression.py ...sss [ 24%] 318s tests/test_config.py ....... [ 25%] 318s tests/test_core.py .................................................ss.. [ 32%] 318s sss.s [ 32%] 318s tests/test_file.py sssssssss.s [ 34%] 319s tests/test_generic.py ...... [ 35%] 319s tests/test_mapping.py ................. [ 37%] 319s tests/test_parquet.py ssssssssssssssssssssssssssssssssssssssssssssssssss [ 43%] 319s ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 52%] 319s ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 61%] 319s tests/test_registry.py ......s [ 62%] 351s tests/test_spec.py ....................x................................ [ 69%] 352s .....ssssssssss......................................................... [ 78%] 355s ........................................................................ [ 87%] 355s ................................. [ 91%] 355s tests/test_utils.py .................................................... [ 98%] 355s ............... [100%] 355s 355s =============================== warnings summary =============================== 355s tests/test_async.py::test_async_streamed_file_write 355s /usr/lib/python3.13/functools.py:59: RuntimeWarning: coroutine 'test_run_coros_in_chunks..runner' was never awaited 355s getattr(wrapper, attr).update(getattr(wrapped, attr, {})) 355s Enable tracemalloc to get traceback where the object was allocated. 355s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 355s 355s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 355s =========== 565 passed, 225 skipped, 2 xfailed, 1 warning in 50.44s ============ 360s /usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:207: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. 360s The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" 360s 360s warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) 371s ============================= test session starts ============================== 371s platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0 371s rootdir: /tmp/autopkgtest.Yc84zM/autopkgtest_tmp 371s plugins: asyncio-0.25.1, typeguard-4.4.2, mock-3.14.0, vcr-1.0.2 371s asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=None 371s collected 1005 items / 3 deselected / 7 skipped / 1002 selected 371s 371s implementations_tests/local/local_test.py .............................. [ 2%] 373s ........................................................................ [ 10%] 374s ................................. [ 13%] 374s implementations_tests/memory/memory_test.py ............................ [ 16%] 377s ........................................................................ [ 23%] 378s ..................................... [ 27%] 388s implementations_tests/test_archive.py .................................. [ 30%] 433s ...................................................sssssssssssssssss [ 37%] 433s implementations_tests/test_asyn_wrapper.py ......... [ 38%] 442s implementations_tests/test_cached.py ..........ssssssss......sss........ [ 41%] 443s ..........ssssssssssssssss.s........ssss..................... [ 47%] 443s implementations_tests/test_common.py ssss [ 48%] 443s implementations_tests/test_data.py .. [ 48%] 444s implementations_tests/test_dirfs.py .................................... [ 51%] 445s ........................................................................ [ 59%] 445s .......................... [ 61%] 445s implementations_tests/test_ftp.py sssssssssssssssssss [ 63%] 950s implementations_tests/test_github.py .FF.. [ 64%] 950s implementations_tests/test_http.py ..................................... [ 67%] 954s .................... [ 69%] 957s implementations_tests/test_http_sync.py F.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 73%] 957s .FFFFFF [ 73%] 957s implementations_tests/test_libarchive.py s [ 73%] 957s implementations_tests/test_local.py .s........................s......... [ 77%] 957s ....................................................ss........ss.sssss.. [ 84%] 957s .....sss....s.......................... [ 88%] 957s implementations_tests/test_memory.py .............................. [ 91%] 958s implementations_tests/test_reference.py ..................s.....ss..ssss [ 94%] 958s s [ 94%] 958s implementations_tests/test_tar.py ......................... [ 97%] 958s implementations_tests/test_webhdfs.py ssssssssssss [ 98%] 958s implementations_tests/test_zip.py ............... [100%] 958s 958s =================================== FAILURES =================================== 958s _________________________ test_github_open_large_file __________________________ 958s 958s self = , addr_infos = [] 958s req = 958s timeout = ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=30, ceil_threshold=5) 958s client_error = 958s args = (functools.partial(, loop=<_UnixSelectorEventLoop running=True closed=False debug=False>),) 958s kwargs = {'server_hostname': 'raw.githubusercontent.com', 'ssl': } 958s 958s async def _wrap_create_connection( 958s self, 958s *args: Any, 958s addr_infos: List[aiohappyeyeballs.AddrInfoType], 958s req: ClientRequest, 958s timeout: "ClientTimeout", 958s client_error: Type[Exception] = ClientConnectorError, 958s **kwargs: Any, 958s ) -> Tuple[asyncio.Transport, ResponseHandler]: 958s try: 958s async with ceil_timeout( 958s timeout.sock_connect, ceil_threshold=timeout.ceil_threshold 958s ): 958s > sock = await aiohappyeyeballs.start_connection( 958s addr_infos=addr_infos, 958s local_addr_infos=self._local_addr_infos, 958s happy_eyeballs_delay=self._happy_eyeballs_delay, 958s interleave=self._interleave, 958s loop=self._loop, 958s ) 958s 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1109: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/aiohappyeyeballs/impl.py:87: in start_connection 958s sock, _, _ = await _staggered.staggered_race( 958s /usr/lib/python3/dist-packages/aiohappyeyeballs/_staggered.py:165: in staggered_race 958s done = await _wait_one( 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s futures = {.run_one_coro() done, defined at /usr/lib/python3/dist-packages/aiohappyeyeballs/_staggered.py:115> result=None>} 958s loop = <_UnixSelectorEventLoop running=True closed=False debug=False> 958s 958s async def _wait_one( 958s futures: "Iterable[asyncio.Future[Any]]", 958s loop: asyncio.AbstractEventLoop, 958s ) -> _T: 958s """Wait for the first future to complete.""" 958s wait_next = loop.create_future() 958s 958s def _on_completion(fut: "asyncio.Future[Any]") -> None: 958s if not wait_next.done(): 958s wait_next.set_result(fut) 958s 958s for f in futures: 958s f.add_done_callback(_on_completion) 958s 958s try: 958s > return await wait_next 958s E asyncio.exceptions.CancelledError 958s 958s /usr/lib/python3/dist-packages/aiohappyeyeballs/_staggered.py:46: CancelledError 958s 958s The above exception was the direct cause of the following exception: 958s 958s self = , method = 'GET' 958s str_or_url = URL('https://raw.githubusercontent.com/mwaskom/seaborn-data/83bfba7/brain_networks.csv') 958s 958s async def _request( 958s self, 958s method: str, 958s str_or_url: StrOrURL, 958s *, 958s params: Query = None, 958s data: Any = None, 958s json: Any = None, 958s cookies: Optional[LooseCookies] = None, 958s headers: Optional[LooseHeaders] = None, 958s skip_auto_headers: Optional[Iterable[str]] = None, 958s auth: Optional[BasicAuth] = None, 958s allow_redirects: bool = True, 958s max_redirects: int = 10, 958s compress: Union[str, bool, None] = None, 958s chunked: Optional[bool] = None, 958s expect100: bool = False, 958s raise_for_status: Union[ 958s None, bool, Callable[[ClientResponse], Awaitable[None]] 958s ] = None, 958s read_until_eof: bool = True, 958s proxy: Optional[StrOrURL] = None, 958s proxy_auth: Optional[BasicAuth] = None, 958s timeout: Union[ClientTimeout, _SENTINEL] = sentinel, 958s verify_ssl: Optional[bool] = None, 958s fingerprint: Optional[bytes] = None, 958s ssl_context: Optional[SSLContext] = None, 958s ssl: Union[SSLContext, bool, Fingerprint] = True, 958s server_hostname: Optional[str] = None, 958s proxy_headers: Optional[LooseHeaders] = None, 958s trace_request_ctx: Optional[Mapping[str, Any]] = None, 958s read_bufsize: Optional[int] = None, 958s auto_decompress: Optional[bool] = None, 958s max_line_size: Optional[int] = None, 958s max_field_size: Optional[int] = None, 958s ) -> ClientResponse: 958s 958s # NOTE: timeout clamps existing connect and read timeouts. We cannot 958s # set the default to None because we need to detect if the user wants 958s # to use the existing timeouts by setting timeout to None. 958s 958s if self.closed: 958s raise RuntimeError("Session is closed") 958s 958s ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint) 958s 958s if data is not None and json is not None: 958s raise ValueError( 958s "data and json parameters can not be used at the same time" 958s ) 958s elif json is not None: 958s data = payload.JsonPayload(json, dumps=self._json_serialize) 958s 958s if not isinstance(chunked, bool) and chunked is not None: 958s warnings.warn("Chunk size is deprecated #1615", DeprecationWarning) 958s 958s redirects = 0 958s history: List[ClientResponse] = [] 958s version = self._version 958s params = params or {} 958s 958s # Merge with default headers and transform to CIMultiDict 958s headers = self._prepare_headers(headers) 958s 958s try: 958s url = self._build_url(str_or_url) 958s except ValueError as e: 958s raise InvalidUrlClientError(str_or_url) from e 958s 958s assert self._connector is not None 958s if url.scheme not in self._connector.allowed_protocol_schema_set: 958s raise NonHttpUrlClientError(url) 958s 958s skip_headers = set(self._skip_auto_headers) 958s if skip_auto_headers is not None: 958s for i in skip_auto_headers: 958s skip_headers.add(istr(i)) 958s 958s if proxy is None: 958s proxy_headers = None 958s else: 958s proxy_headers = self._prepare_headers(proxy_headers) 958s try: 958s proxy = URL(proxy) 958s except ValueError as e: 958s raise InvalidURL(proxy) from e 958s 958s if timeout is sentinel: 958s real_timeout: ClientTimeout = self._timeout 958s else: 958s if not isinstance(timeout, ClientTimeout): 958s real_timeout = ClientTimeout(total=timeout) 958s else: 958s real_timeout = timeout 958s # timeout is cumulative for all request operations 958s # (request, redirects, responses, data consuming) 958s tm = TimeoutHandle( 958s self._loop, real_timeout.total, ceil_threshold=real_timeout.ceil_threshold 958s ) 958s handle = tm.start() 958s 958s if read_bufsize is None: 958s read_bufsize = self._read_bufsize 958s 958s if auto_decompress is None: 958s auto_decompress = self._auto_decompress 958s 958s if max_line_size is None: 958s max_line_size = self._max_line_size 958s 958s if max_field_size is None: 958s max_field_size = self._max_field_size 958s 958s traces = [ 958s Trace( 958s self, 958s trace_config, 958s trace_config.trace_config_ctx(trace_request_ctx=trace_request_ctx), 958s ) 958s for trace_config in self._trace_configs 958s ] 958s 958s for trace in traces: 958s await trace.send_request_start(method, url.update_query(params), headers) 958s 958s timer = tm.timer() 958s try: 958s with timer: 958s # https://www.rfc-editor.org/rfc/rfc9112.html#name-retrying-requests 958s retry_persistent_connection = method in IDEMPOTENT_METHODS 958s while True: 958s url, auth_from_url = strip_auth_from_url(url) 958s if not url.raw_host: 958s # NOTE: Bail early, otherwise, causes `InvalidURL` through 958s # NOTE: `self._request_class()` below. 958s err_exc_cls = ( 958s InvalidUrlRedirectClientError 958s if redirects 958s else InvalidUrlClientError 958s ) 958s raise err_exc_cls(url) 958s # If `auth` was passed for an already authenticated URL, 958s # disallow only if this is the initial URL; this is to avoid issues 958s # with sketchy redirects that are not the caller's responsibility 958s if not history and (auth and auth_from_url): 958s raise ValueError( 958s "Cannot combine AUTH argument with " 958s "credentials encoded in URL" 958s ) 958s 958s # Override the auth with the one from the URL only if we 958s # have no auth, or if we got an auth from a redirect URL 958s if auth is None or (history and auth_from_url is not None): 958s auth = auth_from_url 958s if auth is None: 958s auth = self._default_auth 958s # It would be confusing if we support explicit 958s # Authorization header with auth argument 958s if ( 958s headers is not None 958s and auth is not None 958s and hdrs.AUTHORIZATION in headers 958s ): 958s raise ValueError( 958s "Cannot combine AUTHORIZATION header " 958s "with AUTH argument or credentials " 958s "encoded in URL" 958s ) 958s 958s all_cookies = self._cookie_jar.filter_cookies(url) 958s 958s if cookies is not None: 958s tmp_cookie_jar = CookieJar() 958s tmp_cookie_jar.update_cookies(cookies) 958s req_cookies = tmp_cookie_jar.filter_cookies(url) 958s if req_cookies: 958s all_cookies.load(req_cookies) 958s 958s if proxy is not None: 958s proxy = URL(proxy) 958s elif self._trust_env: 958s with suppress(LookupError): 958s proxy, proxy_auth = get_env_proxy_for_url(url) 958s 958s req = self._request_class( 958s method, 958s url, 958s params=params, 958s headers=headers, 958s skip_auto_headers=skip_headers if skip_headers else None, 958s data=data, 958s cookies=all_cookies, 958s auth=auth, 958s version=version, 958s compress=compress, 958s chunked=chunked, 958s expect100=expect100, 958s loop=self._loop, 958s response_class=self._response_class, 958s proxy=proxy, 958s proxy_auth=proxy_auth, 958s timer=timer, 958s session=self, 958s ssl=ssl if ssl is not None else True, 958s server_hostname=server_hostname, 958s proxy_headers=proxy_headers, 958s traces=traces, 958s trust_env=self.trust_env, 958s ) 958s 958s # connection timeout 958s try: 958s > conn = await self._connector.connect( 958s req, traces=traces, timeout=real_timeout 958s ) 958s 958s /usr/lib/python3/dist-packages/aiohttp/client.py:663: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:538: in connect 958s proto = await self._create_connection(req, traces, timeout) 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1050: in _create_connection 958s _, proto = await self._create_direct_connection(req, traces, timeout) 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1384: in _create_direct_connection 958s raise last_exc 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1353: in _create_direct_connection 958s transp, proto = await self._wrap_create_connection( 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1106: in _wrap_create_connection 958s async with ceil_timeout( 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s exc_type = 958s exc_val = CancelledError(), exc_tb = 958s 958s async def __aexit__( 958s self, 958s exc_type: Optional[Type[BaseException]], 958s exc_val: Optional[BaseException], 958s exc_tb: Optional[TracebackType], 958s ) -> Optional[bool]: 958s assert self._state in (_State.ENTERED, _State.EXPIRING) 958s 958s if self._timeout_handler is not None: 958s self._timeout_handler.cancel() 958s self._timeout_handler = None 958s 958s if self._state is _State.EXPIRING: 958s self._state = _State.EXPIRED 958s 958s if self._task.uncancel() <= self._cancelling and exc_type is not None: 958s # Since there are no new cancel requests, we're 958s # handling this. 958s if issubclass(exc_type, exceptions.CancelledError): 958s > raise TimeoutError from exc_val 958s E TimeoutError 958s 958s /usr/lib/python3.13/asyncio/timeouts.py:116: TimeoutError 958s 958s The above exception was the direct cause of the following exception: 958s 958s self = 958s url = 'https://raw.githubusercontent.com/mwaskom/seaborn-data/83bfba7/brain_networks.csv' 958s kwargs = {}, info = {} 958s session = , policy = 'get' 958s 958s async def _info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s session = await self.set_session() 958s 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > await _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:427: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:839: in _file_info 958s r = await session.get(url, allow_redirects=ar, **kwargs) 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = , method = 'GET' 958s str_or_url = URL('https://raw.githubusercontent.com/mwaskom/seaborn-data/83bfba7/brain_networks.csv') 958s 958s async def _request( 958s self, 958s method: str, 958s str_or_url: StrOrURL, 958s *, 958s params: Query = None, 958s data: Any = None, 958s json: Any = None, 958s cookies: Optional[LooseCookies] = None, 958s headers: Optional[LooseHeaders] = None, 958s skip_auto_headers: Optional[Iterable[str]] = None, 958s auth: Optional[BasicAuth] = None, 958s allow_redirects: bool = True, 958s max_redirects: int = 10, 958s compress: Union[str, bool, None] = None, 958s chunked: Optional[bool] = None, 958s expect100: bool = False, 958s raise_for_status: Union[ 958s None, bool, Callable[[ClientResponse], Awaitable[None]] 958s ] = None, 958s read_until_eof: bool = True, 958s proxy: Optional[StrOrURL] = None, 958s proxy_auth: Optional[BasicAuth] = None, 958s timeout: Union[ClientTimeout, _SENTINEL] = sentinel, 958s verify_ssl: Optional[bool] = None, 958s fingerprint: Optional[bytes] = None, 958s ssl_context: Optional[SSLContext] = None, 958s ssl: Union[SSLContext, bool, Fingerprint] = True, 958s server_hostname: Optional[str] = None, 958s proxy_headers: Optional[LooseHeaders] = None, 958s trace_request_ctx: Optional[Mapping[str, Any]] = None, 958s read_bufsize: Optional[int] = None, 958s auto_decompress: Optional[bool] = None, 958s max_line_size: Optional[int] = None, 958s max_field_size: Optional[int] = None, 958s ) -> ClientResponse: 958s 958s # NOTE: timeout clamps existing connect and read timeouts. We cannot 958s # set the default to None because we need to detect if the user wants 958s # to use the existing timeouts by setting timeout to None. 958s 958s if self.closed: 958s raise RuntimeError("Session is closed") 958s 958s ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint) 958s 958s if data is not None and json is not None: 958s raise ValueError( 958s "data and json parameters can not be used at the same time" 958s ) 958s elif json is not None: 958s data = payload.JsonPayload(json, dumps=self._json_serialize) 958s 958s if not isinstance(chunked, bool) and chunked is not None: 958s warnings.warn("Chunk size is deprecated #1615", DeprecationWarning) 958s 958s redirects = 0 958s history: List[ClientResponse] = [] 958s version = self._version 958s params = params or {} 958s 958s # Merge with default headers and transform to CIMultiDict 958s headers = self._prepare_headers(headers) 958s 958s try: 958s url = self._build_url(str_or_url) 958s except ValueError as e: 958s raise InvalidUrlClientError(str_or_url) from e 958s 958s assert self._connector is not None 958s if url.scheme not in self._connector.allowed_protocol_schema_set: 958s raise NonHttpUrlClientError(url) 958s 958s skip_headers = set(self._skip_auto_headers) 958s if skip_auto_headers is not None: 958s for i in skip_auto_headers: 958s skip_headers.add(istr(i)) 958s 958s if proxy is None: 958s proxy_headers = None 958s else: 958s proxy_headers = self._prepare_headers(proxy_headers) 958s try: 958s proxy = URL(proxy) 958s except ValueError as e: 958s raise InvalidURL(proxy) from e 958s 958s if timeout is sentinel: 958s real_timeout: ClientTimeout = self._timeout 958s else: 958s if not isinstance(timeout, ClientTimeout): 958s real_timeout = ClientTimeout(total=timeout) 958s else: 958s real_timeout = timeout 958s # timeout is cumulative for all request operations 958s # (request, redirects, responses, data consuming) 958s tm = TimeoutHandle( 958s self._loop, real_timeout.total, ceil_threshold=real_timeout.ceil_threshold 958s ) 958s handle = tm.start() 958s 958s if read_bufsize is None: 958s read_bufsize = self._read_bufsize 958s 958s if auto_decompress is None: 958s auto_decompress = self._auto_decompress 958s 958s if max_line_size is None: 958s max_line_size = self._max_line_size 958s 958s if max_field_size is None: 958s max_field_size = self._max_field_size 958s 958s traces = [ 958s Trace( 958s self, 958s trace_config, 958s trace_config.trace_config_ctx(trace_request_ctx=trace_request_ctx), 958s ) 958s for trace_config in self._trace_configs 958s ] 958s 958s for trace in traces: 958s await trace.send_request_start(method, url.update_query(params), headers) 958s 958s timer = tm.timer() 958s try: 958s with timer: 958s # https://www.rfc-editor.org/rfc/rfc9112.html#name-retrying-requests 958s retry_persistent_connection = method in IDEMPOTENT_METHODS 958s while True: 958s url, auth_from_url = strip_auth_from_url(url) 958s if not url.raw_host: 958s # NOTE: Bail early, otherwise, causes `InvalidURL` through 958s # NOTE: `self._request_class()` below. 958s err_exc_cls = ( 958s InvalidUrlRedirectClientError 958s if redirects 958s else InvalidUrlClientError 958s ) 958s raise err_exc_cls(url) 958s # If `auth` was passed for an already authenticated URL, 958s # disallow only if this is the initial URL; this is to avoid issues 958s # with sketchy redirects that are not the caller's responsibility 958s if not history and (auth and auth_from_url): 958s raise ValueError( 958s "Cannot combine AUTH argument with " 958s "credentials encoded in URL" 958s ) 958s 958s # Override the auth with the one from the URL only if we 958s # have no auth, or if we got an auth from a redirect URL 958s if auth is None or (history and auth_from_url is not None): 958s auth = auth_from_url 958s if auth is None: 958s auth = self._default_auth 958s # It would be confusing if we support explicit 958s # Authorization header with auth argument 958s if ( 958s headers is not None 958s and auth is not None 958s and hdrs.AUTHORIZATION in headers 958s ): 958s raise ValueError( 958s "Cannot combine AUTHORIZATION header " 958s "with AUTH argument or credentials " 958s "encoded in URL" 958s ) 958s 958s all_cookies = self._cookie_jar.filter_cookies(url) 958s 958s if cookies is not None: 958s tmp_cookie_jar = CookieJar() 958s tmp_cookie_jar.update_cookies(cookies) 958s req_cookies = tmp_cookie_jar.filter_cookies(url) 958s if req_cookies: 958s all_cookies.load(req_cookies) 958s 958s if proxy is not None: 958s proxy = URL(proxy) 958s elif self._trust_env: 958s with suppress(LookupError): 958s proxy, proxy_auth = get_env_proxy_for_url(url) 958s 958s req = self._request_class( 958s method, 958s url, 958s params=params, 958s headers=headers, 958s skip_auto_headers=skip_headers if skip_headers else None, 958s data=data, 958s cookies=all_cookies, 958s auth=auth, 958s version=version, 958s compress=compress, 958s chunked=chunked, 958s expect100=expect100, 958s loop=self._loop, 958s response_class=self._response_class, 958s proxy=proxy, 958s proxy_auth=proxy_auth, 958s timer=timer, 958s session=self, 958s ssl=ssl if ssl is not None else True, 958s server_hostname=server_hostname, 958s proxy_headers=proxy_headers, 958s traces=traces, 958s trust_env=self.trust_env, 958s ) 958s 958s # connection timeout 958s try: 958s conn = await self._connector.connect( 958s req, traces=traces, timeout=real_timeout 958s ) 958s except asyncio.TimeoutError as exc: 958s > raise ConnectionTimeoutError( 958s f"Connection timeout to host {url}" 958s ) from exc 958s E aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://raw.githubusercontent.com/mwaskom/seaborn-data/83bfba7/brain_networks.csv 958s 958s /usr/lib/python3/dist-packages/aiohttp/client.py:667: ConnectionTimeoutError 958s 958s The above exception was the direct cause of the following exception: 958s 958s def test_github_open_large_file(): 958s # test opening a large file >1 MB 958s # use block_size=0 to get a streaming interface to the file, ensuring that 958s # we fetch only the parts we need instead of downloading the full file all 958s # at once 958s > with fsspec.open( 958s "github://mwaskom:seaborn-data@83bfba7/brain_networks.csv", block_size=0 958s ) as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_github.py:15: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/core.py:105: in __enter__ 958s f = self.fs.open(self.path, mode=mode) 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/github.py:261: in _open 958s return self.http_fs.open( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:366: in _open 958s size = size or info.update(self.info(path, **kwargs)) or info["size"] 958s /usr/lib/python3/dist-packages/fsspec/asyn.py:118: in wrapper 958s return sync(self.loop, func, *args, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/asyn.py:103: in sync 958s raise return_result 958s /usr/lib/python3/dist-packages/fsspec/asyn.py:56: in _runner 958s result[0] = await coro 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'https://raw.githubusercontent.com/mwaskom/seaborn-data/83bfba7/brain_networks.csv' 958s kwargs = {}, info = {} 958s session = , policy = 'get' 958s 958s async def _info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s session = await self.set_session() 958s 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s await _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: https://raw.githubusercontent.com/mwaskom/seaborn-data/83bfba7/brain_networks.csv 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:440: FileNotFoundError 958s __________________________ test_github_open_lfs_file ___________________________ 958s 958s self = , addr_infos = [] 958s req = 958s timeout = ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=30, ceil_threshold=5) 958s client_error = 958s args = (functools.partial(, loop=<_UnixSelectorEventLoop running=True closed=False debug=False>),) 958s kwargs = {'server_hostname': 'media.githubusercontent.com', 'ssl': } 958s 958s async def _wrap_create_connection( 958s self, 958s *args: Any, 958s addr_infos: List[aiohappyeyeballs.AddrInfoType], 958s req: ClientRequest, 958s timeout: "ClientTimeout", 958s client_error: Type[Exception] = ClientConnectorError, 958s **kwargs: Any, 958s ) -> Tuple[asyncio.Transport, ResponseHandler]: 958s try: 958s async with ceil_timeout( 958s timeout.sock_connect, ceil_threshold=timeout.ceil_threshold 958s ): 958s > sock = await aiohappyeyeballs.start_connection( 958s addr_infos=addr_infos, 958s local_addr_infos=self._local_addr_infos, 958s happy_eyeballs_delay=self._happy_eyeballs_delay, 958s interleave=self._interleave, 958s loop=self._loop, 958s ) 958s 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1109: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/aiohappyeyeballs/impl.py:87: in start_connection 958s sock, _, _ = await _staggered.staggered_race( 958s /usr/lib/python3/dist-packages/aiohappyeyeballs/_staggered.py:165: in staggered_race 958s done = await _wait_one( 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s futures = {.run_one_coro() done, defined at /usr/lib/python3/dist-packages/aiohappyeyeballs/_staggered.py:115> result=None>} 958s loop = <_UnixSelectorEventLoop running=True closed=False debug=False> 958s 958s async def _wait_one( 958s futures: "Iterable[asyncio.Future[Any]]", 958s loop: asyncio.AbstractEventLoop, 958s ) -> _T: 958s """Wait for the first future to complete.""" 958s wait_next = loop.create_future() 958s 958s def _on_completion(fut: "asyncio.Future[Any]") -> None: 958s if not wait_next.done(): 958s wait_next.set_result(fut) 958s 958s for f in futures: 958s f.add_done_callback(_on_completion) 958s 958s try: 958s > return await wait_next 958s E asyncio.exceptions.CancelledError 958s 958s /usr/lib/python3/dist-packages/aiohappyeyeballs/_staggered.py:46: CancelledError 958s 958s The above exception was the direct cause of the following exception: 958s 958s self = , method = 'GET' 958s str_or_url = URL('https://media.githubusercontent.com/media/cBioPortal/datahub/55cd360/public/acc_2019/data_gene_panel_matrix.txt') 958s 958s async def _request( 958s self, 958s method: str, 958s str_or_url: StrOrURL, 958s *, 958s params: Query = None, 958s data: Any = None, 958s json: Any = None, 958s cookies: Optional[LooseCookies] = None, 958s headers: Optional[LooseHeaders] = None, 958s skip_auto_headers: Optional[Iterable[str]] = None, 958s auth: Optional[BasicAuth] = None, 958s allow_redirects: bool = True, 958s max_redirects: int = 10, 958s compress: Union[str, bool, None] = None, 958s chunked: Optional[bool] = None, 958s expect100: bool = False, 958s raise_for_status: Union[ 958s None, bool, Callable[[ClientResponse], Awaitable[None]] 958s ] = None, 958s read_until_eof: bool = True, 958s proxy: Optional[StrOrURL] = None, 958s proxy_auth: Optional[BasicAuth] = None, 958s timeout: Union[ClientTimeout, _SENTINEL] = sentinel, 958s verify_ssl: Optional[bool] = None, 958s fingerprint: Optional[bytes] = None, 958s ssl_context: Optional[SSLContext] = None, 958s ssl: Union[SSLContext, bool, Fingerprint] = True, 958s server_hostname: Optional[str] = None, 958s proxy_headers: Optional[LooseHeaders] = None, 958s trace_request_ctx: Optional[Mapping[str, Any]] = None, 958s read_bufsize: Optional[int] = None, 958s auto_decompress: Optional[bool] = None, 958s max_line_size: Optional[int] = None, 958s max_field_size: Optional[int] = None, 958s ) -> ClientResponse: 958s 958s # NOTE: timeout clamps existing connect and read timeouts. We cannot 958s # set the default to None because we need to detect if the user wants 958s # to use the existing timeouts by setting timeout to None. 958s 958s if self.closed: 958s raise RuntimeError("Session is closed") 958s 958s ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint) 958s 958s if data is not None and json is not None: 958s raise ValueError( 958s "data and json parameters can not be used at the same time" 958s ) 958s elif json is not None: 958s data = payload.JsonPayload(json, dumps=self._json_serialize) 958s 958s if not isinstance(chunked, bool) and chunked is not None: 958s warnings.warn("Chunk size is deprecated #1615", DeprecationWarning) 958s 958s redirects = 0 958s history: List[ClientResponse] = [] 958s version = self._version 958s params = params or {} 958s 958s # Merge with default headers and transform to CIMultiDict 958s headers = self._prepare_headers(headers) 958s 958s try: 958s url = self._build_url(str_or_url) 958s except ValueError as e: 958s raise InvalidUrlClientError(str_or_url) from e 958s 958s assert self._connector is not None 958s if url.scheme not in self._connector.allowed_protocol_schema_set: 958s raise NonHttpUrlClientError(url) 958s 958s skip_headers = set(self._skip_auto_headers) 958s if skip_auto_headers is not None: 958s for i in skip_auto_headers: 958s skip_headers.add(istr(i)) 958s 958s if proxy is None: 958s proxy_headers = None 958s else: 958s proxy_headers = self._prepare_headers(proxy_headers) 958s try: 958s proxy = URL(proxy) 958s except ValueError as e: 958s raise InvalidURL(proxy) from e 958s 958s if timeout is sentinel: 958s real_timeout: ClientTimeout = self._timeout 958s else: 958s if not isinstance(timeout, ClientTimeout): 958s real_timeout = ClientTimeout(total=timeout) 958s else: 958s real_timeout = timeout 958s # timeout is cumulative for all request operations 958s # (request, redirects, responses, data consuming) 958s tm = TimeoutHandle( 958s self._loop, real_timeout.total, ceil_threshold=real_timeout.ceil_threshold 958s ) 958s handle = tm.start() 958s 958s if read_bufsize is None: 958s read_bufsize = self._read_bufsize 958s 958s if auto_decompress is None: 958s auto_decompress = self._auto_decompress 958s 958s if max_line_size is None: 958s max_line_size = self._max_line_size 958s 958s if max_field_size is None: 958s max_field_size = self._max_field_size 958s 958s traces = [ 958s Trace( 958s self, 958s trace_config, 958s trace_config.trace_config_ctx(trace_request_ctx=trace_request_ctx), 958s ) 958s for trace_config in self._trace_configs 958s ] 958s 958s for trace in traces: 958s await trace.send_request_start(method, url.update_query(params), headers) 958s 958s timer = tm.timer() 958s try: 958s with timer: 958s # https://www.rfc-editor.org/rfc/rfc9112.html#name-retrying-requests 958s retry_persistent_connection = method in IDEMPOTENT_METHODS 958s while True: 958s url, auth_from_url = strip_auth_from_url(url) 958s if not url.raw_host: 958s # NOTE: Bail early, otherwise, causes `InvalidURL` through 958s # NOTE: `self._request_class()` below. 958s err_exc_cls = ( 958s InvalidUrlRedirectClientError 958s if redirects 958s else InvalidUrlClientError 958s ) 958s raise err_exc_cls(url) 958s # If `auth` was passed for an already authenticated URL, 958s # disallow only if this is the initial URL; this is to avoid issues 958s # with sketchy redirects that are not the caller's responsibility 958s if not history and (auth and auth_from_url): 958s raise ValueError( 958s "Cannot combine AUTH argument with " 958s "credentials encoded in URL" 958s ) 958s 958s # Override the auth with the one from the URL only if we 958s # have no auth, or if we got an auth from a redirect URL 958s if auth is None or (history and auth_from_url is not None): 958s auth = auth_from_url 958s if auth is None: 958s auth = self._default_auth 958s # It would be confusing if we support explicit 958s # Authorization header with auth argument 958s if ( 958s headers is not None 958s and auth is not None 958s and hdrs.AUTHORIZATION in headers 958s ): 958s raise ValueError( 958s "Cannot combine AUTHORIZATION header " 958s "with AUTH argument or credentials " 958s "encoded in URL" 958s ) 958s 958s all_cookies = self._cookie_jar.filter_cookies(url) 958s 958s if cookies is not None: 958s tmp_cookie_jar = CookieJar() 958s tmp_cookie_jar.update_cookies(cookies) 958s req_cookies = tmp_cookie_jar.filter_cookies(url) 958s if req_cookies: 958s all_cookies.load(req_cookies) 958s 958s if proxy is not None: 958s proxy = URL(proxy) 958s elif self._trust_env: 958s with suppress(LookupError): 958s proxy, proxy_auth = get_env_proxy_for_url(url) 958s 958s req = self._request_class( 958s method, 958s url, 958s params=params, 958s headers=headers, 958s skip_auto_headers=skip_headers if skip_headers else None, 958s data=data, 958s cookies=all_cookies, 958s auth=auth, 958s version=version, 958s compress=compress, 958s chunked=chunked, 958s expect100=expect100, 958s loop=self._loop, 958s response_class=self._response_class, 958s proxy=proxy, 958s proxy_auth=proxy_auth, 958s timer=timer, 958s session=self, 958s ssl=ssl if ssl is not None else True, 958s server_hostname=server_hostname, 958s proxy_headers=proxy_headers, 958s traces=traces, 958s trust_env=self.trust_env, 958s ) 958s 958s # connection timeout 958s try: 958s > conn = await self._connector.connect( 958s req, traces=traces, timeout=real_timeout 958s ) 958s 958s /usr/lib/python3/dist-packages/aiohttp/client.py:663: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:538: in connect 958s proto = await self._create_connection(req, traces, timeout) 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1050: in _create_connection 958s _, proto = await self._create_direct_connection(req, traces, timeout) 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1384: in _create_direct_connection 958s raise last_exc 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1353: in _create_direct_connection 958s transp, proto = await self._wrap_create_connection( 958s /usr/lib/python3/dist-packages/aiohttp/connector.py:1106: in _wrap_create_connection 958s async with ceil_timeout( 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s exc_type = 958s exc_val = CancelledError(), exc_tb = 958s 958s async def __aexit__( 958s self, 958s exc_type: Optional[Type[BaseException]], 958s exc_val: Optional[BaseException], 958s exc_tb: Optional[TracebackType], 958s ) -> Optional[bool]: 958s assert self._state in (_State.ENTERED, _State.EXPIRING) 958s 958s if self._timeout_handler is not None: 958s self._timeout_handler.cancel() 958s self._timeout_handler = None 958s 958s if self._state is _State.EXPIRING: 958s self._state = _State.EXPIRED 958s 958s if self._task.uncancel() <= self._cancelling and exc_type is not None: 958s # Since there are no new cancel requests, we're 958s # handling this. 958s if issubclass(exc_type, exceptions.CancelledError): 958s > raise TimeoutError from exc_val 958s E TimeoutError 958s 958s /usr/lib/python3.13/asyncio/timeouts.py:116: TimeoutError 958s 958s The above exception was the direct cause of the following exception: 958s 958s self = 958s url = 'https://media.githubusercontent.com/media/cBioPortal/datahub/55cd360/public/acc_2019/data_gene_panel_matrix.txt' 958s kwargs = {}, info = {} 958s session = , policy = 'get' 958s 958s async def _info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s session = await self.set_session() 958s 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > await _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:427: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:839: in _file_info 958s r = await session.get(url, allow_redirects=ar, **kwargs) 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = , method = 'GET' 958s str_or_url = URL('https://media.githubusercontent.com/media/cBioPortal/datahub/55cd360/public/acc_2019/data_gene_panel_matrix.txt') 958s 958s async def _request( 958s self, 958s method: str, 958s str_or_url: StrOrURL, 958s *, 958s params: Query = None, 958s data: Any = None, 958s json: Any = None, 958s cookies: Optional[LooseCookies] = None, 958s headers: Optional[LooseHeaders] = None, 958s skip_auto_headers: Optional[Iterable[str]] = None, 958s auth: Optional[BasicAuth] = None, 958s allow_redirects: bool = True, 958s max_redirects: int = 10, 958s compress: Union[str, bool, None] = None, 958s chunked: Optional[bool] = None, 958s expect100: bool = False, 958s raise_for_status: Union[ 958s None, bool, Callable[[ClientResponse], Awaitable[None]] 958s ] = None, 958s read_until_eof: bool = True, 958s proxy: Optional[StrOrURL] = None, 958s proxy_auth: Optional[BasicAuth] = None, 958s timeout: Union[ClientTimeout, _SENTINEL] = sentinel, 958s verify_ssl: Optional[bool] = None, 958s fingerprint: Optional[bytes] = None, 958s ssl_context: Optional[SSLContext] = None, 958s ssl: Union[SSLContext, bool, Fingerprint] = True, 958s server_hostname: Optional[str] = None, 958s proxy_headers: Optional[LooseHeaders] = None, 958s trace_request_ctx: Optional[Mapping[str, Any]] = None, 958s read_bufsize: Optional[int] = None, 958s auto_decompress: Optional[bool] = None, 958s max_line_size: Optional[int] = None, 958s max_field_size: Optional[int] = None, 958s ) -> ClientResponse: 958s 958s # NOTE: timeout clamps existing connect and read timeouts. We cannot 958s # set the default to None because we need to detect if the user wants 958s # to use the existing timeouts by setting timeout to None. 958s 958s if self.closed: 958s raise RuntimeError("Session is closed") 958s 958s ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint) 958s 958s if data is not None and json is not None: 958s raise ValueError( 958s "data and json parameters can not be used at the same time" 958s ) 958s elif json is not None: 958s data = payload.JsonPayload(json, dumps=self._json_serialize) 958s 958s if not isinstance(chunked, bool) and chunked is not None: 958s warnings.warn("Chunk size is deprecated #1615", DeprecationWarning) 958s 958s redirects = 0 958s history: List[ClientResponse] = [] 958s version = self._version 958s params = params or {} 958s 958s # Merge with default headers and transform to CIMultiDict 958s headers = self._prepare_headers(headers) 958s 958s try: 958s url = self._build_url(str_or_url) 958s except ValueError as e: 958s raise InvalidUrlClientError(str_or_url) from e 958s 958s assert self._connector is not None 958s if url.scheme not in self._connector.allowed_protocol_schema_set: 958s raise NonHttpUrlClientError(url) 958s 958s skip_headers = set(self._skip_auto_headers) 958s if skip_auto_headers is not None: 958s for i in skip_auto_headers: 958s skip_headers.add(istr(i)) 958s 958s if proxy is None: 958s proxy_headers = None 958s else: 958s proxy_headers = self._prepare_headers(proxy_headers) 958s try: 958s proxy = URL(proxy) 958s except ValueError as e: 958s raise InvalidURL(proxy) from e 958s 958s if timeout is sentinel: 958s real_timeout: ClientTimeout = self._timeout 958s else: 958s if not isinstance(timeout, ClientTimeout): 958s real_timeout = ClientTimeout(total=timeout) 958s else: 958s real_timeout = timeout 958s # timeout is cumulative for all request operations 958s # (request, redirects, responses, data consuming) 958s tm = TimeoutHandle( 958s self._loop, real_timeout.total, ceil_threshold=real_timeout.ceil_threshold 958s ) 958s handle = tm.start() 958s 958s if read_bufsize is None: 958s read_bufsize = self._read_bufsize 958s 958s if auto_decompress is None: 958s auto_decompress = self._auto_decompress 958s 958s if max_line_size is None: 958s max_line_size = self._max_line_size 958s 958s if max_field_size is None: 958s max_field_size = self._max_field_size 958s 958s traces = [ 958s Trace( 958s self, 958s trace_config, 958s trace_config.trace_config_ctx(trace_request_ctx=trace_request_ctx), 958s ) 958s for trace_config in self._trace_configs 958s ] 958s 958s for trace in traces: 958s await trace.send_request_start(method, url.update_query(params), headers) 958s 958s timer = tm.timer() 958s try: 958s with timer: 958s # https://www.rfc-editor.org/rfc/rfc9112.html#name-retrying-requests 958s retry_persistent_connection = method in IDEMPOTENT_METHODS 958s while True: 958s url, auth_from_url = strip_auth_from_url(url) 958s if not url.raw_host: 958s # NOTE: Bail early, otherwise, causes `InvalidURL` through 958s # NOTE: `self._request_class()` below. 958s err_exc_cls = ( 958s InvalidUrlRedirectClientError 958s if redirects 958s else InvalidUrlClientError 958s ) 958s raise err_exc_cls(url) 958s # If `auth` was passed for an already authenticated URL, 958s # disallow only if this is the initial URL; this is to avoid issues 958s # with sketchy redirects that are not the caller's responsibility 958s if not history and (auth and auth_from_url): 958s raise ValueError( 958s "Cannot combine AUTH argument with " 958s "credentials encoded in URL" 958s ) 958s 958s # Override the auth with the one from the URL only if we 958s # have no auth, or if we got an auth from a redirect URL 958s if auth is None or (history and auth_from_url is not None): 958s auth = auth_from_url 958s if auth is None: 958s auth = self._default_auth 958s # It would be confusing if we support explicit 958s # Authorization header with auth argument 958s if ( 958s headers is not None 958s and auth is not None 958s and hdrs.AUTHORIZATION in headers 958s ): 958s raise ValueError( 958s "Cannot combine AUTHORIZATION header " 958s "with AUTH argument or credentials " 958s "encoded in URL" 958s ) 958s 958s all_cookies = self._cookie_jar.filter_cookies(url) 958s 958s if cookies is not None: 958s tmp_cookie_jar = CookieJar() 958s tmp_cookie_jar.update_cookies(cookies) 958s req_cookies = tmp_cookie_jar.filter_cookies(url) 958s if req_cookies: 958s all_cookies.load(req_cookies) 958s 958s if proxy is not None: 958s proxy = URL(proxy) 958s elif self._trust_env: 958s with suppress(LookupError): 958s proxy, proxy_auth = get_env_proxy_for_url(url) 958s 958s req = self._request_class( 958s method, 958s url, 958s params=params, 958s headers=headers, 958s skip_auto_headers=skip_headers if skip_headers else None, 958s data=data, 958s cookies=all_cookies, 958s auth=auth, 958s version=version, 958s compress=compress, 958s chunked=chunked, 958s expect100=expect100, 958s loop=self._loop, 958s response_class=self._response_class, 958s proxy=proxy, 958s proxy_auth=proxy_auth, 958s timer=timer, 958s session=self, 958s ssl=ssl if ssl is not None else True, 958s server_hostname=server_hostname, 958s proxy_headers=proxy_headers, 958s traces=traces, 958s trust_env=self.trust_env, 958s ) 958s 958s # connection timeout 958s try: 958s conn = await self._connector.connect( 958s req, traces=traces, timeout=real_timeout 958s ) 958s except asyncio.TimeoutError as exc: 958s > raise ConnectionTimeoutError( 958s f"Connection timeout to host {url}" 958s ) from exc 958s E aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://media.githubusercontent.com/media/cBioPortal/datahub/55cd360/public/acc_2019/data_gene_panel_matrix.txt 958s 958s /usr/lib/python3/dist-packages/aiohttp/client.py:667: ConnectionTimeoutError 958s 958s The above exception was the direct cause of the following exception: 958s 958s def test_github_open_lfs_file(): 958s # test opening a git-lfs tracked file 958s > with fsspec.open( 958s "github://cBioPortal:datahub@55cd360" 958s "/public/acc_2019/data_gene_panel_matrix.txt", 958s block_size=0, 958s ) as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_github.py:24: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/core.py:105: in __enter__ 958s f = self.fs.open(self.path, mode=mode) 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/github.py:261: in _open 958s return self.http_fs.open( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:366: in _open 958s size = size or info.update(self.info(path, **kwargs)) or info["size"] 958s /usr/lib/python3/dist-packages/fsspec/asyn.py:118: in wrapper 958s return sync(self.loop, func, *args, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/asyn.py:103: in sync 958s raise return_result 958s /usr/lib/python3/dist-packages/fsspec/asyn.py:56: in _runner 958s result[0] = await coro 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'https://media.githubusercontent.com/media/cBioPortal/datahub/55cd360/public/acc_2019/data_gene_panel_matrix.txt' 958s kwargs = {}, info = {} 958s session = , policy = 'get' 958s 958s async def _info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s session = await self.set_session() 958s 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s await _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: https://media.githubusercontent.com/media/cBioPortal/datahub/55cd360/public/acc_2019/data_gene_panel_matrix.txt 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http.py:440: FileNotFoundError 958s __________________________________ test_list ___________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_list(server, sync): 958s h = fsspec.filesystem("http") 958s > out = h.glob(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:23: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _______________________________ test_list_cache ________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_list_cache(server, sync): 958s h = fsspec.filesystem("http", use_listings_cache=True) 958s > out = h.glob(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:35: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s ___________________ test_list_cache_with_expiry_time_cached ____________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_list_cache_with_expiry_time_cached(server, sync): 958s h = fsspec.filesystem("http", use_listings_cache=True, listings_expiry_time=30) 958s 958s # First, the directory cache is not initialized. 958s assert not h.dircache 958s 958s # By querying the filesystem with "use_listings_cache=True", 958s # the cache will automatically get populated. 958s > out = h.glob(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:47: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s ___________________ test_list_cache_with_expiry_time_purged ____________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_list_cache_with_expiry_time_purged(server, sync): 958s h = fsspec.filesystem("http", use_listings_cache=True, listings_expiry_time=0.3) 958s 958s # First, the directory cache is not initialized. 958s assert not h.dircache 958s 958s # By querying the filesystem with "use_listings_cache=True", 958s # the cache will automatically get populated. 958s > out = h.glob(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:65: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s ____________________________ test_list_cache_reuse _____________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_list_cache_reuse(server, sync): 958s h = fsspec.filesystem("http", use_listings_cache=True, listings_expiry_time=5) 958s 958s # First, the directory cache is not initialized. 958s assert not h.dircache 958s 958s # By querying the filesystem with "use_listings_cache=True", 958s # the cache will automatically get populated. 958s > out = h.glob(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:96: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _________________________ test_ls_raises_filenotfound __________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_ls_raises_filenotfound(server, sync): 958s h = fsspec.filesystem("http") 958s 958s with pytest.raises(FileNotFoundError): 958s > h.ls(server.address + "/not-a-key") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:121: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/not-a-key 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s ________________________ test_list_cache_with_max_paths ________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_list_cache_with_max_paths(server, sync): 958s h = fsspec.filesystem("http", use_listings_cache=True, max_paths=5) 958s > out = h.glob(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:126: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s ___________________ test_list_cache_with_skip_instance_cache ___________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_list_cache_with_skip_instance_cache(server, sync): 958s h = fsspec.filesystem("http", use_listings_cache=True, skip_instance_cache=True) 958s > out = h.glob(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:132: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s __________________________________ test_isdir __________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_isdir(server, sync): 958s h = fsspec.filesystem("http") 958s > assert h.isdir(server.address + "/index/") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:138: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _________________________________ test_exists __________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_exists(server, sync): 958s h = fsspec.filesystem("http") 958s assert not h.exists(server.address + "/notafile") 958s with pytest.raises(FileNotFoundError): 958s > h.cat(server.address + "/notafile") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:147: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:884: in cat 958s return self.cat_file(paths[0], **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:369: in cat_file 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/notafile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s __________________________________ test_read ___________________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_read(server, sync): 958s h = fsspec.filesystem("http") 958s out = server.address + "/index/realfile" 958s # with h.open(out, "rb") as f: 958s # assert f.read() == data 958s # with h.open(out, "rb", block_size=0) as f: 958s # assert f.read() == data 958s > with h.open(out, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:157: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________________ test_methods _________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_methods(server, sync): 958s h = fsspec.filesystem("http") 958s url = server.address + "/index/realfile" 958s > assert h.exists(url) 958s E AssertionError: assert False 958s E + where False = exists('http://127.0.0.1:34153/index/realfile') 958s E + where exists = .exists 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:166: AssertionError 958s _________________________ test_random_access[headers0] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers1] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_length': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers2] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_length': 'true', 'head_ok': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers3] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_range': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers4] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_length': 'true', 'head_not_auth': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers5] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_range': 'true', 'head_not_auth': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers6] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'head_give_length': 'true', 'head_ok': 'true', 'use_206': 'true'} 958s sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers7] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_length': 'true', 'use_206': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _________________________ test_random_access[headers8] _________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_range': 'true', 'use_206': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {}, 958s {"give_length": "true"}, 958s {"give_length": "true", "head_ok": "true"}, 958s {"give_range": "true"}, 958s {"give_length": "true", "head_not_auth": "true"}, 958s {"give_range": "true", "head_not_auth": "true"}, 958s {"use_206": "true", "head_ok": "true", "head_give_length": "true"}, 958s {"use_206": "true", "give_length": "true"}, 958s {"use_206": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_random_access(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:187: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _______________________ test_no_range_support[headers0] ________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_length': 'true', 'head_ok': 'true', 'ignore_range': 'true'} 958s sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {"ignore_range": "true", "head_ok": "true", "give_length": "true"}, 958s {"ignore_range": "true", "give_length": "true"}, 958s {"ignore_range": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_no_range_support(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:212: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _______________________ test_no_range_support[headers1] ________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_length': 'true', 'ignore_range': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {"ignore_range": "true", "head_ok": "true", "give_length": "true"}, 958s {"ignore_range": "true", "give_length": "true"}, 958s {"ignore_range": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_no_range_support(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:212: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _______________________ test_no_range_support[headers2] ________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s headers = {'give_range': 'true', 'ignore_range': 'true'}, sync = None 958s 958s @pytest.mark.parametrize( 958s "headers", 958s [ 958s {"ignore_range": "true", "head_ok": "true", "give_length": "true"}, 958s {"ignore_range": "true", "give_length": "true"}, 958s {"ignore_range": "true", "give_range": "true"}, 958s ], 958s ) 958s def test_no_range_support(server, headers, sync): 958s h = fsspec.filesystem("http", headers=headers) 958s url = server.address + "/index/realfile" 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:212: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _______________________________ test_mapper_url ________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_mapper_url(server, sync): 958s h = fsspec.filesystem("http") 958s mapper = h.get_mapper(server.address + "/index/") 958s assert mapper.root.startswith("http:") 958s > assert list(mapper) 958s E assert [] 958s E + where [] = list() 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:227: AssertionError 958s ___________________________ test_content_length_zero ___________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_content_length_zero(server, sync): 958s h = fsspec.filesystem( 958s "http", headers={"give_length": "true", "zero_length": "true"} 958s ) 958s url = server.address + "/index/realfile" 958s 958s > with h.open(url, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:240: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s ________________________________ test_download _________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s tmpdir = local('/tmp/pytest-of-root/pytest-1/test_download1'), sync = None 958s 958s def test_download(server, tmpdir, sync): 958s h = fsspec.filesystem("http", headers={"give_length": "true", "head_ok": "true "}) 958s url = server.address + "/index/realfile" 958s fn = os.path.join(tmpdir, "afile") 958s > h.get(url, fn) 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:248: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:950: in get 958s rpaths = [p for p in rpaths if not (trailing_sep(p) or self.isdir(p))] 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _____________________________ test_multi_download ______________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s tmpdir = local('/tmp/pytest-of-root/pytest-1/test_multi_download1'), sync = None 958s 958s def test_multi_download(server, tmpdir, sync): 958s h = fsspec.filesystem("http", headers={"give_length": "true", "head_ok": "true "}) 958s urla = server.address + "/index/realfile" 958s urlb = server.address + "/index/otherfile" 958s fna = os.path.join(tmpdir, "afile") 958s fnb = os.path.join(tmpdir, "bfile") 958s > h.get([urla, urlb], [fna, fnb]) 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:258: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:976: in get 958s self.get_file(rpath, lpath, callback=child, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:388: in get_file 958s self._raise_not_found_for_status(r, rpath) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s ___________________________________ test_ls ____________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_ls(server, sync): 958s h = fsspec.filesystem("http") 958s > l = h.ls(server.address + "/data/20020401/", detail=False) 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:265: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/data/20020401/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s __________________________________ test_mcat ___________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_mcat(server, sync): 958s h = fsspec.filesystem("http", headers={"give_length": "true", "head_ok": "true "}) 958s urla = server.address + "/index/realfile" 958s urlb = server.address + "/index/otherfile" 958s > out = h.cat([urla, urlb]) 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:277: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:876: in cat 958s out[path] = self.cat_file(path, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:369: in cat_file 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/otherfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _____________________________ test_cat_file_range ______________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_cat_file_range(server, sync): 958s h = fsspec.filesystem("http", headers={"give_length": "true", "head_ok": "true "}) 958s urla = server.address + "/index/realfile" 958s > assert h.cat(urla, start=1, end=10) == data[1:10] 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:284: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:884: in cat 958s return self.cat_file(paths[0], **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:369: in cat_file 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _______________________________ test_mcat_expand _______________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_mcat_expand(server, sync): 958s h = fsspec.filesystem("http", headers={"give_length": "true", "head_ok": "true "}) 958s > out = h.cat(server.address + "/index/*") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:302: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:867: in cat 958s paths = self.expand_path(path, recursive=recursive) 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1147: in expand_path 958s out = self.expand_path([path], recursive, maxdepth) 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1153: in expand_path 958s bit = set(self.glob(p, maxdepth=maxdepth, **kwargs)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:609: in glob 958s allpaths = self.find( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:499: in find 958s if withdirs and path != "" and self.isdir(path): 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:650: in isdir 958s return bool(self.ls(path)) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:344: in ls 958s out = self._ls_real(url, detail=detail, **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:300: in _ls_real 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/ 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s __________________________________ test_info ___________________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_info(server, sync): 958s fs = fsspec.filesystem("http", headers={"give_etag": "true", "head_ok": "true"}) 958s > info = fs.info(server.address + "/index/realfile") 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:308: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s _____________________________ test_put_file[POST] ______________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s tmp_path = PosixPath('/tmp/pytest-of-root/pytest-1/test_put_file_POST_1') 958s method = 'POST', reset_files = None, sync = None 958s 958s @pytest.mark.parametrize("method", ["POST", "PUT"]) 958s def test_put_file(server, tmp_path, method, reset_files, sync): 958s src_file = tmp_path / "file_1" 958s src_file.write_bytes(data) 958s 958s dwl_file = tmp_path / "down_1" 958s 958s fs = fsspec.filesystem("http", headers={"head_ok": "true", "give_length": "true"}) 958s with pytest.raises(FileNotFoundError): 958s fs.info(server.address + "/hey") 958s 958s > fs.put_file(src_file, server.address + "/hey", method=method) 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:323: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:438: in put_file 958s self._raise_not_found_for_status(resp, rpath) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/hey 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s ______________________________ test_put_file[PUT] ______________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s tmp_path = PosixPath('/tmp/pytest-of-root/pytest-1/test_put_file_PUT_1') 958s method = 'PUT', reset_files = None, sync = None 958s 958s @pytest.mark.parametrize("method", ["POST", "PUT"]) 958s def test_put_file(server, tmp_path, method, reset_files, sync): 958s src_file = tmp_path / "file_1" 958s src_file.write_bytes(data) 958s 958s dwl_file = tmp_path / "down_1" 958s 958s fs = fsspec.filesystem("http", headers={"head_ok": "true", "give_length": "true"}) 958s with pytest.raises(FileNotFoundError): 958s fs.info(server.address + "/hey") 958s 958s > fs.put_file(src_file, server.address + "/hey", method=method) 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:323: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:438: in put_file 958s self._raise_not_found_for_status(resp, rpath) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/hey 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _________________________________ test_encoded _________________________________ 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_encoded(server, sync): 958s fs = fsspec.filesystem("http", encoded=False) 958s > out = fs.cat(server.address + "/Hello: Günter", headers={"give_path": "true"}) 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:340: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/spec.py:884: in cat 958s return self.cat_file(paths[0], **kwargs) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:369: in cat_file 958s self._raise_not_found_for_status(r, url) 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:354: in _raise_not_found_for_status 958s response.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/Hello:%20G%C3%BCnter 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s _______________________________ test_with_cache ________________________________ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s > _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:549: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:894: in _file_info 958s r.raise_for_status() 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s 958s def raise_for_status(self): 958s """Raises :class:`HTTPError`, if one occurred.""" 958s 958s http_error_msg = "" 958s if isinstance(self.reason, bytes): 958s # We attempt to decode utf-8 first because some servers 958s # choose to localize their reason strings. If the string 958s # isn't utf-8, we fall back to iso-8859-1 for all other 958s # encodings. (See PR #3538) 958s try: 958s reason = self.reason.decode("utf-8") 958s except UnicodeDecodeError: 958s reason = self.reason.decode("iso-8859-1") 958s else: 958s reason = self.reason 958s 958s if 400 <= self.status_code < 500: 958s http_error_msg = ( 958s f"{self.status_code} Client Error: {reason} for url: {self.url}" 958s ) 958s 958s elif 500 <= self.status_code < 600: 958s http_error_msg = ( 958s f"{self.status_code} Server Error: {reason} for url: {self.url}" 958s ) 958s 958s if http_error_msg: 958s > raise HTTPError(http_error_msg, response=self) 958s E requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/requests/models.py:1024: HTTPError 958s 958s The above exception was the direct cause of the following exception: 958s 958s server = namespace(address='http://127.0.0.1:34153', realfile='http://127.0.0.1:34153/index/realfile') 958s sync = None 958s 958s def test_with_cache(server, sync): 958s fs = fsspec.filesystem("http", headers={"head_ok": "true", "give_length": "true"}) 958s fn = server.address + "/index/realfile" 958s fs1 = fsspec.filesystem("blockcache", fs=fs) 958s > with fs1.open(fn, "rb") as f: 958s 958s /tmp/autopkgtest.Yc84zM/autopkgtest_tmp/implementations_tests/test_http_sync.py:348: 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s /usr/lib/python3/dist-packages/fsspec/implementations/cached.py:458: in 958s return lambda *args, **kw: getattr(type(self), item).__get__(self)( 958s /usr/lib/python3/dist-packages/fsspec/spec.py:1310: in open 958s f = self._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/cached.py:458: in 958s return lambda *args, **kw: getattr(type(self), item).__get__(self)( 958s /usr/lib/python3/dist-packages/fsspec/implementations/cached.py:340: in _open 958s f = self.fs._open( 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:509: in _open 958s size = size or self.info(path, **kwargs)["size"] 958s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 958s 958s self = 958s url = 'http://127.0.0.1:34153/index/realfile', kwargs = {}, info = {} 958s policy = 'get' 958s 958s def info(self, url, **kwargs): 958s """Get info of URL 958s 958s Tries to access location via HEAD, and then GET methods, but does 958s not fetch the data. 958s 958s It is possible that the server does not supply any size information, in 958s which case size will be given as None (and certain operations on the 958s corresponding file will not work). 958s """ 958s info = {} 958s for policy in ["head", "get"]: 958s try: 958s info.update( 958s _file_info( 958s self.encode_url(url), 958s size_policy=policy, 958s session=self.session, 958s **self.kwargs, 958s **kwargs, 958s ) 958s ) 958s if info.get("size") is not None: 958s break 958s except Exception as exc: 958s if policy == "get": 958s # If get failed, then raise a FileNotFoundError 958s > raise FileNotFoundError(url) from exc 958s E FileNotFoundError: http://127.0.0.1:34153/index/realfile 958s 958s /usr/lib/python3/dist-packages/fsspec/implementations/http_sync.py:562: FileNotFoundError 958s =========================== short test summary info ============================ 958s FAILED implementations_tests/test_github.py::test_github_open_large_file - Fi... 958s FAILED implementations_tests/test_github.py::test_github_open_lfs_file - File... 958s FAILED implementations_tests/test_http_sync.py::test_list - requests.exceptio... 958s FAILED implementations_tests/test_http_sync.py::test_list_cache - requests.ex... 958s FAILED implementations_tests/test_http_sync.py::test_list_cache_with_expiry_time_cached 958s FAILED implementations_tests/test_http_sync.py::test_list_cache_with_expiry_time_purged 958s FAILED implementations_tests/test_http_sync.py::test_list_cache_reuse - reque... 958s FAILED implementations_tests/test_http_sync.py::test_ls_raises_filenotfound 958s FAILED implementations_tests/test_http_sync.py::test_list_cache_with_max_paths 958s FAILED implementations_tests/test_http_sync.py::test_list_cache_with_skip_instance_cache 958s FAILED implementations_tests/test_http_sync.py::test_isdir - requests.excepti... 958s FAILED implementations_tests/test_http_sync.py::test_exists - requests.except... 958s FAILED implementations_tests/test_http_sync.py::test_read - FileNotFoundError... 958s FAILED implementations_tests/test_http_sync.py::test_methods - AssertionError... 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers0] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers1] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers2] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers3] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers4] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers5] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers6] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers7] 958s FAILED implementations_tests/test_http_sync.py::test_random_access[headers8] 958s FAILED implementations_tests/test_http_sync.py::test_no_range_support[headers0] 958s FAILED implementations_tests/test_http_sync.py::test_no_range_support[headers1] 958s FAILED implementations_tests/test_http_sync.py::test_no_range_support[headers2] 958s FAILED implementations_tests/test_http_sync.py::test_mapper_url - assert [] 958s FAILED implementations_tests/test_http_sync.py::test_content_length_zero - Fi... 958s FAILED implementations_tests/test_http_sync.py::test_download - requests.exce... 958s FAILED implementations_tests/test_http_sync.py::test_multi_download - request... 958s FAILED implementations_tests/test_http_sync.py::test_ls - requests.exceptions... 958s FAILED implementations_tests/test_http_sync.py::test_mcat - requests.exceptio... 958s FAILED implementations_tests/test_http_sync.py::test_cat_file_range - request... 958s FAILED implementations_tests/test_http_sync.py::test_mcat_expand - requests.e... 958s FAILED implementations_tests/test_http_sync.py::test_info - FileNotFoundError... 958s FAILED implementations_tests/test_http_sync.py::test_put_file[POST] - request... 958s FAILED implementations_tests/test_http_sync.py::test_put_file[PUT] - requests... 958s FAILED implementations_tests/test_http_sync.py::test_encoded - requests.excep... 958s FAILED implementations_tests/test_http_sync.py::test_with_cache - FileNotFoun... 958s ==== 39 failed, 855 passed, 115 skipped, 3 deselected in 598.25s (0:09:58) ===== 960s autopkgtest [12:01:18]: test fsspec-tests: -----------------------] 960s autopkgtest [12:01:18]: test fsspec-tests: - - - - - - - - - - results - - - - - - - - - - 960s fsspec-tests FAIL non-zero exit status 1 960s autopkgtest [12:01:18]: @@@@@@@@@@@@@@@@@@@@ summary 960s fsspec-tests FAIL non-zero exit status 1 964s nova [W] Using flock in prodstack7-s390x 964s Creating nova instance adt-questing-s390x-fsspec-20250506-114518-juju-7f2275-prod-proposed-migration-environment-2-7aa5ceb2-9cc6-4d4b-bcbc-87e4a81846a4 from image adt/ubuntu-questing-s390x-server-20250506.img (UUID fef1f145-d219-47e4-a2ed-77b44eac0376)... 964s nova [W] Timed out waiting for 2764dd19-21c2-4083-8f85-57dc8214d26e to get deleted.