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