0s autopkgtest [08:55:55]: starting date and time: 2024-11-13 08:55:55+0000 0s autopkgtest [08:55:55]: git checkout: 6f3be7a8 Fix armhf LXD image generation for plucky 0s autopkgtest [08:55:55]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.ksbgbdqc/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults,src:python3-stdlib-extensions --apt-upgrade meteofrance-api --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=python3-defaults/3.12.7-1 python3-stdlib-extensions/3.12.7-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor builder-cpu2-ram4-disk20 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-4.secgroup --name adt-plucky-amd64-meteofrance-api-20241113-085555-juju-7f2275-prod-proposed-migration-environment-20-358e25bc-a5d9-4a12-b868-4722aa657cc4 --image adt/ubuntu-plucky-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration-amd64 -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 178s autopkgtest [08:58:53]: testbed dpkg architecture: amd64 178s autopkgtest [08:58:53]: testbed apt version: 2.9.8 178s autopkgtest [08:58:53]: @@@@@@@@@@@@@@@@@@@@ test bed setup 179s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 179s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.3 kB] 179s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [7016 B] 179s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [76.4 kB] 179s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [849 kB] 180s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main i386 Packages [65.2 kB] 180s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 Packages [111 kB] 180s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/restricted amd64 Packages [32.6 kB] 180s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/universe i386 Packages [255 kB] 180s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 Packages [637 kB] 180s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 Packages [37.7 kB] 180s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse i386 Packages [13.0 kB] 180s Fetched 2173 kB in 1s (2506 kB/s) 180s Reading package lists... 182s Reading package lists... 182s Building dependency tree... 182s Reading state information... 183s Calculating upgrade... 183s The following NEW packages will be installed: 183s python3.13-gdbm 183s The following packages will be upgraded: 183s libgpgme11t64 libpython3-stdlib python3 python3-gdbm python3-minimal 183s 5 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 183s Need to get 253 kB of archives. 183s After this operation, 147 kB of additional disk space will be used. 183s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 python3-minimal amd64 3.12.7-1 [27.4 kB] 183s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 python3 amd64 3.12.7-1 [24.0 kB] 183s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libpython3-stdlib amd64 3.12.7-1 [10.0 kB] 183s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-gdbm amd64 3.13.0-2 [31.3 kB] 183s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 python3-gdbm amd64 3.12.7-1 [8642 B] 183s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 libgpgme11t64 amd64 1.23.2-5ubuntu4 [152 kB] 183s Fetched 253 kB in 0s (618 kB/s) 184s (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 ... 75541 files and directories currently installed.) 184s Preparing to unpack .../python3-minimal_3.12.7-1_amd64.deb ... 184s Unpacking python3-minimal (3.12.7-1) over (3.12.6-0ubuntu1) ... 184s Setting up python3-minimal (3.12.7-1) ... 184s (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 ... 75541 files and directories currently installed.) 184s Preparing to unpack .../python3_3.12.7-1_amd64.deb ... 184s Unpacking python3 (3.12.7-1) over (3.12.6-0ubuntu1) ... 184s Preparing to unpack .../libpython3-stdlib_3.12.7-1_amd64.deb ... 184s Unpacking libpython3-stdlib:amd64 (3.12.7-1) over (3.12.6-0ubuntu1) ... 184s Selecting previously unselected package python3.13-gdbm. 184s Preparing to unpack .../python3.13-gdbm_3.13.0-2_amd64.deb ... 184s Unpacking python3.13-gdbm (3.13.0-2) ... 184s Preparing to unpack .../python3-gdbm_3.12.7-1_amd64.deb ... 184s Unpacking python3-gdbm:amd64 (3.12.7-1) over (3.12.6-1ubuntu1) ... 184s Preparing to unpack .../libgpgme11t64_1.23.2-5ubuntu4_amd64.deb ... 184s Unpacking libgpgme11t64:amd64 (1.23.2-5ubuntu4) over (1.18.0-4.1ubuntu4) ... 184s Setting up libgpgme11t64:amd64 (1.23.2-5ubuntu4) ... 184s Setting up python3.13-gdbm (3.13.0-2) ... 184s Setting up libpython3-stdlib:amd64 (3.12.7-1) ... 184s Setting up python3 (3.12.7-1) ... 184s Setting up python3-gdbm:amd64 (3.12.7-1) ... 184s Processing triggers for man-db (2.12.1-3) ... 185s Processing triggers for libc-bin (2.40-1ubuntu3) ... 185s Reading package lists... 185s Building dependency tree... 185s Reading state information... 185s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 186s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 186s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 186s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 186s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 187s Reading package lists... 187s Reading package lists... 187s Building dependency tree... 187s Reading state information... 187s Calculating upgrade... 187s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 187s Reading package lists... 187s Building dependency tree... 187s Reading state information... 188s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 191s autopkgtest [08:59:06]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 16 13:41:20 UTC 2024 191s autopkgtest [08:59:06]: @@@@@@@@@@@@@@@@@@@@ apt-source meteofrance-api 193s Get:1 http://ftpmaster.internal/ubuntu plucky/universe meteofrance-api 1.3.0-2 (dsc) [2261 B] 193s Get:2 http://ftpmaster.internal/ubuntu plucky/universe meteofrance-api 1.3.0-2 (tar) [64.0 kB] 193s Get:3 http://ftpmaster.internal/ubuntu plucky/universe meteofrance-api 1.3.0-2 (diff) [2528 B] 193s gpgv: Signature made Wed Jul 31 03:29:27 2024 UTC 193s gpgv: using RSA key FB8ACFA78C726089C38AD0269605A1098C63B92A 193s gpgv: Can't check signature: No public key 193s dpkg-source: warning: cannot verify inline signature for ./meteofrance-api_1.3.0-2.dsc: no acceptable signature found 193s autopkgtest [08:59:08]: testing package meteofrance-api version 1.3.0-2 193s autopkgtest [08:59:08]: build not needed 193s autopkgtest [08:59:08]: test run-tests: preparing testbed 199s Reading package lists... 199s Building dependency tree... 199s Reading state information... 199s Starting pkgProblemResolver with broken count: 0 199s Starting 2 pkgProblemResolver with broken count: 0 199s Done 199s The following additional packages will be installed: 199s libpython3.13-minimal libpython3.13-stdlib python3-all python3-iniconfig 199s python3-meteofrance-api python3-packaging python3-pluggy python3-pytest 199s python3-requests-mock python3-tz python3.13 python3.13-minimal 199s Suggested packages: 199s python3.13-venv python3.13-doc binfmt-support 199s The following NEW packages will be installed: 199s autopkgtest-satdep libpython3.13-minimal libpython3.13-stdlib python3-all 199s python3-iniconfig python3-meteofrance-api python3-packaging python3-pluggy 199s python3-pytest python3-requests-mock python3-tz python3.13 199s python3.13-minimal 199s 0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded. 199s Need to get 6282 kB/6283 kB of archives. 199s After this operation, 24.3 MB of additional disk space will be used. 199s Get:1 /tmp/autopkgtest.dJOB4h/1-autopkgtest-satdep.deb autopkgtest-satdep amd64 0 [740 B] 200s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-minimal amd64 3.13.0-2 [879 kB] 200s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-minimal amd64 3.13.0-2 [2188 kB] 201s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-stdlib amd64 3.13.0-2 [2107 kB] 201s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13 amd64 3.13.0-2 [719 kB] 201s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 python3-all amd64 3.12.7-1 [890 B] 201s Get:7 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-iniconfig all 1.1.1-2 [6024 B] 201s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-tz all 2024.1-2 [31.4 kB] 201s Get:9 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-meteofrance-api all 1.3.0-2 [19.7 kB] 201s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-packaging all 24.1-1 [41.4 kB] 201s Get:11 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pluggy all 1.5.0-1 [21.0 kB] 201s Get:12 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pytest all 8.3.3-1 [251 kB] 201s Get:13 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-requests-mock all 1.12.1-2 [17.8 kB] 201s Fetched 6282 kB in 1s (6966 kB/s) 201s Selecting previously unselected package libpython3.13-minimal:amd64. 201s (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 ... 75548 files and directories currently installed.) 201s Preparing to unpack .../00-libpython3.13-minimal_3.13.0-2_amd64.deb ... 201s Unpacking libpython3.13-minimal:amd64 (3.13.0-2) ... 201s Selecting previously unselected package python3.13-minimal. 201s Preparing to unpack .../01-python3.13-minimal_3.13.0-2_amd64.deb ... 201s Unpacking python3.13-minimal (3.13.0-2) ... 201s Selecting previously unselected package libpython3.13-stdlib:amd64. 201s Preparing to unpack .../02-libpython3.13-stdlib_3.13.0-2_amd64.deb ... 201s Unpacking libpython3.13-stdlib:amd64 (3.13.0-2) ... 201s Selecting previously unselected package python3.13. 201s Preparing to unpack .../03-python3.13_3.13.0-2_amd64.deb ... 201s Unpacking python3.13 (3.13.0-2) ... 201s Selecting previously unselected package python3-all. 201s Preparing to unpack .../04-python3-all_3.12.7-1_amd64.deb ... 201s Unpacking python3-all (3.12.7-1) ... 201s Selecting previously unselected package python3-iniconfig. 201s Preparing to unpack .../05-python3-iniconfig_1.1.1-2_all.deb ... 201s Unpacking python3-iniconfig (1.1.1-2) ... 201s Selecting previously unselected package python3-tz. 201s Preparing to unpack .../06-python3-tz_2024.1-2_all.deb ... 201s Unpacking python3-tz (2024.1-2) ... 201s Selecting previously unselected package python3-meteofrance-api. 201s Preparing to unpack .../07-python3-meteofrance-api_1.3.0-2_all.deb ... 201s Unpacking python3-meteofrance-api (1.3.0-2) ... 201s Selecting previously unselected package python3-packaging. 201s Preparing to unpack .../08-python3-packaging_24.1-1_all.deb ... 201s Unpacking python3-packaging (24.1-1) ... 201s Selecting previously unselected package python3-pluggy. 201s Preparing to unpack .../09-python3-pluggy_1.5.0-1_all.deb ... 201s Unpacking python3-pluggy (1.5.0-1) ... 201s Selecting previously unselected package python3-pytest. 201s Preparing to unpack .../10-python3-pytest_8.3.3-1_all.deb ... 201s Unpacking python3-pytest (8.3.3-1) ... 201s Selecting previously unselected package python3-requests-mock. 201s Preparing to unpack .../11-python3-requests-mock_1.12.1-2_all.deb ... 201s Unpacking python3-requests-mock (1.12.1-2) ... 201s Selecting previously unselected package autopkgtest-satdep. 201s Preparing to unpack .../12-1-autopkgtest-satdep.deb ... 201s Unpacking autopkgtest-satdep (0) ... 201s Setting up python3-iniconfig (1.1.1-2) ... 201s Setting up python3-tz (2024.1-2) ... 201s Setting up libpython3.13-minimal:amd64 (3.13.0-2) ... 201s Setting up python3-packaging (24.1-1) ... 202s Setting up python3-requests-mock (1.12.1-2) ... 202s Setting up python3-pluggy (1.5.0-1) ... 202s Setting up python3.13-minimal (3.13.0-2) ... 202s Setting up libpython3.13-stdlib:amd64 (3.13.0-2) ... 202s Setting up python3-meteofrance-api (1.3.0-2) ... 203s Setting up python3.13 (3.13.0-2) ... 203s Setting up python3-pytest (8.3.3-1) ... 204s Setting up python3-all (3.12.7-1) ... 204s Setting up autopkgtest-satdep (0) ... 204s Processing triggers for man-db (2.12.1-3) ... 204s Processing triggers for systemd (256.5-2ubuntu4) ... 206s (Reading database ... 76520 files and directories currently installed.) 206s Removing autopkgtest-satdep (0) ... 207s autopkgtest [08:59:22]: test run-tests: [----------------------- 208s ============================= test session starts ============================== 208s platform linux -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.13 208s cachedir: .pytest_cache 208s rootdir: /tmp/autopkgtest.dJOB4h/autopkgtest_tmp 208s plugins: typeguard-4.4.1, requests_mock-1.12.1 208s collecting ... collected 49 items / 7 deselected / 42 selected 208s 208s tests/test_exception.py::test_meteofrance_exception PASSED [ 2%] 208s tests/test_forecast.py::test_forecast_france FAILED [ 4%] 208s 208s =================================== FAILURES =================================== 208s _____________________________ test_forecast_france _____________________________ 208s 208s self = 208s method = 'GET' 208s url = '/forecast?token=__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__&lat=48.8075&lon=2.24028&lang=fr' 208s body = None 208s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 208s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 208s redirect = False, assert_same_host = False 208s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 208s release_conn = False, chunked = False, body_pos = None, preload_content = False 208s decode_content = False, response_kw = {} 208s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/forecast', query='token=__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__&lat=48.8075&lon=2.24028&lang=fr', fragment=None) 208s destination_scheme = None, conn = None, release_this_conn = True 208s http_tunnel_required = True, err = None, clean_exit = False 208s 208s def urlopen( # type: ignore[override] 208s self, 208s method: str, 208s url: str, 208s body: _TYPE_BODY | None = None, 208s headers: typing.Mapping[str, str] | None = None, 208s retries: Retry | bool | int | None = None, 208s redirect: bool = True, 208s assert_same_host: bool = True, 208s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 208s pool_timeout: int | None = None, 208s release_conn: bool | None = None, 208s chunked: bool = False, 208s body_pos: _TYPE_BODY_POSITION | None = None, 208s preload_content: bool = True, 208s decode_content: bool = True, 208s **response_kw: typing.Any, 208s ) -> BaseHTTPResponse: 208s """ 208s Get a connection from the pool and perform an HTTP request. This is the 208s lowest level call for making a request, so you'll need to specify all 208s the raw details. 208s 208s .. note:: 208s 208s More commonly, it's appropriate to use a convenience method 208s such as :meth:`request`. 208s 208s .. note:: 208s 208s `release_conn` will only behave as expected if 208s `preload_content=False` because we want to make 208s `preload_content=False` the default behaviour someday soon without 208s breaking backwards compatibility. 208s 208s :param method: 208s HTTP request method (such as GET, POST, PUT, etc.) 208s 208s :param url: 208s The URL to perform the request on. 208s 208s :param body: 208s Data to send in the request body, either :class:`str`, :class:`bytes`, 208s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 208s 208s :param headers: 208s Dictionary of custom headers to send, such as User-Agent, 208s If-None-Match, etc. If None, pool headers are used. If provided, 208s these headers completely replace any pool-specific headers. 208s 208s :param retries: 208s Configure the number of retries to allow before raising a 208s :class:`~urllib3.exceptions.MaxRetryError` exception. 208s 208s Pass ``None`` to retry until you receive a response. Pass a 208s :class:`~urllib3.util.retry.Retry` object for fine-grained control 208s over different types of retries. 208s Pass an integer number to retry connection errors that many times, 208s but no other types of errors. Pass zero to never retry. 208s 208s If ``False``, then retries are disabled and any exception is raised 208s immediately. Also, instead of raising a MaxRetryError on redirects, 208s the redirect response will be returned. 208s 208s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 208s 208s :param redirect: 208s If True, automatically handle redirects (status codes 301, 302, 208s 303, 307, 308). Each redirect counts as a retry. Disabling retries 208s will disable redirect, too. 208s 208s :param assert_same_host: 208s If ``True``, will make sure that the host of the pool requests is 208s consistent else will raise HostChangedError. When ``False``, you can 208s use the pool on an HTTP proxy and request foreign hosts. 208s 208s :param timeout: 208s If specified, overrides the default timeout for this one 208s request. It may be a float (in seconds) or an instance of 208s :class:`urllib3.util.Timeout`. 208s 208s :param pool_timeout: 208s If set and the pool is set to block=True, then this method will 208s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 208s connection is available within the time period. 208s 208s :param bool preload_content: 208s If True, the response's body will be preloaded into memory. 208s 208s :param bool decode_content: 208s If True, will attempt to decode the body based on the 208s 'content-encoding' header. 208s 208s :param release_conn: 208s If False, then the urlopen call will not release the connection 208s back into the pool once a response is received (but will release if 208s you read the entire contents of the response such as when 208s `preload_content=True`). This is useful if you're not preloading 208s the response's content immediately. You will need to call 208s ``r.release_conn()`` on the response ``r`` to return the connection 208s back into the pool. If None, it takes the value of ``preload_content`` 208s which defaults to ``True``. 208s 208s :param bool chunked: 208s If True, urllib3 will send the body using chunked transfer 208s encoding. Otherwise, urllib3 will send the body using the standard 208s content-length form. Defaults to False. 208s 208s :param int body_pos: 208s Position to seek to in file-like body in the event of a retry or 208s redirect. Typically this won't need to be set because urllib3 will 208s auto-populate the value when needed. 208s """ 208s parsed_url = parse_url(url) 208s destination_scheme = parsed_url.scheme 208s 208s if headers is None: 208s headers = self.headers 208s 208s if not isinstance(retries, Retry): 208s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 208s 208s if release_conn is None: 208s release_conn = preload_content 208s 208s # Check host 208s if assert_same_host and not self.is_same_host(url): 208s raise HostChangedError(self, url, retries) 208s 208s # Ensure that the URL we're connecting to is properly encoded 208s if url.startswith("/"): 208s url = to_str(_encode_target(url)) 208s else: 208s url = to_str(parsed_url.url) 208s 208s conn = None 208s 208s # Track whether `conn` needs to be released before 208s # returning/raising/recursing. Update this variable if necessary, and 208s # leave `release_conn` constant throughout the function. That way, if 208s # the function recurses, the original value of `release_conn` will be 208s # passed down into the recursive call, and its value will be respected. 208s # 208s # See issue #651 [1] for details. 208s # 208s # [1] 208s release_this_conn = release_conn 208s 208s http_tunnel_required = connection_requires_http_tunnel( 208s self.proxy, self.proxy_config, destination_scheme 208s ) 208s 208s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 208s # have to copy the headers dict so we can safely change it without those 208s # changes being reflected in anyone else's copy. 208s if not http_tunnel_required: 208s headers = headers.copy() # type: ignore[attr-defined] 208s headers.update(self.proxy_headers) # type: ignore[union-attr] 208s 208s # Must keep the exception bound to a separate variable or else Python 3 208s # complains about UnboundLocalError. 208s err = None 208s 208s # Keep track of whether we cleanly exited the except block. This 208s # ensures we do proper cleanup in finally. 208s clean_exit = False 208s 208s # Rewind body position, if needed. Record current position 208s # for future rewinds in the event of a redirect/retry. 208s body_pos = set_file_position(body, body_pos) 208s 208s try: 208s # Request a connection from the queue. 208s timeout_obj = self._get_timeout(timeout) 208s conn = self._get_conn(timeout=pool_timeout) 208s 208s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 208s 208s # Is this a closed/new connection that requires CONNECT tunnelling? 208s if self.proxy is not None and http_tunnel_required and conn.is_closed: 208s try: 208s > self._prepare_proxy(conn) 208s 208s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:777: 208s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 208s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1046: in _prepare_proxy 208s conn.connect() 208s /usr/lib/python3/dist-packages/urllib3/connection.py:625: in connect 208s self._tunnel() # type: ignore[attr-defined] 208s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 208s 208s self = 208s 208s def _tunnel(self): 208s connect = b"CONNECT %s:%d %s\r\n" % ( 208s self._wrap_ipv6(self._tunnel_host.encode("idna")), 208s self._tunnel_port, 208s self._http_vsn_str.encode("ascii")) 208s headers = [connect] 208s for header, value in self._tunnel_headers.items(): 208s headers.append(f"{header}: {value}\r\n".encode("latin-1")) 208s headers.append(b"\r\n") 208s # Making a single send() call instead of one per line encourages 208s # the host OS to use a more optimal packet size instead of 208s # potentially emitting a series of small packets. 208s self.send(b"".join(headers)) 208s del headers 208s 208s response = self.response_class(self.sock, method=self._method) 208s try: 208s (version, code, message) = response._read_status() 208s 208s self._raw_proxy_headers = _read_headers(response.fp) 208s 208s if self.debuglevel > 0: 208s for header in self._raw_proxy_headers: 208s print('header:', header.decode()) 208s 208s if code != http.HTTPStatus.OK: 208s self.close() 208s > raise OSError(f"Tunnel connection failed: {code} {message.strip()}") 208s E OSError: Tunnel connection failed: 403 Forbidden 208s 208s /usr/lib/python3.13/http/client.py:979: OSError 208s 208s The above exception was the direct cause of the following exception: 208s Traceback (most recent call last): 208s File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 777, in urlopen 208s self._prepare_proxy(conn) 208s ~~~~~~~~~~~~~~~~~~~^^^^^^ 208s File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1046, in _prepare_proxy 208s conn.connect() 208s ~~~~~~~~~~~~^^ 208s File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 625, in connect 208s self._tunnel() # type: ignore[attr-defined] 208s ~~~~~~~~~~~~^^ 208s File "/usr/lib/python3.13/http/client.py", line 979, in _tunnel 208s raise OSError(f"Tunnel connection failed: {code} {message.strip()}") 208s OSError: Tunnel connection failed: 403 Forbidden 208s 208s The above exception was the direct cause of the following exception: 208s 208s urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden')) 208s 208s The above exception was the direct cause of the following exception: 208s 208s self = 208s request = , stream = False 208s timeout = Timeout(connect=None, read=None, total=None), verify = True 208s cert = None 208s proxies = OrderedDict({'no': '127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,p...,objectstorage.prodstack5.canonical.com', 'https': 'http://squid.internal:3128', 'http': 'http://squid.internal:3128'}) 208s 208s def send( 208s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 208s ): 208s """Sends PreparedRequest object. Returns Response object. 208s 208s :param request: The :class:`PreparedRequest ` being sent. 208s :param stream: (optional) Whether to stream the request content. 208s :param timeout: (optional) How long to wait for the server to send 208s data before giving up, as a float, or a :ref:`(connect timeout, 208s read timeout) ` tuple. 208s :type timeout: float or tuple or urllib3 Timeout object 208s :param verify: (optional) Either a boolean, in which case it controls whether 208s we verify the server's TLS certificate, or a string, in which case it 208s must be a path to a CA bundle to use 208s :param cert: (optional) Any user-provided SSL certificate to be trusted. 208s :param proxies: (optional) The proxies dictionary to apply to the request. 208s :rtype: requests.Response 208s """ 208s 208s try: 208s conn = self.get_connection_with_tls_context( 208s request, verify, proxies=proxies, cert=cert 208s ) 208s except LocationValueError as e: 208s raise InvalidURL(e, request=request) 208s 208s self.cert_verify(conn, request.url, verify, cert) 208s url = self.request_url(request, proxies) 208s self.add_headers( 208s request, 208s stream=stream, 208s timeout=timeout, 208s verify=verify, 208s cert=cert, 208s proxies=proxies, 208s ) 208s 208s chunked = not (request.body is None or "Content-Length" in request.headers) 208s 208s if isinstance(timeout, tuple): 208s try: 208s connect, read = timeout 208s timeout = TimeoutSauce(connect=connect, read=read) 208s except ValueError: 208s raise ValueError( 208s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 208s f"or a single float to set both timeouts to the same value." 208s ) 208s elif isinstance(timeout, TimeoutSauce): 208s pass 208s else: 208s timeout = TimeoutSauce(connect=timeout, read=timeout) 208s 208s try: 208s > resp = conn.urlopen( 208s method=request.method, 208s url=url, 208s body=request.body, 208s headers=request.headers, 208s redirect=False, 208s assert_same_host=False, 208s preload_content=False, 208s decode_content=False, 208s retries=self.max_retries, 208s timeout=timeout, 208s chunked=chunked, 208s ) 208s 208s /usr/lib/python3/dist-packages/requests/adapters.py:667: 208s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 208s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 208s retries = retries.increment( 208s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 208s 208s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 208s method = 'GET' 208s url = '/forecast?token=__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__&lat=48.8075&lon=2.24028&lang=fr' 208s response = None 208s error = ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden')) 208s _pool = 208s _stacktrace = 208s 208s def increment( 208s self, 208s method: str | None = None, 208s url: str | None = None, 208s response: BaseHTTPResponse | None = None, 208s error: Exception | None = None, 208s _pool: ConnectionPool | None = None, 208s _stacktrace: TracebackType | None = None, 208s ) -> Retry: 208s """Return a new Retry object with incremented retry counters. 208s 208s :param response: A response object, or None, if the server did not 208s return a response. 208s :type response: :class:`~urllib3.response.BaseHTTPResponse` 208s :param Exception error: An error encountered during the request, or 208s None if the response was received successfully. 208s 208s :return: A new ``Retry`` object. 208s """ 208s if self.total is False and error: 208s # Disabled, indicate to re-raise the error. 208s raise reraise(type(error), error, _stacktrace) 208s 208s total = self.total 208s if total is not None: 208s total -= 1 208s 208s connect = self.connect 208s read = self.read 208s redirect = self.redirect 208s status_count = self.status 208s other = self.other 208s cause = "unknown" 208s status = None 208s redirect_location = None 208s 208s if error and self._is_connection_error(error): 208s # Connect retry? 208s if connect is False: 208s raise reraise(type(error), error, _stacktrace) 208s elif connect is not None: 208s connect -= 1 208s 208s elif error and self._is_read_error(error): 208s # Read retry? 208s if read is False or method is None or not self._is_method_retryable(method): 208s raise reraise(type(error), error, _stacktrace) 208s elif read is not None: 208s read -= 1 208s 208s elif error: 208s # Other retry? 208s if other is not None: 208s other -= 1 208s 208s elif response and response.get_redirect_location(): 208s # Redirect retry? 208s if redirect is not None: 208s redirect -= 1 208s cause = "too many redirects" 208s response_redirect_location = response.get_redirect_location() 208s if response_redirect_location: 208s redirect_location = response_redirect_location 208s status = response.status 208s 208s else: 208s # Incrementing because of a server error like a 500 in 208s # status_forcelist and the given method is in the allowed_methods 208s cause = ResponseError.GENERIC_ERROR 208s if response and response.status: 208s if status_count is not None: 208s status_count -= 1 208s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 208s status = response.status 208s 208s history = self.history + ( 208s RequestHistory(method, url, error, status, redirect_location), 208s ) 208s 208s new_retry = self.new( 208s total=total, 208s connect=connect, 208s read=read, 208s redirect=redirect, 208s status=status_count, 208s other=other, 208s history=history, 208s ) 208s 208s if new_retry.is_exhausted(): 208s reason = error or ResponseError(cause) 208s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 208s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webservice.meteofrance.com', port=443): Max retries exceeded with url: /forecast?token=__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__&lat=48.8075&lon=2.24028&lang=fr (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden'))) 208s 208s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 208s 208s During handling of the above exception, another exception occurred: 208s 208s def test_forecast_france() -> None: 208s """Test weather forecast results from API.""" 208s client = MeteoFranceClient() 208s 208s > weather_forecast = client.get_forecast(latitude=48.8075, longitude=2.24028) 208s 208s tests/test_forecast.py:15: 208s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 208s /usr/lib/python3/dist-packages/meteofrance_api/client.py:155: in get_forecast 208s resp = self.session.request( 208s /usr/lib/python3/dist-packages/meteofrance_api/session.py:51: in request 208s response = super().request(method, f"{self.host}/{path}", *args, **kwargs) 208s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 208s resp = self.send(prep, **send_kwargs) 208s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 208s r = adapter.send(request, **kwargs) 208s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 208s 208s self = 208s request = , stream = False 208s timeout = Timeout(connect=None, read=None, total=None), verify = True 208s cert = None 208s proxies = OrderedDict({'no': '127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,p...,objectstorage.prodstack5.canonical.com', 'https': 'http://squid.internal:3128', 'http': 'http://squid.internal:3128'}) 208s 208s def send( 208s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 208s ): 208s """Sends PreparedRequest object. Returns Response object. 208s 208s :param request: The :class:`PreparedRequest ` being sent. 208s :param stream: (optional) Whether to stream the request content. 208s :param timeout: (optional) How long to wait for the server to send 208s data before giving up, as a float, or a :ref:`(connect timeout, 208s read timeout) ` tuple. 208s :type timeout: float or tuple or urllib3 Timeout object 208s :param verify: (optional) Either a boolean, in which case it controls whether 208s we verify the server's TLS certificate, or a string, in which case it 208s must be a path to a CA bundle to use 208s :param cert: (optional) Any user-provided SSL certificate to be trusted. 208s :param proxies: (optional) The proxies dictionary to apply to the request. 208s :rtype: requests.Response 208s """ 208s 208s try: 208s conn = self.get_connection_with_tls_context( 208s request, verify, proxies=proxies, cert=cert 208s ) 208s except LocationValueError as e: 208s raise InvalidURL(e, request=request) 208s 208s self.cert_verify(conn, request.url, verify, cert) 208s url = self.request_url(request, proxies) 208s self.add_headers( 208s request, 208s stream=stream, 208s timeout=timeout, 208s verify=verify, 208s cert=cert, 208s proxies=proxies, 208s ) 208s 208s chunked = not (request.body is None or "Content-Length" in request.headers) 208s 208s if isinstance(timeout, tuple): 208s try: 208s connect, read = timeout 208s timeout = TimeoutSauce(connect=connect, read=read) 208s except ValueError: 208s raise ValueError( 208s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 208s f"or a single float to set both timeouts to the same value." 208s ) 208s elif isinstance(timeout, TimeoutSauce): 208s pass 208s else: 208s timeout = TimeoutSauce(connect=timeout, read=timeout) 208s 208s try: 208s resp = conn.urlopen( 208s method=request.method, 208s url=url, 208s body=request.body, 208s headers=request.headers, 208s redirect=False, 208s assert_same_host=False, 208s preload_content=False, 208s decode_content=False, 208s retries=self.max_retries, 208s timeout=timeout, 208s chunked=chunked, 208s ) 208s 208s except (ProtocolError, OSError) as err: 208s raise ConnectionError(err, request=request) 208s 208s except MaxRetryError as e: 208s if isinstance(e.reason, ConnectTimeoutError): 208s # TODO: Remove this in 3.0.0: see #2811 208s if not isinstance(e.reason, NewConnectionError): 208s raise ConnectTimeout(e, request=request) 208s 208s if isinstance(e.reason, ResponseError): 208s raise RetryError(e, request=request) 208s 208s if isinstance(e.reason, _ProxyError): 208s > raise ProxyError(e, request=request) 208s E requests.exceptions.ProxyError: HTTPSConnectionPool(host='webservice.meteofrance.com', port=443): Max retries exceeded with url: /forecast?token=__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__&lat=48.8075&lon=2.24028&lang=fr (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden'))) 208s 208s /usr/lib/python3/dist-packages/requests/adapters.py:694: ProxyError 208s =========================== short test summary info ============================ 208s FAILED tests/test_forecast.py::test_forecast_france - requests.exceptions.Pro... 208s !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!! 208s ================== 1 failed, 1 passed, 7 deselected in 0.41s =================== 209s autopkgtest [08:59:24]: test run-tests: -----------------------] 209s autopkgtest [08:59:24]: test run-tests: - - - - - - - - - - results - - - - - - - - - - 209s run-tests FAIL non-zero exit status 1 209s autopkgtest [08:59:24]: @@@@@@@@@@@@@@@@@@@@ summary 209s run-tests FAIL non-zero exit status 1 231s nova [W] Skipping flock for amd64 231s Creating nova instance adt-plucky-amd64-meteofrance-api-20241113-085555-juju-7f2275-prod-proposed-migration-environment-20-358e25bc-a5d9-4a12-b868-4722aa657cc4 from image adt/ubuntu-plucky-amd64-server-20241113.img (UUID 62c21ac4-2290-4c8d-8313-dddd18eacff4)...