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