0s autopkgtest [09:44:51]: starting date and time: 2024-11-25 09:44:51+0000 0s autopkgtest [09:44:51]: git checkout: 6f3be7a8 Fix armhf LXD image generation for plucky 0s autopkgtest [09:44:51]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.lh8bzvkg/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:tiktoken --apt-upgrade tiktoken --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=tiktoken/0.8.0-1build1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-ppc64el-26.secgroup --name adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-proposed-migration-environment-20-e325a7f8-5491-4109-af68-f7ce1753aa38 --image adt/ubuntu-plucky-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration-ppc64el -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/ 408s nova [W] Using flock in prodstack6-ppc64el 408s Creating nova instance adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-proposed-migration-environment-20-e325a7f8-5491-4109-af68-f7ce1753aa38 from image adt/ubuntu-plucky-ppc64el-server-20241119.img (UUID dcc6a44c-21fb-45bb-821a-d64a8784c175)... 408s nova [E] nova boot failed (attempt #0): 408s nova [E] DEBUG (extension:189) found extension EntryPoint.parse('v1password = swiftclient.authv1:PasswordLoader') 408s DEBUG (extension:189) found extension EntryPoint.parse('noauth = cinderclient.contrib.noauth:CinderNoAuthLoader') 408s DEBUG (extension:189) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken') 408s DEBUG (extension:189) found extension EntryPoint.parse('none = keystoneauth1.loading._plugins.noauth:NoAuth') 408s DEBUG (extension:189) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token') 408s DEBUG (extension:189) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3adfspassword = keystoneauth1.extras._saml2._loading:ADFSPassword') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3applicationcredential = keystoneauth1.loading._plugins.identity.v3:ApplicationCredential') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3multifactor = keystoneauth1.loading._plugins.identity.v3:MultiFactor') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP') 408s DEBUG (session:517) REQ: curl -g -i -X GET https://keystone.ps6.canonical.com:5000/v3 -H "Accept: application/json" -H "User-Agent: nova keystoneauth1/4.0.0 python-requests/2.22.0 CPython/3.8.10" 408s DEBUG (connectionpool:962) Starting new HTTPS connection (1): keystone.ps6.canonical.com:5000 408s DEBUG (connectionpool:429) https://keystone.ps6.canonical.com:5000 "GET /v3 HTTP/1.1" 200 267 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 267 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:41 GMT Keep-Alive: timeout=75, max=1000 Server: Apache/2.4.52 (Ubuntu) Vary: X-Auth-Token x-openstack-request-id: req-01375a69-da1b-4b5f-a5b8-a0a4ec054871 408s DEBUG (session:580) RESP BODY: {"version": {"id": "v3.14", "status": "stable", "updated": "2020-04-07T00:00:00Z", "links": [{"rel": "self", "href": "https://keystone.ps6.canonical.com:5000/v3/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}]}} 408s DEBUG (session:946) GET call to https://keystone.ps6.canonical.com:5000/v3 used request id req-01375a69-da1b-4b5f-a5b8-a0a4ec054871 408s DEBUG (base:182) Making authentication request to https://keystone.ps6.canonical.com:5000/v3/auth/tokens 408s DEBUG (connectionpool:429) https://keystone.ps6.canonical.com:5000 "POST /v3/auth/tokens HTTP/1.1" 201 12525 408s DEBUG (base:187) {"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "c871debdeffd4cb8b69ce618fc4aa361", "name": "prod-proposed-migration-ppc64el", "password_expires_at": null}, "audit_ids": ["XbZOFFpRQTOxDeV46fz_cw"], "expires_at": "2024-11-26T09:45:41.000000Z", "issued_at": "2024-11-25T09:45:41.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "623df63b80274c21bc79a0c35e68d615", "name": "prod-proposed-migration-ppc64el_project"}, "is_domain": false, "roles": [{"id": "86bf3043974746c2bf52c2a9f362f986", "name": "reader"}, {"id": "15cf997650e345b7b21c02b5cdb7d84a", "name": "member"}, {"id": "80674fb26dab46e9a6bd57e7f8193360", "name": "load-balancer_member"}], "is_admin_project": false, "catalog": [{"endpoints": [{"id": "213cdf38198c4581bd5b7d6d0836923b", "interface": "internal", "region_id": "prodstack6", "url": "https://radosgw-internal.ps6.canonical.com:443/", "region": "prodstack6"}, {"id": "67061eee26944a1a8009f9d07be19738", "interface": "public", "region_id": "prodstack6", "url": "https://radosgw.ps6.canonical.com:443/", "region": "prodstack6"}, {"id": "fc88c52c749a47d08a24a2c7efbde01b", "interface": "admin", "region_id": "prodstack6", "url": "https://radosgw-admin.ps6.canonical.com:443/", "region": "prodstack6"}], "id": "06e4714942634054bf9aa11715312b4e", "type": "s3", "name": "s3"}, {"endpoints": [{"id": "8aa44c94b63746bd9b37f1008ad55fa8", "interface": "admin", "region_id": "prodstack6", "url": "https://aodh-admin.ps6.canonical.com:8042", "region": "prodstack6"}, {"id": "92cf08a80a0242ebbca8ec893cf332b1", "interface": "public", "region_id": "prodstack6", "url": "https://aodh.ps6.canonical.com:8042", "region": "prodstack6"}, {"id": "d8139c6e11ae4edcb78981c12bd53212", "interface": "internal", "region_id": "prodstack6", "url": "https://aodh-internal.ps6.canonical.com:8042", "region": "prodstack6"}], "id": "2fb939b0b969435c8f0c5fa4edb4de94", "type": "alarming", "name": "aodh"}, {"endpoints": [{"id": "a49fcc80e658411885f88cdd8432a571", "interface": "internal", "region_id": "prodstack6", "url": "https://heat-internal.ps6.canonical.com:8000/v1", "region": "prodstack6"}, {"id": "b23866fddba8415885b06c064c34b94b", "interface": "public", "region_id": "prodstack6", "url": "https://heat.ps6.canonical.com:8000/v1", "region": "prodstack6"}, {"id": "f84ae55197f94b8392a678f35c82ca26", "interface": "admin", "region_id": "prodstack6", "url": "https://heat-admin.ps6.canonical.com:8000/v1", "region": "prodstack6"}], "id": "3d4b59f7dab644b2b527e8e96b697545", "type": "cloudformation", "name": "heat-cfn"}, {"endpoints": [{"id": "2e0143334c6241169f45f1c11970c6bc", "interface": "public", "region_id": "prodstack6", "url": "https://heat.ps6.canonical.com:8004/v1/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "5e19c32243c04a3faf1e5f9ab900c260", "interface": "internal", "region_id": "prodstack6", "url": "https://heat-internal.ps6.canonical.com:8004/v1/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "b3fc5c88ec8543a691fec75726b86967", "interface": "admin", "region_id": "prodstack6", "url": "https://heat-admin.ps6.canonical.com:8004/v1/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}], "id": "43b926205044476b8093b18d8ce0a9e4", "type": "orchestration", "name": "heat"}, {"endpoints": [{"id": "a47569b96e5b4146a312e4673504557c", "interface": "public", "region_id": "prodstack6", "url": "https://glance.ps6.canonical.com:9292", "region": "prodstack6"}, {"id": "bba35c4ab04f4114a2a34e65568537bd", "interface": "internal", "region_id": "prodstack6", "url": "https://glance-internal.ps6.canonical.com:9292", "region": "prodstack6"}, {"id": "ef769f1117c74a62a279131486c89628", "interface": "admin", "region_id": "prodstack6", "url": "https://glance-admin.ps6.canonical.com:9292", "region": "prodstack6"}], "id": "49de724549524bd78e9cd46a4477226f", "type": "image", "name": "glance"}, {"endpoints": [{"id": "a1a41e9a1e2d42e5b6cd5380cd1e21bf", "interface": "admin", "region_id": "prodstack6", "url": "https://cinder-admin.ps6.canonical.com:8776/v3/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "d2309a99724b4111827482c68a832c0c", "interface": "public", "region_id": "prodstack6", "url": "https://cinder.ps6.canonical.com:8776/v3/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "f8a02e3949ff42afa772eb5e74dbef9f", "interface": "internal", "region_id": "prodstack6", "url": "https://cinder-internal.ps6.canonical.com:8776/v3/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}], "id": "5bf6578a631349e3af4bf36d7adb18e1", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "01d84128f36444e9b01549b86bd69116", "interface": "admin", "region_id": "prodstack6", "url": "https://barbican-admin.ps6.canonical.com:9312", "region": "prodstack6"}, {"id": "0ce4a8777e0b40a88f7fc0f77e34a605", "interface": "public", "region_id": "prodstack6", "url": "https://barbican.ps6.canonical.com:9311", "region": "prodstack6"}, {"id": "f507ba49e4a7435cb330234217c92449", "interface": "internal", "region_id": "prodstack6", "url": "https://barbican-internal.ps6.canonical.com:9311", "region": "prodstack6"}], "id": "62cb1c3d9f6c45979c13516a6b3ff114", "type": "key-manager", "name": "barbican"}, {"endpoints": [{"id": "3cb6121bd8f14da8aa2fba7be823a2b4", "interface": "internal", "region_id": "prodstack6", "url": "https://neutron-internal.ps6.canonical.com:9696", "region": "prodstack6"}, {"id": "46ba11d133fe4e8f9e8f9097ba737682", "interface": "admin", "region_id": "prodstack6", "url": "https://neutron-admin.ps6.canonical.com:9696", "region": "prodstack6"}, {"id": "d872eb6aa23d40009165aa3dcdce3948", "interface": "public", "region_id": "prodstack6", "url": "https://neutron.ps6.canonical.com:9696", "region": "prodstack6"}], "id": "759cb6fdfbc146dd8b9d1ba444c4b9db", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "4349d565f72446da9699269f85df5e8b", "interface": "internal", "region_id": "prodstack6", "url": "https://manila-internal.ps6.canonical.com:8786/v2/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "a483dcc58f5e415e9ec739c94474e609", "interface": "public", "region_id": "prodstack6", "url": "https://manila.ps6.canonical.com:8786/v2/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "c1f14236723e42878562d8dd63d5a6a0", "interface": "admin", "region_id": "prodstack6", "url": "https://manila-admin.ps6.canonical.com:8786/v2/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}], "id": "93fc4008035946deb1f433c2dd905a5d", "type": "sharev2", "name": "manilav2"}, {"endpoints": [{"id": "0fa148793c7249c8b187b6b4ff425731", "interface": "internal", "region_id": "prodstack6", "url": "https://radosgw-internal.ps6.canonical.com:443/swift/v1/AUTH_e4b04ca58d734ed0aa29e306adad4f79/simplestreams/data", "region": "prodstack6"}, {"id": "555ade266a6b4bcc81b6e5abf607aec5", "interface": "public", "region_id": "prodstack6", "url": "https://radosgw.ps6.canonical.com:443/swift/v1/AUTH_e4b04ca58d734ed0aa29e306adad4f79/simplestreams/data", "region": "prodstack6"}, {"id": "7dad1a7b1552465686424fc014463173", "interface": "admin", "region_id": "prodstack6", "url": "https://radosgw-admin.ps6.canonical.com:443/swift/simplestreams/data", "region": "prodstack6"}], "id": "977dd359af1a4fcc91a9daf4dc33b0f3", "type": "product-streams", "name": "image-stream"}, {"endpoints": [{"id": "12d30eabcdec4831bd15273d55b1cbab", "interface": "internal", "region_id": "prodstack6", "url": "https://manila-internal.ps6.canonical.com:8786/v1/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "29d35b2b483346479f1ff1a13604d50e", "interface": "admin", "region_id": "prodstack6", "url": "https://manila-admin.ps6.canonical.com:8786/v1/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "4aa1422b8f5945d8aed9ba6a8d670e5c", "interface": "public", "region_id": "prodstack6", "url": "https://manila.ps6.canonical.com:8786/v1/623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}], "id": "ac5e4f28fa794cde99f1d7ffc1b664e5", "type": "share", "name": "manila"}, {"endpoints": [{"id": "c7db93d54a684d8caeae1d9e18a59118", "interface": "admin", "region_id": "prodstack6", "url": "https://nova-admin.ps6.canonical.com:8774/v2.1", "region": "prodstack6"}, {"id": "dd7a796f401b477f9f1b5bbc05747d8d", "interface": "public", "region_id": "prodstack6", "url": "https://nova.ps6.canonical.com:8774/v2.1", "region": "prodstack6"}, {"id": "e7ecb038d830462ea67b0b463af5e013", "interface": "internal", "region_id": "prodstack6", "url": "https://nova-internal.ps6.canonical.com:8774/v2.1", "region": "prodstack6"}], "id": "b4519af08e174d4a8333a2d14ac3ba3b", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "02ef5b6154934ffd97d8b5b8e4d70d2a", "interface": "internal", "region_id": "prodstack6", "url": "https://radosgw-internal.ps6.canonical.com:443/swift/v1/AUTH_623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "2741abe526e94842a4fa801423ba1ef0", "interface": "public", "region_id": "prodstack6", "url": "https://radosgw.ps6.canonical.com:443/swift/v1/AUTH_623df63b80274c21bc79a0c35e68d615", "region": "prodstack6"}, {"id": "3742f9406c604516933d6fd8c29e0880", "interface": "admin", "region_id": "prodstack6", "url": "https://radosgw-admin.ps6.canonical.com:443/swift", "region": "prodstack6"}], "id": "c7f07a7b3b3c408c96200dfd1d1a0f6f", "type": "object-store", "name": "swift"}, {"endpoints": [{"id": "06d4ed6c160a43f2b7fa7f80ad1dc709", "interface": "internal", "region_id": "prodstack6", "url": "https://designate-internal.ps6.canonical.com:9001", "region": "prodstack6"}, {"id": "1e240624a50c4ca0aaa6ef63cbc94f1b", "interface": "admin", "region_id": "prodstack6", "url": "https://designate-admin.ps6.canonical.com:9001", "region": "prodstack6"}, {"id": "f94d7d17997a43fd9c63b34c43301c6e", "interface": "public", "region_id": "prodstack6", "url": "https://designate.ps6.canonical.com:9001", "region": "prodstack6"}], "id": "cf82013d63844fedbe96bcacb6bd1fef", "type": "dns", "name": "designate"}, {"endpoints": [{"id": "4a688340be464710bfa60bf3f88f41c4", "interface": "admin", "region_id": "prodstack6", "url": "https://gnocchi-admin.ps6.canonical.com:8041", "region": "prodstack6"}, {"id": "a5a95506c96d4716adb4efc3ac9051be", "interface": "public", "region_id": "prodstack6", "url": "https://gnocchi.ps6.canonical.com:8041", "region": "prodstack6"}, {"id": "eebc17a086834f8fa8bb6b35c8061a8c", "interface": "internal", "region_id": "prodstack6", "url": "https://gnocchi-internal.ps6.canonical.com:8041", "region": "prodstack6"}], "id": "d10589e854a446a5b852593f33f170a7", "type": "metric", "name": "gnocchi"}, {"endpoints": [{"id": "08f66df28d0f47f3bec12f29e06d85ac", "interface": "admin", "region_id": "prodstack6", "url": "https://keystone-admin.ps6.canonical.com:35357/v3", "region": "prodstack6"}, {"id": "46d270b45ceb42db902f4d241afa6a70", "interface": "public", "region_id": "prodstack6", "url": "https://keystone.ps6.canonical.com:5000/v3", "region": "prodstack6"}, {"id": "a4addee11d9349cfa46ec6660dbad947", "interface": "internal", "region_id": "prodstack6", "url": "https://keystone-internal.ps6.canonical.com:5000/v3", "region": "prodstack6"}], "id": "deb38a775a9b4e87a8de9e3eed779882", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "18b4af5f40664babb94e884c6a53ccf3", "interface": "admin", "region_id": "prodstack6", "url": "https://octavia-admin.ps6.canonical.com:9876", "region": "prodstack6"}, {"id": "2b6f7ba7f9944ee1aebd6dccc5223b2d", "interface": "internal", "region_id": "prodstack6", "url": "https://octavia-internal.ps6.canonical.com:9876", "region": "prodstack6"}, {"id": "5e3012e9c79e4890be4d964b6208f5c6", "interface": "public", "region_id": "prodstack6", "url": "https://octavia.ps6.canonical.com:9876", "region": "prodstack6"}], "id": "e00337be20d54948b66a1c3109b885c6", "type": "load-balancer", "name": "octavia"}, {"endpoints": [{"id": "2d2942b35f3041389ad810f679d02f22", "interface": "public", "region_id": "prodstack6", "url": "https://placement.ps6.canonical.com:8778", "region": "prodstack6"}, {"id": "2e3beaac7ac14284b72e2592820ad725", "interface": "admin", "region_id": "prodstack6", "url": "https://placement-admin.ps6.canonical.com:8778", "region": "prodstack6"}, {"id": "91060f6df9ae444f81808adf40540d94", "interface": "internal", "region_id": "prodstack6", "url": "https://placement-internal.ps6.canonical.com:8778", "region": "prodstack6"}], "id": "edc6e37f154f4c0ab3dd4d52b82bf873", "type": "placement", "name": "placement"}]}} 408s REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1 -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" 408s DEBUG (session:517) REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1 -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" 408s DEBUG (connectionpool:962) Starting new HTTPS connection (1): nova.ps6.canonical.com:8774 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1 HTTP/1.1" 302 0 408s RESP: [302] Connection: Keep-Alive Content-Length: 0 Content-Type: text/plain; charset=utf8 Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=1000 Location: https://nova.ps6.canonical.com:8774/v2.1/ Server: Apache/2.4.52 (Ubuntu) x-compute-request-id: req-f0ff9abe-e605-4f72-8e1b-4954464523d0 x-openstack-request-id: req-f0ff9abe-e605-4f72-8e1b-4954464523d0 408s DEBUG (session:548) RESP: [302] Connection: Keep-Alive Content-Length: 0 Content-Type: text/plain; charset=utf8 Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=1000 Location: https://nova.ps6.canonical.com:8774/v2.1/ Server: Apache/2.4.52 (Ubuntu) x-compute-request-id: req-f0ff9abe-e605-4f72-8e1b-4954464523d0 x-openstack-request-id: req-f0ff9abe-e605-4f72-8e1b-4954464523d0 408s RESP BODY: Omitted, Content-Type is set to text/plain; charset=utf8. Only application/json responses have their bodies logged. 408s DEBUG (session:580) RESP BODY: Omitted, Content-Type is set to text/plain; charset=utf8. Only application/json responses have their bodies logged. 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1/ HTTP/1.1" 200 397 408s RESP: [200] Connection: Keep-Alive Content-Length: 397 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=999 OpenStack-API-Version: compute 2.1 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.1 x-compute-request-id: req-263c35e7-d7b7-42d3-bfbf-d59dd7400ee3 x-openstack-request-id: req-263c35e7-d7b7-42d3-bfbf-d59dd7400ee3 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 397 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=999 OpenStack-API-Version: compute 2.1 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.1 x-compute-request-id: req-263c35e7-d7b7-42d3-bfbf-d59dd7400ee3 x-openstack-request-id: req-263c35e7-d7b7-42d3-bfbf-d59dd7400ee3 408s RESP BODY: {"version": {"id": "v2.1", "status": "CURRENT", "version": "2.90", "min_version": "2.1", "updated": "2013-07-23T11:33:21Z", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/"}, {"rel": "describedby", "type": "text/html", "href": "http://docs.openstack.org/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2.1"}]}} 408s DEBUG (session:580) RESP BODY: {"version": {"id": "v2.1", "status": "CURRENT", "version": "2.90", "min_version": "2.1", "updated": "2013-07-23T11:33:21Z", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/"}, {"rel": "describedby", "type": "text/html", "href": "http://docs.openstack.org/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2.1"}]}} 408s GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/ used request id req-263c35e7-d7b7-42d3-bfbf-d59dd7400ee3 408s DEBUG (session:936) GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/ used request id req-263c35e7-d7b7-42d3-bfbf-d59dd7400ee3 408s DEBUG (extension:189) found extension EntryPoint.parse('v1password = swiftclient.authv1:PasswordLoader') 408s DEBUG (extension:189) found extension EntryPoint.parse('noauth = cinderclient.contrib.noauth:CinderNoAuthLoader') 408s DEBUG (extension:189) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken') 408s DEBUG (extension:189) found extension EntryPoint.parse('none = keystoneauth1.loading._plugins.noauth:NoAuth') 408s DEBUG (extension:189) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token') 408s DEBUG (extension:189) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3adfspassword = keystoneauth1.extras._saml2._loading:ADFSPassword') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3applicationcredential = keystoneauth1.loading._plugins.identity.v3:ApplicationCredential') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3multifactor = keystoneauth1.loading._plugins.identity.v3:MultiFactor') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth') 408s DEBUG (extension:189) found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP') 408s DEBUG (session:517) REQ: curl -g -i -X GET https://glance.ps6.canonical.com:9292/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175 -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:962) Starting new HTTPS connection (1): glance.ps6.canonical.com:9292 408s DEBUG (connectionpool:429) https://glance.ps6.canonical.com:9292 "GET /v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175 HTTP/1.1" 200 2292 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 2292 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=1000 Server: Apache/2.4.52 (Ubuntu) X-Openstack-Request-Id: req-f9261710-6e4f-4f5e-bb80-4d12dfa58970 408s DEBUG (session:580) RESP BODY: {"architecture": "ppc64le", "base_image_ref": "302dbebd-8fb5-46eb-aa5c-84ec11ab5c95", "boot_roles": "reader,load-balancer_member,member", "content_id": "auto.sync", "hw_cdrom_bus": "scsi", "hw_disk_bus": "virtio", "hw_machine_type": "pseries", "hw_video_model": "vga", "hw_vif_model": "virtio", "image_location": "snapshot", "image_state": "available", "image_type": "snapshot", "instance_uuid": "3677b220-efbb-4a1d-aa95-ccbf4f88d581", "item_name": "disk1.img", "os_distro": "ubuntu", "os_version": "24.10", "owner_id": "623df63b80274c21bc79a0c35e68d615", "owner_project_name": "prod-proposed-migration-ppc64el_project", "owner_user_name": "prod-proposed-migration-ppc64el", "product_name": "com.ubuntu.cloud.daily:server:24.10:ppc64el", "simplestreams_metadata": "{\"aliases\": \"24.10,o,oracular,devel\", \"arch\": \"ppc64el\", \"ftype\": \"disk1.img\", \"label\": \"daily\", \"md5\": \"fd88d9a689ac4d7ab4bea632de90d355\", \"os\": \"ubuntu\", \"pubname\": \"ubuntu-oracular-daily-ppc64el-server-20241009\", \"release\": \"oracular\", \"release_codenam", "source_content_id": "com.ubuntu.cloud:daily:download", "user_id": "c871debdeffd4cb8b69ce618fc4aa361", "version_name": "20241009", "name": "adt/ubuntu-plucky-ppc64el-server-20241119.img", "disk_format": "qcow2", "container_format": "bare", "visibility": "private", "size": 2765422592, "virtual_size": 21474836480, "status": "active", "checksum": "57e80ce32498e1f4de918fa4fc0d5397", "protected": false, "min_ram": 0, "min_disk": 20, "owner": "623df63b80274c21bc79a0c35e68d615", "os_hidden": false, "os_hash_algo": "sha512", "os_hash_value": "30549527d3366d04c8b9f1b6d778693b1b12f707713fcf6f2880cb19e75917565fda77d2994499c62cae9d49bc117aed5c1cc9529046ad4522e6bd68ad3eba9a", "id": "dcc6a44c-21fb-45bb-821a-d64a8784c175", "created_at": "2024-11-19T00:59:37Z", "updated_at": "2024-11-19T01:00:12Z", "locations": [{"url": "rbd://eea9d068-c18c-11ed-8dc0-013aacb71b80/glance/dcc6a44c-21fb-45bb-821a-d64a8784c175/snap", "metadata": {"store": "ceph"}}], "direct_url": "rbd://eea9d068-c18c-11ed-8dc0-013aacb71b80/glance/dcc6a44c-21fb-45bb-821a-d64a8784c175/snap", "tags": [], "self": "/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175", "file": "/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175/file", "schema": "/v2/schemas/image", "stores": "ceph"} 408s DEBUG (session:936) GET call to image for https://glance.ps6.canonical.com:9292/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175 used request id req-f9261710-6e4f-4f5e-bb80-4d12dfa58970 408s DEBUG (session:517) REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1/flavors/autopkgtest-ppc64el -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1/flavors/autopkgtest-ppc64el HTTP/1.1" 404 92 408s DEBUG (session:548) RESP: [404] Connection: Keep-Alive Content-Length: 92 Content-Type: application/json; charset=UTF-8 Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=998 OpenStack-API-Version: compute 2.87 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.87 x-compute-request-id: req-679682a7-b4ab-4b0c-94ad-938450b26524 x-openstack-request-id: req-679682a7-b4ab-4b0c-94ad-938450b26524 408s DEBUG (session:580) RESP BODY: {"itemNotFound": {"code": 404, "message": "Flavor autopkgtest-ppc64el could not be found."}} 408s DEBUG (session:936) GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/flavors/autopkgtest-ppc64el used request id req-679682a7-b4ab-4b0c-94ad-938450b26524 408s DEBUG (session:517) REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1/flavors?is_public=None -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1/flavors?is_public=None HTTP/1.1" 200 40172 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 40172 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=997 OpenStack-API-Version: compute 2.87 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.87 x-compute-request-id: req-1badc650-9e89-4a3b-99d2-dd80b12538cb x-openstack-request-id: req-1badc650-9e89-4a3b-99d2-dd80b12538cb 408s DEBUG (session:580) RESP BODY: {"flavors": [{"id": "05338e57-e2ba-4813-9a8a-2f2af73f8ab2", "name": "builder-ppc64el-cpu2-ram4-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/05338e57-e2ba-4813-9a8a-2f2af73f8ab2"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/05338e57-e2ba-4813-9a8a-2f2af73f8ab2"}], "description": null}, {"id": "08090b4b-98a9-4c15-8ad4-cc6711700879", "name": "builder-ppc64el-cpu8-ram64-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/08090b4b-98a9-4c15-8ad4-cc6711700879"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/08090b4b-98a9-4c15-8ad4-cc6711700879"}], "description": null}, {"id": "0825b8b1-2b9c-42bf-b3e6-e827c22d8df5", "name": "builder-ppc64el-cpu8-ram4-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/0825b8b1-2b9c-42bf-b3e6-e827c22d8df5"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/0825b8b1-2b9c-42bf-b3e6-e827c22d8df5"}], "description": null}, {"id": "0b06db45-151e-44b2-b0f5-f069ad7fa1cb", "name": "builder-ppc64el-cpu2-ram12-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/0b06db45-151e-44b2-b0f5-f069ad7fa1cb"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/0b06db45-151e-44b2-b0f5-f069ad7fa1cb"}], "description": null}, {"id": "0dbf127e-3101-4f05-9d37-15ad6d2a45c1", "name": "builder-ppc64el-cpu2-ram16-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/0dbf127e-3101-4f05-9d37-15ad6d2a45c1"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/0dbf127e-3101-4f05-9d37-15ad6d2a45c1"}], "description": null}, {"id": "102d0b57-e8d2-46c6-9be4-f452119a0280", "name": "autopkgtest-ppc64el", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/102d0b57-e8d2-46c6-9be4-f452119a0280"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/102d0b57-e8d2-46c6-9be4-f452119a0280"}], "description": null}, {"id": "1219f5f0-83f3-4d33-a3bb-1a85c6303159", "name": "builder-ppc64el-cpu128-ram64-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/1219f5f0-83f3-4d33-a3bb-1a85c6303159"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/1219f5f0-83f3-4d33-a3bb-1a85c6303159"}], "description": null}, {"id": "1359c5a4-ee60-4855-9bcc-defd3bff7121", "name": "builder-ppc64el-cpu8-ram8-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/1359c5a4-ee60-4855-9bcc-defd3bff7121"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/1359c5a4-ee60-4855-9bcc-defd3bff7121"}], "description": null}, {"id": "161f21bc-11f7-4ec9-a322-04fc3e0d2a68", "name": "builder-ppc64el-cpu2-ram55-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/161f21bc-11f7-4ec9-a322-04fc3e0d2a68"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/161f21bc-11f7-4ec9-a322-04fc3e0d2a68"}], "description": null}, {"id": "166070cd-7110-473e-a6a2-5e25aa9eeefd", "name": "builder-ppc64el-cpu4-ram64-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/166070cd-7110-473e-a6a2-5e25aa9eeefd"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/166070cd-7110-473e-a6a2-5e25aa9eeefd"}], "description": null}, {"id": "16a0a259-4627-4fbd-bb9d-a3e69346467c", "name": "builder-ppc64el-cpu8-ram64-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/16a0a259-4627-4fbd-bb9d-a3e69346467c"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/16a0a259-4627-4fbd-bb9d-a3e69346467c"}], "description": null}, {"id": "1c59e50a-1a67-4691-8f2c-6954cb0f83ba", "name": "builder-ppc64el-cpu4-ram128-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/1c59e50a-1a67-4691-8f2c-6954cb0f83ba"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/1c59e50a-1a67-4691-8f2c-6954cb0f83ba"}], "description": null}, {"id": "1c94efa8-905a-4bff-8485-0aaf9ac47fe7", "name": "builder-ppc64el-cpu4-ram16-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/1c94efa8-905a-4bff-8485-0aaf9ac47fe7"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/1c94efa8-905a-4bff-8485-0aaf9ac47fe7"}], "description": null}, {"id": "213c954d-26ed-4c86-9592-66384bc22c82", "name": "builder-ppc64el-cpu4-ram16-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/213c954d-26ed-4c86-9592-66384bc22c82"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/213c954d-26ed-4c86-9592-66384bc22c82"}], "description": null}, {"id": "219e90b4-8850-4fa4-b028-4cf7657c3264", "name": "builder-ppc64el-cpu16-ram64-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/219e90b4-8850-4fa4-b028-4cf7657c3264"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/219e90b4-8850-4fa4-b028-4cf7657c3264"}], "description": null}, {"id": "21de1f2a-7ad2-4da5-b6af-de683afb51c9", "name": "builder-ppc64el-cpu48-ram64-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/21de1f2a-7ad2-4da5-b6af-de683afb51c9"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/21de1f2a-7ad2-4da5-b6af-de683afb51c9"}], "description": null}, {"id": "2363173d-a2e1-4383-945f-d69f583a729a", "name": "builder-ppc64el-cpu128-ram128-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/2363173d-a2e1-4383-945f-d69f583a729a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/2363173d-a2e1-4383-945f-d69f583a729a"}], "description": null}, {"id": "23b7a6d6-425f-4669-961d-be7fed7725d3", "name": "builder-ppc64el-cpu2-ram12-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/23b7a6d6-425f-4669-961d-be7fed7725d3"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/23b7a6d6-425f-4669-961d-be7fed7725d3"}], "description": null}, {"id": "2464732a-3147-40fb-b375-2d275070a1f3", "name": "builder-ppc64el-cpu2-ram64-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/2464732a-3147-40fb-b375-2d275070a1f3"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/2464732a-3147-40fb-b375-2d275070a1f3"}], "description": null}, {"id": "250ba167-175c-4548-be23-47a517fa3701", "name": "builder-ppc64el-cpu16-ram72-disk80", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/250ba167-175c-4548-be23-47a517fa3701"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/250ba167-175c-4548-be23-47a517fa3701"}], "description": null}, {"id": "27ffca72-b7d0-4d4b-96c6-de69e0f767bd", "name": "builder-ppc64el-cpu2-ram8-disk1500", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/27ffca72-b7d0-4d4b-96c6-de69e0f767bd"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/27ffca72-b7d0-4d4b-96c6-de69e0f767bd"}], "description": null}, {"id": "2b2e94dd-a11d-4eae-93df-c8cce920b95e", "name": "builder-ppc64el-cpu2-ram32-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/2b2e94dd-a11d-4eae-93df-c8cce920b95e"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/2b2e94dd-a11d-4eae-93df-c8cce920b95e"}], "description": null}, {"id": "2d842f6f-be4f-4b39-bc9e-a8dbf3233bc1", "name": "builder-ppc64el-cpu2-ram4-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/2d842f6f-be4f-4b39-bc9e-a8dbf3233bc1"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/2d842f6f-be4f-4b39-bc9e-a8dbf3233bc1"}], "description": null}, {"id": "2f626a91-24b0-44ba-afa5-2cab984ae81f", "name": "builder-ppc64el-cpu128-ram32-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/2f626a91-24b0-44ba-afa5-2cab984ae81f"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/2f626a91-24b0-44ba-afa5-2cab984ae81f"}], "description": null}, {"id": "3325f74a-e433-4072-8c2c-b50052e31602", "name": "builder-ppc64el-cpu2-ram8-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/3325f74a-e433-4072-8c2c-b50052e31602"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/3325f74a-e433-4072-8c2c-b50052e31602"}], "description": null}, {"id": "34df8936-a2ae-450a-9fea-2cdaebae5803", "name": "builder-ppc64el-cpu8-ram16-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/34df8936-a2ae-450a-9fea-2cdaebae5803"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/34df8936-a2ae-450a-9fea-2cdaebae5803"}], "description": null}, {"id": "378080cb-1d08-401a-b556-0f903a79ae2c", "name": "builder-ppc64el-cpu8-ram12-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/378080cb-1d08-401a-b556-0f903a79ae2c"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/378080cb-1d08-401a-b556-0f903a79ae2c"}], "description": null}, {"id": "37ed4cfe-a588-40c4-8494-098403c1f0f3", "name": "builder-ppc64el-cpu4-ram12-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/37ed4cfe-a588-40c4-8494-098403c1f0f3"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/37ed4cfe-a588-40c4-8494-098403c1f0f3"}], "description": null}, {"id": "3aa7a161-3310-40b9-8e89-195294d45b10", "name": "builder-ppc64el-cpu48-ram128-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/3aa7a161-3310-40b9-8e89-195294d45b10"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/3aa7a161-3310-40b9-8e89-195294d45b10"}], "description": null}, {"id": "3c30219d-30a4-4fb4-bf2e-da5602313583", "name": "builder-ppc64el-cpu2-ram32-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/3c30219d-30a4-4fb4-bf2e-da5602313583"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/3c30219d-30a4-4fb4-bf2e-da5602313583"}], "description": null}, {"id": "3f533bb3-541c-4868-8883-69a5f1be7c80", "name": "builder-ppc64el-cpu16-ram16-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/3f533bb3-541c-4868-8883-69a5f1be7c80"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/3f533bb3-541c-4868-8883-69a5f1be7c80"}], "description": null}, {"id": "40ca84e0-d087-4f4b-bba2-e1823c6d3b85", "name": "builder-ppc64el-cpu8-ram8-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/40ca84e0-d087-4f4b-bba2-e1823c6d3b85"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/40ca84e0-d087-4f4b-bba2-e1823c6d3b85"}], "description": null}, {"id": "47276443-70e8-487f-9aaa-ef1a05b07c3c", "name": "builder-ppc64el-cpu4-ram105-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/47276443-70e8-487f-9aaa-ef1a05b07c3c"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/47276443-70e8-487f-9aaa-ef1a05b07c3c"}], "description": null}, {"id": "4d315fef-8774-4e68-916d-a6f08c302c0c", "name": "builder-ppc64el-cpu16-ram32-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/4d315fef-8774-4e68-916d-a6f08c302c0c"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/4d315fef-8774-4e68-916d-a6f08c302c0c"}], "description": null}, {"id": "4ea8e0b3-bd6c-4df2-a3bd-2b7dea6aea13", "name": "builder-ppc64el-cpu4-ram8-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/4ea8e0b3-bd6c-4df2-a3bd-2b7dea6aea13"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/4ea8e0b3-bd6c-4df2-a3bd-2b7dea6aea13"}], "description": null}, {"id": "503bfc0d-e770-441c-90b7-7049e4bdbe7e", "name": "builder-ppc64el-cpu8-ram120-disk28", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/503bfc0d-e770-441c-90b7-7049e4bdbe7e"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/503bfc0d-e770-441c-90b7-7049e4bdbe7e"}], "description": null}, {"id": "510412bb-aeb3-43d8-a0f0-cdb0cf97a5f2", "name": "builder-ppc64el-cpu4-ram4-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/510412bb-aeb3-43d8-a0f0-cdb0cf97a5f2"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/510412bb-aeb3-43d8-a0f0-cdb0cf97a5f2"}], "description": null}, {"id": "53b9821c-da67-415d-990c-2f023ff61d1e", "name": "builder-ppc64el-cpu8-ram32-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/53b9821c-da67-415d-990c-2f023ff61d1e"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/53b9821c-da67-415d-990c-2f023ff61d1e"}], "description": null}, {"id": "556a816f-2280-4167-bba4-0319a6d3aba9", "name": "builder-ppc64el-cpu8-ram4-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/556a816f-2280-4167-bba4-0319a6d3aba9"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/556a816f-2280-4167-bba4-0319a6d3aba9"}], "description": null}, {"id": "560c2269-9192-4b41-8787-506b25ef7067", "name": "builder-ppc64el-cpu8-ram8-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/560c2269-9192-4b41-8787-506b25ef7067"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/560c2269-9192-4b41-8787-506b25ef7067"}], "description": null}, {"id": "57403612-9552-4ada-8e55-b40624c3d8f4", "name": "builder-ppc64el-cpu8-ram16-disk500", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/57403612-9552-4ada-8e55-b40624c3d8f4"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/57403612-9552-4ada-8e55-b40624c3d8f4"}], "description": null}, {"id": "59bee3ae-a610-4f1a-b13f-a5f3400d2412", "name": "builder-ppc64el-cpu16-ram16-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/59bee3ae-a610-4f1a-b13f-a5f3400d2412"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/59bee3ae-a610-4f1a-b13f-a5f3400d2412"}], "description": null}, {"id": "5bf0bfb6-311e-4895-a22e-228b091cde43", "name": "builder-ppc64el-cpu24-ram64-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/5bf0bfb6-311e-4895-a22e-228b091cde43"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/5bf0bfb6-311e-4895-a22e-228b091cde43"}], "description": null}, {"id": "5d1a2077-5359-4a36-922a-351690cae9cc", "name": "builder-ppc64el-cpu4-ram8-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/5d1a2077-5359-4a36-922a-351690cae9cc"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/5d1a2077-5359-4a36-922a-351690cae9cc"}], "description": null}, {"id": "60cc1be7-1fa9-49e9-8702-419f39585f4b", "name": "builder-ppc64el-cpu8-ram16-disk200", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/60cc1be7-1fa9-49e9-8702-419f39585f4b"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/60cc1be7-1fa9-49e9-8702-419f39585f4b"}], "description": null}, {"id": "62f8dfc9-c388-44d0-962f-79bb9917cd11", "name": "builder-ppc64el-cpu2-ram44-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/62f8dfc9-c388-44d0-962f-79bb9917cd11"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/62f8dfc9-c388-44d0-962f-79bb9917cd11"}], "description": null}, {"id": "6679449d-f912-473e-82a2-42546b3087e2", "name": "builder-ppc64el-cpu24-ram128-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/6679449d-f912-473e-82a2-42546b3087e2"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/6679449d-f912-473e-82a2-42546b3087e2"}], "description": null}, {"id": "694472bd-b1d9-4708-a626-5e5b3dc7e09a", "name": "builder-ppc64el-cpu4-ram8-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/694472bd-b1d9-4708-a626-5e5b3dc7e09a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/694472bd-b1d9-4708-a626-5e5b3dc7e09a"}], "description": null}, {"id": "696dde5e-582a-44cf-a030-ef883bc20144", "name": "builder-ppc64el-cpu8-ram16-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/696dde5e-582a-44cf-a030-ef883bc20144"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/696dde5e-582a-44cf-a030-ef883bc20144"}], "description": null}, {"id": "6e611cfc-91b1-4ade-877b-32b26ee297eb", "name": "builder-ppc64el-cpu2-ram16-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/6e611cfc-91b1-4ade-877b-32b26ee297eb"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/6e611cfc-91b1-4ade-877b-32b26ee297eb"}], "description": null}, {"id": "6e66fb56-0aa8-47f9-a877-e48efe207344", "name": "builder-ppc64el-cpu8-ram32-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/6e66fb56-0aa8-47f9-a877-e48efe207344"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/6e66fb56-0aa8-47f9-a877-e48efe207344"}], "description": null}, {"id": "70ba6763-188c-45d0-bb63-7e7930afb1aa", "name": "builder-ppc64el-cpu32-ram256-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/70ba6763-188c-45d0-bb63-7e7930afb1aa"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/70ba6763-188c-45d0-bb63-7e7930afb1aa"}], "description": null}, {"id": "73ce7235-e8b9-4370-aeba-3a33729c46b3", "name": "builder-ppc64el-cpu4-ram16-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/73ce7235-e8b9-4370-aeba-3a33729c46b3"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/73ce7235-e8b9-4370-aeba-3a33729c46b3"}], "description": null}, {"id": "74ef175b-e74b-4750-a5c3-abcefba98501", "name": "builder-ppc64el-cpu8-ram12-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/74ef175b-e74b-4750-a5c3-abcefba98501"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/74ef175b-e74b-4750-a5c3-abcefba98501"}], "description": null}, {"id": "79aee276-b044-40e3-bf50-9ba4009d1400", "name": "builder-ppc64el-cpu8-ram32-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/79aee276-b044-40e3-bf50-9ba4009d1400"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/79aee276-b044-40e3-bf50-9ba4009d1400"}], "description": null}, {"id": "79e5d123-cfc1-4b78-a85b-b607091140eb", "name": "builder-ppc64el-cpu64-ram128-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/79e5d123-cfc1-4b78-a85b-b607091140eb"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/79e5d123-cfc1-4b78-a85b-b607091140eb"}], "description": null}, {"id": "7c20dd8b-310a-4013-ac86-21fdfb5ff536", "name": "builder-ppc64el-cpu8-ram128-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/7c20dd8b-310a-4013-ac86-21fdfb5ff536"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/7c20dd8b-310a-4013-ac86-21fdfb5ff536"}], "description": null}, {"id": "82e7fa99-f07c-46de-8f52-b92ad80a561a", "name": "builder-ppc64el-cpu2-ram16-disk68", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/82e7fa99-f07c-46de-8f52-b92ad80a561a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/82e7fa99-f07c-46de-8f52-b92ad80a561a"}], "description": null}, {"id": "85159e74-03c6-4178-bb31-e756efd11acb", "name": "builder-ppc64el-cpu16-ram8-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/85159e74-03c6-4178-bb31-e756efd11acb"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/85159e74-03c6-4178-bb31-e756efd11acb"}], "description": null}, {"id": "85f8b76d-5d7f-4f2a-998c-cd1d11c834ac", "name": "builder-ppc64el-cpu4-ram64-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/85f8b76d-5d7f-4f2a-998c-cd1d11c834ac"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/85f8b76d-5d7f-4f2a-998c-cd1d11c834ac"}], "description": null}, {"id": "861fa361-94af-45b2-9de2-5cbe0df87b1f", "name": "builder-ppc64el-cpu4-ram12-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/861fa361-94af-45b2-9de2-5cbe0df87b1f"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/861fa361-94af-45b2-9de2-5cbe0df87b1f"}], "description": null}, {"id": "88f7a27b-bd61-4d5e-a90f-391ef9d78fc4", "name": "builder-ppc64el-cpu4-ram105-disk28", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/88f7a27b-bd61-4d5e-a90f-391ef9d78fc4"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/88f7a27b-bd61-4d5e-a90f-391ef9d78fc4"}], "description": null}, {"id": "89afc706-8e2c-4ccd-b411-2d387d894209", "name": "builder-ppc64el-cpu2-ram16-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/89afc706-8e2c-4ccd-b411-2d387d894209"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/89afc706-8e2c-4ccd-b411-2d387d894209"}], "description": null}, {"id": "905418ec-52e8-4ae7-adf1-ccef895e14c2", "name": "builder-ppc64el-cpu4-ram64-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/905418ec-52e8-4ae7-adf1-ccef895e14c2"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/905418ec-52e8-4ae7-adf1-ccef895e14c2"}], "description": null}, {"id": "95b1a0b4-1ecc-4ceb-a8d6-2d3bdefbce79", "name": "builder-ppc64el-cpu2-ram8-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/95b1a0b4-1ecc-4ceb-a8d6-2d3bdefbce79"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/95b1a0b4-1ecc-4ceb-a8d6-2d3bdefbce79"}], "description": null}, {"id": "97704ac8-c97f-4f00-8e0d-85aa4e940154", "name": "builder-ppc64el-cpu2-ram12-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/97704ac8-c97f-4f00-8e0d-85aa4e940154"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/97704ac8-c97f-4f00-8e0d-85aa4e940154"}], "description": null}, {"id": "9a51418a-b43e-417c-9d1d-5c706d3ca620", "name": "builder-ppc64el-cpu8-ram40-disk68", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/9a51418a-b43e-417c-9d1d-5c706d3ca620"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/9a51418a-b43e-417c-9d1d-5c706d3ca620"}], "description": null}, {"id": "9af1f804-8d3b-4769-b317-63a8ee73942b", "name": "builder-ppc64el-cpu4-ram8-disk200", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/9af1f804-8d3b-4769-b317-63a8ee73942b"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/9af1f804-8d3b-4769-b317-63a8ee73942b"}], "description": null}, {"id": "9b15a7c7-c4c2-4841-b95e-928a217f2995", "name": "builder-ppc64el-cpu128-ram128-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/9b15a7c7-c4c2-4841-b95e-928a217f2995"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/9b15a7c7-c4c2-4841-b95e-928a217f2995"}], "description": null}, {"id": "9bec8a82-6767-45bd-826f-abd939beb5e3", "name": "builder-ppc64el-cpu4-ram12-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/9bec8a82-6767-45bd-826f-abd939beb5e3"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/9bec8a82-6767-45bd-826f-abd939beb5e3"}], "description": null}, {"id": "9e195c66-66cf-4314-bf0c-7b24de55e52f", "name": "builder-ppc64el-cpu8-ram64-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/9e195c66-66cf-4314-bf0c-7b24de55e52f"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/9e195c66-66cf-4314-bf0c-7b24de55e52f"}], "description": null}, {"id": "a37e29b1-11ac-4bd5-a015-a9ee46ed25b8", "name": "builder-ppc64el-cpu32-ram128-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/a37e29b1-11ac-4bd5-a015-a9ee46ed25b8"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/a37e29b1-11ac-4bd5-a015-a9ee46ed25b8"}], "description": null}, {"id": "a8157747-dcd3-4c19-98b7-df687076ae87", "name": "builder-ppc64el-cpu4-ram4-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/a8157747-dcd3-4c19-98b7-df687076ae87"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/a8157747-dcd3-4c19-98b7-df687076ae87"}], "description": null}, {"id": "a8d935bc-6ad6-4942-abdd-670d6421a03b", "name": "builder-ppc64el-cpu128-ram32-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/a8d935bc-6ad6-4942-abdd-670d6421a03b"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/a8d935bc-6ad6-4942-abdd-670d6421a03b"}], "description": null}, {"id": "ac354706-0335-4e10-a755-51a75b1a962c", "name": "builder-ppc64el-cpu4-ram8-disk120", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/ac354706-0335-4e10-a755-51a75b1a962c"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/ac354706-0335-4e10-a755-51a75b1a962c"}], "description": null}, {"id": "acb43878-9eee-4d8a-8ec0-610607dd1a28", "name": "builder-ppc64el-cpu128-ram64-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/acb43878-9eee-4d8a-8ec0-610607dd1a28"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/acb43878-9eee-4d8a-8ec0-610607dd1a28"}], "description": null}, {"id": "ad9b6a30-fa9a-400e-b49b-51f9a3c2eda9", "name": "builder-ppc64el-cpu4-ram72-disk28", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/ad9b6a30-fa9a-400e-b49b-51f9a3c2eda9"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/ad9b6a30-fa9a-400e-b49b-51f9a3c2eda9"}], "description": null}, {"id": "b1004655-b40b-44b4-be0b-7cf1763734a1", "name": "builder-ppc64el-cpu32-ram128-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/b1004655-b40b-44b4-be0b-7cf1763734a1"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/b1004655-b40b-44b4-be0b-7cf1763734a1"}], "description": null}, {"id": "b39a607b-bb86-4b68-a455-9dfcb714130f", "name": "builder-ppc64el-cpu4-ram72-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/b39a607b-bb86-4b68-a455-9dfcb714130f"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/b39a607b-bb86-4b68-a455-9dfcb714130f"}], "description": null}, {"id": "b5673781-1772-4bbf-8526-4d19486c6ac3", "name": "builder-ppc64el-cpu2-ram8-disk28", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/b5673781-1772-4bbf-8526-4d19486c6ac3"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/b5673781-1772-4bbf-8526-4d19486c6ac3"}], "description": null}, {"id": "b7538b06-d418-44a1-8ec5-30cc698ac005", "name": "builder-ppc64el-cpu16-ram32-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/b7538b06-d418-44a1-8ec5-30cc698ac005"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/b7538b06-d418-44a1-8ec5-30cc698ac005"}], "description": null}, {"id": "bc3d73f7-47c5-4533-9915-5da668c18032", "name": "builder-ppc64el-cpu4-ram4-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/bc3d73f7-47c5-4533-9915-5da668c18032"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/bc3d73f7-47c5-4533-9915-5da668c18032"}], "description": null}, {"id": "be11f608-8f5e-4e93-8b39-2e062fc23eb1", "name": "builder-ppc64el-cpu16-ram64-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/be11f608-8f5e-4e93-8b39-2e062fc23eb1"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/be11f608-8f5e-4e93-8b39-2e062fc23eb1"}], "description": null}, {"id": "c7e29ea5-b92f-4011-bc7c-1a81af4e8e98", "name": "builder-ppc64el-cpu8-ram16-disk1000", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/c7e29ea5-b92f-4011-bc7c-1a81af4e8e98"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/c7e29ea5-b92f-4011-bc7c-1a81af4e8e98"}], "description": null}, {"id": "ccda5e60-c156-4367-aeaf-25d9cd9fc4d8", "name": "builder-ppc64el-cpu4-ram24-disk68", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/ccda5e60-c156-4367-aeaf-25d9cd9fc4d8"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/ccda5e60-c156-4367-aeaf-25d9cd9fc4d8"}], "description": null}, {"id": "cdc72dd8-3a8d-4f6f-997b-60017a100228", "name": "builder-ppc64el-cpu4-ram40-disk188", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/cdc72dd8-3a8d-4f6f-997b-60017a100228"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/cdc72dd8-3a8d-4f6f-997b-60017a100228"}], "description": null}, {"id": "cedd22e7-22ba-425e-8ace-5a3607e63239", "name": "builder-ppc64el-cpu16-ram4-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/cedd22e7-22ba-425e-8ace-5a3607e63239"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/cedd22e7-22ba-425e-8ace-5a3607e63239"}], "description": null}, {"id": "cffc3023-932a-439e-8bb7-faf8f6d6c42a", "name": "builder-ppc64el-cpu16-ram128-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/cffc3023-932a-439e-8bb7-faf8f6d6c42a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/cffc3023-932a-439e-8bb7-faf8f6d6c42a"}], "description": null}, {"id": "d0030e34-8145-4944-a92d-ba1e454c6126", "name": "builder-ppc64el-cpu64-ram256-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/d0030e34-8145-4944-a92d-ba1e454c6126"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/d0030e34-8145-4944-a92d-ba1e454c6126"}], "description": null}, {"id": "d24cccba-50db-4ebf-8e12-4f601202a489", "name": "builder-ppc64el-cpu2-ram4-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/d24cccba-50db-4ebf-8e12-4f601202a489"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/d24cccba-50db-4ebf-8e12-4f601202a489"}], "description": null}, {"id": "d3801d0d-ae1d-474a-be3f-c3b4e0d75ce6", "name": "builder-ppc64el-cpu4-ram32-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/d3801d0d-ae1d-474a-be3f-c3b4e0d75ce6"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/d3801d0d-ae1d-474a-be3f-c3b4e0d75ce6"}], "description": null}, {"id": "d4a9ba53-090a-4189-a822-48d3e2d80aa2", "name": "builder-ppc64el-cpu2-ram32-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/d4a9ba53-090a-4189-a822-48d3e2d80aa2"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/d4a9ba53-090a-4189-a822-48d3e2d80aa2"}], "description": null}, {"id": "d5142b95-4b59-484a-8d9d-e0519b9fdbba", "name": "builder-ppc64el-cpu4-ram32-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/d5142b95-4b59-484a-8d9d-e0519b9fdbba"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/d5142b95-4b59-484a-8d9d-e0519b9fdbba"}], "description": null}, {"id": "d67d41f2-0658-4e81-ac4f-abc5e19944a7", "name": "builder-ppc64el-cpu2-ram64-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/d67d41f2-0658-4e81-ac4f-abc5e19944a7"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/d67d41f2-0658-4e81-ac4f-abc5e19944a7"}], "description": null}, {"id": "d7441372-a91d-47c8-89a4-c08f59ece241", "name": "builder-ppc64el-cpu16-ram32-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/d7441372-a91d-47c8-89a4-c08f59ece241"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/d7441372-a91d-47c8-89a4-c08f59ece241"}], "description": null}, {"id": "da39261b-e816-43f1-a7bb-f5e784e73fbb", "name": "builder-ppc64el-cpu16-ram16-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/da39261b-e816-43f1-a7bb-f5e784e73fbb"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/da39261b-e816-43f1-a7bb-f5e784e73fbb"}], "description": null}, {"id": "dcc8e80f-6e4d-4f7d-a68f-298ebcb4376d", "name": "builder-ppc64el-cpu32-ram256-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/dcc8e80f-6e4d-4f7d-a68f-298ebcb4376d"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/dcc8e80f-6e4d-4f7d-a68f-298ebcb4376d"}], "description": null}, {"id": "dd1211e5-4133-400a-9dc9-71fa83fd4d97", "name": "builder-ppc64el-cpu2-ram55-disk28", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/dd1211e5-4133-400a-9dc9-71fa83fd4d97"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/dd1211e5-4133-400a-9dc9-71fa83fd4d97"}], "description": null}, {"id": "dfa7dc00-528e-45c5-b267-3d798e73e8da", "name": "builder-ppc64el-cpu8-ram4-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/dfa7dc00-528e-45c5-b267-3d798e73e8da"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/dfa7dc00-528e-45c5-b267-3d798e73e8da"}], "description": null}, {"id": "e2116c8a-a35a-432f-8bf7-06bef30c10ae", "name": "builder-ppc64el-cpu8-ram12-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/e2116c8a-a35a-432f-8bf7-06bef30c10ae"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/e2116c8a-a35a-432f-8bf7-06bef30c10ae"}], "description": null}, {"id": "e2818c96-49bf-4337-a614-ae546d7d7302", "name": "builder-ppc64el-cpu4-ram32-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/e2818c96-49bf-4337-a614-ae546d7d7302"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/e2818c96-49bf-4337-a614-ae546d7d7302"}], "description": null}, {"id": "e4437d6f-4673-4fcb-89e8-1ce861789538", "name": "flaor_00396665", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/e4437d6f-4673-4fcb-89e8-1ce861789538"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/e4437d6f-4673-4fcb-89e8-1ce861789538"}], "description": null}, {"id": "e628d527-f077-426d-9380-5eea778aabc2", "name": "builder-ppc64el-cpu8-ram16-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/e628d527-f077-426d-9380-5eea778aabc2"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/e628d527-f077-426d-9380-5eea778aabc2"}], "description": null}, {"id": "e752e039-cbe4-4a16-8197-de87ba42b83e", "name": "builder-ppc64el-cpu64-ram256-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/e752e039-cbe4-4a16-8197-de87ba42b83e"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/e752e039-cbe4-4a16-8197-de87ba42b83e"}], "description": null}, {"id": "e7f811c8-a60c-45c6-86c8-8e4b025751df", "name": "builder-ppc64el-cpu4-ram16-disk40", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/e7f811c8-a60c-45c6-86c8-8e4b025751df"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/e7f811c8-a60c-45c6-86c8-8e4b025751df"}], "description": null}, {"id": "eb80d7e2-b6e1-42a5-b80d-3dad861f6989", "name": "builder-ppc64el-cpu16-ram4-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/eb80d7e2-b6e1-42a5-b80d-3dad861f6989"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/eb80d7e2-b6e1-42a5-b80d-3dad861f6989"}], "description": null}, {"id": "ed127e2b-02b8-4e61-bf10-0c89b90928e6", "name": "builder-ppc64el-cpu64-ram128-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/ed127e2b-02b8-4e61-bf10-0c89b90928e6"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/ed127e2b-02b8-4e61-bf10-0c89b90928e6"}], "description": null}, {"id": "ef7301a7-71f4-48ac-b387-23251f4060e1", "name": "builder-ppc64el-cpu16-ram8-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/ef7301a7-71f4-48ac-b387-23251f4060e1"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/ef7301a7-71f4-48ac-b387-23251f4060e1"}], "description": null}, {"id": "f0f1af4d-f230-40c1-b789-c94e02a68daa", "name": "builder-ppc64el-cpu16-ram8-disk20", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/f0f1af4d-f230-40c1-b789-c94e02a68daa"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/f0f1af4d-f230-40c1-b789-c94e02a68daa"}], "description": null}, {"id": "f40b2dbc-5d69-40b0-a9fc-71c32de93ca3", "name": "autopkgtest-big-ppc64el", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/f40b2dbc-5d69-40b0-a9fc-71c32de93ca3"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/f40b2dbc-5d69-40b0-a9fc-71c32de93ca3"}], "description": null}, {"id": "f6aae414-e26b-4692-95d4-d851b6993c2a", "name": "builder-ppc64el-cpu2-ram8-disk50", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/f6aae414-e26b-4692-95d4-d851b6993c2a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/f6aae414-e26b-4692-95d4-d851b6993c2a"}], "description": null}, {"id": "f91b245b-ad92-47f6-8861-d1e070fcc19c", "name": "builder-ppc64el-cpu2-ram64-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/f91b245b-ad92-47f6-8861-d1e070fcc19c"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/f91b245b-ad92-47f6-8861-d1e070fcc19c"}], "description": null}, {"id": "fa3bbba4-5e72-4ca3-9661-ccf45947bbf5", "name": "builder-ppc64el-cpu16-ram4-disk100", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/fa3bbba4-5e72-4ca3-9661-ccf45947bbf5"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/fa3bbba4-5e72-4ca3-9661-ccf45947bbf5"}], "description": null}, {"id": "ff4cf1ee-6e00-49b7-9d11-fafa69b910df", "name": "builder-ppc64el-cpu8-ram32-disk40", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/ff4cf1ee-6e00-49b7-9d11-fafa69b910df"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/ff4cf1ee-6e00-49b7-9d11-fafa69b910df"}], "description": null}]} 408s DEBUG (session:936) GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/flavors?is_public=None used request id req-1badc650-9e89-4a3b-99d2-dd80b12538cb 408s DEBUG (session:517) REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1/flavors/102d0b57-e8d2-46c6-9be4-f452119a0280 -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1/flavors/102d0b57-e8d2-46c6-9be4-f452119a0280 HTTP/1.1" 200 623 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 623 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:42 GMT Keep-Alive: timeout=75, max=996 OpenStack-API-Version: compute 2.87 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.87 x-compute-request-id: req-6b8785b3-44cb-4c11-8ec6-b291747b2b63 x-openstack-request-id: req-6b8785b3-44cb-4c11-8ec6-b291747b2b63 408s DEBUG (session:580) RESP BODY: {"flavor": {"id": "102d0b57-e8d2-46c6-9be4-f452119a0280", "name": "autopkgtest-ppc64el", "ram": 4096, "disk": 20, "swap": 0, "OS-FLV-EXT-DATA:ephemeral": 0, "OS-FLV-DISABLED:disabled": false, "vcpus": 2, "os-flavor-access:is_public": false, "rxtx_factor": 1.0, "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/flavors/102d0b57-e8d2-46c6-9be4-f452119a0280"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/flavors/102d0b57-e8d2-46c6-9be4-f452119a0280"}], "description": null, "extra_specs": {"aggregate_instance_extra_specs:commit": "builder-ppc64el", "hw_rng:allowed": "True"}}} 408s DEBUG (session:936) GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/flavors/102d0b57-e8d2-46c6-9be4-f452119a0280 used request id req-6b8785b3-44cb-4c11-8ec6-b291747b2b63 408s DEBUG (session:517) REQ: curl -g -i -X POST https://nova.ps6.canonical.com:8774/v2.1/servers -H "Accept: application/json" -H "Content-Type: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" -d '{"server": {"name": "adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-proposed-migration-environment-20-e325a7f8-5491-4109-af68-f7ce1753aa38", "imageRef": "dcc6a44c-21fb-45bb-821a-d64a8784c175", "flavorRef": "102d0b57-e8d2-46c6-9be4-f452119a0280", "user_data": "I2Nsb3VkLWNvbmZpZwpob3N0bmFtZTogYXV0b3BrZ3Rlc3QKZnFkbjogYXV0b3BrZ3Rlc3QubG9jYWwKbWFuYWdlX2V0Y19ob3N0czogdHJ1ZQphcHRfdXBkYXRlOiB0cnVlCmFwdF91cGdyYWRlOiBmYWxzZQphcHRfbWlycm9yOiBodHRwOi8vZnRwbWFzdGVyLmludGVybmFsL3VidW50dS8KCnJ1bmNtZDoKIC0gZWNobyAnQWNxdWlyZTo6TGFuZ3VhZ2VzICJub25lIjsnID4gL2V0Yy9hcHQvYXB0LmNvbmYuZC85MG5vbGFuZ3VhZ2VzCiAtIGVjaG8gJ2ZvcmNlLXVuc2FmZS1pbycgPiAvZXRjL2Rwa2cvZHBrZy5jZmcuZC9hdXRvcGtndGVzdAogLSBwcmludGYgJ1xuVEVSTT1saW51eFxuJ2h0dHBfcHJveHk9aHR0cDovL3NxdWlkLmludGVybmFsOjMxMjgnXG4naHR0cHNfcHJveHk9aHR0cDovL3NxdWlkLmludGVybmFsOjMxMjgnXG4nbm9fcHJveHk9MTI3LjAuMC4xLDEyNy4wLjEuMSxsb2dpbi51YnVudHUuY29tLGxvY2FsaG9zdCxsb2NhbGRvbWFpbixub3ZhbG9jYWwsaW50ZXJuYWwsYXJjaGl2ZS51YnVudHUuY29tLHBvcnRzLnVidW50dS5jb20sc2VjdXJpdHkudWJ1bnR1LmNvbSxkZGVicy51YnVudHUuY29tLGNoYW5nZWxvZ3MudWJ1bnR1LmNvbSxrZXlzZXJ2ZXIudWJ1bnR1LmNvbSxsYXVuY2hwYWRsaWJyYXJpYW4ubmV0LGxhdW5jaHBhZGNvbnRlbnQubmV0LGxhdW5jaHBhZC5uZXQsMTAuMjQuMC4wLzI0LGtleXN0b25lLnBzNS5jYW5vbmljYWwuY29tLG9iamVjdHN0b3JhZ2UucHJvZHN0YWNrNS5jYW5vbmljYWwuY29tJ1xuJyA+PiAvZXRjL2Vudmlyb25tZW50CiAtIHNlZCAtaSAtciAnL14xMjcuMC4xLjEvIHMvYXV0b3BrZ3Rlc3QtW14gXStcLi9hdXRvcGtndGVzdFwuLycgL2V0Yy9ob3N0cwo=", "key_name": "testbed-juju-7f2275-prod-proposed-migration-environment-20", "min_count": 1, "max_count": 1, "security_groups": [{"name": "autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-ppc64el-26.secgroup"}], "networks": [{"uuid": "3083d638-5564-4f5c-97ef-09f045123d20"}]}}' 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "POST /v2.1/servers HTTP/1.1" 202 479 408s DEBUG (session:548) RESP: [202] Connection: Keep-Alive Content-Length: 479 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:43 GMT Keep-Alive: timeout=75, max=995 OpenStack-API-Version: compute 2.87 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.87 location: https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a x-compute-request-id: req-85171fe7-d2bc-4c9f-8a4c-4a5a4667afd0 x-openstack-request-id: req-85171fe7-d2bc-4c9f-8a4c-4a5a4667afd0 408s DEBUG (session:580) RESP BODY: {"server": {"id": "b21862f8-c2b8-4bd1-8fc5-e8821381a02a", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a"}], "OS-DCF:diskConfig": "MANUAL", "security_groups": [{"name": "autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-ppc64el-26.secgroup"}], "adminPass": "zdSVPkAHd7sx"}} 408s DEBUG (session:936) POST call to compute for https://nova.ps6.canonical.com:8774/v2.1/servers used request id req-85171fe7-d2bc-4c9f-8a4c-4a5a4667afd0 408s DEBUG (session:517) REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a HTTP/1.1" 200 3200 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 3200 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:43 GMT Keep-Alive: timeout=75, max=994 OpenStack-API-Version: compute 2.87 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.87 x-compute-request-id: req-eb5f62a0-117c-4213-91be-be4ca037d877 x-openstack-request-id: req-eb5f62a0-117c-4213-91be-be4ca037d877 408s DEBUG (session:580) RESP BODY: {"server": {"id": "b21862f8-c2b8-4bd1-8fc5-e8821381a02a", "name": "adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-proposed-migration-environment-20-e325a7f8-5491-4109-af68-f7ce1753aa38", "status": "BUILD", "tenant_id": "623df63b80274c21bc79a0c35e68d615", "user_id": "c871debdeffd4cb8b69ce618fc4aa361", "metadata": {}, "hostId": "", "image": {"id": "dcc6a44c-21fb-45bb-821a-d64a8784c175", "links": [{"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/images/dcc6a44c-21fb-45bb-821a-d64a8784c175"}]}, "flavor": {"vcpus": 2, "ram": 4096, "disk": 20, "ephemeral": 0, "swap": 0, "original_name": "autopkgtest-ppc64el", "extra_specs": {"aggregate_instance_extra_specs:commit": "builder-ppc64el", "hw_rng:allowed": "True"}}, "created": "2024-11-25T09:45:44Z", "updated": "2024-11-25T09:45:43Z", "addresses": {}, "accessIPv4": "", "accessIPv6": "", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a"}], "OS-DCF:diskConfig": "MANUAL", "progress": 0, "OS-EXT-AZ:availability_zone": "", "config_drive": "", "key_name": "testbed-juju-7f2275-prod-proposed-migration-environment-20", "OS-SRV-USG:launched_at": null, "OS-SRV-USG:terminated_at": null, "OS-EXT-SRV-ATTR:host": null, "OS-EXT-SRV-ATTR:instance_name": "", "OS-EXT-SRV-ATTR:hypervisor_hostname": null, "OS-EXT-SRV-ATTR:reservation_id": "r-ahklkqaa", "OS-EXT-SRV-ATTR:launch_index": 0, "OS-EXT-SRV-ATTR:hostname": "adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-pr", "OS-EXT-SRV-ATTR:kernel_id": "", "OS-EXT-SRV-ATTR:ramdisk_id": "", "OS-EXT-SRV-ATTR:root_device_name": null, "OS-EXT-SRV-ATTR:user_data": "I2Nsb3VkLWNvbmZpZwpob3N0bmFtZTogYXV0b3BrZ3Rlc3QKZnFkbjogYXV0b3BrZ3Rlc3QubG9jYWwKbWFuYWdlX2V0Y19ob3N0czogdHJ1ZQphcHRfdXBkYXRlOiB0cnVlCmFwdF91cGdyYWRlOiBmYWxzZQphcHRfbWlycm9yOiBodHRwOi8vZnRwbWFzdGVyLmludGVybmFsL3VidW50dS8KCnJ1bmNtZDoKIC0gZWNobyAnQWNxdWlyZTo6TGFuZ3VhZ2VzICJub25lIjsnID4gL2V0Yy9hcHQvYXB0LmNvbmYuZC85MG5vbGFuZ3VhZ2VzCiAtIGVjaG8gJ2ZvcmNlLXVuc2FmZS1pbycgPiAvZXRjL2Rwa2cvZHBrZy5jZmcuZC9hdXRvcGtndGVzdAogLSBwcmludGYgJ1xuVEVSTT1saW51eFxuJ2h0dHBfcHJveHk9aHR0cDovL3NxdWlkLmludGVybmFsOjMxMjgnXG4naHR0cHNfcHJveHk9aHR0cDovL3NxdWlkLmludGVybmFsOjMxMjgnXG4nbm9fcHJveHk9MTI3LjAuMC4xLDEyNy4wLjEuMSxsb2dpbi51YnVudHUuY29tLGxvY2FsaG9zdCxsb2NhbGRvbWFpbixub3ZhbG9jYWwsaW50ZXJuYWwsYXJjaGl2ZS51YnVudHUuY29tLHBvcnRzLnVidW50dS5jb20sc2VjdXJpdHkudWJ1bnR1LmNvbSxkZGVicy51YnVudHUuY29tLGNoYW5nZWxvZ3MudWJ1bnR1LmNvbSxrZXlzZXJ2ZXIudWJ1bnR1LmNvbSxsYXVuY2hwYWRsaWJyYXJpYW4ubmV0LGxhdW5jaHBhZGNvbnRlbnQubmV0LGxhdW5jaHBhZC5uZXQsMTAuMjQuMC4wLzI0LGtleXN0b25lLnBzNS5jYW5vbmljYWwuY29tLG9iamVjdHN0b3JhZ2UucHJvZHN0YWNrNS5jYW5vbmljYWwuY29tJ1xuJyA+PiAvZXRjL2Vudmlyb25tZW50CiAtIHNlZCAtaSAtciAnL14xMjcuMC4xLjEvIHMvYXV0b3BrZ3Rlc3QtW14gXStcLi9hdXRvcGtndGVzdFwuLycgL2V0Yy9ob3N0cwo=", "OS-EXT-STS:task_state": "scheduling", "OS-EXT-STS:vm_state": "building", "OS-EXT-STS:power_state": 0, "os-extended-volumes:volumes_attached": [], "locked": false, "locked_reason": null, "description": null, "tags": [], "trusted_image_certificates": null, "server_groups": []}} 408s DEBUG (session:936) GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a used request id req-eb5f62a0-117c-4213-91be-be4ca037d877 408s DEBUG (session:517) REQ: curl -g -i -X GET https://glance.ps6.canonical.com:9292/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175 -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:429) https://glance.ps6.canonical.com:9292 "GET /v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175 HTTP/1.1" 200 2292 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 2292 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:43 GMT Keep-Alive: timeout=75, max=999 Server: Apache/2.4.52 (Ubuntu) X-Openstack-Request-Id: req-848623cf-cc8c-43ad-b446-7b8c91ede512 408s DEBUG (session:580) RESP BODY: {"architecture": "ppc64le", "base_image_ref": "302dbebd-8fb5-46eb-aa5c-84ec11ab5c95", "boot_roles": "reader,load-balancer_member,member", "content_id": "auto.sync", "hw_cdrom_bus": "scsi", "hw_disk_bus": "virtio", "hw_machine_type": "pseries", "hw_video_model": "vga", "hw_vif_model": "virtio", "image_location": "snapshot", "image_state": "available", "image_type": "snapshot", "instance_uuid": "3677b220-efbb-4a1d-aa95-ccbf4f88d581", "item_name": "disk1.img", "os_distro": "ubuntu", "os_version": "24.10", "owner_id": "623df63b80274c21bc79a0c35e68d615", "owner_project_name": "prod-proposed-migration-ppc64el_project", "owner_user_name": "prod-proposed-migration-ppc64el", "product_name": "com.ubuntu.cloud.daily:server:24.10:ppc64el", "simplestreams_metadata": "{\"aliases\": \"24.10,o,oracular,devel\", \"arch\": \"ppc64el\", \"ftype\": \"disk1.img\", \"label\": \"daily\", \"md5\": \"fd88d9a689ac4d7ab4bea632de90d355\", \"os\": \"ubuntu\", \"pubname\": \"ubuntu-oracular-daily-ppc64el-server-20241009\", \"release\": \"oracular\", \"release_codenam", "source_content_id": "com.ubuntu.cloud:daily:download", "user_id": "c871debdeffd4cb8b69ce618fc4aa361", "version_name": "20241009", "name": "adt/ubuntu-plucky-ppc64el-server-20241119.img", "disk_format": "qcow2", "container_format": "bare", "visibility": "private", "size": 2765422592, "virtual_size": 21474836480, "status": "active", "checksum": "57e80ce32498e1f4de918fa4fc0d5397", "protected": false, "min_ram": 0, "min_disk": 20, "owner": "623df63b80274c21bc79a0c35e68d615", "os_hidden": false, "os_hash_algo": "sha512", "os_hash_value": "30549527d3366d04c8b9f1b6d778693b1b12f707713fcf6f2880cb19e75917565fda77d2994499c62cae9d49bc117aed5c1cc9529046ad4522e6bd68ad3eba9a", "id": "dcc6a44c-21fb-45bb-821a-d64a8784c175", "created_at": "2024-11-19T00:59:37Z", "updated_at": "2024-11-19T01:00:12Z", "locations": [{"url": "rbd://eea9d068-c18c-11ed-8dc0-013aacb71b80/glance/dcc6a44c-21fb-45bb-821a-d64a8784c175/snap", "metadata": {"store": "ceph"}}], "direct_url": "rbd://eea9d068-c18c-11ed-8dc0-013aacb71b80/glance/dcc6a44c-21fb-45bb-821a-d64a8784c175/snap", "tags": [], "self": "/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175", "file": "/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175/file", "schema": "/v2/schemas/image", "stores": "ceph"} 408s DEBUG (session:936) GET call to image for https://glance.ps6.canonical.com:9292/v2/images/dcc6a44c-21fb-45bb-821a-d64a8784c175 used request id req-848623cf-cc8c-43ad-b446-7b8c91ede512 408s +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ 408s | Property | Value | 408s +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ 408s | OS-DCF:diskConfig | MANUAL | 408s | OS-EXT-AZ:availability_zone | | 408s | OS-EXT-SRV-ATTR:host | - | 408s | OS-EXT-SRV-ATTR:hostname | adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-pr | 408s | OS-EXT-SRV-ATTR:hypervisor_hostname | - | 408s | OS-EXT-SRV-ATTR:instance_name | | 408s | OS-EXT-SRV-ATTR:kernel_id | | 408s | OS-EXT-SRV-ATTR:launch_index | 0 | 408s | OS-EXT-SRV-ATTR:ramdisk_id | | 408s | OS-EXT-SRV-ATTR:reservation_id | r-ahklkqaa | 408s | OS-EXT-SRV-ATTR:root_device_name | - | 408s | OS-EXT-STS:power_state | 0 | 408s | OS-EXT-STS:task_state | scheduling | 408s | OS-EXT-STS:vm_state | building | 408s | OS-SRV-USG:launched_at | - | 408s | OS-SRV-USG:terminated_at | - | 408s | accessIPv4 | | 408s | accessIPv6 | | 408s | adminPass | zdSVPkAHd7sx | 408s | config_drive | | 408s | created | 2024-11-25T09:45:44Z | 408s | description | - | 408s | flavor:disk | 20 | 408s | flavor:ephemeral | 0 | 408s | flavor:extra_specs | {"aggregate_instance_extra_specs:commit": "builder-ppc64el", "hw_rng:allowed": "True"} | 408s | flavor:original_name | autopkgtest-ppc64el | 408s | flavor:ram | 4096 | 408s | flavor:swap | 0 | 408s | flavor:vcpus | 2 | 408s | hostId | | 408s | id | b21862f8-c2b8-4bd1-8fc5-e8821381a02a | 408s | image | adt/ubuntu-plucky-ppc64el-server-20241119.img (dcc6a44c-21fb-45bb-821a-d64a8784c175) | 408s | key_name | testbed-juju-7f2275-prod-proposed-migration-environment-20 | 408s | locked | False | 408s | locked_reason | - | 408s | metadata | {} | 408s | name | adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-proposed-migration-environment-20-e325a7f8-5491-4109-af68-f7ce1753aa38 | 408s | os-extended-volumes:volumes_attached | [] | 408s | progress | 0 | 408s | security_groups | autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-ppc64el-26.secgroup | 408s | server_groups | [] | 408s | status | BUILD | 408s | tags | [] | 408s | tenant_id | 623df63b80274c21bc79a0c35e68d615 | 408s | trusted_image_certificates | - | 408s | updated | 2024-11-25T09:45:43Z | 408s | user_id | c871debdeffd4cb8b69ce618fc4aa361 | 408s +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+DEBUG (session:517) REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a HTTP/1.1" 200 3200 408s DEBUG (session:548) RESP: [200] Connection: Keep-Alive Content-Length: 3200 Content-Type: application/json Date: Mon, 25 Nov 2024 09:45:44 GMT Keep-Alive: timeout=75, max=993 OpenStack-API-Version: compute 2.87 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.87 x-compute-request-id: req-b94a941d-aa5e-4908-bee3-189fbde6b9b6 x-openstack-request-id: req-b94a941d-aa5e-4908-bee3-189fbde6b9b6 408s DEBUG (session:580) RESP BODY: {"server": {"id": "b21862f8-c2b8-4bd1-8fc5-e8821381a02a", "name": "adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-proposed-migration-environment-20-e325a7f8-5491-4109-af68-f7ce1753aa38", "status": "BUILD", "tenant_id": "623df63b80274c21bc79a0c35e68d615", "user_id": "c871debdeffd4cb8b69ce618fc4aa361", "metadata": {}, "hostId": "", "image": {"id": "dcc6a44c-21fb-45bb-821a-d64a8784c175", "links": [{"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/images/dcc6a44c-21fb-45bb-821a-d64a8784c175"}]}, "flavor": {"vcpus": 2, "ram": 4096, "disk": 20, "ephemeral": 0, "swap": 0, "original_name": "autopkgtest-ppc64el", "extra_specs": {"aggregate_instance_extra_specs:commit": "builder-ppc64el", "hw_rng:allowed": "True"}}, "created": "2024-11-25T09:45:44Z", "updated": "2024-11-25T09:45:44Z", "addresses": {}, "accessIPv4": "", "accessIPv6": "", "links": [{"rel": "self", "href": "https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a"}, {"rel": "bookmark", "href": "https://nova.ps6.canonical.com:8774/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a"}], "OS-DCF:diskConfig": "MANUAL", "progress": 0, "OS-EXT-AZ:availability_zone": "", "config_drive": "", "key_name": "testbed-juju-7f2275-prod-proposed-migration-environment-20", "OS-SRV-USG:launched_at": null, "OS-SRV-USG:terminated_at": null, "OS-EXT-SRV-ATTR:host": null, "OS-EXT-SRV-ATTR:instance_name": "", "OS-EXT-SRV-ATTR:hypervisor_hostname": null, "OS-EXT-SRV-ATTR:reservation_id": "r-ahklkqaa", "OS-EXT-SRV-ATTR:launch_index": 0, "OS-EXT-SRV-ATTR:hostname": "adt-plucky-ppc64el-tiktoken-20241125-094451-juju-7f2275-prod-pr", "OS-EXT-SRV-ATTR:kernel_id": "", "OS-EXT-SRV-ATTR:ramdisk_id": "", "OS-EXT-SRV-ATTR:root_device_name": null, "OS-EXT-SRV-ATTR:user_data": "I2Nsb3VkLWNvbmZpZwpob3N0bmFtZTogYXV0b3BrZ3Rlc3QKZnFkbjogYXV0b3BrZ3Rlc3QubG9jYWwKbWFuYWdlX2V0Y19ob3N0czogdHJ1ZQphcHRfdXBkYXRlOiB0cnVlCmFwdF91cGdyYWRlOiBmYWxzZQphcHRfbWlycm9yOiBodHRwOi8vZnRwbWFzdGVyLmludGVybmFsL3VidW50dS8KCnJ1bmNtZDoKIC0gZWNobyAnQWNxdWlyZTo6TGFuZ3VhZ2VzICJub25lIjsnID4gL2V0Yy9hcHQvYXB0LmNvbmYuZC85MG5vbGFuZ3VhZ2VzCiAtIGVjaG8gJ2ZvcmNlLXVuc2FmZS1pbycgPiAvZXRjL2Rwa2cvZHBrZy5jZmcuZC9hdXRvcGtndGVzdAogLSBwcmludGYgJ1xuVEVSTT1saW51eFxuJ2h0dHBfcHJveHk9aHR0cDovL3NxdWlkLmludGVybmFsOjMxMjgnXG4naHR0cHNfcHJveHk9aHR0cDovL3NxdWlkLmludGVybmFsOjMxMjgnXG4nbm9fcHJveHk9MTI3LjAuMC4xLDEyNy4wLjEuMSxsb2dpbi51YnVudHUuY29tLGxvY2FsaG9zdCxsb2NhbGRvbWFpbixub3ZhbG9jYWwsaW50ZXJuYWwsYXJjaGl2ZS51YnVudHUuY29tLHBvcnRzLnVidW50dS5jb20sc2VjdXJpdHkudWJ1bnR1LmNvbSxkZGVicy51YnVudHUuY29tLGNoYW5nZWxvZ3MudWJ1bnR1LmNvbSxrZXlzZXJ2ZXIudWJ1bnR1LmNvbSxsYXVuY2hwYWRsaWJyYXJpYW4ubmV0LGxhdW5jaHBhZGNvbnRlbnQubmV0LGxhdW5jaHBhZC5uZXQsMTAuMjQuMC4wLzI0LGtleXN0b25lLnBzNS5jYW5vbmljYWwuY29tLG9iamVjdHN0b3JhZ2UucHJvZHN0YWNrNS5jYW5vbmljYWwuY29tJ1xuJyA+PiAvZXRjL2Vudmlyb25tZW50CiAtIHNlZCAtaSAtciAnL14xMjcuMC4xLjEvIHMvYXV0b3BrZ3Rlc3QtW14gXStcLi9hdXRvcGtndGVzdFwuLycgL2V0Yy9ob3N0cwo=", "OS-EXT-STS:task_state": "scheduling", "OS-EXT-STS:vm_state": "building", "OS-EXT-STS:power_state": 0, "os-extended-volumes:volumes_attached": [], "locked": false, "locked_reason": null, "description": null, "tags": [], "trusted_image_certificates": null, "server_groups": []}} 408s DEBUG (session:936) GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a used request id req-b94a941d-aa5e-4908-bee3-189fbde6b9b6 408s 408s 408s Server building... 0% completeDEBUG (session:517) REQ: curl -g -i -X GET https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.87" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}f8f537510e7e2a345a7c63d1126069325d2d630bed8dc9b933acae18d8fd05f9" -H "X-OpenStack-Nova-API-Version: 2.87" 408s DEBUG (connectionpool:429) https://nova.ps6.canonical.com:8774 "GET /v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a HTTP/1.1" 404 111 408s DEBUG (session:548) RESP: [404] Connection: Keep-Alive Content-Length: 111 Content-Type: application/json; charset=UTF-8 Date: Mon, 25 Nov 2024 09:45:49 GMT Keep-Alive: timeout=75, max=992 OpenStack-API-Version: compute 2.87 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.87 x-compute-request-id: req-87863db6-9f64-42fc-b4e8-8e6f01010d4c x-openstack-request-id: req-87863db6-9f64-42fc-b4e8-8e6f01010d4c 408s DEBUG (session:580) RESP BODY: {"itemNotFound": {"code": 404, "message": "Instance b21862f8-c2b8-4bd1-8fc5-e8821381a02a could not be found."}} 408s DEBUG (session:936) GET call to compute for https://nova.ps6.canonical.com:8774/v2.1/servers/b21862f8-c2b8-4bd1-8fc5-e8821381a02a used request id req-87863db6-9f64-42fc-b4e8-8e6f01010d4c 408s DEBUG (shell:822) Instance b21862f8-c2b8-4bd1-8fc5-e8821381a02a could not be found. (HTTP 404) (Request-ID: req-87863db6-9f64-42fc-b4e8-8e6f01010d4c) 408s Traceback (most recent call last): 408s File "/usr/lib/python3/dist-packages/novaclient/shell.py", line 820, in main 408s OpenStackComputeShell().main(argv) 408s File "/usr/lib/python3/dist-packages/novaclient/shell.py", line 742, in main 408s args.func(self.cs, args) 408s File "/usr/lib/python3/dist-packages/novaclient/v2/shell.py", line 980, in do_boot 408s _poll_for_status(cs.servers.get, server.id, 'building', ['active']) 408s File "/usr/lib/python3/dist-packages/novaclient/v2/shell.py", line 1003, in _poll_for_status 408s obj = poll_fn(obj_id) 408s File "/usr/lib/python3/dist-packages/novaclient/v2/servers.py", line 846, in get 408s return self._get("/servers/%s" % base.getid(server), "server") 408s File "/usr/lib/python3/dist-packages/novaclient/base.py", line 352, in _get 408s resp, body = self.api.client.get(url) 408s File "/usr/lib/python3/dist-packages/keystoneauth1/adapter.py", line 386, in get 408s return self.request(url, 'GET', **kwargs) 408s File "/usr/lib/python3/dist-packages/novaclient/client.py", line 78, in request 408s raise exceptions.from_response(resp, body, url, method) 408s novaclient.exceptions.NotFound: Instance b21862f8-c2b8-4bd1-8fc5-e8821381a02a could not be found. (HTTP 404) (Request-ID: req-87863db6-9f64-42fc-b4e8-8e6f01010d4c) 408s ERROR (NotFound): Instance b21862f8-c2b8-4bd1-8fc5-e8821381a02a could not be found. (HTTP 404) (Request-ID: req-87863db6-9f64-42fc-b4e8-8e6f01010d4c) 408s ERROR (CommandError): Unable to delete the specified server(s). 410s autopkgtest [09:51:41]: testbed dpkg architecture: ppc64el 410s autopkgtest [09:51:41]: testbed apt version: 2.9.8 410s autopkgtest [09:51:41]: @@@@@@@@@@@@@@@@@@@@ test bed setup 411s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 411s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [797 kB] 412s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [14.2 kB] 412s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9704 B] 412s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [49.6 kB] 412s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main ppc64el Packages [61.8 kB] 412s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/restricted ppc64el Packages [756 B] 412s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el Packages [612 kB] 412s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse ppc64el Packages [9468 B] 412s Fetched 1628 kB in 1s (1938 kB/s) 412s Reading package lists... 414s Reading package lists... 415s Building dependency tree... 415s Reading state information... 415s Calculating upgrade... 415s The following package was automatically installed and is no longer required: 415s libsgutils2-1.46-2 415s Use 'sudo apt autoremove' to remove it. 415s The following NEW packages will be installed: 415s libsgutils2-1.48 415s The following packages will be upgraded: 415s bash bpftrace curl debconf debconf-i18n distro-info dracut-install 415s gir1.2-girepository-2.0 gir1.2-glib-2.0 hostname init init-system-helpers 415s libaudit-common libaudit1 libcurl3t64-gnutls libcurl4t64 415s libgirepository-1.0-1 libglib2.0-0t64 libglib2.0-data liblzma5 415s libpam-modules libpam-modules-bin libpam-runtime libpam0g libplymouth5 415s libselinux1 libsemanage-common libsemanage2 linux-base lsvpd 415s lto-disabled-list lxd-installer openssh-client openssh-server 415s openssh-sftp-server pinentry-curses plymouth plymouth-theme-ubuntu-text 415s python3-blinker python3-dbus python3-debconf python3-gi 415s python3-jsonschema-specifications python3-rpds-py python3-yaml sg3-utils 415s sg3-utils-udev vim-common vim-tiny xxd xz-utils 415s 51 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 415s Need to get 14.1 MB of archives. 415s After this operation, 3452 kB of additional disk space will be used. 415s Get:1 http://ftpmaster.internal/ubuntu plucky/main ppc64el bash ppc64el 5.2.32-1ubuntu2 [979 kB] 416s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el hostname ppc64el 3.25 [11.3 kB] 416s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el init-system-helpers all 1.67ubuntu1 [39.1 kB] 416s Get:4 http://ftpmaster.internal/ubuntu plucky/main ppc64el libaudit-common all 1:4.0.2-2ubuntu1 [6578 B] 416s Get:5 http://ftpmaster.internal/ubuntu plucky/main ppc64el libaudit1 ppc64el 1:4.0.2-2ubuntu1 [59.6 kB] 416s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el debconf-i18n all 1.5.87ubuntu1 [204 kB] 416s Get:7 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-debconf all 1.5.87ubuntu1 [4156 B] 416s Get:8 http://ftpmaster.internal/ubuntu plucky/main ppc64el debconf all 1.5.87ubuntu1 [124 kB] 416s Get:9 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam0g ppc64el 1.5.3-7ubuntu4 [76.2 kB] 416s Get:10 http://ftpmaster.internal/ubuntu plucky/main ppc64el libselinux1 ppc64el 3.7-3ubuntu1 [100 kB] 416s Get:11 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam-modules-bin ppc64el 1.5.3-7ubuntu4 [57.6 kB] 416s Get:12 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam-modules ppc64el 1.5.3-7ubuntu4 [325 kB] 416s Get:13 http://ftpmaster.internal/ubuntu plucky/main ppc64el init ppc64el 1.67ubuntu1 [6432 B] 416s Get:14 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-sftp-server ppc64el 1:9.9p1-3ubuntu2 [43.4 kB] 416s Get:15 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-server ppc64el 1:9.9p1-3ubuntu2 [680 kB] 416s Get:16 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-client ppc64el 1:9.9p1-3ubuntu2 [1169 kB] 416s Get:17 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam-runtime all 1.5.3-7ubuntu4 [40.8 kB] 416s Get:18 http://ftpmaster.internal/ubuntu plucky/main ppc64el liblzma5 ppc64el 5.6.3-1 [172 kB] 416s Get:19 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsemanage-common all 3.7-2build1 [7186 B] 416s Get:20 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsemanage2 ppc64el 3.7-2build1 [115 kB] 416s Get:21 http://ftpmaster.internal/ubuntu plucky/main ppc64el distro-info ppc64el 1.12 [20.0 kB] 416s Get:22 http://ftpmaster.internal/ubuntu plucky/main ppc64el gir1.2-girepository-2.0 ppc64el 1.82.0-2 [25.3 kB] 416s Get:23 http://ftpmaster.internal/ubuntu plucky/main ppc64el gir1.2-glib-2.0 ppc64el 2.82.2-3 [182 kB] 416s Get:24 http://ftpmaster.internal/ubuntu plucky/main ppc64el libglib2.0-0t64 ppc64el 2.82.2-3 [1787 kB] 416s Get:25 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgirepository-1.0-1 ppc64el 1.82.0-2 [95.5 kB] 416s Get:26 http://ftpmaster.internal/ubuntu plucky/main ppc64el libglib2.0-data all 2.82.2-3 [51.7 kB] 416s Get:27 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-dbus ppc64el 1.3.2-5build4 [117 kB] 416s Get:28 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-gi ppc64el 3.50.0-3build1 [308 kB] 416s Get:29 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-yaml ppc64el 6.0.2-1build1 [180 kB] 416s Get:30 http://ftpmaster.internal/ubuntu plucky/main ppc64el vim-tiny ppc64el 2:9.1.0861-1ubuntu1 [1078 kB] 416s Get:31 http://ftpmaster.internal/ubuntu plucky/main ppc64el vim-common all 2:9.1.0861-1ubuntu1 [395 kB] 416s Get:32 http://ftpmaster.internal/ubuntu plucky/main ppc64el xxd ppc64el 2:9.1.0861-1ubuntu1 [67.9 kB] 416s Get:33 http://ftpmaster.internal/ubuntu plucky/main ppc64el libplymouth5 ppc64el 24.004.60-2ubuntu4 [169 kB] 416s Get:34 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsgutils2-1.48 ppc64el 1.48-0ubuntu1 [133 kB] 416s Get:35 http://ftpmaster.internal/ubuntu plucky/main ppc64el lsvpd ppc64el 1.7.14-1ubuntu3 [162 kB] 416s Get:36 http://ftpmaster.internal/ubuntu plucky/main ppc64el plymouth-theme-ubuntu-text ppc64el 24.004.60-2ubuntu4 [11.1 kB] 416s Get:37 http://ftpmaster.internal/ubuntu plucky/main ppc64el plymouth ppc64el 24.004.60-2ubuntu4 [152 kB] 416s Get:38 http://ftpmaster.internal/ubuntu plucky/main ppc64el xz-utils ppc64el 5.6.3-1 [280 kB] 416s Get:39 http://ftpmaster.internal/ubuntu plucky/main ppc64el bpftrace ppc64el 0.21.2-2ubuntu3 [1898 kB] 416s Get:40 http://ftpmaster.internal/ubuntu plucky/main ppc64el curl ppc64el 8.11.0-1ubuntu2 [256 kB] 416s Get:41 http://ftpmaster.internal/ubuntu plucky/main ppc64el libcurl4t64 ppc64el 8.11.0-1ubuntu2 [476 kB] 416s Get:42 http://ftpmaster.internal/ubuntu plucky/main ppc64el dracut-install ppc64el 105-2ubuntu2 [38.5 kB] 416s Get:43 http://ftpmaster.internal/ubuntu plucky/main ppc64el libcurl3t64-gnutls ppc64el 8.11.0-1ubuntu2 [474 kB] 416s Get:44 http://ftpmaster.internal/ubuntu plucky/main ppc64el linux-base all 4.10.1ubuntu1 [34.8 kB] 416s Get:45 http://ftpmaster.internal/ubuntu plucky/main ppc64el lto-disabled-list all 54 [12.2 kB] 416s Get:46 http://ftpmaster.internal/ubuntu plucky/main ppc64el lxd-installer all 10 [5264 B] 416s Get:47 http://ftpmaster.internal/ubuntu plucky/main ppc64el pinentry-curses ppc64el 1.3.1-0ubuntu2 [43.5 kB] 416s Get:48 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-blinker all 1.9.0-1 [10.7 kB] 416s Get:49 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-rpds-py ppc64el 0.21.0-2ubuntu1 [338 kB] 416s Get:50 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-jsonschema-specifications all 2023.12.1-2 [9116 B] 416s Get:51 http://ftpmaster.internal/ubuntu plucky/main ppc64el sg3-utils ppc64el 1.48-0ubuntu1 [1070 kB] 416s Get:52 http://ftpmaster.internal/ubuntu plucky/main ppc64el sg3-utils-udev all 1.48-0ubuntu1 [6608 B] 417s Preconfiguring packages ... 417s Fetched 14.1 MB in 1s (10.6 MB/s) 417s (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 ... 73847 files and directories currently installed.) 417s Preparing to unpack .../bash_5.2.32-1ubuntu2_ppc64el.deb ... 417s Unpacking bash (5.2.32-1ubuntu2) over (5.2.32-1ubuntu1) ... 417s Setting up bash (5.2.32-1ubuntu2) ... 417s update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode 417s (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 ... 73847 files and directories currently installed.) 417s Preparing to unpack .../hostname_3.25_ppc64el.deb ... 417s Unpacking hostname (3.25) over (3.23+nmu2ubuntu2) ... 417s Setting up hostname (3.25) ... 417s (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 ... 73847 files and directories currently installed.) 417s Preparing to unpack .../init-system-helpers_1.67ubuntu1_all.deb ... 417s Unpacking init-system-helpers (1.67ubuntu1) over (1.66ubuntu1) ... 417s Setting up init-system-helpers (1.67ubuntu1) ... 417s (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 ... 73847 files and directories currently installed.) 417s Preparing to unpack .../libaudit-common_1%3a4.0.2-2ubuntu1_all.deb ... 417s Unpacking libaudit-common (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 417s Setting up libaudit-common (1:4.0.2-2ubuntu1) ... 417s (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 ... 73847 files and directories currently installed.) 417s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu1_ppc64el.deb ... 417s Unpacking libaudit1:ppc64el (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 417s Setting up libaudit1:ppc64el (1:4.0.2-2ubuntu1) ... 417s (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 ... 73847 files and directories currently installed.) 417s Preparing to unpack .../debconf-i18n_1.5.87ubuntu1_all.deb ... 417s Unpacking debconf-i18n (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 417s Preparing to unpack .../python3-debconf_1.5.87ubuntu1_all.deb ... 418s Unpacking python3-debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 418s Preparing to unpack .../debconf_1.5.87ubuntu1_all.deb ... 418s Unpacking debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 418s Setting up debconf (1.5.87ubuntu1) ... 418s (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 ... 73847 files and directories currently installed.) 418s Preparing to unpack .../libpam0g_1.5.3-7ubuntu4_ppc64el.deb ... 418s Unpacking libpam0g:ppc64el (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 418s Setting up libpam0g:ppc64el (1.5.3-7ubuntu4) ... 418s (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 ... 73847 files and directories currently installed.) 418s Preparing to unpack .../libselinux1_3.7-3ubuntu1_ppc64el.deb ... 418s Unpacking libselinux1:ppc64el (3.7-3ubuntu1) over (3.5-2ubuntu5) ... 418s Setting up libselinux1:ppc64el (3.7-3ubuntu1) ... 418s (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 ... 73847 files and directories currently installed.) 418s Preparing to unpack .../libpam-modules-bin_1.5.3-7ubuntu4_ppc64el.deb ... 418s Unpacking libpam-modules-bin (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 418s Setting up libpam-modules-bin (1.5.3-7ubuntu4) ... 418s pam_namespace.service is a disabled or a static unit not running, not starting it. 418s (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 ... 73847 files and directories currently installed.) 418s Preparing to unpack .../libpam-modules_1.5.3-7ubuntu4_ppc64el.deb ... 419s Unpacking libpam-modules:ppc64el (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 419s Setting up libpam-modules:ppc64el (1.5.3-7ubuntu4) ... 419s (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 ... 73847 files and directories currently installed.) 419s Preparing to unpack .../init_1.67ubuntu1_ppc64el.deb ... 419s Unpacking init (1.67ubuntu1) over (1.66ubuntu1) ... 419s Preparing to unpack .../openssh-sftp-server_1%3a9.9p1-3ubuntu2_ppc64el.deb ... 419s Unpacking openssh-sftp-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 419s Preparing to unpack .../openssh-server_1%3a9.9p1-3ubuntu2_ppc64el.deb ... 419s Unpacking openssh-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 419s Preparing to unpack .../openssh-client_1%3a9.9p1-3ubuntu2_ppc64el.deb ... 419s Unpacking openssh-client (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 419s Preparing to unpack .../libpam-runtime_1.5.3-7ubuntu4_all.deb ... 419s Unpacking libpam-runtime (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 419s Setting up libpam-runtime (1.5.3-7ubuntu4) ... 419s (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 ... 73849 files and directories currently installed.) 419s Preparing to unpack .../liblzma5_5.6.3-1_ppc64el.deb ... 419s Unpacking liblzma5:ppc64el (5.6.3-1) over (5.6.2-2) ... 419s Setting up liblzma5:ppc64el (5.6.3-1) ... 419s (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 ... 73849 files and directories currently installed.) 419s Preparing to unpack .../libsemanage-common_3.7-2build1_all.deb ... 419s Unpacking libsemanage-common (3.7-2build1) over (3.5-1build6) ... 419s Setting up libsemanage-common (3.7-2build1) ... 419s (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 ... 73848 files and directories currently installed.) 419s Preparing to unpack .../libsemanage2_3.7-2build1_ppc64el.deb ... 419s Unpacking libsemanage2:ppc64el (3.7-2build1) over (3.5-1build6) ... 419s Setting up libsemanage2:ppc64el (3.7-2build1) ... 419s (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 ... 73848 files and directories currently installed.) 419s Preparing to unpack .../00-distro-info_1.12_ppc64el.deb ... 419s Unpacking distro-info (1.12) over (1.9) ... 419s Preparing to unpack .../01-gir1.2-girepository-2.0_1.82.0-2_ppc64el.deb ... 419s Unpacking gir1.2-girepository-2.0:ppc64el (1.82.0-2) over (1.80.1-4) ... 419s Preparing to unpack .../02-gir1.2-glib-2.0_2.82.2-3_ppc64el.deb ... 419s Unpacking gir1.2-glib-2.0:ppc64el (2.82.2-3) over (2.82.1-0ubuntu1) ... 419s Preparing to unpack .../03-libglib2.0-0t64_2.82.2-3_ppc64el.deb ... 419s Unpacking libglib2.0-0t64:ppc64el (2.82.2-3) over (2.82.1-0ubuntu1) ... 419s Preparing to unpack .../04-libgirepository-1.0-1_1.82.0-2_ppc64el.deb ... 419s Unpacking libgirepository-1.0-1:ppc64el (1.82.0-2) over (1.80.1-4) ... 419s Preparing to unpack .../05-libglib2.0-data_2.82.2-3_all.deb ... 419s Unpacking libglib2.0-data (2.82.2-3) over (2.82.1-0ubuntu1) ... 419s Preparing to unpack .../06-python3-dbus_1.3.2-5build4_ppc64el.deb ... 419s Unpacking python3-dbus (1.3.2-5build4) over (1.3.2-5build3) ... 420s Preparing to unpack .../07-python3-gi_3.50.0-3build1_ppc64el.deb ... 420s Unpacking python3-gi (3.50.0-3build1) over (3.50.0-3) ... 420s Preparing to unpack .../08-python3-yaml_6.0.2-1build1_ppc64el.deb ... 420s Unpacking python3-yaml (6.0.2-1build1) over (6.0.2-1) ... 420s Preparing to unpack .../09-vim-tiny_2%3a9.1.0861-1ubuntu1_ppc64el.deb ... 420s Unpacking vim-tiny (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 420s Preparing to unpack .../10-vim-common_2%3a9.1.0861-1ubuntu1_all.deb ... 420s Unpacking vim-common (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 420s Preparing to unpack .../11-xxd_2%3a9.1.0861-1ubuntu1_ppc64el.deb ... 420s Unpacking xxd (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 420s Preparing to unpack .../12-libplymouth5_24.004.60-2ubuntu4_ppc64el.deb ... 420s Unpacking libplymouth5:ppc64el (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 420s Selecting previously unselected package libsgutils2-1.48:ppc64el. 420s Preparing to unpack .../13-libsgutils2-1.48_1.48-0ubuntu1_ppc64el.deb ... 420s Unpacking libsgutils2-1.48:ppc64el (1.48-0ubuntu1) ... 420s Preparing to unpack .../14-lsvpd_1.7.14-1ubuntu3_ppc64el.deb ... 420s Unpacking lsvpd (1.7.14-1ubuntu3) over (1.7.14-1ubuntu2) ... 420s Preparing to unpack .../15-plymouth-theme-ubuntu-text_24.004.60-2ubuntu4_ppc64el.deb ... 420s Unpacking plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 420s Preparing to unpack .../16-plymouth_24.004.60-2ubuntu4_ppc64el.deb ... 420s Unpacking plymouth (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 420s Preparing to unpack .../17-xz-utils_5.6.3-1_ppc64el.deb ... 420s Unpacking xz-utils (5.6.3-1) over (5.6.2-2) ... 420s Preparing to unpack .../18-bpftrace_0.21.2-2ubuntu3_ppc64el.deb ... 420s Unpacking bpftrace (0.21.2-2ubuntu3) over (0.21.2-2ubuntu2) ... 420s Preparing to unpack .../19-curl_8.11.0-1ubuntu2_ppc64el.deb ... 420s Unpacking curl (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 420s Preparing to unpack .../20-libcurl4t64_8.11.0-1ubuntu2_ppc64el.deb ... 420s Unpacking libcurl4t64:ppc64el (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 420s Preparing to unpack .../21-dracut-install_105-2ubuntu2_ppc64el.deb ... 420s Unpacking dracut-install (105-2ubuntu2) over (105-1ubuntu1) ... 420s Preparing to unpack .../22-libcurl3t64-gnutls_8.11.0-1ubuntu2_ppc64el.deb ... 420s Unpacking libcurl3t64-gnutls:ppc64el (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 420s Preparing to unpack .../23-linux-base_4.10.1ubuntu1_all.deb ... 420s Unpacking linux-base (4.10.1ubuntu1) over (4.5ubuntu9) ... 420s Preparing to unpack .../24-lto-disabled-list_54_all.deb ... 420s Unpacking lto-disabled-list (54) over (53) ... 420s Preparing to unpack .../25-lxd-installer_10_all.deb ... 420s Unpacking lxd-installer (10) over (9) ... 420s Preparing to unpack .../26-pinentry-curses_1.3.1-0ubuntu2_ppc64el.deb ... 420s Unpacking pinentry-curses (1.3.1-0ubuntu2) over (1.2.1-3ubuntu5) ... 420s Preparing to unpack .../27-python3-blinker_1.9.0-1_all.deb ... 420s Unpacking python3-blinker (1.9.0-1) over (1.8.2-1) ... 420s Preparing to unpack .../28-python3-rpds-py_0.21.0-2ubuntu1_ppc64el.deb ... 420s Unpacking python3-rpds-py (0.21.0-2ubuntu1) over (0.20.0-0ubuntu3) ... 420s Preparing to unpack .../29-python3-jsonschema-specifications_2023.12.1-2_all.deb ... 421s Unpacking python3-jsonschema-specifications (2023.12.1-2) over (2023.12.1-1ubuntu1) ... 421s Preparing to unpack .../30-sg3-utils_1.48-0ubuntu1_ppc64el.deb ... 421s Unpacking sg3-utils (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 421s Preparing to unpack .../31-sg3-utils-udev_1.48-0ubuntu1_all.deb ... 421s Unpacking sg3-utils-udev (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 421s Setting up pinentry-curses (1.3.1-0ubuntu2) ... 421s Setting up distro-info (1.12) ... 421s Setting up lto-disabled-list (54) ... 421s Setting up linux-base (4.10.1ubuntu1) ... 421s Setting up init (1.67ubuntu1) ... 421s Setting up libcurl4t64:ppc64el (8.11.0-1ubuntu2) ... 421s Setting up bpftrace (0.21.2-2ubuntu3) ... 421s Setting up openssh-client (1:9.9p1-3ubuntu2) ... 421s Setting up python3-debconf (1.5.87ubuntu1) ... 421s Setting up libcurl3t64-gnutls:ppc64el (8.11.0-1ubuntu2) ... 421s Setting up libsgutils2-1.48:ppc64el (1.48-0ubuntu1) ... 421s Setting up python3-yaml (6.0.2-1build1) ... 421s Setting up debconf-i18n (1.5.87ubuntu1) ... 421s Setting up xxd (2:9.1.0861-1ubuntu1) ... 421s Setting up libglib2.0-0t64:ppc64el (2.82.2-3) ... 421s No schema files found: doing nothing. 421s Setting up libglib2.0-data (2.82.2-3) ... 421s Setting up vim-common (2:9.1.0861-1ubuntu1) ... 421s Setting up xz-utils (5.6.3-1) ... 421s Setting up gir1.2-glib-2.0:ppc64el (2.82.2-3) ... 421s Setting up lxd-installer (10) ... 421s Setting up python3-rpds-py (0.21.0-2ubuntu1) ... 422s Setting up dracut-install (105-2ubuntu2) ... 422s Setting up libplymouth5:ppc64el (24.004.60-2ubuntu4) ... 422s Setting up libgirepository-1.0-1:ppc64el (1.82.0-2) ... 422s Setting up curl (8.11.0-1ubuntu2) ... 422s Setting up python3-jsonschema-specifications (2023.12.1-2) ... 422s Setting up sg3-utils (1.48-0ubuntu1) ... 422s Setting up python3-blinker (1.9.0-1) ... 422s Setting up openssh-sftp-server (1:9.9p1-3ubuntu2) ... 422s Setting up python3-dbus (1.3.2-5build4) ... 422s Setting up openssh-server (1:9.9p1-3ubuntu2) ... 422s Installing new version of config file /etc/ssh/moduli ... 422s Replacing config file /etc/ssh/sshd_config with new version 423s Setting up plymouth (24.004.60-2ubuntu4) ... 423s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 423s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 424s Setting up lsvpd (1.7.14-1ubuntu3) ... 424s Setting up vim-tiny (2:9.1.0861-1ubuntu1) ... 424s Setting up sg3-utils-udev (1.48-0ubuntu1) ... 424s update-initramfs: deferring update (trigger activated) 424s Setting up gir1.2-girepository-2.0:ppc64el (1.82.0-2) ... 424s Setting up python3-gi (3.50.0-3build1) ... 424s Processing triggers for debianutils (5.21) ... 424s Processing triggers for install-info (7.1.1-1) ... 424s Processing triggers for initramfs-tools (0.142ubuntu35) ... 424s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 424s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 431s Processing triggers for libc-bin (2.40-1ubuntu3) ... 431s Processing triggers for ufw (0.36.2-8) ... 431s Processing triggers for man-db (2.13.0-1) ... 433s Setting up plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) ... 433s Processing triggers for initramfs-tools (0.142ubuntu35) ... 433s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 433s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 440s Reading package lists... 440s Building dependency tree... 440s Reading state information... 440s The following packages will be REMOVED: 440s libsgutils2-1.46-2* 440s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 440s After this operation, 380 kB disk space will be freed. 440s (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 ... 73881 files and directories currently installed.) 440s Removing libsgutils2-1.46-2:ppc64el (1.46-3ubuntu5) ... 440s Processing triggers for libc-bin (2.40-1ubuntu3) ... 441s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 441s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 441s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 441s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 442s Reading package lists... 442s Reading package lists... 442s Building dependency tree... 442s Reading state information... 442s Calculating upgrade... 443s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 443s Reading package lists... 443s Building dependency tree... 443s Reading state information... 443s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 443s autopkgtest [09:52:14]: rebooting testbed after setup commands that affected boot 474s autopkgtest [09:52:45]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP Mon Sep 16 13:49:23 UTC 2024 477s autopkgtest [09:52:48]: @@@@@@@@@@@@@@@@@@@@ apt-source tiktoken 479s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/universe tiktoken 0.8.0-1build1 (dsc) [2247 B] 479s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/universe tiktoken 0.8.0-1build1 (tar) [31.6 kB] 479s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/universe tiktoken 0.8.0-1build1 (diff) [3908 B] 479s gpgv: Signature made Mon Nov 18 15:38:19 2024 UTC 479s gpgv: using RSA key 25E3FF2D7F469DBE7D0D4E50AFCFEC8E669CE1C2 479s gpgv: Can't check signature: No public key 479s dpkg-source: warning: cannot verify inline signature for ./tiktoken_0.8.0-1build1.dsc: no acceptable signature found 479s autopkgtest [09:52:50]: testing package tiktoken version 0.8.0-1build1 479s autopkgtest [09:52:50]: build not needed 480s autopkgtest [09:52:51]: test pybuild-autopkgtest: preparing testbed 482s Reading package lists... 482s Building dependency tree... 482s Reading state information... 482s Starting pkgProblemResolver with broken count: 0 482s Starting 2 pkgProblemResolver with broken count: 0 482s Done 482s The following additional packages will be installed: 482s autoconf automake autopoint autotools-dev binutils-mingw-w64-i686 482s binutils-mingw-w64-x86-64 build-essential cargo cargo-1.80 cmake cmake-data 482s cpp cpp-14 cpp-14-powerpc64le-linux-gnu cpp-powerpc64le-linux-gnu debhelper 482s debugedit dh-autoreconf dh-python dh-strip-nondeterminism dwz 482s fontconfig-config fonts-dejavu-core fonts-dejavu-mono g++ g++-14 482s g++-14-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu gcc gcc-14 482s gcc-14-powerpc64le-linux-gnu gcc-powerpc64le-linux-gnu gettext 482s intltool-debian libarchive-zip-perl libasan8 libbrotli-dev libbz2-dev 482s libcc1-0 libdebhelper-perl libexpat1-dev libfile-stripnondeterminism-perl 482s libfontconfig-dev libfontconfig1 libfreetype-dev libgcc-14-dev libgit2-1.7 482s libgomp1 libhttp-parser2.9 libisl23 libitm1 libjsoncpp25 liblsan0 libmpc3 482s libpfm4 libpkgconf3 libpng-dev libpython3-all-dev libpython3-dev 482s libpython3.12-dev libquadmath0 librhash0 librust-ab-glyph-dev 482s librust-ab-glyph-rasterizer+libm-dev librust-ab-glyph-rasterizer-dev 482s librust-addr2line-dev librust-adler-dev librust-ahash-dev 482s librust-aho-corasick-dev librust-allocator-api2-dev librust-anes-dev 482s librust-anstream-dev librust-anstyle-dev librust-anstyle-parse-dev 482s librust-anstyle-query-dev librust-anyhow-dev librust-approx-dev 482s librust-arbitrary-dev librust-array-init-dev librust-arrayvec-dev 482s librust-async-attributes-dev librust-async-channel-dev 482s librust-async-executor-dev librust-async-fs-dev 482s librust-async-global-executor-dev librust-async-io-dev 482s librust-async-lock-dev librust-async-net-dev librust-async-process-dev 482s librust-async-signal-dev librust-async-std-dev librust-async-task-dev 482s librust-atomic-dev librust-atomic-waker-dev librust-autocfg-dev 482s librust-backtrace-dev librust-base64-dev librust-bit-set+std-dev 482s librust-bit-set-dev librust-bit-vec-dev librust-bitflags-1-dev 482s librust-bitflags-dev librust-bitvec-dev librust-blobby-dev 482s librust-block-buffer-dev librust-blocking-dev librust-bstr-dev 482s librust-bumpalo-dev librust-bytecheck-derive-dev librust-bytecheck-dev 482s librust-bytemuck-derive-dev librust-bytemuck-dev librust-byteorder-dev 482s librust-bytes-dev librust-cast-dev librust-cc-dev librust-cfg-if-0.1-dev 482s librust-cfg-if-dev librust-chrono-dev librust-chrono-tz-build-dev 482s librust-chrono-tz-dev librust-ciborium-dev librust-ciborium-io-dev 482s librust-ciborium-ll-dev librust-clap-builder-dev librust-clap-derive-dev 482s librust-clap-dev librust-clap-lex-dev librust-cmake-dev 482s librust-color-quant-dev librust-colorchoice-dev 482s librust-compiler-builtins+core-dev 482s librust-compiler-builtins+rustc-dep-of-std-dev librust-compiler-builtins-dev 482s librust-concurrent-queue-dev librust-const-cstr-dev librust-const-oid-dev 482s librust-const-random-dev librust-const-random-macro-dev 482s librust-convert-case-dev librust-core-maths-dev librust-cpp-demangle-dev 482s librust-cpufeatures-dev librust-crc32fast-dev librust-criterion-dev 482s librust-critical-section-dev librust-crossbeam-deque-dev 482s librust-crossbeam-epoch+std-dev librust-crossbeam-epoch-dev 482s librust-crossbeam-utils-dev librust-crunchy-dev librust-crypto-common-dev 482s librust-csv-core-dev librust-csv-dev librust-ctor-dev librust-deranged-dev 482s librust-derive-arbitrary-dev librust-derive-more-dev librust-digest-dev 482s librust-dirs-next-dev librust-dirs-sys-next-dev librust-dlib-dev 482s librust-either-dev librust-env-logger-dev librust-equivalent-dev 482s librust-erased-serde-dev librust-errno-dev librust-eui48-dev 482s librust-event-listener-dev librust-event-listener-strategy-dev 482s librust-eyre+default-dev librust-eyre-dev librust-fallible-iterator-dev 482s librust-fancy-regex-dev librust-fastrand-dev librust-flate2-dev 482s librust-float-ord-dev librust-fnv-dev librust-font-kit-dev 482s librust-freetype-dev librust-freetype-sys-dev librust-funty-dev 482s librust-futures-channel-dev librust-futures-core-dev librust-futures-dev 482s librust-futures-executor-dev librust-futures-io-dev librust-futures-lite-dev 482s librust-futures-macro-dev librust-futures-sink-dev librust-futures-task-dev 482s librust-futures-util-dev librust-generic-array-dev librust-geo-types-dev 482s librust-getrandom-dev librust-ghost-dev librust-gif-dev librust-gimli-dev 482s librust-half-dev librust-hashbrown-dev librust-heck-dev librust-hmac-dev 482s librust-humantime-dev librust-iana-time-zone-dev librust-image-dev 482s librust-indenter-dev librust-indexmap-dev librust-indoc-dev 482s librust-inventory-dev librust-is-terminal-dev librust-itertools-dev 482s librust-itoa-dev librust-jobserver-dev librust-jpeg-decoder-dev 482s librust-js-sys-dev librust-kv-log-macro-dev librust-lazy-static-dev 482s librust-libc-dev librust-libloading-dev librust-libm-dev 482s librust-libwebp-sys-dev librust-libz-sys-dev librust-linux-raw-sys-dev 482s librust-lock-api-dev librust-log-dev librust-md-5-dev librust-md5-asm-dev 482s librust-memchr-dev librust-memmap2-dev librust-memoffset-dev 482s librust-miniz-oxide-dev librust-mio-dev librust-no-panic-dev 482s librust-num-bigint-dev librust-num-complex-dev librust-num-conv-dev 482s librust-num-cpus-dev librust-num-integer-dev librust-num-rational-dev 482s librust-num-threads-dev librust-num-traits-dev librust-object-dev 482s librust-once-cell-dev librust-oorandom-dev librust-owned-ttf-parser-dev 482s librust-owning-ref-dev librust-parking-dev librust-parking-lot-core-dev 482s librust-parking-lot-dev librust-parse-zoneinfo-dev 482s librust-pathfinder-geometry-dev librust-pathfinder-simd-dev 482s librust-phf+uncased-dev librust-phf-codegen-dev librust-phf-dev 482s librust-phf-generator-dev librust-phf-shared+uncased-dev 482s librust-phf-shared-dev librust-pin-project-lite-dev librust-pin-utils-dev 482s librust-pkg-config-dev librust-plotters-backend-dev 482s librust-plotters-bitmap-dev librust-plotters-dev librust-plotters-svg-dev 482s librust-png-dev librust-polling-dev librust-portable-atomic-dev 482s librust-postgres-derive-dev librust-postgres-protocol-dev 482s librust-postgres-types-dev librust-powerfmt-dev librust-powerfmt-macros-dev 482s librust-ppv-lite86-dev librust-proc-macro2-dev librust-proptest-dev 482s librust-ptr-meta-derive-dev librust-ptr-meta-dev 482s librust-pure-rust-locales-dev librust-pyo3-build-config-dev librust-pyo3-dev 482s librust-pyo3-ffi-dev librust-pyo3-macros-backend-dev librust-pyo3-macros-dev 482s librust-python3-dll-a-dev librust-qoi-dev librust-quick-error-dev 482s librust-quickcheck-dev librust-quote-dev librust-radium-dev 482s librust-rand-chacha-dev librust-rand-core+getrandom-dev 482s librust-rand-core+serde-dev librust-rand-core+std-dev librust-rand-core-dev 482s librust-rand-dev librust-rand-xorshift-dev librust-rayon-core-dev 482s librust-rayon-dev librust-regex-automata-dev librust-regex-dev 482s librust-regex-syntax-dev librust-rend-dev librust-rkyv-derive-dev 482s librust-rkyv-dev librust-rust-decimal-dev librust-rustc-demangle-dev 482s librust-rustc-hash-dev librust-rustc-std-workspace-core-dev 482s librust-rustc-version-dev librust-rustix-dev 482s librust-rusty-fork+wait-timeout-dev librust-rusty-fork-dev 482s librust-ruzstd-dev librust-ryu-dev librust-same-file-dev 482s librust-scopeguard-dev librust-seahash-dev librust-semver-dev 482s librust-serde-derive-dev librust-serde-dev librust-serde-fmt-dev 482s librust-serde-json-dev librust-serde-test-dev librust-sha1-asm-dev 482s librust-sha1-dev librust-sha2-asm-dev librust-sha2-dev librust-shlex-dev 482s librust-signal-hook-registry-dev librust-simdutf8-dev librust-siphasher-dev 482s librust-slab-dev librust-slog-dev librust-smallvec-dev librust-smol-dev 482s librust-smol-str-dev librust-socket2-dev librust-spin-dev 482s librust-stable-deref-trait-dev librust-static-assertions-dev 482s librust-stringprep-dev librust-strsim-dev librust-subtle-dev 482s librust-sval-buffer-dev librust-sval-derive-dev librust-sval-dev 482s librust-sval-dynamic-dev librust-sval-fmt-dev librust-sval-ref-dev 482s librust-sval-serde-dev librust-syn-1-dev librust-syn-dev librust-tap-dev 482s librust-target-lexicon-dev librust-tempfile-dev librust-termcolor-dev 482s librust-terminal-size-dev librust-tiff-dev librust-time-core-dev 482s librust-time-dev librust-time-macros-dev librust-tiny-keccak-dev 482s librust-tinytemplate-dev librust-tinyvec+tinyvec-macros-dev 482s librust-tinyvec-dev librust-tinyvec-macros-dev librust-tokio-dev 482s librust-tokio-macros-dev librust-tracing-attributes-dev 482s librust-tracing-core-dev librust-tracing-dev librust-traitobject-dev 482s librust-ttf-parser-dev librust-twox-hash-dev librust-typemap-dev 482s librust-typenum-dev librust-unarray-dev librust-uncased-dev 482s librust-unicase-dev librust-unicode-bidi-dev librust-unicode-ident-dev 482s librust-unicode-normalization-dev librust-unicode-segmentation-dev 482s librust-unicode-width-dev librust-unindent-dev librust-unsafe-any-dev 482s librust-utf8parse-dev librust-uuid-dev librust-valuable-derive-dev 482s librust-valuable-dev librust-value-bag-dev librust-value-bag-serde1-dev 482s librust-value-bag-sval2-dev librust-version-check-dev 482s librust-wait-timeout-dev librust-walkdir-dev 482s librust-wasm-bindgen+default-dev librust-wasm-bindgen+spans-dev 482s librust-wasm-bindgen-backend-dev librust-wasm-bindgen-dev 482s librust-wasm-bindgen-macro+spans-dev librust-wasm-bindgen-macro-dev 482s librust-wasm-bindgen-macro-support+spans-dev 482s librust-wasm-bindgen-macro-support-dev librust-wasm-bindgen-shared-dev 482s librust-web-sys-dev librust-webp-dev librust-weezl-dev librust-winapi-dev 482s librust-winapi-i686-pc-windows-gnu-dev librust-winapi-util-dev 482s librust-winapi-x86-64-pc-windows-gnu-dev librust-wyz-dev 482s librust-yeslogic-fontconfig-sys-dev librust-zerocopy-derive-dev 482s librust-zerocopy-dev librust-zeroize-derive-dev librust-zeroize-dev 482s libsharpyuv-dev libsharpyuv0 libstd-rust-1.80 libstd-rust-1.80-dev 482s libstdc++-14-dev libtool libtsan2 libubsan1 libwebp-dev libwebp7 482s libwebpdecoder3 libwebpdemux2 libwebpmux3 llvm llvm-19 llvm-19-linker-tools 482s llvm-19-runtime llvm-runtime m4 pkg-config pkgconf pkgconf-bin po-debconf 482s pybuild-plugin-autopkgtest pybuild-plugin-pyproject python3-all 482s python3-build python3-dateutil python3-hypothesis python3-iniconfig 482s python3-installer python3-packaging python3-pluggy python3-pyproject-hooks 482s python3-pytest python3-regex python3-semantic-version 482s python3-setuptools-rust python3-sortedcontainers python3-tiktoken 482s python3-toml python3-wheel python3.12-dev rustc rustc-1.80 uuid-dev 482s zlib1g-dev 482s Suggested packages: 482s autoconf-archive gnu-standards autoconf-doc cargo-1.80-doc cmake-doc 482s cmake-format elpa-cmake-mode ninja-build cpp-doc gcc-14-locales cpp-14-doc 482s dh-make flit gcc-14-doc gcc-multilib manpages-dev flex bison gdb gcc-doc 482s gdb-powerpc64le-linux-gnu gettext-doc libasprintf-dev libgettextpo-dev 482s freetype2-doc librust-adler+compiler-builtins-dev librust-adler+core-dev 482s librust-adler+rustc-dep-of-std-dev librust-backtrace+cpp-demangle-dev 482s librust-backtrace+rustc-serialize-dev librust-backtrace+serde-dev 482s librust-backtrace+verify-winapi-dev librust-backtrace+winapi-dev 482s librust-cfg-if-0.1+core-dev librust-cfg-if+core-dev 482s librust-compiler-builtins+c-dev gnuplot-nox librust-csv-core+libc-dev 482s librust-either+serde-dev librust-getrandom+compiler-builtins-dev 482s librust-getrandom+core-dev librust-getrandom+rustc-dep-of-std-dev 482s librust-phf+phf-macros-dev librust-phf+serde-dev librust-phf+unicase-dev 482s librust-phf-shared+unicase-dev librust-rand-xorshift+serde-dev 482s librust-rustc-demangle+compiler-builtins-dev librust-rustc-demangle+core-dev 482s librust-rustc-demangle+rustc-dep-of-std-dev librust-ryu+no-panic-dev 482s librust-slog+erased-serde-dev librust-tinyvec+arbitrary-dev 482s librust-tinyvec+serde-dev librust-uncased+serde-dev 482s librust-uncased+with-serde-alloc-dev 482s librust-wasm-bindgen-backend+extra-traits-dev librust-wasm-bindgen+serde-dev 482s librust-wasm-bindgen+serde-serialize-dev librust-wasm-bindgen+serde-json-dev 482s librust-wasm-bindgen+strict-macro-dev 482s librust-wasm-bindgen+xxx-debug-only-print-generated-code-dev 482s librust-wasm-bindgen-macro+strict-macro-dev 482s librust-wasm-bindgen-macro-support+extra-traits-dev librust-weezl+async-dev 482s librust-weezl+futures-dev libstdc++-14-doc libtool-doc gfortran 482s | fortran95-compiler gcj-jdk llvm-19-doc m4-doc libmail-box-perl python3-pip 482s python3-venv python-build-doc python-hypothesis-doc python-installer-doc 482s python-semantic-version-doc python-sortedcontainers-doc llvm-18 lld-18 482s clang-18 482s Recommended packages: 482s bzip2-doc libarchive-cpio-perl libpng-tools librust-phf+std-dev 482s librust-subtle+default-dev libltdl-dev llvm-19-dev libmail-sendmail-perl 482s python3-click 483s The following NEW packages will be installed: 483s autoconf automake autopkgtest-satdep autopoint autotools-dev 483s binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 build-essential cargo 483s cargo-1.80 cmake cmake-data cpp cpp-14 cpp-14-powerpc64le-linux-gnu 483s cpp-powerpc64le-linux-gnu debhelper debugedit dh-autoreconf dh-python 483s dh-strip-nondeterminism dwz fontconfig-config fonts-dejavu-core 483s fonts-dejavu-mono g++ g++-14 g++-14-powerpc64le-linux-gnu 483s g++-powerpc64le-linux-gnu gcc gcc-14 gcc-14-powerpc64le-linux-gnu 483s gcc-powerpc64le-linux-gnu gettext intltool-debian libarchive-zip-perl 483s libasan8 libbrotli-dev libbz2-dev libcc1-0 libdebhelper-perl libexpat1-dev 483s libfile-stripnondeterminism-perl libfontconfig-dev libfontconfig1 483s libfreetype-dev libgcc-14-dev libgit2-1.7 libgomp1 libhttp-parser2.9 483s libisl23 libitm1 libjsoncpp25 liblsan0 libmpc3 libpfm4 libpkgconf3 483s libpng-dev libpython3-all-dev libpython3-dev libpython3.12-dev libquadmath0 483s librhash0 librust-ab-glyph-dev librust-ab-glyph-rasterizer+libm-dev 483s librust-ab-glyph-rasterizer-dev librust-addr2line-dev librust-adler-dev 483s librust-ahash-dev librust-aho-corasick-dev librust-allocator-api2-dev 483s librust-anes-dev librust-anstream-dev librust-anstyle-dev 483s librust-anstyle-parse-dev librust-anstyle-query-dev librust-anyhow-dev 483s librust-approx-dev librust-arbitrary-dev librust-array-init-dev 483s librust-arrayvec-dev librust-async-attributes-dev librust-async-channel-dev 483s librust-async-executor-dev librust-async-fs-dev 483s librust-async-global-executor-dev librust-async-io-dev 483s librust-async-lock-dev librust-async-net-dev librust-async-process-dev 483s librust-async-signal-dev librust-async-std-dev librust-async-task-dev 483s librust-atomic-dev librust-atomic-waker-dev librust-autocfg-dev 483s librust-backtrace-dev librust-base64-dev librust-bit-set+std-dev 483s librust-bit-set-dev librust-bit-vec-dev librust-bitflags-1-dev 483s librust-bitflags-dev librust-bitvec-dev librust-blobby-dev 483s librust-block-buffer-dev librust-blocking-dev librust-bstr-dev 483s librust-bumpalo-dev librust-bytecheck-derive-dev librust-bytecheck-dev 483s librust-bytemuck-derive-dev librust-bytemuck-dev librust-byteorder-dev 483s librust-bytes-dev librust-cast-dev librust-cc-dev librust-cfg-if-0.1-dev 483s librust-cfg-if-dev librust-chrono-dev librust-chrono-tz-build-dev 483s librust-chrono-tz-dev librust-ciborium-dev librust-ciborium-io-dev 483s librust-ciborium-ll-dev librust-clap-builder-dev librust-clap-derive-dev 483s librust-clap-dev librust-clap-lex-dev librust-cmake-dev 483s librust-color-quant-dev librust-colorchoice-dev 483s librust-compiler-builtins+core-dev 483s librust-compiler-builtins+rustc-dep-of-std-dev librust-compiler-builtins-dev 483s librust-concurrent-queue-dev librust-const-cstr-dev librust-const-oid-dev 483s librust-const-random-dev librust-const-random-macro-dev 483s librust-convert-case-dev librust-core-maths-dev librust-cpp-demangle-dev 483s librust-cpufeatures-dev librust-crc32fast-dev librust-criterion-dev 483s librust-critical-section-dev librust-crossbeam-deque-dev 483s librust-crossbeam-epoch+std-dev librust-crossbeam-epoch-dev 483s librust-crossbeam-utils-dev librust-crunchy-dev librust-crypto-common-dev 483s librust-csv-core-dev librust-csv-dev librust-ctor-dev librust-deranged-dev 483s librust-derive-arbitrary-dev librust-derive-more-dev librust-digest-dev 483s librust-dirs-next-dev librust-dirs-sys-next-dev librust-dlib-dev 483s librust-either-dev librust-env-logger-dev librust-equivalent-dev 483s librust-erased-serde-dev librust-errno-dev librust-eui48-dev 483s librust-event-listener-dev librust-event-listener-strategy-dev 483s librust-eyre+default-dev librust-eyre-dev librust-fallible-iterator-dev 483s librust-fancy-regex-dev librust-fastrand-dev librust-flate2-dev 483s librust-float-ord-dev librust-fnv-dev librust-font-kit-dev 483s librust-freetype-dev librust-freetype-sys-dev librust-funty-dev 483s librust-futures-channel-dev librust-futures-core-dev librust-futures-dev 483s librust-futures-executor-dev librust-futures-io-dev librust-futures-lite-dev 483s librust-futures-macro-dev librust-futures-sink-dev librust-futures-task-dev 483s librust-futures-util-dev librust-generic-array-dev librust-geo-types-dev 483s librust-getrandom-dev librust-ghost-dev librust-gif-dev librust-gimli-dev 483s librust-half-dev librust-hashbrown-dev librust-heck-dev librust-hmac-dev 483s librust-humantime-dev librust-iana-time-zone-dev librust-image-dev 483s librust-indenter-dev librust-indexmap-dev librust-indoc-dev 483s librust-inventory-dev librust-is-terminal-dev librust-itertools-dev 483s librust-itoa-dev librust-jobserver-dev librust-jpeg-decoder-dev 483s librust-js-sys-dev librust-kv-log-macro-dev librust-lazy-static-dev 483s librust-libc-dev librust-libloading-dev librust-libm-dev 483s librust-libwebp-sys-dev librust-libz-sys-dev librust-linux-raw-sys-dev 483s librust-lock-api-dev librust-log-dev librust-md-5-dev librust-md5-asm-dev 483s librust-memchr-dev librust-memmap2-dev librust-memoffset-dev 483s librust-miniz-oxide-dev librust-mio-dev librust-no-panic-dev 483s librust-num-bigint-dev librust-num-complex-dev librust-num-conv-dev 483s librust-num-cpus-dev librust-num-integer-dev librust-num-rational-dev 483s librust-num-threads-dev librust-num-traits-dev librust-object-dev 483s librust-once-cell-dev librust-oorandom-dev librust-owned-ttf-parser-dev 483s librust-owning-ref-dev librust-parking-dev librust-parking-lot-core-dev 483s librust-parking-lot-dev librust-parse-zoneinfo-dev 483s librust-pathfinder-geometry-dev librust-pathfinder-simd-dev 483s librust-phf+uncased-dev librust-phf-codegen-dev librust-phf-dev 483s librust-phf-generator-dev librust-phf-shared+uncased-dev 483s librust-phf-shared-dev librust-pin-project-lite-dev librust-pin-utils-dev 483s librust-pkg-config-dev librust-plotters-backend-dev 483s librust-plotters-bitmap-dev librust-plotters-dev librust-plotters-svg-dev 483s librust-png-dev librust-polling-dev librust-portable-atomic-dev 483s librust-postgres-derive-dev librust-postgres-protocol-dev 483s librust-postgres-types-dev librust-powerfmt-dev librust-powerfmt-macros-dev 483s librust-ppv-lite86-dev librust-proc-macro2-dev librust-proptest-dev 483s librust-ptr-meta-derive-dev librust-ptr-meta-dev 483s librust-pure-rust-locales-dev librust-pyo3-build-config-dev librust-pyo3-dev 483s librust-pyo3-ffi-dev librust-pyo3-macros-backend-dev librust-pyo3-macros-dev 483s librust-python3-dll-a-dev librust-qoi-dev librust-quick-error-dev 483s librust-quickcheck-dev librust-quote-dev librust-radium-dev 483s librust-rand-chacha-dev librust-rand-core+getrandom-dev 483s librust-rand-core+serde-dev librust-rand-core+std-dev librust-rand-core-dev 483s librust-rand-dev librust-rand-xorshift-dev librust-rayon-core-dev 483s librust-rayon-dev librust-regex-automata-dev librust-regex-dev 483s librust-regex-syntax-dev librust-rend-dev librust-rkyv-derive-dev 483s librust-rkyv-dev librust-rust-decimal-dev librust-rustc-demangle-dev 483s librust-rustc-hash-dev librust-rustc-std-workspace-core-dev 483s librust-rustc-version-dev librust-rustix-dev 483s librust-rusty-fork+wait-timeout-dev librust-rusty-fork-dev 483s librust-ruzstd-dev librust-ryu-dev librust-same-file-dev 483s librust-scopeguard-dev librust-seahash-dev librust-semver-dev 483s librust-serde-derive-dev librust-serde-dev librust-serde-fmt-dev 483s librust-serde-json-dev librust-serde-test-dev librust-sha1-asm-dev 483s librust-sha1-dev librust-sha2-asm-dev librust-sha2-dev librust-shlex-dev 483s librust-signal-hook-registry-dev librust-simdutf8-dev librust-siphasher-dev 483s librust-slab-dev librust-slog-dev librust-smallvec-dev librust-smol-dev 483s librust-smol-str-dev librust-socket2-dev librust-spin-dev 483s librust-stable-deref-trait-dev librust-static-assertions-dev 483s librust-stringprep-dev librust-strsim-dev librust-subtle-dev 483s librust-sval-buffer-dev librust-sval-derive-dev librust-sval-dev 483s librust-sval-dynamic-dev librust-sval-fmt-dev librust-sval-ref-dev 483s librust-sval-serde-dev librust-syn-1-dev librust-syn-dev librust-tap-dev 483s librust-target-lexicon-dev librust-tempfile-dev librust-termcolor-dev 483s librust-terminal-size-dev librust-tiff-dev librust-time-core-dev 483s librust-time-dev librust-time-macros-dev librust-tiny-keccak-dev 483s librust-tinytemplate-dev librust-tinyvec+tinyvec-macros-dev 483s librust-tinyvec-dev librust-tinyvec-macros-dev librust-tokio-dev 483s librust-tokio-macros-dev librust-tracing-attributes-dev 483s librust-tracing-core-dev librust-tracing-dev librust-traitobject-dev 483s librust-ttf-parser-dev librust-twox-hash-dev librust-typemap-dev 483s librust-typenum-dev librust-unarray-dev librust-uncased-dev 483s librust-unicase-dev librust-unicode-bidi-dev librust-unicode-ident-dev 483s librust-unicode-normalization-dev librust-unicode-segmentation-dev 483s librust-unicode-width-dev librust-unindent-dev librust-unsafe-any-dev 483s librust-utf8parse-dev librust-uuid-dev librust-valuable-derive-dev 483s librust-valuable-dev librust-value-bag-dev librust-value-bag-serde1-dev 483s librust-value-bag-sval2-dev librust-version-check-dev 483s librust-wait-timeout-dev librust-walkdir-dev 483s librust-wasm-bindgen+default-dev librust-wasm-bindgen+spans-dev 483s librust-wasm-bindgen-backend-dev librust-wasm-bindgen-dev 483s librust-wasm-bindgen-macro+spans-dev librust-wasm-bindgen-macro-dev 483s librust-wasm-bindgen-macro-support+spans-dev 483s librust-wasm-bindgen-macro-support-dev librust-wasm-bindgen-shared-dev 483s librust-web-sys-dev librust-webp-dev librust-weezl-dev librust-winapi-dev 483s librust-winapi-i686-pc-windows-gnu-dev librust-winapi-util-dev 483s librust-winapi-x86-64-pc-windows-gnu-dev librust-wyz-dev 483s librust-yeslogic-fontconfig-sys-dev librust-zerocopy-derive-dev 483s librust-zerocopy-dev librust-zeroize-derive-dev librust-zeroize-dev 483s libsharpyuv-dev libsharpyuv0 libstd-rust-1.80 libstd-rust-1.80-dev 483s libstdc++-14-dev libtool libtsan2 libubsan1 libwebp-dev libwebp7 483s libwebpdecoder3 libwebpdemux2 libwebpmux3 llvm llvm-19 llvm-19-linker-tools 483s llvm-19-runtime llvm-runtime m4 pkg-config pkgconf pkgconf-bin po-debconf 483s pybuild-plugin-autopkgtest pybuild-plugin-pyproject python3-all 483s python3-build python3-dateutil python3-hypothesis python3-iniconfig 483s python3-installer python3-packaging python3-pluggy python3-pyproject-hooks 483s python3-pytest python3-regex python3-semantic-version 483s python3-setuptools-rust python3-sortedcontainers python3-tiktoken 483s python3-toml python3-wheel python3.12-dev rustc rustc-1.80 uuid-dev 483s zlib1g-dev 483s 0 upgraded, 467 newly installed, 0 to remove and 0 not upgraded. 483s Need to get 215 MB/215 MB of archives. 483s After this operation, 955 MB of additional disk space will be used. 483s Get:1 /tmp/autopkgtest.hWvff3/1-autopkgtest-satdep.deb autopkgtest-satdep ppc64el 0 [864 B] 483s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el m4 ppc64el 1.4.19-4build1 [278 kB] 483s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el autoconf all 2.72-3 [382 kB] 483s Get:4 http://ftpmaster.internal/ubuntu plucky/main ppc64el autotools-dev all 20220109.1 [44.9 kB] 483s Get:5 http://ftpmaster.internal/ubuntu plucky/main ppc64el automake all 1:1.16.5-1.3ubuntu1 [558 kB] 483s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el autopoint all 0.22.5-2 [616 kB] 483s Get:7 http://ftpmaster.internal/ubuntu plucky/main ppc64el libisl23 ppc64el 0.27-1 [882 kB] 483s Get:8 http://ftpmaster.internal/ubuntu plucky/main ppc64el libmpc3 ppc64el 1.3.1-1build2 [62.1 kB] 483s Get:9 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp-14-powerpc64le-linux-gnu ppc64el 14.2.0-8ubuntu1 [10.5 MB] 484s Get:10 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp-14 ppc64el 14.2.0-8ubuntu1 [1034 B] 484s Get:11 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp-powerpc64le-linux-gnu ppc64el 4:14.1.0-2ubuntu1 [5456 B] 484s Get:12 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp ppc64el 4:14.1.0-2ubuntu1 [22.5 kB] 484s Get:13 http://ftpmaster.internal/ubuntu plucky/main ppc64el libcc1-0 ppc64el 14.2.0-8ubuntu1 [48.1 kB] 484s Get:14 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgomp1 ppc64el 14.2.0-8ubuntu1 [161 kB] 484s Get:15 http://ftpmaster.internal/ubuntu plucky/main ppc64el libitm1 ppc64el 14.2.0-8ubuntu1 [31.9 kB] 484s Get:16 http://ftpmaster.internal/ubuntu plucky/main ppc64el libasan8 ppc64el 14.2.0-8ubuntu1 [2945 kB] 484s Get:17 http://ftpmaster.internal/ubuntu plucky/main ppc64el liblsan0 ppc64el 14.2.0-8ubuntu1 [1322 kB] 484s Get:18 http://ftpmaster.internal/ubuntu plucky/main ppc64el libtsan2 ppc64el 14.2.0-8ubuntu1 [2695 kB] 484s Get:19 http://ftpmaster.internal/ubuntu plucky/main ppc64el libubsan1 ppc64el 14.2.0-8ubuntu1 [1191 kB] 484s Get:20 http://ftpmaster.internal/ubuntu plucky/main ppc64el libquadmath0 ppc64el 14.2.0-8ubuntu1 [158 kB] 484s Get:21 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgcc-14-dev ppc64el 14.2.0-8ubuntu1 [1619 kB] 484s Get:22 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc-14-powerpc64le-linux-gnu ppc64el 14.2.0-8ubuntu1 [20.6 MB] 484s Get:23 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc-14 ppc64el 14.2.0-8ubuntu1 [528 kB] 484s Get:24 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc-powerpc64le-linux-gnu ppc64el 4:14.1.0-2ubuntu1 [1222 B] 484s Get:25 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc ppc64el 4:14.1.0-2ubuntu1 [5006 B] 484s Get:26 http://ftpmaster.internal/ubuntu plucky/main ppc64el libstdc++-14-dev ppc64el 14.2.0-8ubuntu1 [2673 kB] 484s Get:27 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++-14-powerpc64le-linux-gnu ppc64el 14.2.0-8ubuntu1 [12.0 MB] 485s Get:28 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++-14 ppc64el 14.2.0-8ubuntu1 [19.9 kB] 485s Get:29 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++-powerpc64le-linux-gnu ppc64el 4:14.1.0-2ubuntu1 [968 B] 485s Get:30 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++ ppc64el 4:14.1.0-2ubuntu1 [1090 B] 485s Get:31 http://ftpmaster.internal/ubuntu plucky/main ppc64el build-essential ppc64el 12.10ubuntu1 [4936 B] 485s Get:32 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhttp-parser2.9 ppc64el 2.9.4-6build1 [24.4 kB] 485s Get:33 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgit2-1.7 ppc64el 1.7.2+ds-1ubuntu3 [611 kB] 485s Get:34 http://ftpmaster.internal/ubuntu plucky/main ppc64el libstd-rust-1.80 ppc64el 1.80.1+dfsg0ubuntu1-0ubuntu1 [22.0 MB] 485s Get:35 http://ftpmaster.internal/ubuntu plucky/main ppc64el libstd-rust-1.80-dev ppc64el 1.80.1+dfsg0ubuntu1-0ubuntu1 [39.8 MB] 486s Get:36 http://ftpmaster.internal/ubuntu plucky/main ppc64el rustc-1.80 ppc64el 1.80.1+dfsg0ubuntu1-0ubuntu1 [3375 kB] 486s Get:37 http://ftpmaster.internal/ubuntu plucky/main ppc64el cargo-1.80 ppc64el 1.80.1+dfsg0ubuntu1-0ubuntu1 [6239 kB] 486s Get:38 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjsoncpp25 ppc64el 1.9.5-6build1 [89.0 kB] 486s Get:39 http://ftpmaster.internal/ubuntu plucky/main ppc64el librhash0 ppc64el 1.4.3-3build1 [147 kB] 486s Get:40 http://ftpmaster.internal/ubuntu plucky/main ppc64el cmake-data all 3.30.3-1 [2246 kB] 486s Get:41 http://ftpmaster.internal/ubuntu plucky/main ppc64el cmake ppc64el 3.30.3-1 [12.1 MB] 487s Get:42 http://ftpmaster.internal/ubuntu plucky/main ppc64el libdebhelper-perl all 13.20ubuntu1 [94.2 kB] 487s Get:43 http://ftpmaster.internal/ubuntu plucky/main ppc64el libtool all 2.4.7-8 [166 kB] 487s Get:44 http://ftpmaster.internal/ubuntu plucky/main ppc64el dh-autoreconf all 20 [16.1 kB] 487s Get:45 http://ftpmaster.internal/ubuntu plucky/main ppc64el libarchive-zip-perl all 1.68-1 [90.2 kB] 487s Get:46 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfile-stripnondeterminism-perl all 1.14.0-1 [20.1 kB] 487s Get:47 http://ftpmaster.internal/ubuntu plucky/main ppc64el dh-strip-nondeterminism all 1.14.0-1 [5058 B] 487s Get:48 http://ftpmaster.internal/ubuntu plucky/main ppc64el debugedit ppc64el 1:5.1-1 [52.1 kB] 487s Get:49 http://ftpmaster.internal/ubuntu plucky/main ppc64el dwz ppc64el 0.15-1build6 [142 kB] 487s Get:50 http://ftpmaster.internal/ubuntu plucky/main ppc64el gettext ppc64el 0.22.5-2 [1082 kB] 487s Get:51 http://ftpmaster.internal/ubuntu plucky/main ppc64el intltool-debian all 0.35.0+20060710.6 [23.2 kB] 487s Get:52 http://ftpmaster.internal/ubuntu plucky/main ppc64el po-debconf all 1.0.21+nmu1 [233 kB] 487s Get:53 http://ftpmaster.internal/ubuntu plucky/main ppc64el debhelper all 13.20ubuntu1 [893 kB] 487s Get:54 http://ftpmaster.internal/ubuntu plucky/universe ppc64el dh-python all 6.20241024 [112 kB] 487s Get:55 http://ftpmaster.internal/ubuntu plucky/main ppc64el fonts-dejavu-mono all 2.37-8 [502 kB] 487s Get:56 http://ftpmaster.internal/ubuntu plucky/main ppc64el fonts-dejavu-core all 2.37-8 [835 kB] 487s Get:57 http://ftpmaster.internal/ubuntu plucky/main ppc64el fontconfig-config ppc64el 2.15.0-1.1ubuntu2 [37.4 kB] 487s Get:58 http://ftpmaster.internal/ubuntu plucky/main ppc64el libbrotli-dev ppc64el 1.1.0-2build3 [427 kB] 487s Get:59 http://ftpmaster.internal/ubuntu plucky/main ppc64el libbz2-dev ppc64el 1.0.8-6 [50.2 kB] 487s Get:60 http://ftpmaster.internal/ubuntu plucky/main ppc64el libexpat1-dev ppc64el 2.6.4-1 [149 kB] 487s Get:61 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfontconfig1 ppc64el 2.15.0-1.1ubuntu2 [190 kB] 487s Get:62 http://ftpmaster.internal/ubuntu plucky/main ppc64el zlib1g-dev ppc64el 1:1.3.dfsg+really1.3.1-1ubuntu1 [902 kB] 487s Get:63 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpng-dev ppc64el 1.6.44-2 [325 kB] 487s Get:64 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfreetype-dev ppc64el 2.13.3+dfsg-1 [719 kB] 487s Get:65 http://ftpmaster.internal/ubuntu plucky/main ppc64el uuid-dev ppc64el 2.40.2-1ubuntu1 [55.1 kB] 487s Get:66 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpkgconf3 ppc64el 1.8.1-4 [37.1 kB] 487s Get:67 http://ftpmaster.internal/ubuntu plucky/main ppc64el pkgconf-bin ppc64el 1.8.1-4 [22.5 kB] 487s Get:68 http://ftpmaster.internal/ubuntu plucky/main ppc64el pkgconf ppc64el 1.8.1-4 [16.7 kB] 487s Get:69 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfontconfig-dev ppc64el 2.15.0-1.1ubuntu2 [212 kB] 487s Get:70 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3.12-dev ppc64el 3.12.7-3 [6136 kB] 487s Get:71 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3-dev ppc64el 3.12.6-0ubuntu1 [10.2 kB] 487s Get:72 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3-all-dev ppc64el 3.12.6-0ubuntu1 [916 B] 487s Get:73 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ab-glyph-rasterizer-dev ppc64el 0.1.7-1 [12.2 kB] 487s Get:74 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-libm-dev ppc64el 0.2.8-1 [101 kB] 487s Get:75 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ab-glyph-rasterizer+libm-dev ppc64el 0.1.7-1 [1066 B] 487s Get:76 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-core-maths-dev ppc64el 0.1.0-2 [7954 B] 487s Get:77 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ttf-parser-dev ppc64el 0.24.1-1 [148 kB] 487s Get:78 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-owned-ttf-parser-dev ppc64el 0.24.0-1 [129 kB] 487s Get:79 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ab-glyph-dev ppc64el 0.2.28-1 [20.7 kB] 487s Get:80 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-cfg-if-dev ppc64el 1.0.0-1 [10.5 kB] 487s Get:81 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-cpp-demangle-dev ppc64el 0.4.0-1 [66.1 kB] 487s Get:82 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-fallible-iterator-dev ppc64el 0.3.0-2 [20.3 kB] 487s Get:83 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unicode-ident-dev ppc64el 1.0.13-1 [38.5 kB] 487s Get:84 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-proc-macro2-dev ppc64el 1.0.86-1 [44.8 kB] 487s Get:85 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-quote-dev ppc64el 1.0.37-1 [29.5 kB] 487s Get:86 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-syn-dev ppc64el 2.0.85-1 [219 kB] 487s Get:87 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-derive-arbitrary-dev ppc64el 1.3.2-1 [12.3 kB] 487s Get:88 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-arbitrary-dev ppc64el 1.3.2-1 [31.4 kB] 487s Get:89 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-equivalent-dev ppc64el 1.0.1-1 [8240 B] 487s Get:90 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-critical-section-dev ppc64el 1.1.3-1 [20.5 kB] 487s Get:91 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-serde-derive-dev ppc64el 1.0.210-1 [50.1 kB] 487s Get:92 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-serde-dev ppc64el 1.0.210-2 [66.4 kB] 487s Get:93 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-portable-atomic-dev ppc64el 1.9.0-4 [124 kB] 487s Get:94 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rustc-std-workspace-core-dev ppc64el 1.0.0-1 [3020 B] 487s Get:95 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-libc-dev ppc64el 0.2.161-1 [379 kB] 487s Get:96 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-getrandom-dev ppc64el 0.2.12-1 [36.4 kB] 487s Get:97 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-smallvec-dev ppc64el 1.13.2-1 [35.5 kB] 487s Get:98 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-parking-lot-core-dev ppc64el 0.9.10-1 [32.6 kB] 487s Get:99 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-once-cell-dev ppc64el 1.20.2-1 [31.9 kB] 487s Get:100 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-crunchy-dev ppc64el 0.2.2-1 [5340 B] 487s Get:101 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tiny-keccak-dev ppc64el 2.0.2-1 [20.9 kB] 488s Get:102 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-const-random-macro-dev ppc64el 0.1.16-2 [10.5 kB] 488s Get:103 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-const-random-dev ppc64el 0.1.17-2 [8590 B] 488s Get:104 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-version-check-dev ppc64el 0.9.5-1 [16.9 kB] 488s Get:105 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-byteorder-dev ppc64el 1.5.0-1 [22.4 kB] 488s Get:106 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-zerocopy-derive-dev ppc64el 0.7.32-2 [29.7 kB] 488s Get:107 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-zerocopy-dev ppc64el 0.7.32-1 [116 kB] 488s Get:108 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ahash-dev all 0.8.11-8 [37.9 kB] 488s Get:109 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-allocator-api2-dev ppc64el 0.2.16-1 [54.8 kB] 488s Get:110 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-compiler-builtins-dev ppc64el 0.1.101-1 [156 kB] 488s Get:111 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-either-dev ppc64el 1.13.0-1 [20.2 kB] 488s Get:112 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-crossbeam-utils-dev ppc64el 0.8.19-1 [41.1 kB] 488s Get:113 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-crossbeam-epoch-dev ppc64el 0.9.18-1 [42.3 kB] 488s Get:114 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-crossbeam-epoch+std-dev ppc64el 0.9.18-1 [1128 B] 488s Get:115 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-crossbeam-deque-dev ppc64el 0.8.5-1 [22.4 kB] 488s Get:116 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rayon-core-dev ppc64el 1.12.1-1 [63.7 kB] 488s Get:117 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rayon-dev ppc64el 1.10.0-1 [149 kB] 488s Get:118 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-hashbrown-dev ppc64el 0.14.5-5 [110 kB] 488s Get:119 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-indexmap-dev ppc64el 2.2.6-1 [66.7 kB] 488s Get:120 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-stable-deref-trait-dev ppc64el 1.2.0-1 [9794 B] 488s Get:121 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-gimli-dev ppc64el 0.28.1-2 [209 kB] 488s Get:122 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-memmap2-dev ppc64el 0.9.3-1 [30.8 kB] 488s Get:123 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-crc32fast-dev ppc64el 1.4.2-1 [39.8 kB] 488s Get:124 http://ftpmaster.internal/ubuntu plucky/main ppc64el pkg-config ppc64el 1.8.1-4 [7362 B] 488s Get:125 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pkg-config-dev ppc64el 0.3.27-1 [21.5 kB] 488s Get:126 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-libz-sys-dev ppc64el 1.1.20-1 [19.8 kB] 488s Get:127 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-adler-dev ppc64el 1.0.2-2 [15.3 kB] 488s Get:128 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-miniz-oxide-dev ppc64el 0.7.1-1 [51.5 kB] 488s Get:129 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-flate2-dev ppc64el 1.0.34-1 [94.5 kB] 488s Get:130 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sval-derive-dev ppc64el 2.6.1-2 [11.0 kB] 488s Get:131 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sval-dev ppc64el 2.6.1-2 [28.0 kB] 488s Get:132 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sval-ref-dev ppc64el 2.6.1-1 [8944 B] 488s Get:133 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-erased-serde-dev ppc64el 0.3.31-1 [22.7 kB] 488s Get:134 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-serde-fmt-dev all 1.0.3-3 [6956 B] 488s Get:135 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-syn-1-dev ppc64el 1.0.109-2 [188 kB] 488s Get:136 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-no-panic-dev ppc64el 0.1.13-1 [11.3 kB] 488s Get:137 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-itoa-dev ppc64el 1.0.9-1 [13.1 kB] 488s Get:138 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ryu-dev ppc64el 1.0.15-1 [41.7 kB] 488s Get:139 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-serde-json-dev ppc64el 1.0.128-1 [128 kB] 488s Get:140 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-serde-test-dev ppc64el 1.0.171-1 [20.6 kB] 488s Get:141 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-value-bag-serde1-dev ppc64el 1.9.0-1 [7822 B] 488s Get:142 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sval-buffer-dev ppc64el 2.6.1-1 [16.8 kB] 488s Get:143 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sval-dynamic-dev ppc64el 2.6.1-1 [9544 B] 488s Get:144 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sval-fmt-dev ppc64el 2.6.1-1 [12.0 kB] 488s Get:145 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sval-serde-dev ppc64el 2.6.1-1 [13.2 kB] 488s Get:146 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-value-bag-sval2-dev ppc64el 1.9.0-1 [7862 B] 488s Get:147 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-value-bag-dev ppc64el 1.9.0-1 [37.6 kB] 488s Get:148 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-log-dev ppc64el 0.4.22-1 [43.0 kB] 488s Get:149 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-memchr-dev ppc64el 2.7.4-1 [71.8 kB] 488s Get:150 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ppv-lite86-dev ppc64el 0.2.16-1 [21.9 kB] 488s Get:151 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rand-core-dev ppc64el 0.6.4-2 [23.8 kB] 488s Get:152 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rand-chacha-dev ppc64el 0.3.1-2 [16.9 kB] 488s Get:153 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rand-core+getrandom-dev ppc64el 0.6.4-2 [1054 B] 488s Get:154 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rand-core+serde-dev ppc64el 0.6.4-2 [1108 B] 488s Get:155 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rand-core+std-dev ppc64el 0.6.4-2 [1054 B] 488s Get:156 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rand-dev ppc64el 0.8.5-1 [77.5 kB] 488s Get:157 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unicode-segmentation-dev ppc64el 1.11.0-1 [74.2 kB] 488s Get:158 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-convert-case-dev ppc64el 0.6.0-2 [19.5 kB] 488s Get:159 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-semver-dev ppc64el 1.0.23-1 [30.6 kB] 488s Get:160 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rustc-version-dev ppc64el 0.4.0-1 [13.8 kB] 488s Get:161 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-derive-more-dev ppc64el 0.99.17-1 [50.0 kB] 488s Get:162 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-cfg-if-0.1-dev ppc64el 0.1.10-2 [10.2 kB] 488s Get:163 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-blobby-dev ppc64el 0.3.1-1 [11.3 kB] 488s Get:164 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-typenum-dev ppc64el 1.17.0-2 [41.2 kB] 488s Get:165 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-zeroize-derive-dev ppc64el 1.4.2-1 [12.7 kB] 488s Get:166 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-zeroize-dev ppc64el 1.8.1-1 [21.6 kB] 488s Get:167 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-generic-array-dev ppc64el 0.14.7-1 [16.9 kB] 488s Get:168 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-block-buffer-dev ppc64el 0.10.2-2 [12.2 kB] 488s Get:169 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-const-oid-dev ppc64el 0.9.3-1 [40.9 kB] 488s Get:170 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-crypto-common-dev ppc64el 0.1.6-1 [10.5 kB] 488s Get:171 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-subtle-dev ppc64el 2.6.1-1 [16.1 kB] 488s Get:172 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-digest-dev ppc64el 0.10.7-2 [20.9 kB] 488s Get:173 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-static-assertions-dev ppc64el 1.1.0-1 [19.0 kB] 488s Get:174 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-twox-hash-dev ppc64el 1.6.3-1 [21.6 kB] 488s Get:175 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ruzstd-dev ppc64el 0.5.0-1 [44.6 kB] 489s Get:176 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-object-dev ppc64el 0.32.2-1 [228 kB] 489s Get:177 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rustc-demangle-dev ppc64el 0.1.21-1 [27.7 kB] 489s Get:178 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-addr2line-dev ppc64el 0.21.0-2 [36.4 kB] 489s Get:179 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-aho-corasick-dev ppc64el 1.1.3-1 [146 kB] 489s Get:180 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bitflags-1-dev ppc64el 1.3.2-5 [25.3 kB] 489s Get:181 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-anes-dev ppc64el 0.1.6-1 [21.1 kB] 489s Get:182 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-anstyle-dev ppc64el 1.0.8-1 [16.7 kB] 489s Get:183 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-arrayvec-dev ppc64el 0.7.4-2 [29.9 kB] 489s Get:184 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-utf8parse-dev ppc64el 0.2.1-1 [15.0 kB] 489s Get:185 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-anstyle-parse-dev ppc64el 0.2.1-1 [17.1 kB] 489s Get:186 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-anstyle-query-dev ppc64el 1.0.0-1 [9774 B] 489s Get:187 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-colorchoice-dev ppc64el 1.0.0-1 [8338 B] 489s Get:188 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-anstream-dev ppc64el 0.6.15-1 [25.7 kB] 489s Get:189 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-jobserver-dev ppc64el 0.1.32-1 [29.1 kB] 489s Get:190 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-shlex-dev ppc64el 1.3.0-1 [20.1 kB] 489s Get:191 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-cc-dev ppc64el 1.1.14-1 [73.6 kB] 489s Get:192 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-backtrace-dev ppc64el 0.3.69-2 [69.9 kB] 489s Get:193 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-anyhow-dev ppc64el 1.0.86-1 [44.3 kB] 489s Get:194 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bytecheck-derive-dev ppc64el 0.6.12-1 [7090 B] 489s Get:195 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ptr-meta-derive-dev ppc64el 0.1.4-1 [3966 B] 489s Get:196 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ptr-meta-dev ppc64el 0.1.4-1 [7340 B] 489s Get:197 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-simdutf8-dev ppc64el 0.1.4-4 [27.2 kB] 489s Get:198 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bytemuck-derive-dev ppc64el 1.5.0-2 [18.7 kB] 489s Get:199 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bytemuck-dev ppc64el 1.14.0-1 [42.7 kB] 489s Get:200 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-atomic-dev ppc64el 0.6.0-1 [15.5 kB] 489s Get:201 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-md5-asm-dev ppc64el 0.5.0-2 [7514 B] 489s Get:202 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-md-5-dev ppc64el 0.10.6-1 [17.5 kB] 489s Get:203 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-cpufeatures-dev ppc64el 0.2.11-1 [14.9 kB] 489s Get:204 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sha1-asm-dev ppc64el 0.5.1-2 [8058 B] 489s Get:205 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sha1-dev ppc64el 0.10.6-1 [16.0 kB] 489s Get:206 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-slog-dev ppc64el 2.7.0-1 [44.0 kB] 489s Get:207 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-uuid-dev ppc64el 1.10.0-1 [44.2 kB] 489s Get:208 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bytecheck-dev ppc64el 0.6.12-1 [10.2 kB] 489s Get:209 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-autocfg-dev ppc64el 1.1.0-1 [15.1 kB] 489s Get:210 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-traits-dev ppc64el 0.2.19-2 [46.2 kB] 489s Get:211 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-funty-dev ppc64el 2.0.0-1 [13.8 kB] 489s Get:212 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-radium-dev ppc64el 1.1.0-1 [14.9 kB] 489s Get:213 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tap-dev ppc64el 1.0.1-1 [12.7 kB] 489s Get:214 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-traitobject-dev ppc64el 0.1.0-1 [4542 B] 489s Get:215 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unsafe-any-dev ppc64el 0.4.2-2 [4626 B] 489s Get:216 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-typemap-dev ppc64el 0.3.3-2 [6726 B] 489s Get:217 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wyz-dev ppc64el 0.5.1-1 [19.7 kB] 489s Get:218 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bitvec-dev ppc64el 1.0.1-1 [179 kB] 489s Get:219 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bytes-dev ppc64el 1.8.0-1 [56.9 kB] 489s Get:220 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rend-dev ppc64el 0.4.0-1 [10.3 kB] 489s Get:221 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rkyv-derive-dev ppc64el 0.7.44-1 [17.5 kB] 489s Get:222 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-seahash-dev ppc64el 4.1.0-1 [25.1 kB] 489s Get:223 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-smol-str-dev ppc64el 0.2.0-1 [15.2 kB] 489s Get:224 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tinyvec-dev ppc64el 1.6.0-2 [37.7 kB] 489s Get:225 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tinyvec-macros-dev ppc64el 0.1.0-1 [3856 B] 489s Get:226 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tinyvec+tinyvec-macros-dev ppc64el 1.6.0-2 [1128 B] 489s Get:227 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rkyv-dev ppc64el 0.7.44-1 [94.4 kB] 489s Get:228 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-complex-dev ppc64el 0.4.6-2 [30.8 kB] 489s Get:229 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-approx-dev ppc64el 0.5.1-1 [16.0 kB] 490s Get:230 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-array-init-dev ppc64el 2.0.1-1 [12.3 kB] 490s Get:231 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-attributes-dev all 1.1.2-6 [6756 B] 490s Get:232 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-concurrent-queue-dev ppc64el 2.5.0-4 [23.9 kB] 490s Get:233 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-parking-dev ppc64el 2.2.0-1 [11.6 kB] 490s Get:234 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pin-project-lite-dev ppc64el 0.2.13-1 [30.2 kB] 490s Get:235 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-event-listener-dev all 5.3.1-8 [29.6 kB] 490s Get:236 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-event-listener-strategy-dev ppc64el 0.5.2-3 [12.7 kB] 490s Get:237 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-core-dev ppc64el 0.3.30-1 [16.7 kB] 490s Get:238 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-channel-dev all 2.3.1-8 [13.1 kB] 490s Get:239 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-task-dev all 4.7.1-3 [29.4 kB] 490s Get:240 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-fastrand-dev ppc64el 2.1.1-1 [17.8 kB] 490s Get:241 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-io-dev ppc64el 0.3.31-1 [11.2 kB] 490s Get:242 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-lite-dev ppc64el 2.3.0-2 [38.6 kB] 490s Get:243 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-slab-dev ppc64el 0.4.9-1 [21.2 kB] 490s Get:244 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-executor-dev all 1.13.1-1 [18.7 kB] 490s Get:245 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-lock-dev all 3.4.0-4 [29.3 kB] 490s Get:246 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-atomic-waker-dev ppc64el 1.1.2-1 [14.3 kB] 490s Get:247 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tracing-attributes-dev ppc64el 0.1.27-1 [33.3 kB] 490s Get:248 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-valuable-derive-dev ppc64el 0.1.0-1 [5946 B] 490s Get:249 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-valuable-dev ppc64el 0.1.0-4 [23.5 kB] 490s Get:250 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tracing-core-dev ppc64el 0.1.32-1 [53.8 kB] 490s Get:251 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tracing-dev ppc64el 0.1.40-1 [69.5 kB] 490s Get:252 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-blocking-dev all 1.6.1-5 [17.5 kB] 490s Get:253 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-fs-dev all 2.1.2-4 [15.3 kB] 490s Get:254 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bitflags-dev ppc64el 2.6.0-1 [41.1 kB] 490s Get:255 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-compiler-builtins+core-dev ppc64el 0.1.101-1 [1092 B] 490s Get:256 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-compiler-builtins+rustc-dep-of-std-dev ppc64el 0.1.101-1 [1104 B] 490s Get:257 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-errno-dev ppc64el 0.3.8-1 [13.0 kB] 490s Get:258 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-linux-raw-sys-dev ppc64el 0.4.14-1 [138 kB] 490s Get:259 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rustix-dev ppc64el 0.38.32-1 [274 kB] 490s Get:260 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-polling-dev ppc64el 3.4.0-1 [47.8 kB] 490s Get:261 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-io-dev ppc64el 2.3.3-4 [41.0 kB] 490s Get:262 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-mio-dev ppc64el 1.0.2-2 [87.6 kB] 490s Get:263 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-owning-ref-dev ppc64el 0.4.1-1 [13.7 kB] 490s Get:264 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-scopeguard-dev ppc64el 1.2.0-1 [13.3 kB] 490s Get:265 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-lock-api-dev ppc64el 0.4.12-1 [22.9 kB] 490s Get:266 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-parking-lot-dev ppc64el 0.12.3-1 [38.7 kB] 490s Get:267 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-signal-hook-registry-dev ppc64el 1.4.0-1 [19.2 kB] 490s Get:268 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-socket2-dev ppc64el 0.5.7-1 [48.3 kB] 490s Get:269 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tokio-macros-dev ppc64el 2.4.0-2 [14.0 kB] 490s Get:270 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tokio-dev ppc64el 1.39.3-3 [561 kB] 490s Get:271 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-global-executor-dev ppc64el 2.4.1-5 [14.6 kB] 490s Get:272 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-net-dev all 2.0.0-4 [14.6 kB] 490s Get:273 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-signal-dev ppc64el 0.2.10-1 [16.0 kB] 490s Get:274 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-process-dev all 2.3.0-1 [21.2 kB] 490s Get:275 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-kv-log-macro-dev all 1.0.8-4 [7290 B] 490s Get:276 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pin-utils-dev ppc64el 0.1.0-1 [9340 B] 490s Get:277 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-async-std-dev all 1.13.0-1 [170 kB] 490s Get:278 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-base64-dev ppc64el 0.21.7-1 [65.1 kB] 490s Get:279 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bit-vec-dev ppc64el 0.6.3-1 [21.1 kB] 490s Get:280 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bit-set-dev ppc64el 0.5.2-1 [15.7 kB] 490s Get:281 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bit-set+std-dev ppc64el 0.5.2-1 [1088 B] 490s Get:282 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-regex-syntax-dev ppc64el 0.8.2-1 [200 kB] 490s Get:283 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-regex-automata-dev ppc64el 0.4.7-1 [424 kB] 490s Get:284 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bstr-dev ppc64el 1.7.0-2build1 [271 kB] 490s Get:285 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-bumpalo-dev ppc64el 3.16.0-1 [75.7 kB] 490s Get:286 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-cast-dev ppc64el 0.3.0-1 [13.1 kB] 490s Get:287 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-iana-time-zone-dev ppc64el 0.1.60-1 [25.1 kB] 490s Get:288 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen-shared-dev ppc64el 0.2.87-1 [9094 B] 490s Get:289 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen-backend-dev ppc64el 0.2.87-1 [27.0 kB] 490s Get:290 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen-macro-support-dev ppc64el 0.2.87-1 [21.2 kB] 490s Get:291 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen-macro-dev ppc64el 0.2.87-1 [16.6 kB] 490s Get:292 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen-dev ppc64el 0.2.87-1 [157 kB] 490s Get:293 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen-macro-support+spans-dev ppc64el 0.2.87-1 [1078 B] 490s Get:294 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen-macro+spans-dev ppc64el 0.2.87-1 [1060 B] 490s Get:295 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen+spans-dev ppc64el 0.2.87-1 [1040 B] 490s Get:296 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wasm-bindgen+default-dev ppc64el 0.2.87-1 [1048 B] 490s Get:297 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-js-sys-dev ppc64el 0.3.64-1 [71.9 kB] 490s Get:298 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pure-rust-locales-dev ppc64el 0.8.1-1 [112 kB] 490s Get:299 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-chrono-dev ppc64el 0.4.38-2 [172 kB] 490s Get:300 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-regex-dev ppc64el 1.10.6-1 [199 kB] 490s Get:301 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-parse-zoneinfo-dev ppc64el 0.3.0-1 [71.0 kB] 491s Get:302 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-siphasher-dev ppc64el 0.3.10-1 [12.0 kB] 491s Get:303 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-phf-shared-dev ppc64el 0.11.2-1 [15.6 kB] 491s Get:304 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-phf-dev ppc64el 0.11.2-1 [21.6 kB] 491s Get:305 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-uncased-dev ppc64el 0.9.6-2 [12.2 kB] 491s Get:306 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-phf-shared+uncased-dev ppc64el 0.11.2-1 [1030 B] 491s Get:307 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-phf+uncased-dev ppc64el 0.11.2-1 [1030 B] 491s Get:308 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ciborium-io-dev ppc64el 0.2.2-1 [8184 B] 491s Get:309 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-half-dev ppc64el 1.8.2-4 [34.8 kB] 491s Get:310 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ciborium-ll-dev ppc64el 0.2.2-1 [15.8 kB] 491s Get:311 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ciborium-dev ppc64el 0.2.2-2 [32.6 kB] 491s Get:312 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-clap-lex-dev ppc64el 0.7.2-2 [14.3 kB] 491s Get:313 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-strsim-dev ppc64el 0.11.1-1 [15.9 kB] 491s Get:314 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-terminal-size-dev ppc64el 0.3.0-2 [12.6 kB] 491s Get:315 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unicase-dev ppc64el 2.7.0-1 [19.4 kB] 491s Get:316 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unicode-width-dev ppc64el 0.1.14-1 [196 kB] 491s Get:317 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-clap-builder-dev ppc64el 4.5.15-2 [135 kB] 491s Get:318 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-heck-dev ppc64el 0.4.1-1 [13.3 kB] 491s Get:319 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-clap-derive-dev ppc64el 4.5.13-2 [29.3 kB] 491s Get:320 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-clap-dev ppc64el 4.5.16-1 [52.3 kB] 491s Get:321 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-csv-core-dev ppc64el 0.1.11-1 [25.9 kB] 491s Get:322 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-csv-dev ppc64el 1.3.0-1 [729 kB] 491s Get:323 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-sink-dev ppc64el 0.3.31-1 [10.1 kB] 491s Get:324 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-channel-dev ppc64el 0.3.30-1 [31.8 kB] 491s Get:325 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-task-dev ppc64el 0.3.30-1 [13.5 kB] 491s Get:326 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-macro-dev ppc64el 0.3.30-1 [13.3 kB] 491s Get:327 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-util-dev ppc64el 0.3.30-2 [127 kB] 491s Get:328 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-cpus-dev ppc64el 1.16.0-1 [18.1 kB] 491s Get:329 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-executor-dev ppc64el 0.3.30-1 [19.8 kB] 491s Get:330 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-futures-dev ppc64el 0.3.30-2 [53.2 kB] 491s Get:331 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-is-terminal-dev ppc64el 0.4.13-1 [8268 B] 491s Get:332 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-itertools-dev ppc64el 0.10.5-1 [101 kB] 491s Get:333 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-oorandom-dev ppc64el 11.1.3-1 [11.3 kB] 491s Get:334 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-winapi-i686-pc-windows-gnu-dev ppc64el 0.4.0-1 [3648 B] 491s Get:335 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-winapi-x86-64-pc-windows-gnu-dev ppc64el 0.4.0-1 [3660 B] 491s Get:336 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-winapi-dev ppc64el 0.3.9-1 [953 kB] 491s Get:337 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-dirs-sys-next-dev ppc64el 0.1.1-1 [12.1 kB] 491s Get:338 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-dirs-next-dev ppc64el 2.0.0-1 [13.1 kB] 491s Get:339 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-float-ord-dev ppc64el 0.3.2-1 [9402 B] 491s Get:340 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-cmake-dev ppc64el 0.1.45-1 [16.0 kB] 491s Get:341 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-freetype-sys-dev ppc64el 0.13.1-1 [11.8 kB] 492s Get:342 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-freetype-dev ppc64el 0.7.0-4 [20.4 kB] 492s Get:343 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-spin-dev ppc64el 0.9.8-4 [33.4 kB] 492s Get:344 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-lazy-static-dev ppc64el 1.5.0-1 [14.2 kB] 492s Get:345 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pathfinder-simd-dev ppc64el 0.5.2-1 [20.1 kB] 492s Get:346 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pathfinder-geometry-dev ppc64el 0.5.1-1 [13.2 kB] 492s Get:347 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-winapi-util-dev ppc64el 0.1.6-1 [14.0 kB] 492s Get:348 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-same-file-dev ppc64el 1.0.6-1 [11.5 kB] 492s Get:349 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-walkdir-dev ppc64el 2.5.0-1 [24.5 kB] 492s Get:350 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-const-cstr-dev ppc64el 0.3.0-1 [9070 B] 492s Get:351 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-libloading-dev ppc64el 0.8.5-1 [29.2 kB] 492s Get:352 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-dlib-dev ppc64el 0.5.2-2 [7972 B] 492s Get:353 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-yeslogic-fontconfig-sys-dev ppc64el 3.0.1-1 [8106 B] 492s Get:354 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-font-kit-dev ppc64el 0.11.0-2 [56.2 kB] 492s Get:355 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-color-quant-dev ppc64el 1.1.0-1 [8468 B] 492s Get:356 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-weezl-dev ppc64el 0.1.5-1 [30.3 kB] 492s Get:357 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-gif-dev ppc64el 0.11.3-1 [31.9 kB] 492s Get:358 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-jpeg-decoder-dev ppc64el 0.3.0-1 [717 kB] 492s Get:359 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-integer-dev ppc64el 0.1.46-1 [22.6 kB] 492s Get:360 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-humantime-dev ppc64el 2.1.0-1 [18.2 kB] 492s Get:361 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-termcolor-dev ppc64el 1.4.1-1 [19.7 kB] 492s Get:362 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-env-logger-dev ppc64el 0.10.2-2 [34.4 kB] 492s Get:363 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-quickcheck-dev ppc64el 1.0.3-3 [27.9 kB] 492s Get:364 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-bigint-dev ppc64el 0.4.6-1 [84.9 kB] 492s Get:365 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-rational-dev ppc64el 0.4.2-1 [28.7 kB] 492s Get:366 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-png-dev ppc64el 0.17.7-3 [63.4 kB] 492s Get:367 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-qoi-dev ppc64el 0.4.1-2 [56.7 kB] 492s Get:368 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tiff-dev ppc64el 0.9.0-1 [1413 kB] 492s Get:369 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsharpyuv0 ppc64el 1.4.0-0.1 [22.0 kB] 492s Get:370 http://ftpmaster.internal/ubuntu plucky/main ppc64el libwebp7 ppc64el 1.4.0-0.1 [309 kB] 492s Get:371 http://ftpmaster.internal/ubuntu plucky/main ppc64el libwebpdemux2 ppc64el 1.4.0-0.1 [14.1 kB] 492s Get:372 http://ftpmaster.internal/ubuntu plucky/main ppc64el libwebpmux3 ppc64el 1.4.0-0.1 [31.4 kB] 492s Get:373 http://ftpmaster.internal/ubuntu plucky/main ppc64el libwebpdecoder3 ppc64el 1.4.0-0.1 [144 kB] 492s Get:374 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsharpyuv-dev ppc64el 1.4.0-0.1 [24.4 kB] 492s Get:375 http://ftpmaster.internal/ubuntu plucky/main ppc64el libwebp-dev ppc64el 1.4.0-0.1 [451 kB] 492s Get:376 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-libwebp-sys-dev ppc64el 0.9.5-1build1 [1357 kB] 492s Get:377 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-webp-dev ppc64el 0.2.6-1 [1846 kB] 492s Get:378 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-image-dev ppc64el 0.24.7-2 [229 kB] 492s Get:379 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-plotters-backend-dev ppc64el 0.3.7-1 [15.7 kB] 492s Get:380 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-plotters-bitmap-dev ppc64el 0.3.3-3 [17.1 kB] 492s Get:381 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-plotters-svg-dev ppc64el 0.3.5-1 [9258 B] 492s Get:382 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-web-sys-dev ppc64el 0.3.64-2 [581 kB] 492s Get:383 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-plotters-dev ppc64el 0.3.5-4 [118 kB] 492s Get:384 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-smol-dev all 2.0.2-1 [205 kB] 492s Get:385 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tinytemplate-dev ppc64el 1.2.1-1 [26.8 kB] 492s Get:386 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-criterion-dev all 0.5.1-6 [104 kB] 492s Get:387 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-phf-generator-dev ppc64el 0.11.2-2 [12.3 kB] 492s Get:388 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-phf-codegen-dev ppc64el 0.11.2-1 [14.3 kB] 492s Get:389 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-chrono-tz-build-dev ppc64el 0.2.1-1 [12.1 kB] 492s Get:390 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-chrono-tz-dev ppc64el 0.8.6-2 [513 kB] 492s Get:391 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ctor-dev ppc64el 0.1.26-1 [12.0 kB] 492s Get:392 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-powerfmt-macros-dev ppc64el 0.1.0-1 [10.5 kB] 492s Get:393 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-powerfmt-dev ppc64el 0.2.0-1 [16.5 kB] 492s Get:394 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-deranged-dev ppc64el 0.3.11-1 [18.4 kB] 492s Get:395 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-eui48-dev ppc64el 1.1.0-2 [16.1 kB] 492s Get:396 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-indenter-dev ppc64el 0.3.3-1 [8648 B] 492s Get:397 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-eyre-dev ppc64el 0.6.12-1 [38.0 kB] 492s Get:398 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-eyre+default-dev ppc64el 0.6.12-1 [1050 B] 492s Get:399 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-fancy-regex-dev ppc64el 0.11.0-2 [54.7 kB] 492s Get:400 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-fnv-dev ppc64el 1.0.7-1 [12.8 kB] 492s Get:401 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-geo-types-dev ppc64el 0.7.11-2 [32.8 kB] 493s Get:402 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-ghost-dev ppc64el 0.1.5-1 [16.1 kB] 493s Get:403 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-hmac-dev ppc64el 0.12.1-1 [43.9 kB] 493s Get:404 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-indoc-dev ppc64el 2.0.5-1 [16.7 kB] 493s Get:405 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-inventory-dev ppc64el 0.3.2-1 [13.5 kB] 493s Get:406 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-memoffset-dev ppc64el 0.8.0-1 [10.9 kB] 493s Get:407 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-conv-dev ppc64el 0.1.0-1 [8996 B] 493s Get:408 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-num-threads-dev ppc64el 0.1.7-1 [9156 B] 493s Get:409 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-postgres-derive-dev ppc64el 0.4.5-1 [13.4 kB] 493s Get:410 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sha2-asm-dev ppc64el 0.6.2-2 [14.4 kB] 493s Get:411 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-sha2-dev ppc64el 0.10.8-1 [25.6 kB] 493s Get:412 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unicode-bidi-dev ppc64el 0.3.13-1 [39.9 kB] 493s Get:413 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unicode-normalization-dev ppc64el 0.1.22-1 [104 kB] 493s Get:414 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-stringprep-dev ppc64el 0.1.2-1 [16.5 kB] 493s Get:415 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-postgres-protocol-dev ppc64el 0.6.6-2 [25.9 kB] 493s Get:416 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-time-core-dev ppc64el 0.1.2-1 [9138 B] 493s Get:417 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-time-macros-dev ppc64el 0.2.16-1 [25.1 kB] 493s Get:418 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-time-dev ppc64el 0.3.36-2 [99.4 kB] 493s Get:419 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-postgres-types-dev ppc64el 0.2.6-2 [30.1 kB] 493s Get:420 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rand-xorshift-dev ppc64el 0.3.0-2 [10.9 kB] 493s Get:421 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-quick-error-dev ppc64el 2.0.1-1 [15.6 kB] 493s Get:422 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-tempfile-dev ppc64el 3.10.1-1 [33.7 kB] 493s Get:423 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rusty-fork-dev ppc64el 0.3.0-1 [20.4 kB] 493s Get:424 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-wait-timeout-dev ppc64el 0.2.0-1 [14.2 kB] 493s Get:425 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rusty-fork+wait-timeout-dev ppc64el 0.3.0-1 [1134 B] 493s Get:426 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unarray-dev ppc64el 0.1.4-1 [14.6 kB] 493s Get:427 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-proptest-dev ppc64el 1.5.0-2 [171 kB] 493s Get:428 http://ftpmaster.internal/ubuntu plucky/universe ppc64el llvm-19-runtime ppc64el 1:19.1.2-1ubuntu1 [589 kB] 493s Get:429 http://ftpmaster.internal/ubuntu plucky/universe ppc64el llvm-runtime ppc64el 1:19.0-60~exp1 [5610 B] 493s Get:430 http://ftpmaster.internal/ubuntu plucky/universe ppc64el llvm-19-linker-tools ppc64el 1:19.1.2-1ubuntu1 [1373 kB] 493s Get:431 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libpfm4 ppc64el 4.13.0+git83-g91970fe-1 [181 kB] 493s Get:432 http://ftpmaster.internal/ubuntu plucky/universe ppc64el llvm-19 ppc64el 1:19.1.2-1ubuntu1 [19.5 MB] 495s Get:433 http://ftpmaster.internal/ubuntu plucky/universe ppc64el llvm ppc64el 1:19.0-60~exp1 [4146 B] 495s Get:434 http://ftpmaster.internal/ubuntu plucky/universe ppc64el binutils-mingw-w64-x86-64 ppc64el 2.43.1-4ubuntu1+12 [3877 kB] 495s Get:435 http://ftpmaster.internal/ubuntu plucky/universe ppc64el binutils-mingw-w64-i686 ppc64el 2.43.1-4ubuntu1+12 [3595 kB] 496s Get:436 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-python3-dll-a-dev ppc64el 0.2.10-1 [31.6 kB] 496s Get:437 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-target-lexicon-dev ppc64el 0.12.14-1 [25.1 kB] 496s Get:438 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pyo3-build-config-dev ppc64el 0.22.6-1 [30.8 kB] 496s Get:439 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3.12-dev ppc64el 3.12.7-3 [505 kB] 496s Get:440 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pyo3-ffi-dev ppc64el 0.22.6-1build1 [62.6 kB] 496s Get:441 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pyo3-macros-backend-dev ppc64el 0.22.6-1 [58.5 kB] 496s Get:442 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pyo3-macros-dev ppc64el 0.22.6-1 [10.4 kB] 496s Get:443 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rust-decimal-dev ppc64el 1.36.0-1 [114 kB] 496s Get:444 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-unindent-dev ppc64el 0.2.3-1 [9190 B] 496s Get:445 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-pyo3-dev ppc64el 0.22.6-1 [415 kB] 496s Get:446 http://ftpmaster.internal/ubuntu plucky/universe ppc64el librust-rustc-hash-dev ppc64el 1.1.0-1 [10.8 kB] 496s Get:447 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pybuild-plugin-autopkgtest all 6.20241024 [1746 B] 496s Get:448 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-packaging all 24.2-1 [51.5 kB] 496s Get:449 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 496s Get:450 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-toml all 0.10.2-1 [16.5 kB] 496s Get:451 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-wheel all 0.45.1-1 [57.7 kB] 496s Get:452 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-build all 1.2.2-1 [31.0 kB] 496s Get:453 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 496s Get:454 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pybuild-plugin-pyproject all 6.20241024 [1728 B] 496s Get:455 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-all ppc64el 3.12.6-0ubuntu1 [888 B] 496s Get:456 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-dateutil all 2.9.0-3 [80.2 kB] 496s Get:457 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-sortedcontainers all 2.4.0-2 [27.6 kB] 496s Get:458 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-hypothesis all 6.119.3-1 [329 kB] 496s Get:459 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-iniconfig all 1.1.1-2 [6024 B] 496s Get:460 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pluggy all 1.5.0-1 [21.0 kB] 496s Get:461 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest all 8.3.3-1 [251 kB] 496s Get:462 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-regex ppc64el 0.1.20240724-1build1 [330 kB] 496s Get:463 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-semantic-version all 2.10.0-2 [15.1 kB] 496s Get:464 http://ftpmaster.internal/ubuntu plucky/main ppc64el rustc ppc64el 1.80.1ubuntu2 [2760 B] 496s Get:465 http://ftpmaster.internal/ubuntu plucky/main ppc64el cargo ppc64el 1.80.1ubuntu2 [2244 B] 496s Get:466 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-setuptools-rust all 1.9.0+dfsg-2 [23.1 kB] 496s Get:467 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el python3-tiktoken ppc64el 0.8.0-1build1 [823 kB] 497s Fetched 215 MB in 14s (15.8 MB/s) 498s Selecting previously unselected package m4. 498s (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 ... 73876 files and directories currently installed.) 498s Preparing to unpack .../000-m4_1.4.19-4build1_ppc64el.deb ... 498s Unpacking m4 (1.4.19-4build1) ... 498s Selecting previously unselected package autoconf. 498s Preparing to unpack .../001-autoconf_2.72-3_all.deb ... 498s Unpacking autoconf (2.72-3) ... 498s Selecting previously unselected package autotools-dev. 498s Preparing to unpack .../002-autotools-dev_20220109.1_all.deb ... 498s Unpacking autotools-dev (20220109.1) ... 498s Selecting previously unselected package automake. 498s Preparing to unpack .../003-automake_1%3a1.16.5-1.3ubuntu1_all.deb ... 498s Unpacking automake (1:1.16.5-1.3ubuntu1) ... 498s Selecting previously unselected package autopoint. 498s Preparing to unpack .../004-autopoint_0.22.5-2_all.deb ... 498s Unpacking autopoint (0.22.5-2) ... 498s Selecting previously unselected package libisl23:ppc64el. 498s Preparing to unpack .../005-libisl23_0.27-1_ppc64el.deb ... 498s Unpacking libisl23:ppc64el (0.27-1) ... 498s Selecting previously unselected package libmpc3:ppc64el. 498s Preparing to unpack .../006-libmpc3_1.3.1-1build2_ppc64el.deb ... 498s Unpacking libmpc3:ppc64el (1.3.1-1build2) ... 498s Selecting previously unselected package cpp-14-powerpc64le-linux-gnu. 498s Preparing to unpack .../007-cpp-14-powerpc64le-linux-gnu_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking cpp-14-powerpc64le-linux-gnu (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package cpp-14. 498s Preparing to unpack .../008-cpp-14_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking cpp-14 (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package cpp-powerpc64le-linux-gnu. 498s Preparing to unpack .../009-cpp-powerpc64le-linux-gnu_4%3a14.1.0-2ubuntu1_ppc64el.deb ... 498s Unpacking cpp-powerpc64le-linux-gnu (4:14.1.0-2ubuntu1) ... 498s Selecting previously unselected package cpp. 498s Preparing to unpack .../010-cpp_4%3a14.1.0-2ubuntu1_ppc64el.deb ... 498s Unpacking cpp (4:14.1.0-2ubuntu1) ... 498s Selecting previously unselected package libcc1-0:ppc64el. 498s Preparing to unpack .../011-libcc1-0_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking libcc1-0:ppc64el (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package libgomp1:ppc64el. 498s Preparing to unpack .../012-libgomp1_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking libgomp1:ppc64el (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package libitm1:ppc64el. 498s Preparing to unpack .../013-libitm1_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking libitm1:ppc64el (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package libasan8:ppc64el. 498s Preparing to unpack .../014-libasan8_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking libasan8:ppc64el (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package liblsan0:ppc64el. 498s Preparing to unpack .../015-liblsan0_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking liblsan0:ppc64el (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package libtsan2:ppc64el. 498s Preparing to unpack .../016-libtsan2_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking libtsan2:ppc64el (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package libubsan1:ppc64el. 498s Preparing to unpack .../017-libubsan1_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking libubsan1:ppc64el (14.2.0-8ubuntu1) ... 498s Selecting previously unselected package libquadmath0:ppc64el. 498s Preparing to unpack .../018-libquadmath0_14.2.0-8ubuntu1_ppc64el.deb ... 498s Unpacking libquadmath0:ppc64el (14.2.0-8ubuntu1) ... 499s Selecting previously unselected package libgcc-14-dev:ppc64el. 499s Preparing to unpack .../019-libgcc-14-dev_14.2.0-8ubuntu1_ppc64el.deb ... 499s Unpacking libgcc-14-dev:ppc64el (14.2.0-8ubuntu1) ... 499s Selecting previously unselected package gcc-14-powerpc64le-linux-gnu. 499s Preparing to unpack .../020-gcc-14-powerpc64le-linux-gnu_14.2.0-8ubuntu1_ppc64el.deb ... 499s Unpacking gcc-14-powerpc64le-linux-gnu (14.2.0-8ubuntu1) ... 499s Selecting previously unselected package gcc-14. 499s Preparing to unpack .../021-gcc-14_14.2.0-8ubuntu1_ppc64el.deb ... 499s Unpacking gcc-14 (14.2.0-8ubuntu1) ... 499s Selecting previously unselected package gcc-powerpc64le-linux-gnu. 499s Preparing to unpack .../022-gcc-powerpc64le-linux-gnu_4%3a14.1.0-2ubuntu1_ppc64el.deb ... 499s Unpacking gcc-powerpc64le-linux-gnu (4:14.1.0-2ubuntu1) ... 499s Selecting previously unselected package gcc. 499s Preparing to unpack .../023-gcc_4%3a14.1.0-2ubuntu1_ppc64el.deb ... 499s Unpacking gcc (4:14.1.0-2ubuntu1) ... 499s Selecting previously unselected package libstdc++-14-dev:ppc64el. 499s Preparing to unpack .../024-libstdc++-14-dev_14.2.0-8ubuntu1_ppc64el.deb ... 499s Unpacking libstdc++-14-dev:ppc64el (14.2.0-8ubuntu1) ... 499s Selecting previously unselected package g++-14-powerpc64le-linux-gnu. 499s Preparing to unpack .../025-g++-14-powerpc64le-linux-gnu_14.2.0-8ubuntu1_ppc64el.deb ... 499s Unpacking g++-14-powerpc64le-linux-gnu (14.2.0-8ubuntu1) ... 499s Selecting previously unselected package g++-14. 499s Preparing to unpack .../026-g++-14_14.2.0-8ubuntu1_ppc64el.deb ... 499s Unpacking g++-14 (14.2.0-8ubuntu1) ... 499s Selecting previously unselected package g++-powerpc64le-linux-gnu. 499s Preparing to unpack .../027-g++-powerpc64le-linux-gnu_4%3a14.1.0-2ubuntu1_ppc64el.deb ... 499s Unpacking g++-powerpc64le-linux-gnu (4:14.1.0-2ubuntu1) ... 499s Selecting previously unselected package g++. 499s Preparing to unpack .../028-g++_4%3a14.1.0-2ubuntu1_ppc64el.deb ... 499s Unpacking g++ (4:14.1.0-2ubuntu1) ... 499s Selecting previously unselected package build-essential. 499s Preparing to unpack .../029-build-essential_12.10ubuntu1_ppc64el.deb ... 499s Unpacking build-essential (12.10ubuntu1) ... 499s Selecting previously unselected package libhttp-parser2.9:ppc64el. 499s Preparing to unpack .../030-libhttp-parser2.9_2.9.4-6build1_ppc64el.deb ... 499s Unpacking libhttp-parser2.9:ppc64el (2.9.4-6build1) ... 499s Selecting previously unselected package libgit2-1.7:ppc64el. 499s Preparing to unpack .../031-libgit2-1.7_1.7.2+ds-1ubuntu3_ppc64el.deb ... 499s Unpacking libgit2-1.7:ppc64el (1.7.2+ds-1ubuntu3) ... 499s Selecting previously unselected package libstd-rust-1.80:ppc64el. 499s Preparing to unpack .../032-libstd-rust-1.80_1.80.1+dfsg0ubuntu1-0ubuntu1_ppc64el.deb ... 499s Unpacking libstd-rust-1.80:ppc64el (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 500s Selecting previously unselected package libstd-rust-1.80-dev:ppc64el. 500s Preparing to unpack .../033-libstd-rust-1.80-dev_1.80.1+dfsg0ubuntu1-0ubuntu1_ppc64el.deb ... 500s Unpacking libstd-rust-1.80-dev:ppc64el (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 501s Selecting previously unselected package rustc-1.80. 501s Preparing to unpack .../034-rustc-1.80_1.80.1+dfsg0ubuntu1-0ubuntu1_ppc64el.deb ... 501s Unpacking rustc-1.80 (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 501s Selecting previously unselected package cargo-1.80. 501s Preparing to unpack .../035-cargo-1.80_1.80.1+dfsg0ubuntu1-0ubuntu1_ppc64el.deb ... 501s Unpacking cargo-1.80 (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 501s Selecting previously unselected package libjsoncpp25:ppc64el. 501s Preparing to unpack .../036-libjsoncpp25_1.9.5-6build1_ppc64el.deb ... 501s Unpacking libjsoncpp25:ppc64el (1.9.5-6build1) ... 501s Selecting previously unselected package librhash0:ppc64el. 501s Preparing to unpack .../037-librhash0_1.4.3-3build1_ppc64el.deb ... 501s Unpacking librhash0:ppc64el (1.4.3-3build1) ... 501s Selecting previously unselected package cmake-data. 501s Preparing to unpack .../038-cmake-data_3.30.3-1_all.deb ... 501s Unpacking cmake-data (3.30.3-1) ... 501s Selecting previously unselected package cmake. 501s Preparing to unpack .../039-cmake_3.30.3-1_ppc64el.deb ... 501s Unpacking cmake (3.30.3-1) ... 502s Selecting previously unselected package libdebhelper-perl. 502s Preparing to unpack .../040-libdebhelper-perl_13.20ubuntu1_all.deb ... 502s Unpacking libdebhelper-perl (13.20ubuntu1) ... 502s Selecting previously unselected package libtool. 502s Preparing to unpack .../041-libtool_2.4.7-8_all.deb ... 502s Unpacking libtool (2.4.7-8) ... 502s Selecting previously unselected package dh-autoreconf. 502s Preparing to unpack .../042-dh-autoreconf_20_all.deb ... 502s Unpacking dh-autoreconf (20) ... 502s Selecting previously unselected package libarchive-zip-perl. 502s Preparing to unpack .../043-libarchive-zip-perl_1.68-1_all.deb ... 502s Unpacking libarchive-zip-perl (1.68-1) ... 502s Selecting previously unselected package libfile-stripnondeterminism-perl. 502s Preparing to unpack .../044-libfile-stripnondeterminism-perl_1.14.0-1_all.deb ... 502s Unpacking libfile-stripnondeterminism-perl (1.14.0-1) ... 502s Selecting previously unselected package dh-strip-nondeterminism. 502s Preparing to unpack .../045-dh-strip-nondeterminism_1.14.0-1_all.deb ... 502s Unpacking dh-strip-nondeterminism (1.14.0-1) ... 502s Selecting previously unselected package debugedit. 502s Preparing to unpack .../046-debugedit_1%3a5.1-1_ppc64el.deb ... 502s Unpacking debugedit (1:5.1-1) ... 502s Selecting previously unselected package dwz. 502s Preparing to unpack .../047-dwz_0.15-1build6_ppc64el.deb ... 502s Unpacking dwz (0.15-1build6) ... 502s Selecting previously unselected package gettext. 502s Preparing to unpack .../048-gettext_0.22.5-2_ppc64el.deb ... 502s Unpacking gettext (0.22.5-2) ... 502s Selecting previously unselected package intltool-debian. 502s Preparing to unpack .../049-intltool-debian_0.35.0+20060710.6_all.deb ... 502s Unpacking intltool-debian (0.35.0+20060710.6) ... 502s Selecting previously unselected package po-debconf. 502s Preparing to unpack .../050-po-debconf_1.0.21+nmu1_all.deb ... 502s Unpacking po-debconf (1.0.21+nmu1) ... 502s Selecting previously unselected package debhelper. 502s Preparing to unpack .../051-debhelper_13.20ubuntu1_all.deb ... 502s Unpacking debhelper (13.20ubuntu1) ... 502s Selecting previously unselected package dh-python. 502s Preparing to unpack .../052-dh-python_6.20241024_all.deb ... 502s Unpacking dh-python (6.20241024) ... 502s Selecting previously unselected package fonts-dejavu-mono. 502s Preparing to unpack .../053-fonts-dejavu-mono_2.37-8_all.deb ... 502s Unpacking fonts-dejavu-mono (2.37-8) ... 502s Selecting previously unselected package fonts-dejavu-core. 502s Preparing to unpack .../054-fonts-dejavu-core_2.37-8_all.deb ... 502s Unpacking fonts-dejavu-core (2.37-8) ... 502s Selecting previously unselected package fontconfig-config. 502s Preparing to unpack .../055-fontconfig-config_2.15.0-1.1ubuntu2_ppc64el.deb ... 502s Unpacking fontconfig-config (2.15.0-1.1ubuntu2) ... 502s Selecting previously unselected package libbrotli-dev:ppc64el. 502s Preparing to unpack .../056-libbrotli-dev_1.1.0-2build3_ppc64el.deb ... 502s Unpacking libbrotli-dev:ppc64el (1.1.0-2build3) ... 502s Selecting previously unselected package libbz2-dev:ppc64el. 502s Preparing to unpack .../057-libbz2-dev_1.0.8-6_ppc64el.deb ... 502s Unpacking libbz2-dev:ppc64el (1.0.8-6) ... 502s Selecting previously unselected package libexpat1-dev:ppc64el. 502s Preparing to unpack .../058-libexpat1-dev_2.6.4-1_ppc64el.deb ... 502s Unpacking libexpat1-dev:ppc64el (2.6.4-1) ... 502s Selecting previously unselected package libfontconfig1:ppc64el. 502s Preparing to unpack .../059-libfontconfig1_2.15.0-1.1ubuntu2_ppc64el.deb ... 502s Unpacking libfontconfig1:ppc64el (2.15.0-1.1ubuntu2) ... 502s Selecting previously unselected package zlib1g-dev:ppc64el. 502s Preparing to unpack .../060-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_ppc64el.deb ... 502s Unpacking zlib1g-dev:ppc64el (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 502s Selecting previously unselected package libpng-dev:ppc64el. 502s Preparing to unpack .../061-libpng-dev_1.6.44-2_ppc64el.deb ... 502s Unpacking libpng-dev:ppc64el (1.6.44-2) ... 502s Selecting previously unselected package libfreetype-dev:ppc64el. 502s Preparing to unpack .../062-libfreetype-dev_2.13.3+dfsg-1_ppc64el.deb ... 502s Unpacking libfreetype-dev:ppc64el (2.13.3+dfsg-1) ... 502s Selecting previously unselected package uuid-dev:ppc64el. 502s Preparing to unpack .../063-uuid-dev_2.40.2-1ubuntu1_ppc64el.deb ... 502s Unpacking uuid-dev:ppc64el (2.40.2-1ubuntu1) ... 502s Selecting previously unselected package libpkgconf3:ppc64el. 502s Preparing to unpack .../064-libpkgconf3_1.8.1-4_ppc64el.deb ... 502s Unpacking libpkgconf3:ppc64el (1.8.1-4) ... 502s Selecting previously unselected package pkgconf-bin. 502s Preparing to unpack .../065-pkgconf-bin_1.8.1-4_ppc64el.deb ... 502s Unpacking pkgconf-bin (1.8.1-4) ... 502s Selecting previously unselected package pkgconf:ppc64el. 502s Preparing to unpack .../066-pkgconf_1.8.1-4_ppc64el.deb ... 502s Unpacking pkgconf:ppc64el (1.8.1-4) ... 503s Selecting previously unselected package libfontconfig-dev:ppc64el. 503s Preparing to unpack .../067-libfontconfig-dev_2.15.0-1.1ubuntu2_ppc64el.deb ... 503s Unpacking libfontconfig-dev:ppc64el (2.15.0-1.1ubuntu2) ... 503s Selecting previously unselected package libpython3.12-dev:ppc64el. 503s Preparing to unpack .../068-libpython3.12-dev_3.12.7-3_ppc64el.deb ... 503s Unpacking libpython3.12-dev:ppc64el (3.12.7-3) ... 503s Selecting previously unselected package libpython3-dev:ppc64el. 503s Preparing to unpack .../069-libpython3-dev_3.12.6-0ubuntu1_ppc64el.deb ... 503s Unpacking libpython3-dev:ppc64el (3.12.6-0ubuntu1) ... 503s Selecting previously unselected package libpython3-all-dev:ppc64el. 503s Preparing to unpack .../070-libpython3-all-dev_3.12.6-0ubuntu1_ppc64el.deb ... 503s Unpacking libpython3-all-dev:ppc64el (3.12.6-0ubuntu1) ... 503s Selecting previously unselected package librust-ab-glyph-rasterizer-dev:ppc64el. 503s Preparing to unpack .../071-librust-ab-glyph-rasterizer-dev_0.1.7-1_ppc64el.deb ... 503s Unpacking librust-ab-glyph-rasterizer-dev:ppc64el (0.1.7-1) ... 503s Selecting previously unselected package librust-libm-dev:ppc64el. 503s Preparing to unpack .../072-librust-libm-dev_0.2.8-1_ppc64el.deb ... 503s Unpacking librust-libm-dev:ppc64el (0.2.8-1) ... 503s Selecting previously unselected package librust-ab-glyph-rasterizer+libm-dev:ppc64el. 503s Preparing to unpack .../073-librust-ab-glyph-rasterizer+libm-dev_0.1.7-1_ppc64el.deb ... 503s Unpacking librust-ab-glyph-rasterizer+libm-dev:ppc64el (0.1.7-1) ... 503s Selecting previously unselected package librust-core-maths-dev:ppc64el. 503s Preparing to unpack .../074-librust-core-maths-dev_0.1.0-2_ppc64el.deb ... 503s Unpacking librust-core-maths-dev:ppc64el (0.1.0-2) ... 503s Selecting previously unselected package librust-ttf-parser-dev:ppc64el. 503s Preparing to unpack .../075-librust-ttf-parser-dev_0.24.1-1_ppc64el.deb ... 503s Unpacking librust-ttf-parser-dev:ppc64el (0.24.1-1) ... 503s Selecting previously unselected package librust-owned-ttf-parser-dev:ppc64el. 503s Preparing to unpack .../076-librust-owned-ttf-parser-dev_0.24.0-1_ppc64el.deb ... 503s Unpacking librust-owned-ttf-parser-dev:ppc64el (0.24.0-1) ... 503s Selecting previously unselected package librust-ab-glyph-dev:ppc64el. 503s Preparing to unpack .../077-librust-ab-glyph-dev_0.2.28-1_ppc64el.deb ... 503s Unpacking librust-ab-glyph-dev:ppc64el (0.2.28-1) ... 503s Selecting previously unselected package librust-cfg-if-dev:ppc64el. 503s Preparing to unpack .../078-librust-cfg-if-dev_1.0.0-1_ppc64el.deb ... 503s Unpacking librust-cfg-if-dev:ppc64el (1.0.0-1) ... 503s Selecting previously unselected package librust-cpp-demangle-dev:ppc64el. 503s Preparing to unpack .../079-librust-cpp-demangle-dev_0.4.0-1_ppc64el.deb ... 503s Unpacking librust-cpp-demangle-dev:ppc64el (0.4.0-1) ... 503s Selecting previously unselected package librust-fallible-iterator-dev:ppc64el. 503s Preparing to unpack .../080-librust-fallible-iterator-dev_0.3.0-2_ppc64el.deb ... 503s Unpacking librust-fallible-iterator-dev:ppc64el (0.3.0-2) ... 503s Selecting previously unselected package librust-unicode-ident-dev:ppc64el. 503s Preparing to unpack .../081-librust-unicode-ident-dev_1.0.13-1_ppc64el.deb ... 503s Unpacking librust-unicode-ident-dev:ppc64el (1.0.13-1) ... 503s Selecting previously unselected package librust-proc-macro2-dev:ppc64el. 503s Preparing to unpack .../082-librust-proc-macro2-dev_1.0.86-1_ppc64el.deb ... 503s Unpacking librust-proc-macro2-dev:ppc64el (1.0.86-1) ... 503s Selecting previously unselected package librust-quote-dev:ppc64el. 503s Preparing to unpack .../083-librust-quote-dev_1.0.37-1_ppc64el.deb ... 503s Unpacking librust-quote-dev:ppc64el (1.0.37-1) ... 503s Selecting previously unselected package librust-syn-dev:ppc64el. 503s Preparing to unpack .../084-librust-syn-dev_2.0.85-1_ppc64el.deb ... 503s Unpacking librust-syn-dev:ppc64el (2.0.85-1) ... 503s Selecting previously unselected package librust-derive-arbitrary-dev:ppc64el. 503s Preparing to unpack .../085-librust-derive-arbitrary-dev_1.3.2-1_ppc64el.deb ... 503s Unpacking librust-derive-arbitrary-dev:ppc64el (1.3.2-1) ... 503s Selecting previously unselected package librust-arbitrary-dev:ppc64el. 503s Preparing to unpack .../086-librust-arbitrary-dev_1.3.2-1_ppc64el.deb ... 503s Unpacking librust-arbitrary-dev:ppc64el (1.3.2-1) ... 503s Selecting previously unselected package librust-equivalent-dev:ppc64el. 503s Preparing to unpack .../087-librust-equivalent-dev_1.0.1-1_ppc64el.deb ... 503s Unpacking librust-equivalent-dev:ppc64el (1.0.1-1) ... 503s Selecting previously unselected package librust-critical-section-dev:ppc64el. 503s Preparing to unpack .../088-librust-critical-section-dev_1.1.3-1_ppc64el.deb ... 503s Unpacking librust-critical-section-dev:ppc64el (1.1.3-1) ... 503s Selecting previously unselected package librust-serde-derive-dev:ppc64el. 503s Preparing to unpack .../089-librust-serde-derive-dev_1.0.210-1_ppc64el.deb ... 503s Unpacking librust-serde-derive-dev:ppc64el (1.0.210-1) ... 503s Selecting previously unselected package librust-serde-dev:ppc64el. 503s Preparing to unpack .../090-librust-serde-dev_1.0.210-2_ppc64el.deb ... 503s Unpacking librust-serde-dev:ppc64el (1.0.210-2) ... 503s Selecting previously unselected package librust-portable-atomic-dev:ppc64el. 503s Preparing to unpack .../091-librust-portable-atomic-dev_1.9.0-4_ppc64el.deb ... 503s Unpacking librust-portable-atomic-dev:ppc64el (1.9.0-4) ... 503s Selecting previously unselected package librust-rustc-std-workspace-core-dev:ppc64el. 503s Preparing to unpack .../092-librust-rustc-std-workspace-core-dev_1.0.0-1_ppc64el.deb ... 503s Unpacking librust-rustc-std-workspace-core-dev:ppc64el (1.0.0-1) ... 503s Selecting previously unselected package librust-libc-dev:ppc64el. 503s Preparing to unpack .../093-librust-libc-dev_0.2.161-1_ppc64el.deb ... 503s Unpacking librust-libc-dev:ppc64el (0.2.161-1) ... 503s Selecting previously unselected package librust-getrandom-dev:ppc64el. 503s Preparing to unpack .../094-librust-getrandom-dev_0.2.12-1_ppc64el.deb ... 503s Unpacking librust-getrandom-dev:ppc64el (0.2.12-1) ... 503s Selecting previously unselected package librust-smallvec-dev:ppc64el. 503s Preparing to unpack .../095-librust-smallvec-dev_1.13.2-1_ppc64el.deb ... 503s Unpacking librust-smallvec-dev:ppc64el (1.13.2-1) ... 503s Selecting previously unselected package librust-parking-lot-core-dev:ppc64el. 503s Preparing to unpack .../096-librust-parking-lot-core-dev_0.9.10-1_ppc64el.deb ... 503s Unpacking librust-parking-lot-core-dev:ppc64el (0.9.10-1) ... 503s Selecting previously unselected package librust-once-cell-dev:ppc64el. 503s Preparing to unpack .../097-librust-once-cell-dev_1.20.2-1_ppc64el.deb ... 503s Unpacking librust-once-cell-dev:ppc64el (1.20.2-1) ... 503s Selecting previously unselected package librust-crunchy-dev:ppc64el. 503s Preparing to unpack .../098-librust-crunchy-dev_0.2.2-1_ppc64el.deb ... 503s Unpacking librust-crunchy-dev:ppc64el (0.2.2-1) ... 503s Selecting previously unselected package librust-tiny-keccak-dev:ppc64el. 503s Preparing to unpack .../099-librust-tiny-keccak-dev_2.0.2-1_ppc64el.deb ... 503s Unpacking librust-tiny-keccak-dev:ppc64el (2.0.2-1) ... 503s Selecting previously unselected package librust-const-random-macro-dev:ppc64el. 503s Preparing to unpack .../100-librust-const-random-macro-dev_0.1.16-2_ppc64el.deb ... 503s Unpacking librust-const-random-macro-dev:ppc64el (0.1.16-2) ... 504s Selecting previously unselected package librust-const-random-dev:ppc64el. 504s Preparing to unpack .../101-librust-const-random-dev_0.1.17-2_ppc64el.deb ... 504s Unpacking librust-const-random-dev:ppc64el (0.1.17-2) ... 504s Selecting previously unselected package librust-version-check-dev:ppc64el. 504s Preparing to unpack .../102-librust-version-check-dev_0.9.5-1_ppc64el.deb ... 504s Unpacking librust-version-check-dev:ppc64el (0.9.5-1) ... 504s Selecting previously unselected package librust-byteorder-dev:ppc64el. 504s Preparing to unpack .../103-librust-byteorder-dev_1.5.0-1_ppc64el.deb ... 504s Unpacking librust-byteorder-dev:ppc64el (1.5.0-1) ... 504s Selecting previously unselected package librust-zerocopy-derive-dev:ppc64el. 504s Preparing to unpack .../104-librust-zerocopy-derive-dev_0.7.32-2_ppc64el.deb ... 504s Unpacking librust-zerocopy-derive-dev:ppc64el (0.7.32-2) ... 504s Selecting previously unselected package librust-zerocopy-dev:ppc64el. 504s Preparing to unpack .../105-librust-zerocopy-dev_0.7.32-1_ppc64el.deb ... 504s Unpacking librust-zerocopy-dev:ppc64el (0.7.32-1) ... 504s Selecting previously unselected package librust-ahash-dev. 504s Preparing to unpack .../106-librust-ahash-dev_0.8.11-8_all.deb ... 504s Unpacking librust-ahash-dev (0.8.11-8) ... 504s Selecting previously unselected package librust-allocator-api2-dev:ppc64el. 504s Preparing to unpack .../107-librust-allocator-api2-dev_0.2.16-1_ppc64el.deb ... 504s Unpacking librust-allocator-api2-dev:ppc64el (0.2.16-1) ... 504s Selecting previously unselected package librust-compiler-builtins-dev:ppc64el. 504s Preparing to unpack .../108-librust-compiler-builtins-dev_0.1.101-1_ppc64el.deb ... 504s Unpacking librust-compiler-builtins-dev:ppc64el (0.1.101-1) ... 504s Selecting previously unselected package librust-either-dev:ppc64el. 504s Preparing to unpack .../109-librust-either-dev_1.13.0-1_ppc64el.deb ... 504s Unpacking librust-either-dev:ppc64el (1.13.0-1) ... 504s Selecting previously unselected package librust-crossbeam-utils-dev:ppc64el. 504s Preparing to unpack .../110-librust-crossbeam-utils-dev_0.8.19-1_ppc64el.deb ... 504s Unpacking librust-crossbeam-utils-dev:ppc64el (0.8.19-1) ... 504s Selecting previously unselected package librust-crossbeam-epoch-dev:ppc64el. 504s Preparing to unpack .../111-librust-crossbeam-epoch-dev_0.9.18-1_ppc64el.deb ... 504s Unpacking librust-crossbeam-epoch-dev:ppc64el (0.9.18-1) ... 504s Selecting previously unselected package librust-crossbeam-epoch+std-dev:ppc64el. 504s Preparing to unpack .../112-librust-crossbeam-epoch+std-dev_0.9.18-1_ppc64el.deb ... 504s Unpacking librust-crossbeam-epoch+std-dev:ppc64el (0.9.18-1) ... 504s Selecting previously unselected package librust-crossbeam-deque-dev:ppc64el. 504s Preparing to unpack .../113-librust-crossbeam-deque-dev_0.8.5-1_ppc64el.deb ... 504s Unpacking librust-crossbeam-deque-dev:ppc64el (0.8.5-1) ... 504s Selecting previously unselected package librust-rayon-core-dev:ppc64el. 504s Preparing to unpack .../114-librust-rayon-core-dev_1.12.1-1_ppc64el.deb ... 504s Unpacking librust-rayon-core-dev:ppc64el (1.12.1-1) ... 504s Selecting previously unselected package librust-rayon-dev:ppc64el. 504s Preparing to unpack .../115-librust-rayon-dev_1.10.0-1_ppc64el.deb ... 504s Unpacking librust-rayon-dev:ppc64el (1.10.0-1) ... 504s Selecting previously unselected package librust-hashbrown-dev:ppc64el. 504s Preparing to unpack .../116-librust-hashbrown-dev_0.14.5-5_ppc64el.deb ... 504s Unpacking librust-hashbrown-dev:ppc64el (0.14.5-5) ... 504s Selecting previously unselected package librust-indexmap-dev:ppc64el. 504s Preparing to unpack .../117-librust-indexmap-dev_2.2.6-1_ppc64el.deb ... 504s Unpacking librust-indexmap-dev:ppc64el (2.2.6-1) ... 504s Selecting previously unselected package librust-stable-deref-trait-dev:ppc64el. 504s Preparing to unpack .../118-librust-stable-deref-trait-dev_1.2.0-1_ppc64el.deb ... 504s Unpacking librust-stable-deref-trait-dev:ppc64el (1.2.0-1) ... 504s Selecting previously unselected package librust-gimli-dev:ppc64el. 504s Preparing to unpack .../119-librust-gimli-dev_0.28.1-2_ppc64el.deb ... 504s Unpacking librust-gimli-dev:ppc64el (0.28.1-2) ... 504s Selecting previously unselected package librust-memmap2-dev:ppc64el. 504s Preparing to unpack .../120-librust-memmap2-dev_0.9.3-1_ppc64el.deb ... 504s Unpacking librust-memmap2-dev:ppc64el (0.9.3-1) ... 504s Selecting previously unselected package librust-crc32fast-dev:ppc64el. 504s Preparing to unpack .../121-librust-crc32fast-dev_1.4.2-1_ppc64el.deb ... 504s Unpacking librust-crc32fast-dev:ppc64el (1.4.2-1) ... 504s Selecting previously unselected package pkg-config:ppc64el. 504s Preparing to unpack .../122-pkg-config_1.8.1-4_ppc64el.deb ... 504s Unpacking pkg-config:ppc64el (1.8.1-4) ... 504s Selecting previously unselected package librust-pkg-config-dev:ppc64el. 504s Preparing to unpack .../123-librust-pkg-config-dev_0.3.27-1_ppc64el.deb ... 504s Unpacking librust-pkg-config-dev:ppc64el (0.3.27-1) ... 504s Selecting previously unselected package librust-libz-sys-dev:ppc64el. 504s Preparing to unpack .../124-librust-libz-sys-dev_1.1.20-1_ppc64el.deb ... 504s Unpacking librust-libz-sys-dev:ppc64el (1.1.20-1) ... 504s Selecting previously unselected package librust-adler-dev:ppc64el. 504s Preparing to unpack .../125-librust-adler-dev_1.0.2-2_ppc64el.deb ... 504s Unpacking librust-adler-dev:ppc64el (1.0.2-2) ... 504s Selecting previously unselected package librust-miniz-oxide-dev:ppc64el. 504s Preparing to unpack .../126-librust-miniz-oxide-dev_0.7.1-1_ppc64el.deb ... 504s Unpacking librust-miniz-oxide-dev:ppc64el (0.7.1-1) ... 504s Selecting previously unselected package librust-flate2-dev:ppc64el. 504s Preparing to unpack .../127-librust-flate2-dev_1.0.34-1_ppc64el.deb ... 504s Unpacking librust-flate2-dev:ppc64el (1.0.34-1) ... 504s Selecting previously unselected package librust-sval-derive-dev:ppc64el. 504s Preparing to unpack .../128-librust-sval-derive-dev_2.6.1-2_ppc64el.deb ... 504s Unpacking librust-sval-derive-dev:ppc64el (2.6.1-2) ... 504s Selecting previously unselected package librust-sval-dev:ppc64el. 504s Preparing to unpack .../129-librust-sval-dev_2.6.1-2_ppc64el.deb ... 504s Unpacking librust-sval-dev:ppc64el (2.6.1-2) ... 504s Selecting previously unselected package librust-sval-ref-dev:ppc64el. 504s Preparing to unpack .../130-librust-sval-ref-dev_2.6.1-1_ppc64el.deb ... 504s Unpacking librust-sval-ref-dev:ppc64el (2.6.1-1) ... 504s Selecting previously unselected package librust-erased-serde-dev:ppc64el. 504s Preparing to unpack .../131-librust-erased-serde-dev_0.3.31-1_ppc64el.deb ... 504s Unpacking librust-erased-serde-dev:ppc64el (0.3.31-1) ... 504s Selecting previously unselected package librust-serde-fmt-dev. 504s Preparing to unpack .../132-librust-serde-fmt-dev_1.0.3-3_all.deb ... 504s Unpacking librust-serde-fmt-dev (1.0.3-3) ... 504s Selecting previously unselected package librust-syn-1-dev:ppc64el. 504s Preparing to unpack .../133-librust-syn-1-dev_1.0.109-2_ppc64el.deb ... 504s Unpacking librust-syn-1-dev:ppc64el (1.0.109-2) ... 504s Selecting previously unselected package librust-no-panic-dev:ppc64el. 504s Preparing to unpack .../134-librust-no-panic-dev_0.1.13-1_ppc64el.deb ... 504s Unpacking librust-no-panic-dev:ppc64el (0.1.13-1) ... 504s Selecting previously unselected package librust-itoa-dev:ppc64el. 504s Preparing to unpack .../135-librust-itoa-dev_1.0.9-1_ppc64el.deb ... 504s Unpacking librust-itoa-dev:ppc64el (1.0.9-1) ... 504s Selecting previously unselected package librust-ryu-dev:ppc64el. 504s Preparing to unpack .../136-librust-ryu-dev_1.0.15-1_ppc64el.deb ... 504s Unpacking librust-ryu-dev:ppc64el (1.0.15-1) ... 504s Selecting previously unselected package librust-serde-json-dev:ppc64el. 504s Preparing to unpack .../137-librust-serde-json-dev_1.0.128-1_ppc64el.deb ... 504s Unpacking librust-serde-json-dev:ppc64el (1.0.128-1) ... 504s Selecting previously unselected package librust-serde-test-dev:ppc64el. 504s Preparing to unpack .../138-librust-serde-test-dev_1.0.171-1_ppc64el.deb ... 504s Unpacking librust-serde-test-dev:ppc64el (1.0.171-1) ... 504s Selecting previously unselected package librust-value-bag-serde1-dev:ppc64el. 504s Preparing to unpack .../139-librust-value-bag-serde1-dev_1.9.0-1_ppc64el.deb ... 504s Unpacking librust-value-bag-serde1-dev:ppc64el (1.9.0-1) ... 504s Selecting previously unselected package librust-sval-buffer-dev:ppc64el. 504s Preparing to unpack .../140-librust-sval-buffer-dev_2.6.1-1_ppc64el.deb ... 504s Unpacking librust-sval-buffer-dev:ppc64el (2.6.1-1) ... 505s Selecting previously unselected package librust-sval-dynamic-dev:ppc64el. 505s Preparing to unpack .../141-librust-sval-dynamic-dev_2.6.1-1_ppc64el.deb ... 505s Unpacking librust-sval-dynamic-dev:ppc64el (2.6.1-1) ... 505s Selecting previously unselected package librust-sval-fmt-dev:ppc64el. 505s Preparing to unpack .../142-librust-sval-fmt-dev_2.6.1-1_ppc64el.deb ... 505s Unpacking librust-sval-fmt-dev:ppc64el (2.6.1-1) ... 505s Selecting previously unselected package librust-sval-serde-dev:ppc64el. 505s Preparing to unpack .../143-librust-sval-serde-dev_2.6.1-1_ppc64el.deb ... 505s Unpacking librust-sval-serde-dev:ppc64el (2.6.1-1) ... 505s Selecting previously unselected package librust-value-bag-sval2-dev:ppc64el. 505s Preparing to unpack .../144-librust-value-bag-sval2-dev_1.9.0-1_ppc64el.deb ... 505s Unpacking librust-value-bag-sval2-dev:ppc64el (1.9.0-1) ... 505s Selecting previously unselected package librust-value-bag-dev:ppc64el. 505s Preparing to unpack .../145-librust-value-bag-dev_1.9.0-1_ppc64el.deb ... 505s Unpacking librust-value-bag-dev:ppc64el (1.9.0-1) ... 505s Selecting previously unselected package librust-log-dev:ppc64el. 505s Preparing to unpack .../146-librust-log-dev_0.4.22-1_ppc64el.deb ... 505s Unpacking librust-log-dev:ppc64el (0.4.22-1) ... 505s Selecting previously unselected package librust-memchr-dev:ppc64el. 505s Preparing to unpack .../147-librust-memchr-dev_2.7.4-1_ppc64el.deb ... 505s Unpacking librust-memchr-dev:ppc64el (2.7.4-1) ... 505s Selecting previously unselected package librust-ppv-lite86-dev:ppc64el. 505s Preparing to unpack .../148-librust-ppv-lite86-dev_0.2.16-1_ppc64el.deb ... 505s Unpacking librust-ppv-lite86-dev:ppc64el (0.2.16-1) ... 505s Selecting previously unselected package librust-rand-core-dev:ppc64el. 505s Preparing to unpack .../149-librust-rand-core-dev_0.6.4-2_ppc64el.deb ... 505s Unpacking librust-rand-core-dev:ppc64el (0.6.4-2) ... 505s Selecting previously unselected package librust-rand-chacha-dev:ppc64el. 505s Preparing to unpack .../150-librust-rand-chacha-dev_0.3.1-2_ppc64el.deb ... 505s Unpacking librust-rand-chacha-dev:ppc64el (0.3.1-2) ... 505s Selecting previously unselected package librust-rand-core+getrandom-dev:ppc64el. 505s Preparing to unpack .../151-librust-rand-core+getrandom-dev_0.6.4-2_ppc64el.deb ... 505s Unpacking librust-rand-core+getrandom-dev:ppc64el (0.6.4-2) ... 505s Selecting previously unselected package librust-rand-core+serde-dev:ppc64el. 505s Preparing to unpack .../152-librust-rand-core+serde-dev_0.6.4-2_ppc64el.deb ... 505s Unpacking librust-rand-core+serde-dev:ppc64el (0.6.4-2) ... 505s Selecting previously unselected package librust-rand-core+std-dev:ppc64el. 505s Preparing to unpack .../153-librust-rand-core+std-dev_0.6.4-2_ppc64el.deb ... 505s Unpacking librust-rand-core+std-dev:ppc64el (0.6.4-2) ... 505s Selecting previously unselected package librust-rand-dev:ppc64el. 505s Preparing to unpack .../154-librust-rand-dev_0.8.5-1_ppc64el.deb ... 505s Unpacking librust-rand-dev:ppc64el (0.8.5-1) ... 505s Selecting previously unselected package librust-unicode-segmentation-dev:ppc64el. 505s Preparing to unpack .../155-librust-unicode-segmentation-dev_1.11.0-1_ppc64el.deb ... 505s Unpacking librust-unicode-segmentation-dev:ppc64el (1.11.0-1) ... 505s Selecting previously unselected package librust-convert-case-dev:ppc64el. 505s Preparing to unpack .../156-librust-convert-case-dev_0.6.0-2_ppc64el.deb ... 505s Unpacking librust-convert-case-dev:ppc64el (0.6.0-2) ... 505s Selecting previously unselected package librust-semver-dev:ppc64el. 505s Preparing to unpack .../157-librust-semver-dev_1.0.23-1_ppc64el.deb ... 505s Unpacking librust-semver-dev:ppc64el (1.0.23-1) ... 505s Selecting previously unselected package librust-rustc-version-dev:ppc64el. 505s Preparing to unpack .../158-librust-rustc-version-dev_0.4.0-1_ppc64el.deb ... 505s Unpacking librust-rustc-version-dev:ppc64el (0.4.0-1) ... 505s Selecting previously unselected package librust-derive-more-dev:ppc64el. 505s Preparing to unpack .../159-librust-derive-more-dev_0.99.17-1_ppc64el.deb ... 505s Unpacking librust-derive-more-dev:ppc64el (0.99.17-1) ... 505s Selecting previously unselected package librust-cfg-if-0.1-dev:ppc64el. 505s Preparing to unpack .../160-librust-cfg-if-0.1-dev_0.1.10-2_ppc64el.deb ... 505s Unpacking librust-cfg-if-0.1-dev:ppc64el (0.1.10-2) ... 505s Selecting previously unselected package librust-blobby-dev:ppc64el. 505s Preparing to unpack .../161-librust-blobby-dev_0.3.1-1_ppc64el.deb ... 505s Unpacking librust-blobby-dev:ppc64el (0.3.1-1) ... 505s Selecting previously unselected package librust-typenum-dev:ppc64el. 505s Preparing to unpack .../162-librust-typenum-dev_1.17.0-2_ppc64el.deb ... 505s Unpacking librust-typenum-dev:ppc64el (1.17.0-2) ... 505s Selecting previously unselected package librust-zeroize-derive-dev:ppc64el. 505s Preparing to unpack .../163-librust-zeroize-derive-dev_1.4.2-1_ppc64el.deb ... 505s Unpacking librust-zeroize-derive-dev:ppc64el (1.4.2-1) ... 505s Selecting previously unselected package librust-zeroize-dev:ppc64el. 505s Preparing to unpack .../164-librust-zeroize-dev_1.8.1-1_ppc64el.deb ... 505s Unpacking librust-zeroize-dev:ppc64el (1.8.1-1) ... 505s Selecting previously unselected package librust-generic-array-dev:ppc64el. 505s Preparing to unpack .../165-librust-generic-array-dev_0.14.7-1_ppc64el.deb ... 505s Unpacking librust-generic-array-dev:ppc64el (0.14.7-1) ... 505s Selecting previously unselected package librust-block-buffer-dev:ppc64el. 505s Preparing to unpack .../166-librust-block-buffer-dev_0.10.2-2_ppc64el.deb ... 505s Unpacking librust-block-buffer-dev:ppc64el (0.10.2-2) ... 505s Selecting previously unselected package librust-const-oid-dev:ppc64el. 505s Preparing to unpack .../167-librust-const-oid-dev_0.9.3-1_ppc64el.deb ... 505s Unpacking librust-const-oid-dev:ppc64el (0.9.3-1) ... 505s Selecting previously unselected package librust-crypto-common-dev:ppc64el. 505s Preparing to unpack .../168-librust-crypto-common-dev_0.1.6-1_ppc64el.deb ... 505s Unpacking librust-crypto-common-dev:ppc64el (0.1.6-1) ... 505s Selecting previously unselected package librust-subtle-dev:ppc64el. 505s Preparing to unpack .../169-librust-subtle-dev_2.6.1-1_ppc64el.deb ... 505s Unpacking librust-subtle-dev:ppc64el (2.6.1-1) ... 505s Selecting previously unselected package librust-digest-dev:ppc64el. 505s Preparing to unpack .../170-librust-digest-dev_0.10.7-2_ppc64el.deb ... 505s Unpacking librust-digest-dev:ppc64el (0.10.7-2) ... 505s Selecting previously unselected package librust-static-assertions-dev:ppc64el. 505s Preparing to unpack .../171-librust-static-assertions-dev_1.1.0-1_ppc64el.deb ... 505s Unpacking librust-static-assertions-dev:ppc64el (1.1.0-1) ... 505s Selecting previously unselected package librust-twox-hash-dev:ppc64el. 505s Preparing to unpack .../172-librust-twox-hash-dev_1.6.3-1_ppc64el.deb ... 505s Unpacking librust-twox-hash-dev:ppc64el (1.6.3-1) ... 505s Selecting previously unselected package librust-ruzstd-dev:ppc64el. 505s Preparing to unpack .../173-librust-ruzstd-dev_0.5.0-1_ppc64el.deb ... 505s Unpacking librust-ruzstd-dev:ppc64el (0.5.0-1) ... 505s Selecting previously unselected package librust-object-dev:ppc64el. 505s Preparing to unpack .../174-librust-object-dev_0.32.2-1_ppc64el.deb ... 505s Unpacking librust-object-dev:ppc64el (0.32.2-1) ... 505s Selecting previously unselected package librust-rustc-demangle-dev:ppc64el. 505s Preparing to unpack .../175-librust-rustc-demangle-dev_0.1.21-1_ppc64el.deb ... 505s Unpacking librust-rustc-demangle-dev:ppc64el (0.1.21-1) ... 505s Selecting previously unselected package librust-addr2line-dev:ppc64el. 505s Preparing to unpack .../176-librust-addr2line-dev_0.21.0-2_ppc64el.deb ... 505s Unpacking librust-addr2line-dev:ppc64el (0.21.0-2) ... 505s Selecting previously unselected package librust-aho-corasick-dev:ppc64el. 505s Preparing to unpack .../177-librust-aho-corasick-dev_1.1.3-1_ppc64el.deb ... 505s Unpacking librust-aho-corasick-dev:ppc64el (1.1.3-1) ... 505s Selecting previously unselected package librust-bitflags-1-dev:ppc64el. 505s Preparing to unpack .../178-librust-bitflags-1-dev_1.3.2-5_ppc64el.deb ... 505s Unpacking librust-bitflags-1-dev:ppc64el (1.3.2-5) ... 505s Selecting previously unselected package librust-anes-dev:ppc64el. 505s Preparing to unpack .../179-librust-anes-dev_0.1.6-1_ppc64el.deb ... 505s Unpacking librust-anes-dev:ppc64el (0.1.6-1) ... 505s Selecting previously unselected package librust-anstyle-dev:ppc64el. 505s Preparing to unpack .../180-librust-anstyle-dev_1.0.8-1_ppc64el.deb ... 505s Unpacking librust-anstyle-dev:ppc64el (1.0.8-1) ... 505s Selecting previously unselected package librust-arrayvec-dev:ppc64el. 505s Preparing to unpack .../181-librust-arrayvec-dev_0.7.4-2_ppc64el.deb ... 505s Unpacking librust-arrayvec-dev:ppc64el (0.7.4-2) ... 505s Selecting previously unselected package librust-utf8parse-dev:ppc64el. 505s Preparing to unpack .../182-librust-utf8parse-dev_0.2.1-1_ppc64el.deb ... 505s Unpacking librust-utf8parse-dev:ppc64el (0.2.1-1) ... 505s Selecting previously unselected package librust-anstyle-parse-dev:ppc64el. 505s Preparing to unpack .../183-librust-anstyle-parse-dev_0.2.1-1_ppc64el.deb ... 505s Unpacking librust-anstyle-parse-dev:ppc64el (0.2.1-1) ... 505s Selecting previously unselected package librust-anstyle-query-dev:ppc64el. 505s Preparing to unpack .../184-librust-anstyle-query-dev_1.0.0-1_ppc64el.deb ... 505s Unpacking librust-anstyle-query-dev:ppc64el (1.0.0-1) ... 505s Selecting previously unselected package librust-colorchoice-dev:ppc64el. 505s Preparing to unpack .../185-librust-colorchoice-dev_1.0.0-1_ppc64el.deb ... 505s Unpacking librust-colorchoice-dev:ppc64el (1.0.0-1) ... 506s Selecting previously unselected package librust-anstream-dev:ppc64el. 506s Preparing to unpack .../186-librust-anstream-dev_0.6.15-1_ppc64el.deb ... 506s Unpacking librust-anstream-dev:ppc64el (0.6.15-1) ... 506s Selecting previously unselected package librust-jobserver-dev:ppc64el. 506s Preparing to unpack .../187-librust-jobserver-dev_0.1.32-1_ppc64el.deb ... 506s Unpacking librust-jobserver-dev:ppc64el (0.1.32-1) ... 506s Selecting previously unselected package librust-shlex-dev:ppc64el. 506s Preparing to unpack .../188-librust-shlex-dev_1.3.0-1_ppc64el.deb ... 506s Unpacking librust-shlex-dev:ppc64el (1.3.0-1) ... 506s Selecting previously unselected package librust-cc-dev:ppc64el. 506s Preparing to unpack .../189-librust-cc-dev_1.1.14-1_ppc64el.deb ... 506s Unpacking librust-cc-dev:ppc64el (1.1.14-1) ... 506s Selecting previously unselected package librust-backtrace-dev:ppc64el. 506s Preparing to unpack .../190-librust-backtrace-dev_0.3.69-2_ppc64el.deb ... 506s Unpacking librust-backtrace-dev:ppc64el (0.3.69-2) ... 506s Selecting previously unselected package librust-anyhow-dev:ppc64el. 506s Preparing to unpack .../191-librust-anyhow-dev_1.0.86-1_ppc64el.deb ... 506s Unpacking librust-anyhow-dev:ppc64el (1.0.86-1) ... 506s Selecting previously unselected package librust-bytecheck-derive-dev:ppc64el. 506s Preparing to unpack .../192-librust-bytecheck-derive-dev_0.6.12-1_ppc64el.deb ... 506s Unpacking librust-bytecheck-derive-dev:ppc64el (0.6.12-1) ... 506s Selecting previously unselected package librust-ptr-meta-derive-dev:ppc64el. 506s Preparing to unpack .../193-librust-ptr-meta-derive-dev_0.1.4-1_ppc64el.deb ... 506s Unpacking librust-ptr-meta-derive-dev:ppc64el (0.1.4-1) ... 506s Selecting previously unselected package librust-ptr-meta-dev:ppc64el. 506s Preparing to unpack .../194-librust-ptr-meta-dev_0.1.4-1_ppc64el.deb ... 506s Unpacking librust-ptr-meta-dev:ppc64el (0.1.4-1) ... 506s Selecting previously unselected package librust-simdutf8-dev:ppc64el. 506s Preparing to unpack .../195-librust-simdutf8-dev_0.1.4-4_ppc64el.deb ... 506s Unpacking librust-simdutf8-dev:ppc64el (0.1.4-4) ... 506s Selecting previously unselected package librust-bytemuck-derive-dev:ppc64el. 506s Preparing to unpack .../196-librust-bytemuck-derive-dev_1.5.0-2_ppc64el.deb ... 506s Unpacking librust-bytemuck-derive-dev:ppc64el (1.5.0-2) ... 506s Selecting previously unselected package librust-bytemuck-dev:ppc64el. 506s Preparing to unpack .../197-librust-bytemuck-dev_1.14.0-1_ppc64el.deb ... 506s Unpacking librust-bytemuck-dev:ppc64el (1.14.0-1) ... 506s Selecting previously unselected package librust-atomic-dev:ppc64el. 506s Preparing to unpack .../198-librust-atomic-dev_0.6.0-1_ppc64el.deb ... 506s Unpacking librust-atomic-dev:ppc64el (0.6.0-1) ... 506s Selecting previously unselected package librust-md5-asm-dev:ppc64el. 506s Preparing to unpack .../199-librust-md5-asm-dev_0.5.0-2_ppc64el.deb ... 506s Unpacking librust-md5-asm-dev:ppc64el (0.5.0-2) ... 506s Selecting previously unselected package librust-md-5-dev:ppc64el. 506s Preparing to unpack .../200-librust-md-5-dev_0.10.6-1_ppc64el.deb ... 506s Unpacking librust-md-5-dev:ppc64el (0.10.6-1) ... 506s Selecting previously unselected package librust-cpufeatures-dev:ppc64el. 506s Preparing to unpack .../201-librust-cpufeatures-dev_0.2.11-1_ppc64el.deb ... 506s Unpacking librust-cpufeatures-dev:ppc64el (0.2.11-1) ... 506s Selecting previously unselected package librust-sha1-asm-dev:ppc64el. 506s Preparing to unpack .../202-librust-sha1-asm-dev_0.5.1-2_ppc64el.deb ... 506s Unpacking librust-sha1-asm-dev:ppc64el (0.5.1-2) ... 506s Selecting previously unselected package librust-sha1-dev:ppc64el. 506s Preparing to unpack .../203-librust-sha1-dev_0.10.6-1_ppc64el.deb ... 506s Unpacking librust-sha1-dev:ppc64el (0.10.6-1) ... 506s Selecting previously unselected package librust-slog-dev:ppc64el. 506s Preparing to unpack .../204-librust-slog-dev_2.7.0-1_ppc64el.deb ... 506s Unpacking librust-slog-dev:ppc64el (2.7.0-1) ... 506s Selecting previously unselected package librust-uuid-dev:ppc64el. 506s Preparing to unpack .../205-librust-uuid-dev_1.10.0-1_ppc64el.deb ... 506s Unpacking librust-uuid-dev:ppc64el (1.10.0-1) ... 506s Selecting previously unselected package librust-bytecheck-dev:ppc64el. 506s Preparing to unpack .../206-librust-bytecheck-dev_0.6.12-1_ppc64el.deb ... 506s Unpacking librust-bytecheck-dev:ppc64el (0.6.12-1) ... 506s Selecting previously unselected package librust-autocfg-dev:ppc64el. 506s Preparing to unpack .../207-librust-autocfg-dev_1.1.0-1_ppc64el.deb ... 506s Unpacking librust-autocfg-dev:ppc64el (1.1.0-1) ... 506s Selecting previously unselected package librust-num-traits-dev:ppc64el. 506s Preparing to unpack .../208-librust-num-traits-dev_0.2.19-2_ppc64el.deb ... 506s Unpacking librust-num-traits-dev:ppc64el (0.2.19-2) ... 506s Selecting previously unselected package librust-funty-dev:ppc64el. 506s Preparing to unpack .../209-librust-funty-dev_2.0.0-1_ppc64el.deb ... 506s Unpacking librust-funty-dev:ppc64el (2.0.0-1) ... 506s Selecting previously unselected package librust-radium-dev:ppc64el. 506s Preparing to unpack .../210-librust-radium-dev_1.1.0-1_ppc64el.deb ... 506s Unpacking librust-radium-dev:ppc64el (1.1.0-1) ... 506s Selecting previously unselected package librust-tap-dev:ppc64el. 506s Preparing to unpack .../211-librust-tap-dev_1.0.1-1_ppc64el.deb ... 506s Unpacking librust-tap-dev:ppc64el (1.0.1-1) ... 506s Selecting previously unselected package librust-traitobject-dev:ppc64el. 506s Preparing to unpack .../212-librust-traitobject-dev_0.1.0-1_ppc64el.deb ... 506s Unpacking librust-traitobject-dev:ppc64el (0.1.0-1) ... 506s Selecting previously unselected package librust-unsafe-any-dev:ppc64el. 506s Preparing to unpack .../213-librust-unsafe-any-dev_0.4.2-2_ppc64el.deb ... 506s Unpacking librust-unsafe-any-dev:ppc64el (0.4.2-2) ... 506s Selecting previously unselected package librust-typemap-dev:ppc64el. 506s Preparing to unpack .../214-librust-typemap-dev_0.3.3-2_ppc64el.deb ... 506s Unpacking librust-typemap-dev:ppc64el (0.3.3-2) ... 506s Selecting previously unselected package librust-wyz-dev:ppc64el. 506s Preparing to unpack .../215-librust-wyz-dev_0.5.1-1_ppc64el.deb ... 506s Unpacking librust-wyz-dev:ppc64el (0.5.1-1) ... 506s Selecting previously unselected package librust-bitvec-dev:ppc64el. 506s Preparing to unpack .../216-librust-bitvec-dev_1.0.1-1_ppc64el.deb ... 506s Unpacking librust-bitvec-dev:ppc64el (1.0.1-1) ... 506s Selecting previously unselected package librust-bytes-dev:ppc64el. 506s Preparing to unpack .../217-librust-bytes-dev_1.8.0-1_ppc64el.deb ... 506s Unpacking librust-bytes-dev:ppc64el (1.8.0-1) ... 506s Selecting previously unselected package librust-rend-dev:ppc64el. 507s Preparing to unpack .../218-librust-rend-dev_0.4.0-1_ppc64el.deb ... 507s Unpacking librust-rend-dev:ppc64el (0.4.0-1) ... 507s Selecting previously unselected package librust-rkyv-derive-dev:ppc64el. 507s Preparing to unpack .../219-librust-rkyv-derive-dev_0.7.44-1_ppc64el.deb ... 507s Unpacking librust-rkyv-derive-dev:ppc64el (0.7.44-1) ... 507s Selecting previously unselected package librust-seahash-dev:ppc64el. 507s Preparing to unpack .../220-librust-seahash-dev_4.1.0-1_ppc64el.deb ... 507s Unpacking librust-seahash-dev:ppc64el (4.1.0-1) ... 507s Selecting previously unselected package librust-smol-str-dev:ppc64el. 507s Preparing to unpack .../221-librust-smol-str-dev_0.2.0-1_ppc64el.deb ... 507s Unpacking librust-smol-str-dev:ppc64el (0.2.0-1) ... 507s Selecting previously unselected package librust-tinyvec-dev:ppc64el. 507s Preparing to unpack .../222-librust-tinyvec-dev_1.6.0-2_ppc64el.deb ... 507s Unpacking librust-tinyvec-dev:ppc64el (1.6.0-2) ... 507s Selecting previously unselected package librust-tinyvec-macros-dev:ppc64el. 507s Preparing to unpack .../223-librust-tinyvec-macros-dev_0.1.0-1_ppc64el.deb ... 507s Unpacking librust-tinyvec-macros-dev:ppc64el (0.1.0-1) ... 507s Selecting previously unselected package librust-tinyvec+tinyvec-macros-dev:ppc64el. 507s Preparing to unpack .../224-librust-tinyvec+tinyvec-macros-dev_1.6.0-2_ppc64el.deb ... 507s Unpacking librust-tinyvec+tinyvec-macros-dev:ppc64el (1.6.0-2) ... 507s Selecting previously unselected package librust-rkyv-dev:ppc64el. 507s Preparing to unpack .../225-librust-rkyv-dev_0.7.44-1_ppc64el.deb ... 507s Unpacking librust-rkyv-dev:ppc64el (0.7.44-1) ... 507s Selecting previously unselected package librust-num-complex-dev:ppc64el. 507s Preparing to unpack .../226-librust-num-complex-dev_0.4.6-2_ppc64el.deb ... 507s Unpacking librust-num-complex-dev:ppc64el (0.4.6-2) ... 507s Selecting previously unselected package librust-approx-dev:ppc64el. 507s Preparing to unpack .../227-librust-approx-dev_0.5.1-1_ppc64el.deb ... 507s Unpacking librust-approx-dev:ppc64el (0.5.1-1) ... 507s Selecting previously unselected package librust-array-init-dev:ppc64el. 507s Preparing to unpack .../228-librust-array-init-dev_2.0.1-1_ppc64el.deb ... 507s Unpacking librust-array-init-dev:ppc64el (2.0.1-1) ... 507s Selecting previously unselected package librust-async-attributes-dev. 507s Preparing to unpack .../229-librust-async-attributes-dev_1.1.2-6_all.deb ... 507s Unpacking librust-async-attributes-dev (1.1.2-6) ... 507s Selecting previously unselected package librust-concurrent-queue-dev:ppc64el. 507s Preparing to unpack .../230-librust-concurrent-queue-dev_2.5.0-4_ppc64el.deb ... 507s Unpacking librust-concurrent-queue-dev:ppc64el (2.5.0-4) ... 507s Selecting previously unselected package librust-parking-dev:ppc64el. 507s Preparing to unpack .../231-librust-parking-dev_2.2.0-1_ppc64el.deb ... 507s Unpacking librust-parking-dev:ppc64el (2.2.0-1) ... 507s Selecting previously unselected package librust-pin-project-lite-dev:ppc64el. 507s Preparing to unpack .../232-librust-pin-project-lite-dev_0.2.13-1_ppc64el.deb ... 507s Unpacking librust-pin-project-lite-dev:ppc64el (0.2.13-1) ... 507s Selecting previously unselected package librust-event-listener-dev. 507s Preparing to unpack .../233-librust-event-listener-dev_5.3.1-8_all.deb ... 507s Unpacking librust-event-listener-dev (5.3.1-8) ... 507s Selecting previously unselected package librust-event-listener-strategy-dev:ppc64el. 507s Preparing to unpack .../234-librust-event-listener-strategy-dev_0.5.2-3_ppc64el.deb ... 507s Unpacking librust-event-listener-strategy-dev:ppc64el (0.5.2-3) ... 507s Selecting previously unselected package librust-futures-core-dev:ppc64el. 507s Preparing to unpack .../235-librust-futures-core-dev_0.3.30-1_ppc64el.deb ... 507s Unpacking librust-futures-core-dev:ppc64el (0.3.30-1) ... 507s Selecting previously unselected package librust-async-channel-dev. 507s Preparing to unpack .../236-librust-async-channel-dev_2.3.1-8_all.deb ... 507s Unpacking librust-async-channel-dev (2.3.1-8) ... 507s Selecting previously unselected package librust-async-task-dev. 507s Preparing to unpack .../237-librust-async-task-dev_4.7.1-3_all.deb ... 507s Unpacking librust-async-task-dev (4.7.1-3) ... 507s Selecting previously unselected package librust-fastrand-dev:ppc64el. 507s Preparing to unpack .../238-librust-fastrand-dev_2.1.1-1_ppc64el.deb ... 507s Unpacking librust-fastrand-dev:ppc64el (2.1.1-1) ... 507s Selecting previously unselected package librust-futures-io-dev:ppc64el. 507s Preparing to unpack .../239-librust-futures-io-dev_0.3.31-1_ppc64el.deb ... 507s Unpacking librust-futures-io-dev:ppc64el (0.3.31-1) ... 507s Selecting previously unselected package librust-futures-lite-dev:ppc64el. 507s Preparing to unpack .../240-librust-futures-lite-dev_2.3.0-2_ppc64el.deb ... 507s Unpacking librust-futures-lite-dev:ppc64el (2.3.0-2) ... 507s Selecting previously unselected package librust-slab-dev:ppc64el. 507s Preparing to unpack .../241-librust-slab-dev_0.4.9-1_ppc64el.deb ... 507s Unpacking librust-slab-dev:ppc64el (0.4.9-1) ... 507s Selecting previously unselected package librust-async-executor-dev. 507s Preparing to unpack .../242-librust-async-executor-dev_1.13.1-1_all.deb ... 507s Unpacking librust-async-executor-dev (1.13.1-1) ... 507s Selecting previously unselected package librust-async-lock-dev. 507s Preparing to unpack .../243-librust-async-lock-dev_3.4.0-4_all.deb ... 507s Unpacking librust-async-lock-dev (3.4.0-4) ... 507s Selecting previously unselected package librust-atomic-waker-dev:ppc64el. 507s Preparing to unpack .../244-librust-atomic-waker-dev_1.1.2-1_ppc64el.deb ... 507s Unpacking librust-atomic-waker-dev:ppc64el (1.1.2-1) ... 507s Selecting previously unselected package librust-tracing-attributes-dev:ppc64el. 507s Preparing to unpack .../245-librust-tracing-attributes-dev_0.1.27-1_ppc64el.deb ... 507s Unpacking librust-tracing-attributes-dev:ppc64el (0.1.27-1) ... 507s Selecting previously unselected package librust-valuable-derive-dev:ppc64el. 507s Preparing to unpack .../246-librust-valuable-derive-dev_0.1.0-1_ppc64el.deb ... 507s Unpacking librust-valuable-derive-dev:ppc64el (0.1.0-1) ... 507s Selecting previously unselected package librust-valuable-dev:ppc64el. 507s Preparing to unpack .../247-librust-valuable-dev_0.1.0-4_ppc64el.deb ... 507s Unpacking librust-valuable-dev:ppc64el (0.1.0-4) ... 507s Selecting previously unselected package librust-tracing-core-dev:ppc64el. 507s Preparing to unpack .../248-librust-tracing-core-dev_0.1.32-1_ppc64el.deb ... 507s Unpacking librust-tracing-core-dev:ppc64el (0.1.32-1) ... 507s Selecting previously unselected package librust-tracing-dev:ppc64el. 507s Preparing to unpack .../249-librust-tracing-dev_0.1.40-1_ppc64el.deb ... 507s Unpacking librust-tracing-dev:ppc64el (0.1.40-1) ... 507s Selecting previously unselected package librust-blocking-dev. 507s Preparing to unpack .../250-librust-blocking-dev_1.6.1-5_all.deb ... 507s Unpacking librust-blocking-dev (1.6.1-5) ... 507s Selecting previously unselected package librust-async-fs-dev. 507s Preparing to unpack .../251-librust-async-fs-dev_2.1.2-4_all.deb ... 507s Unpacking librust-async-fs-dev (2.1.2-4) ... 507s Selecting previously unselected package librust-bitflags-dev:ppc64el. 507s Preparing to unpack .../252-librust-bitflags-dev_2.6.0-1_ppc64el.deb ... 507s Unpacking librust-bitflags-dev:ppc64el (2.6.0-1) ... 507s Selecting previously unselected package librust-compiler-builtins+core-dev:ppc64el. 507s Preparing to unpack .../253-librust-compiler-builtins+core-dev_0.1.101-1_ppc64el.deb ... 507s Unpacking librust-compiler-builtins+core-dev:ppc64el (0.1.101-1) ... 507s Selecting previously unselected package librust-compiler-builtins+rustc-dep-of-std-dev:ppc64el. 507s Preparing to unpack .../254-librust-compiler-builtins+rustc-dep-of-std-dev_0.1.101-1_ppc64el.deb ... 507s Unpacking librust-compiler-builtins+rustc-dep-of-std-dev:ppc64el (0.1.101-1) ... 507s Selecting previously unselected package librust-errno-dev:ppc64el. 507s Preparing to unpack .../255-librust-errno-dev_0.3.8-1_ppc64el.deb ... 507s Unpacking librust-errno-dev:ppc64el (0.3.8-1) ... 507s Selecting previously unselected package librust-linux-raw-sys-dev:ppc64el. 507s Preparing to unpack .../256-librust-linux-raw-sys-dev_0.4.14-1_ppc64el.deb ... 507s Unpacking librust-linux-raw-sys-dev:ppc64el (0.4.14-1) ... 507s Selecting previously unselected package librust-rustix-dev:ppc64el. 507s Preparing to unpack .../257-librust-rustix-dev_0.38.32-1_ppc64el.deb ... 507s Unpacking librust-rustix-dev:ppc64el (0.38.32-1) ... 507s Selecting previously unselected package librust-polling-dev:ppc64el. 507s Preparing to unpack .../258-librust-polling-dev_3.4.0-1_ppc64el.deb ... 507s Unpacking librust-polling-dev:ppc64el (3.4.0-1) ... 507s Selecting previously unselected package librust-async-io-dev:ppc64el. 507s Preparing to unpack .../259-librust-async-io-dev_2.3.3-4_ppc64el.deb ... 507s Unpacking librust-async-io-dev:ppc64el (2.3.3-4) ... 507s Selecting previously unselected package librust-mio-dev:ppc64el. 507s Preparing to unpack .../260-librust-mio-dev_1.0.2-2_ppc64el.deb ... 507s Unpacking librust-mio-dev:ppc64el (1.0.2-2) ... 507s Selecting previously unselected package librust-owning-ref-dev:ppc64el. 507s Preparing to unpack .../261-librust-owning-ref-dev_0.4.1-1_ppc64el.deb ... 507s Unpacking librust-owning-ref-dev:ppc64el (0.4.1-1) ... 507s Selecting previously unselected package librust-scopeguard-dev:ppc64el. 508s Preparing to unpack .../262-librust-scopeguard-dev_1.2.0-1_ppc64el.deb ... 508s Unpacking librust-scopeguard-dev:ppc64el (1.2.0-1) ... 508s Selecting previously unselected package librust-lock-api-dev:ppc64el. 508s Preparing to unpack .../263-librust-lock-api-dev_0.4.12-1_ppc64el.deb ... 508s Unpacking librust-lock-api-dev:ppc64el (0.4.12-1) ... 508s Selecting previously unselected package librust-parking-lot-dev:ppc64el. 508s Preparing to unpack .../264-librust-parking-lot-dev_0.12.3-1_ppc64el.deb ... 508s Unpacking librust-parking-lot-dev:ppc64el (0.12.3-1) ... 508s Selecting previously unselected package librust-signal-hook-registry-dev:ppc64el. 508s Preparing to unpack .../265-librust-signal-hook-registry-dev_1.4.0-1_ppc64el.deb ... 508s Unpacking librust-signal-hook-registry-dev:ppc64el (1.4.0-1) ... 508s Selecting previously unselected package librust-socket2-dev:ppc64el. 508s Preparing to unpack .../266-librust-socket2-dev_0.5.7-1_ppc64el.deb ... 508s Unpacking librust-socket2-dev:ppc64el (0.5.7-1) ... 508s Selecting previously unselected package librust-tokio-macros-dev:ppc64el. 508s Preparing to unpack .../267-librust-tokio-macros-dev_2.4.0-2_ppc64el.deb ... 508s Unpacking librust-tokio-macros-dev:ppc64el (2.4.0-2) ... 508s Selecting previously unselected package librust-tokio-dev:ppc64el. 508s Preparing to unpack .../268-librust-tokio-dev_1.39.3-3_ppc64el.deb ... 508s Unpacking librust-tokio-dev:ppc64el (1.39.3-3) ... 508s Selecting previously unselected package librust-async-global-executor-dev:ppc64el. 508s Preparing to unpack .../269-librust-async-global-executor-dev_2.4.1-5_ppc64el.deb ... 508s Unpacking librust-async-global-executor-dev:ppc64el (2.4.1-5) ... 508s Selecting previously unselected package librust-async-net-dev. 508s Preparing to unpack .../270-librust-async-net-dev_2.0.0-4_all.deb ... 508s Unpacking librust-async-net-dev (2.0.0-4) ... 508s Selecting previously unselected package librust-async-signal-dev:ppc64el. 508s Preparing to unpack .../271-librust-async-signal-dev_0.2.10-1_ppc64el.deb ... 508s Unpacking librust-async-signal-dev:ppc64el (0.2.10-1) ... 508s Selecting previously unselected package librust-async-process-dev. 508s Preparing to unpack .../272-librust-async-process-dev_2.3.0-1_all.deb ... 508s Unpacking librust-async-process-dev (2.3.0-1) ... 508s Selecting previously unselected package librust-kv-log-macro-dev. 508s Preparing to unpack .../273-librust-kv-log-macro-dev_1.0.8-4_all.deb ... 508s Unpacking librust-kv-log-macro-dev (1.0.8-4) ... 508s Selecting previously unselected package librust-pin-utils-dev:ppc64el. 508s Preparing to unpack .../274-librust-pin-utils-dev_0.1.0-1_ppc64el.deb ... 508s Unpacking librust-pin-utils-dev:ppc64el (0.1.0-1) ... 508s Selecting previously unselected package librust-async-std-dev. 508s Preparing to unpack .../275-librust-async-std-dev_1.13.0-1_all.deb ... 508s Unpacking librust-async-std-dev (1.13.0-1) ... 508s Selecting previously unselected package librust-base64-dev:ppc64el. 508s Preparing to unpack .../276-librust-base64-dev_0.21.7-1_ppc64el.deb ... 508s Unpacking librust-base64-dev:ppc64el (0.21.7-1) ... 508s Selecting previously unselected package librust-bit-vec-dev:ppc64el. 508s Preparing to unpack .../277-librust-bit-vec-dev_0.6.3-1_ppc64el.deb ... 508s Unpacking librust-bit-vec-dev:ppc64el (0.6.3-1) ... 508s Selecting previously unselected package librust-bit-set-dev:ppc64el. 508s Preparing to unpack .../278-librust-bit-set-dev_0.5.2-1_ppc64el.deb ... 508s Unpacking librust-bit-set-dev:ppc64el (0.5.2-1) ... 508s Selecting previously unselected package librust-bit-set+std-dev:ppc64el. 508s Preparing to unpack .../279-librust-bit-set+std-dev_0.5.2-1_ppc64el.deb ... 508s Unpacking librust-bit-set+std-dev:ppc64el (0.5.2-1) ... 508s Selecting previously unselected package librust-regex-syntax-dev:ppc64el. 508s Preparing to unpack .../280-librust-regex-syntax-dev_0.8.2-1_ppc64el.deb ... 508s Unpacking librust-regex-syntax-dev:ppc64el (0.8.2-1) ... 508s Selecting previously unselected package librust-regex-automata-dev:ppc64el. 508s Preparing to unpack .../281-librust-regex-automata-dev_0.4.7-1_ppc64el.deb ... 508s Unpacking librust-regex-automata-dev:ppc64el (0.4.7-1) ... 508s Selecting previously unselected package librust-bstr-dev:ppc64el. 508s Preparing to unpack .../282-librust-bstr-dev_1.7.0-2build1_ppc64el.deb ... 508s Unpacking librust-bstr-dev:ppc64el (1.7.0-2build1) ... 508s Selecting previously unselected package librust-bumpalo-dev:ppc64el. 508s Preparing to unpack .../283-librust-bumpalo-dev_3.16.0-1_ppc64el.deb ... 508s Unpacking librust-bumpalo-dev:ppc64el (3.16.0-1) ... 508s Selecting previously unselected package librust-cast-dev:ppc64el. 508s Preparing to unpack .../284-librust-cast-dev_0.3.0-1_ppc64el.deb ... 508s Unpacking librust-cast-dev:ppc64el (0.3.0-1) ... 508s Selecting previously unselected package librust-iana-time-zone-dev:ppc64el. 508s Preparing to unpack .../285-librust-iana-time-zone-dev_0.1.60-1_ppc64el.deb ... 508s Unpacking librust-iana-time-zone-dev:ppc64el (0.1.60-1) ... 508s Selecting previously unselected package librust-wasm-bindgen-shared-dev:ppc64el. 508s Preparing to unpack .../286-librust-wasm-bindgen-shared-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen-shared-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen-backend-dev:ppc64el. 508s Preparing to unpack .../287-librust-wasm-bindgen-backend-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen-backend-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen-macro-support-dev:ppc64el. 508s Preparing to unpack .../288-librust-wasm-bindgen-macro-support-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen-macro-support-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen-macro-dev:ppc64el. 508s Preparing to unpack .../289-librust-wasm-bindgen-macro-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen-macro-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen-dev:ppc64el. 508s Preparing to unpack .../290-librust-wasm-bindgen-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen-macro-support+spans-dev:ppc64el. 508s Preparing to unpack .../291-librust-wasm-bindgen-macro-support+spans-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen-macro-support+spans-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen-macro+spans-dev:ppc64el. 508s Preparing to unpack .../292-librust-wasm-bindgen-macro+spans-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen-macro+spans-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen+spans-dev:ppc64el. 508s Preparing to unpack .../293-librust-wasm-bindgen+spans-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen+spans-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-wasm-bindgen+default-dev:ppc64el. 508s Preparing to unpack .../294-librust-wasm-bindgen+default-dev_0.2.87-1_ppc64el.deb ... 508s Unpacking librust-wasm-bindgen+default-dev:ppc64el (0.2.87-1) ... 508s Selecting previously unselected package librust-js-sys-dev:ppc64el. 508s Preparing to unpack .../295-librust-js-sys-dev_0.3.64-1_ppc64el.deb ... 508s Unpacking librust-js-sys-dev:ppc64el (0.3.64-1) ... 509s Selecting previously unselected package librust-pure-rust-locales-dev:ppc64el. 509s Preparing to unpack .../296-librust-pure-rust-locales-dev_0.8.1-1_ppc64el.deb ... 509s Unpacking librust-pure-rust-locales-dev:ppc64el (0.8.1-1) ... 509s Selecting previously unselected package librust-chrono-dev:ppc64el. 509s Preparing to unpack .../297-librust-chrono-dev_0.4.38-2_ppc64el.deb ... 509s Unpacking librust-chrono-dev:ppc64el (0.4.38-2) ... 509s Selecting previously unselected package librust-regex-dev:ppc64el. 509s Preparing to unpack .../298-librust-regex-dev_1.10.6-1_ppc64el.deb ... 509s Unpacking librust-regex-dev:ppc64el (1.10.6-1) ... 509s Selecting previously unselected package librust-parse-zoneinfo-dev:ppc64el. 509s Preparing to unpack .../299-librust-parse-zoneinfo-dev_0.3.0-1_ppc64el.deb ... 509s Unpacking librust-parse-zoneinfo-dev:ppc64el (0.3.0-1) ... 509s Selecting previously unselected package librust-siphasher-dev:ppc64el. 509s Preparing to unpack .../300-librust-siphasher-dev_0.3.10-1_ppc64el.deb ... 509s Unpacking librust-siphasher-dev:ppc64el (0.3.10-1) ... 509s Selecting previously unselected package librust-phf-shared-dev:ppc64el. 509s Preparing to unpack .../301-librust-phf-shared-dev_0.11.2-1_ppc64el.deb ... 509s Unpacking librust-phf-shared-dev:ppc64el (0.11.2-1) ... 509s Selecting previously unselected package librust-phf-dev:ppc64el. 509s Preparing to unpack .../302-librust-phf-dev_0.11.2-1_ppc64el.deb ... 509s Unpacking librust-phf-dev:ppc64el (0.11.2-1) ... 509s Selecting previously unselected package librust-uncased-dev:ppc64el. 509s Preparing to unpack .../303-librust-uncased-dev_0.9.6-2_ppc64el.deb ... 509s Unpacking librust-uncased-dev:ppc64el (0.9.6-2) ... 509s Selecting previously unselected package librust-phf-shared+uncased-dev:ppc64el. 509s Preparing to unpack .../304-librust-phf-shared+uncased-dev_0.11.2-1_ppc64el.deb ... 509s Unpacking librust-phf-shared+uncased-dev:ppc64el (0.11.2-1) ... 509s Selecting previously unselected package librust-phf+uncased-dev:ppc64el. 509s Preparing to unpack .../305-librust-phf+uncased-dev_0.11.2-1_ppc64el.deb ... 509s Unpacking librust-phf+uncased-dev:ppc64el (0.11.2-1) ... 509s Selecting previously unselected package librust-ciborium-io-dev:ppc64el. 509s Preparing to unpack .../306-librust-ciborium-io-dev_0.2.2-1_ppc64el.deb ... 509s Unpacking librust-ciborium-io-dev:ppc64el (0.2.2-1) ... 509s Selecting previously unselected package librust-half-dev:ppc64el. 509s Preparing to unpack .../307-librust-half-dev_1.8.2-4_ppc64el.deb ... 509s Unpacking librust-half-dev:ppc64el (1.8.2-4) ... 509s Selecting previously unselected package librust-ciborium-ll-dev:ppc64el. 509s Preparing to unpack .../308-librust-ciborium-ll-dev_0.2.2-1_ppc64el.deb ... 509s Unpacking librust-ciborium-ll-dev:ppc64el (0.2.2-1) ... 509s Selecting previously unselected package librust-ciborium-dev:ppc64el. 509s Preparing to unpack .../309-librust-ciborium-dev_0.2.2-2_ppc64el.deb ... 509s Unpacking librust-ciborium-dev:ppc64el (0.2.2-2) ... 509s Selecting previously unselected package librust-clap-lex-dev:ppc64el. 509s Preparing to unpack .../310-librust-clap-lex-dev_0.7.2-2_ppc64el.deb ... 509s Unpacking librust-clap-lex-dev:ppc64el (0.7.2-2) ... 509s Selecting previously unselected package librust-strsim-dev:ppc64el. 509s Preparing to unpack .../311-librust-strsim-dev_0.11.1-1_ppc64el.deb ... 509s Unpacking librust-strsim-dev:ppc64el (0.11.1-1) ... 509s Selecting previously unselected package librust-terminal-size-dev:ppc64el. 509s Preparing to unpack .../312-librust-terminal-size-dev_0.3.0-2_ppc64el.deb ... 509s Unpacking librust-terminal-size-dev:ppc64el (0.3.0-2) ... 509s Selecting previously unselected package librust-unicase-dev:ppc64el. 509s Preparing to unpack .../313-librust-unicase-dev_2.7.0-1_ppc64el.deb ... 509s Unpacking librust-unicase-dev:ppc64el (2.7.0-1) ... 509s Selecting previously unselected package librust-unicode-width-dev:ppc64el. 509s Preparing to unpack .../314-librust-unicode-width-dev_0.1.14-1_ppc64el.deb ... 509s Unpacking librust-unicode-width-dev:ppc64el (0.1.14-1) ... 509s Selecting previously unselected package librust-clap-builder-dev:ppc64el. 509s Preparing to unpack .../315-librust-clap-builder-dev_4.5.15-2_ppc64el.deb ... 509s Unpacking librust-clap-builder-dev:ppc64el (4.5.15-2) ... 509s Selecting previously unselected package librust-heck-dev:ppc64el. 509s Preparing to unpack .../316-librust-heck-dev_0.4.1-1_ppc64el.deb ... 509s Unpacking librust-heck-dev:ppc64el (0.4.1-1) ... 509s Selecting previously unselected package librust-clap-derive-dev:ppc64el. 509s Preparing to unpack .../317-librust-clap-derive-dev_4.5.13-2_ppc64el.deb ... 509s Unpacking librust-clap-derive-dev:ppc64el (4.5.13-2) ... 509s Selecting previously unselected package librust-clap-dev:ppc64el. 509s Preparing to unpack .../318-librust-clap-dev_4.5.16-1_ppc64el.deb ... 509s Unpacking librust-clap-dev:ppc64el (4.5.16-1) ... 509s Selecting previously unselected package librust-csv-core-dev:ppc64el. 509s Preparing to unpack .../319-librust-csv-core-dev_0.1.11-1_ppc64el.deb ... 509s Unpacking librust-csv-core-dev:ppc64el (0.1.11-1) ... 509s Selecting previously unselected package librust-csv-dev:ppc64el. 509s Preparing to unpack .../320-librust-csv-dev_1.3.0-1_ppc64el.deb ... 509s Unpacking librust-csv-dev:ppc64el (1.3.0-1) ... 509s Selecting previously unselected package librust-futures-sink-dev:ppc64el. 509s Preparing to unpack .../321-librust-futures-sink-dev_0.3.31-1_ppc64el.deb ... 509s Unpacking librust-futures-sink-dev:ppc64el (0.3.31-1) ... 509s Selecting previously unselected package librust-futures-channel-dev:ppc64el. 509s Preparing to unpack .../322-librust-futures-channel-dev_0.3.30-1_ppc64el.deb ... 509s Unpacking librust-futures-channel-dev:ppc64el (0.3.30-1) ... 509s Selecting previously unselected package librust-futures-task-dev:ppc64el. 509s Preparing to unpack .../323-librust-futures-task-dev_0.3.30-1_ppc64el.deb ... 509s Unpacking librust-futures-task-dev:ppc64el (0.3.30-1) ... 509s Selecting previously unselected package librust-futures-macro-dev:ppc64el. 509s Preparing to unpack .../324-librust-futures-macro-dev_0.3.30-1_ppc64el.deb ... 509s Unpacking librust-futures-macro-dev:ppc64el (0.3.30-1) ... 509s Selecting previously unselected package librust-futures-util-dev:ppc64el. 509s Preparing to unpack .../325-librust-futures-util-dev_0.3.30-2_ppc64el.deb ... 509s Unpacking librust-futures-util-dev:ppc64el (0.3.30-2) ... 509s Selecting previously unselected package librust-num-cpus-dev:ppc64el. 509s Preparing to unpack .../326-librust-num-cpus-dev_1.16.0-1_ppc64el.deb ... 509s Unpacking librust-num-cpus-dev:ppc64el (1.16.0-1) ... 509s Selecting previously unselected package librust-futures-executor-dev:ppc64el. 509s Preparing to unpack .../327-librust-futures-executor-dev_0.3.30-1_ppc64el.deb ... 509s Unpacking librust-futures-executor-dev:ppc64el (0.3.30-1) ... 509s Selecting previously unselected package librust-futures-dev:ppc64el. 509s Preparing to unpack .../328-librust-futures-dev_0.3.30-2_ppc64el.deb ... 509s Unpacking librust-futures-dev:ppc64el (0.3.30-2) ... 509s Selecting previously unselected package librust-is-terminal-dev:ppc64el. 509s Preparing to unpack .../329-librust-is-terminal-dev_0.4.13-1_ppc64el.deb ... 509s Unpacking librust-is-terminal-dev:ppc64el (0.4.13-1) ... 509s Selecting previously unselected package librust-itertools-dev:ppc64el. 509s Preparing to unpack .../330-librust-itertools-dev_0.10.5-1_ppc64el.deb ... 509s Unpacking librust-itertools-dev:ppc64el (0.10.5-1) ... 509s Selecting previously unselected package librust-oorandom-dev:ppc64el. 509s Preparing to unpack .../331-librust-oorandom-dev_11.1.3-1_ppc64el.deb ... 509s Unpacking librust-oorandom-dev:ppc64el (11.1.3-1) ... 509s Selecting previously unselected package librust-winapi-i686-pc-windows-gnu-dev:ppc64el. 509s Preparing to unpack .../332-librust-winapi-i686-pc-windows-gnu-dev_0.4.0-1_ppc64el.deb ... 509s Unpacking librust-winapi-i686-pc-windows-gnu-dev:ppc64el (0.4.0-1) ... 509s Selecting previously unselected package librust-winapi-x86-64-pc-windows-gnu-dev:ppc64el. 510s Preparing to unpack .../333-librust-winapi-x86-64-pc-windows-gnu-dev_0.4.0-1_ppc64el.deb ... 510s Unpacking librust-winapi-x86-64-pc-windows-gnu-dev:ppc64el (0.4.0-1) ... 510s Selecting previously unselected package librust-winapi-dev:ppc64el. 510s Preparing to unpack .../334-librust-winapi-dev_0.3.9-1_ppc64el.deb ... 510s Unpacking librust-winapi-dev:ppc64el (0.3.9-1) ... 510s Selecting previously unselected package librust-dirs-sys-next-dev:ppc64el. 510s Preparing to unpack .../335-librust-dirs-sys-next-dev_0.1.1-1_ppc64el.deb ... 510s Unpacking librust-dirs-sys-next-dev:ppc64el (0.1.1-1) ... 510s Selecting previously unselected package librust-dirs-next-dev:ppc64el. 510s Preparing to unpack .../336-librust-dirs-next-dev_2.0.0-1_ppc64el.deb ... 510s Unpacking librust-dirs-next-dev:ppc64el (2.0.0-1) ... 510s Selecting previously unselected package librust-float-ord-dev:ppc64el. 510s Preparing to unpack .../337-librust-float-ord-dev_0.3.2-1_ppc64el.deb ... 510s Unpacking librust-float-ord-dev:ppc64el (0.3.2-1) ... 510s Selecting previously unselected package librust-cmake-dev:ppc64el. 510s Preparing to unpack .../338-librust-cmake-dev_0.1.45-1_ppc64el.deb ... 510s Unpacking librust-cmake-dev:ppc64el (0.1.45-1) ... 510s Selecting previously unselected package librust-freetype-sys-dev:ppc64el. 510s Preparing to unpack .../339-librust-freetype-sys-dev_0.13.1-1_ppc64el.deb ... 510s Unpacking librust-freetype-sys-dev:ppc64el (0.13.1-1) ... 510s Selecting previously unselected package librust-freetype-dev:ppc64el. 510s Preparing to unpack .../340-librust-freetype-dev_0.7.0-4_ppc64el.deb ... 510s Unpacking librust-freetype-dev:ppc64el (0.7.0-4) ... 510s Selecting previously unselected package librust-spin-dev:ppc64el. 510s Preparing to unpack .../341-librust-spin-dev_0.9.8-4_ppc64el.deb ... 510s Unpacking librust-spin-dev:ppc64el (0.9.8-4) ... 510s Selecting previously unselected package librust-lazy-static-dev:ppc64el. 510s Preparing to unpack .../342-librust-lazy-static-dev_1.5.0-1_ppc64el.deb ... 510s Unpacking librust-lazy-static-dev:ppc64el (1.5.0-1) ... 510s Selecting previously unselected package librust-pathfinder-simd-dev:ppc64el. 510s Preparing to unpack .../343-librust-pathfinder-simd-dev_0.5.2-1_ppc64el.deb ... 510s Unpacking librust-pathfinder-simd-dev:ppc64el (0.5.2-1) ... 510s Selecting previously unselected package librust-pathfinder-geometry-dev:ppc64el. 510s Preparing to unpack .../344-librust-pathfinder-geometry-dev_0.5.1-1_ppc64el.deb ... 510s Unpacking librust-pathfinder-geometry-dev:ppc64el (0.5.1-1) ... 510s Selecting previously unselected package librust-winapi-util-dev:ppc64el. 510s Preparing to unpack .../345-librust-winapi-util-dev_0.1.6-1_ppc64el.deb ... 510s Unpacking librust-winapi-util-dev:ppc64el (0.1.6-1) ... 510s Selecting previously unselected package librust-same-file-dev:ppc64el. 510s Preparing to unpack .../346-librust-same-file-dev_1.0.6-1_ppc64el.deb ... 510s Unpacking librust-same-file-dev:ppc64el (1.0.6-1) ... 510s Selecting previously unselected package librust-walkdir-dev:ppc64el. 510s Preparing to unpack .../347-librust-walkdir-dev_2.5.0-1_ppc64el.deb ... 510s Unpacking librust-walkdir-dev:ppc64el (2.5.0-1) ... 510s Selecting previously unselected package librust-const-cstr-dev:ppc64el. 510s Preparing to unpack .../348-librust-const-cstr-dev_0.3.0-1_ppc64el.deb ... 510s Unpacking librust-const-cstr-dev:ppc64el (0.3.0-1) ... 510s Selecting previously unselected package librust-libloading-dev:ppc64el. 510s Preparing to unpack .../349-librust-libloading-dev_0.8.5-1_ppc64el.deb ... 510s Unpacking librust-libloading-dev:ppc64el (0.8.5-1) ... 510s Selecting previously unselected package librust-dlib-dev:ppc64el. 510s Preparing to unpack .../350-librust-dlib-dev_0.5.2-2_ppc64el.deb ... 510s Unpacking librust-dlib-dev:ppc64el (0.5.2-2) ... 510s Selecting previously unselected package librust-yeslogic-fontconfig-sys-dev:ppc64el. 510s Preparing to unpack .../351-librust-yeslogic-fontconfig-sys-dev_3.0.1-1_ppc64el.deb ... 510s Unpacking librust-yeslogic-fontconfig-sys-dev:ppc64el (3.0.1-1) ... 510s Selecting previously unselected package librust-font-kit-dev:ppc64el. 510s Preparing to unpack .../352-librust-font-kit-dev_0.11.0-2_ppc64el.deb ... 510s Unpacking librust-font-kit-dev:ppc64el (0.11.0-2) ... 510s Selecting previously unselected package librust-color-quant-dev:ppc64el. 510s Preparing to unpack .../353-librust-color-quant-dev_1.1.0-1_ppc64el.deb ... 510s Unpacking librust-color-quant-dev:ppc64el (1.1.0-1) ... 510s Selecting previously unselected package librust-weezl-dev:ppc64el. 510s Preparing to unpack .../354-librust-weezl-dev_0.1.5-1_ppc64el.deb ... 510s Unpacking librust-weezl-dev:ppc64el (0.1.5-1) ... 510s Selecting previously unselected package librust-gif-dev:ppc64el. 510s Preparing to unpack .../355-librust-gif-dev_0.11.3-1_ppc64el.deb ... 510s Unpacking librust-gif-dev:ppc64el (0.11.3-1) ... 510s Selecting previously unselected package librust-jpeg-decoder-dev:ppc64el. 510s Preparing to unpack .../356-librust-jpeg-decoder-dev_0.3.0-1_ppc64el.deb ... 510s Unpacking librust-jpeg-decoder-dev:ppc64el (0.3.0-1) ... 510s Selecting previously unselected package librust-num-integer-dev:ppc64el. 510s Preparing to unpack .../357-librust-num-integer-dev_0.1.46-1_ppc64el.deb ... 510s Unpacking librust-num-integer-dev:ppc64el (0.1.46-1) ... 510s Selecting previously unselected package librust-humantime-dev:ppc64el. 510s Preparing to unpack .../358-librust-humantime-dev_2.1.0-1_ppc64el.deb ... 510s Unpacking librust-humantime-dev:ppc64el (2.1.0-1) ... 510s Selecting previously unselected package librust-termcolor-dev:ppc64el. 510s Preparing to unpack .../359-librust-termcolor-dev_1.4.1-1_ppc64el.deb ... 510s Unpacking librust-termcolor-dev:ppc64el (1.4.1-1) ... 510s Selecting previously unselected package librust-env-logger-dev:ppc64el. 510s Preparing to unpack .../360-librust-env-logger-dev_0.10.2-2_ppc64el.deb ... 510s Unpacking librust-env-logger-dev:ppc64el (0.10.2-2) ... 510s Selecting previously unselected package librust-quickcheck-dev:ppc64el. 510s Preparing to unpack .../361-librust-quickcheck-dev_1.0.3-3_ppc64el.deb ... 510s Unpacking librust-quickcheck-dev:ppc64el (1.0.3-3) ... 510s Selecting previously unselected package librust-num-bigint-dev:ppc64el. 510s Preparing to unpack .../362-librust-num-bigint-dev_0.4.6-1_ppc64el.deb ... 510s Unpacking librust-num-bigint-dev:ppc64el (0.4.6-1) ... 510s Selecting previously unselected package librust-num-rational-dev:ppc64el. 510s Preparing to unpack .../363-librust-num-rational-dev_0.4.2-1_ppc64el.deb ... 510s Unpacking librust-num-rational-dev:ppc64el (0.4.2-1) ... 510s Selecting previously unselected package librust-png-dev:ppc64el. 510s Preparing to unpack .../364-librust-png-dev_0.17.7-3_ppc64el.deb ... 510s Unpacking librust-png-dev:ppc64el (0.17.7-3) ... 510s Selecting previously unselected package librust-qoi-dev:ppc64el. 510s Preparing to unpack .../365-librust-qoi-dev_0.4.1-2_ppc64el.deb ... 510s Unpacking librust-qoi-dev:ppc64el (0.4.1-2) ... 510s Selecting previously unselected package librust-tiff-dev:ppc64el. 510s Preparing to unpack .../366-librust-tiff-dev_0.9.0-1_ppc64el.deb ... 510s Unpacking librust-tiff-dev:ppc64el (0.9.0-1) ... 510s Selecting previously unselected package libsharpyuv0:ppc64el. 510s Preparing to unpack .../367-libsharpyuv0_1.4.0-0.1_ppc64el.deb ... 510s Unpacking libsharpyuv0:ppc64el (1.4.0-0.1) ... 510s Selecting previously unselected package libwebp7:ppc64el. 510s Preparing to unpack .../368-libwebp7_1.4.0-0.1_ppc64el.deb ... 510s Unpacking libwebp7:ppc64el (1.4.0-0.1) ... 510s Selecting previously unselected package libwebpdemux2:ppc64el. 510s Preparing to unpack .../369-libwebpdemux2_1.4.0-0.1_ppc64el.deb ... 510s Unpacking libwebpdemux2:ppc64el (1.4.0-0.1) ... 511s Selecting previously unselected package libwebpmux3:ppc64el. 511s Preparing to unpack .../370-libwebpmux3_1.4.0-0.1_ppc64el.deb ... 511s Unpacking libwebpmux3:ppc64el (1.4.0-0.1) ... 511s Selecting previously unselected package libwebpdecoder3:ppc64el. 511s Preparing to unpack .../371-libwebpdecoder3_1.4.0-0.1_ppc64el.deb ... 511s Unpacking libwebpdecoder3:ppc64el (1.4.0-0.1) ... 511s Selecting previously unselected package libsharpyuv-dev:ppc64el. 511s Preparing to unpack .../372-libsharpyuv-dev_1.4.0-0.1_ppc64el.deb ... 511s Unpacking libsharpyuv-dev:ppc64el (1.4.0-0.1) ... 511s Selecting previously unselected package libwebp-dev:ppc64el. 511s Preparing to unpack .../373-libwebp-dev_1.4.0-0.1_ppc64el.deb ... 511s Unpacking libwebp-dev:ppc64el (1.4.0-0.1) ... 511s Selecting previously unselected package librust-libwebp-sys-dev:ppc64el. 511s Preparing to unpack .../374-librust-libwebp-sys-dev_0.9.5-1build1_ppc64el.deb ... 511s Unpacking librust-libwebp-sys-dev:ppc64el (0.9.5-1build1) ... 511s Selecting previously unselected package librust-webp-dev:ppc64el. 511s Preparing to unpack .../375-librust-webp-dev_0.2.6-1_ppc64el.deb ... 511s Unpacking librust-webp-dev:ppc64el (0.2.6-1) ... 511s Selecting previously unselected package librust-image-dev:ppc64el. 511s Preparing to unpack .../376-librust-image-dev_0.24.7-2_ppc64el.deb ... 511s Unpacking librust-image-dev:ppc64el (0.24.7-2) ... 511s Selecting previously unselected package librust-plotters-backend-dev:ppc64el. 511s Preparing to unpack .../377-librust-plotters-backend-dev_0.3.7-1_ppc64el.deb ... 511s Unpacking librust-plotters-backend-dev:ppc64el (0.3.7-1) ... 511s Selecting previously unselected package librust-plotters-bitmap-dev:ppc64el. 511s Preparing to unpack .../378-librust-plotters-bitmap-dev_0.3.3-3_ppc64el.deb ... 511s Unpacking librust-plotters-bitmap-dev:ppc64el (0.3.3-3) ... 511s Selecting previously unselected package librust-plotters-svg-dev:ppc64el. 511s Preparing to unpack .../379-librust-plotters-svg-dev_0.3.5-1_ppc64el.deb ... 511s Unpacking librust-plotters-svg-dev:ppc64el (0.3.5-1) ... 511s Selecting previously unselected package librust-web-sys-dev:ppc64el. 511s Preparing to unpack .../380-librust-web-sys-dev_0.3.64-2_ppc64el.deb ... 511s Unpacking librust-web-sys-dev:ppc64el (0.3.64-2) ... 511s Selecting previously unselected package librust-plotters-dev:ppc64el. 511s Preparing to unpack .../381-librust-plotters-dev_0.3.5-4_ppc64el.deb ... 511s Unpacking librust-plotters-dev:ppc64el (0.3.5-4) ... 511s Selecting previously unselected package librust-smol-dev. 511s Preparing to unpack .../382-librust-smol-dev_2.0.2-1_all.deb ... 511s Unpacking librust-smol-dev (2.0.2-1) ... 511s Selecting previously unselected package librust-tinytemplate-dev:ppc64el. 511s Preparing to unpack .../383-librust-tinytemplate-dev_1.2.1-1_ppc64el.deb ... 511s Unpacking librust-tinytemplate-dev:ppc64el (1.2.1-1) ... 511s Selecting previously unselected package librust-criterion-dev. 511s Preparing to unpack .../384-librust-criterion-dev_0.5.1-6_all.deb ... 511s Unpacking librust-criterion-dev (0.5.1-6) ... 511s Selecting previously unselected package librust-phf-generator-dev:ppc64el. 511s Preparing to unpack .../385-librust-phf-generator-dev_0.11.2-2_ppc64el.deb ... 511s Unpacking librust-phf-generator-dev:ppc64el (0.11.2-2) ... 511s Selecting previously unselected package librust-phf-codegen-dev:ppc64el. 511s Preparing to unpack .../386-librust-phf-codegen-dev_0.11.2-1_ppc64el.deb ... 511s Unpacking librust-phf-codegen-dev:ppc64el (0.11.2-1) ... 511s Selecting previously unselected package librust-chrono-tz-build-dev:ppc64el. 511s Preparing to unpack .../387-librust-chrono-tz-build-dev_0.2.1-1_ppc64el.deb ... 511s Unpacking librust-chrono-tz-build-dev:ppc64el (0.2.1-1) ... 511s Selecting previously unselected package librust-chrono-tz-dev:ppc64el. 511s Preparing to unpack .../388-librust-chrono-tz-dev_0.8.6-2_ppc64el.deb ... 511s Unpacking librust-chrono-tz-dev:ppc64el (0.8.6-2) ... 511s Selecting previously unselected package librust-ctor-dev:ppc64el. 511s Preparing to unpack .../389-librust-ctor-dev_0.1.26-1_ppc64el.deb ... 511s Unpacking librust-ctor-dev:ppc64el (0.1.26-1) ... 511s Selecting previously unselected package librust-powerfmt-macros-dev:ppc64el. 511s Preparing to unpack .../390-librust-powerfmt-macros-dev_0.1.0-1_ppc64el.deb ... 511s Unpacking librust-powerfmt-macros-dev:ppc64el (0.1.0-1) ... 511s Selecting previously unselected package librust-powerfmt-dev:ppc64el. 511s Preparing to unpack .../391-librust-powerfmt-dev_0.2.0-1_ppc64el.deb ... 511s Unpacking librust-powerfmt-dev:ppc64el (0.2.0-1) ... 511s Selecting previously unselected package librust-deranged-dev:ppc64el. 511s Preparing to unpack .../392-librust-deranged-dev_0.3.11-1_ppc64el.deb ... 511s Unpacking librust-deranged-dev:ppc64el (0.3.11-1) ... 511s Selecting previously unselected package librust-eui48-dev:ppc64el. 511s Preparing to unpack .../393-librust-eui48-dev_1.1.0-2_ppc64el.deb ... 511s Unpacking librust-eui48-dev:ppc64el (1.1.0-2) ... 511s Selecting previously unselected package librust-indenter-dev:ppc64el. 511s Preparing to unpack .../394-librust-indenter-dev_0.3.3-1_ppc64el.deb ... 511s Unpacking librust-indenter-dev:ppc64el (0.3.3-1) ... 511s Selecting previously unselected package librust-eyre-dev:ppc64el. 511s Preparing to unpack .../395-librust-eyre-dev_0.6.12-1_ppc64el.deb ... 511s Unpacking librust-eyre-dev:ppc64el (0.6.12-1) ... 511s Selecting previously unselected package librust-eyre+default-dev:ppc64el. 511s Preparing to unpack .../396-librust-eyre+default-dev_0.6.12-1_ppc64el.deb ... 511s Unpacking librust-eyre+default-dev:ppc64el (0.6.12-1) ... 511s Selecting previously unselected package librust-fancy-regex-dev:ppc64el. 512s Preparing to unpack .../397-librust-fancy-regex-dev_0.11.0-2_ppc64el.deb ... 512s Unpacking librust-fancy-regex-dev:ppc64el (0.11.0-2) ... 512s Selecting previously unselected package librust-fnv-dev:ppc64el. 512s Preparing to unpack .../398-librust-fnv-dev_1.0.7-1_ppc64el.deb ... 512s Unpacking librust-fnv-dev:ppc64el (1.0.7-1) ... 512s Selecting previously unselected package librust-geo-types-dev:ppc64el. 512s Preparing to unpack .../399-librust-geo-types-dev_0.7.11-2_ppc64el.deb ... 512s Unpacking librust-geo-types-dev:ppc64el (0.7.11-2) ... 512s Selecting previously unselected package librust-ghost-dev:ppc64el. 512s Preparing to unpack .../400-librust-ghost-dev_0.1.5-1_ppc64el.deb ... 512s Unpacking librust-ghost-dev:ppc64el (0.1.5-1) ... 512s Selecting previously unselected package librust-hmac-dev:ppc64el. 512s Preparing to unpack .../401-librust-hmac-dev_0.12.1-1_ppc64el.deb ... 512s Unpacking librust-hmac-dev:ppc64el (0.12.1-1) ... 512s Selecting previously unselected package librust-indoc-dev:ppc64el. 512s Preparing to unpack .../402-librust-indoc-dev_2.0.5-1_ppc64el.deb ... 512s Unpacking librust-indoc-dev:ppc64el (2.0.5-1) ... 512s Selecting previously unselected package librust-inventory-dev:ppc64el. 512s Preparing to unpack .../403-librust-inventory-dev_0.3.2-1_ppc64el.deb ... 512s Unpacking librust-inventory-dev:ppc64el (0.3.2-1) ... 512s Selecting previously unselected package librust-memoffset-dev:ppc64el. 512s Preparing to unpack .../404-librust-memoffset-dev_0.8.0-1_ppc64el.deb ... 512s Unpacking librust-memoffset-dev:ppc64el (0.8.0-1) ... 512s Selecting previously unselected package librust-num-conv-dev:ppc64el. 512s Preparing to unpack .../405-librust-num-conv-dev_0.1.0-1_ppc64el.deb ... 512s Unpacking librust-num-conv-dev:ppc64el (0.1.0-1) ... 512s Selecting previously unselected package librust-num-threads-dev:ppc64el. 512s Preparing to unpack .../406-librust-num-threads-dev_0.1.7-1_ppc64el.deb ... 512s Unpacking librust-num-threads-dev:ppc64el (0.1.7-1) ... 512s Selecting previously unselected package librust-postgres-derive-dev:ppc64el. 512s Preparing to unpack .../407-librust-postgres-derive-dev_0.4.5-1_ppc64el.deb ... 512s Unpacking librust-postgres-derive-dev:ppc64el (0.4.5-1) ... 512s Selecting previously unselected package librust-sha2-asm-dev:ppc64el. 512s Preparing to unpack .../408-librust-sha2-asm-dev_0.6.2-2_ppc64el.deb ... 512s Unpacking librust-sha2-asm-dev:ppc64el (0.6.2-2) ... 512s Selecting previously unselected package librust-sha2-dev:ppc64el. 512s Preparing to unpack .../409-librust-sha2-dev_0.10.8-1_ppc64el.deb ... 512s Unpacking librust-sha2-dev:ppc64el (0.10.8-1) ... 512s Selecting previously unselected package librust-unicode-bidi-dev:ppc64el. 512s Preparing to unpack .../410-librust-unicode-bidi-dev_0.3.13-1_ppc64el.deb ... 512s Unpacking librust-unicode-bidi-dev:ppc64el (0.3.13-1) ... 512s Selecting previously unselected package librust-unicode-normalization-dev:ppc64el. 512s Preparing to unpack .../411-librust-unicode-normalization-dev_0.1.22-1_ppc64el.deb ... 512s Unpacking librust-unicode-normalization-dev:ppc64el (0.1.22-1) ... 512s Selecting previously unselected package librust-stringprep-dev:ppc64el. 512s Preparing to unpack .../412-librust-stringprep-dev_0.1.2-1_ppc64el.deb ... 512s Unpacking librust-stringprep-dev:ppc64el (0.1.2-1) ... 512s Selecting previously unselected package librust-postgres-protocol-dev:ppc64el. 512s Preparing to unpack .../413-librust-postgres-protocol-dev_0.6.6-2_ppc64el.deb ... 512s Unpacking librust-postgres-protocol-dev:ppc64el (0.6.6-2) ... 512s Selecting previously unselected package librust-time-core-dev:ppc64el. 512s Preparing to unpack .../414-librust-time-core-dev_0.1.2-1_ppc64el.deb ... 512s Unpacking librust-time-core-dev:ppc64el (0.1.2-1) ... 512s Selecting previously unselected package librust-time-macros-dev:ppc64el. 512s Preparing to unpack .../415-librust-time-macros-dev_0.2.16-1_ppc64el.deb ... 512s Unpacking librust-time-macros-dev:ppc64el (0.2.16-1) ... 512s Selecting previously unselected package librust-time-dev:ppc64el. 512s Preparing to unpack .../416-librust-time-dev_0.3.36-2_ppc64el.deb ... 512s Unpacking librust-time-dev:ppc64el (0.3.36-2) ... 512s Selecting previously unselected package librust-postgres-types-dev:ppc64el. 512s Preparing to unpack .../417-librust-postgres-types-dev_0.2.6-2_ppc64el.deb ... 512s Unpacking librust-postgres-types-dev:ppc64el (0.2.6-2) ... 512s Selecting previously unselected package librust-rand-xorshift-dev:ppc64el. 512s Preparing to unpack .../418-librust-rand-xorshift-dev_0.3.0-2_ppc64el.deb ... 512s Unpacking librust-rand-xorshift-dev:ppc64el (0.3.0-2) ... 512s Selecting previously unselected package librust-quick-error-dev:ppc64el. 512s Preparing to unpack .../419-librust-quick-error-dev_2.0.1-1_ppc64el.deb ... 512s Unpacking librust-quick-error-dev:ppc64el (2.0.1-1) ... 512s Selecting previously unselected package librust-tempfile-dev:ppc64el. 512s Preparing to unpack .../420-librust-tempfile-dev_3.10.1-1_ppc64el.deb ... 512s Unpacking librust-tempfile-dev:ppc64el (3.10.1-1) ... 512s Selecting previously unselected package librust-rusty-fork-dev:ppc64el. 512s Preparing to unpack .../421-librust-rusty-fork-dev_0.3.0-1_ppc64el.deb ... 512s Unpacking librust-rusty-fork-dev:ppc64el (0.3.0-1) ... 512s Selecting previously unselected package librust-wait-timeout-dev:ppc64el. 512s Preparing to unpack .../422-librust-wait-timeout-dev_0.2.0-1_ppc64el.deb ... 512s Unpacking librust-wait-timeout-dev:ppc64el (0.2.0-1) ... 512s Selecting previously unselected package librust-rusty-fork+wait-timeout-dev:ppc64el. 512s Preparing to unpack .../423-librust-rusty-fork+wait-timeout-dev_0.3.0-1_ppc64el.deb ... 512s Unpacking librust-rusty-fork+wait-timeout-dev:ppc64el (0.3.0-1) ... 512s Selecting previously unselected package librust-unarray-dev:ppc64el. 512s Preparing to unpack .../424-librust-unarray-dev_0.1.4-1_ppc64el.deb ... 512s Unpacking librust-unarray-dev:ppc64el (0.1.4-1) ... 512s Selecting previously unselected package librust-proptest-dev:ppc64el. 512s Preparing to unpack .../425-librust-proptest-dev_1.5.0-2_ppc64el.deb ... 512s Unpacking librust-proptest-dev:ppc64el (1.5.0-2) ... 512s Selecting previously unselected package llvm-19-runtime. 512s Preparing to unpack .../426-llvm-19-runtime_1%3a19.1.2-1ubuntu1_ppc64el.deb ... 512s Unpacking llvm-19-runtime (1:19.1.2-1ubuntu1) ... 512s Selecting previously unselected package llvm-runtime:ppc64el. 512s Preparing to unpack .../427-llvm-runtime_1%3a19.0-60~exp1_ppc64el.deb ... 512s Unpacking llvm-runtime:ppc64el (1:19.0-60~exp1) ... 512s Selecting previously unselected package llvm-19-linker-tools. 512s Preparing to unpack .../428-llvm-19-linker-tools_1%3a19.1.2-1ubuntu1_ppc64el.deb ... 512s Unpacking llvm-19-linker-tools (1:19.1.2-1ubuntu1) ... 512s Selecting previously unselected package libpfm4:ppc64el. 512s Preparing to unpack .../429-libpfm4_4.13.0+git83-g91970fe-1_ppc64el.deb ... 512s Unpacking libpfm4:ppc64el (4.13.0+git83-g91970fe-1) ... 512s Selecting previously unselected package llvm-19. 512s Preparing to unpack .../430-llvm-19_1%3a19.1.2-1ubuntu1_ppc64el.deb ... 512s Unpacking llvm-19 (1:19.1.2-1ubuntu1) ... 513s Selecting previously unselected package llvm. 513s Preparing to unpack .../431-llvm_1%3a19.0-60~exp1_ppc64el.deb ... 513s Unpacking llvm (1:19.0-60~exp1) ... 513s Selecting previously unselected package binutils-mingw-w64-x86-64. 513s Preparing to unpack .../432-binutils-mingw-w64-x86-64_2.43.1-4ubuntu1+12_ppc64el.deb ... 513s Unpacking binutils-mingw-w64-x86-64 (2.43.1-4ubuntu1+12) ... 513s Selecting previously unselected package binutils-mingw-w64-i686. 513s Preparing to unpack .../433-binutils-mingw-w64-i686_2.43.1-4ubuntu1+12_ppc64el.deb ... 513s Unpacking binutils-mingw-w64-i686 (2.43.1-4ubuntu1+12) ... 513s Selecting previously unselected package librust-python3-dll-a-dev:ppc64el. 513s Preparing to unpack .../434-librust-python3-dll-a-dev_0.2.10-1_ppc64el.deb ... 513s Unpacking librust-python3-dll-a-dev:ppc64el (0.2.10-1) ... 513s Selecting previously unselected package librust-target-lexicon-dev:ppc64el. 513s Preparing to unpack .../435-librust-target-lexicon-dev_0.12.14-1_ppc64el.deb ... 513s Unpacking librust-target-lexicon-dev:ppc64el (0.12.14-1) ... 513s Selecting previously unselected package librust-pyo3-build-config-dev:ppc64el. 513s Preparing to unpack .../436-librust-pyo3-build-config-dev_0.22.6-1_ppc64el.deb ... 513s Unpacking librust-pyo3-build-config-dev:ppc64el (0.22.6-1) ... 513s Selecting previously unselected package python3.12-dev. 513s Preparing to unpack .../437-python3.12-dev_3.12.7-3_ppc64el.deb ... 513s Unpacking python3.12-dev (3.12.7-3) ... 513s Selecting previously unselected package librust-pyo3-ffi-dev:ppc64el. 513s Preparing to unpack .../438-librust-pyo3-ffi-dev_0.22.6-1build1_ppc64el.deb ... 513s Unpacking librust-pyo3-ffi-dev:ppc64el (0.22.6-1build1) ... 513s Selecting previously unselected package librust-pyo3-macros-backend-dev:ppc64el. 513s Preparing to unpack .../439-librust-pyo3-macros-backend-dev_0.22.6-1_ppc64el.deb ... 513s Unpacking librust-pyo3-macros-backend-dev:ppc64el (0.22.6-1) ... 514s Selecting previously unselected package librust-pyo3-macros-dev:ppc64el. 514s Preparing to unpack .../440-librust-pyo3-macros-dev_0.22.6-1_ppc64el.deb ... 514s Unpacking librust-pyo3-macros-dev:ppc64el (0.22.6-1) ... 514s Selecting previously unselected package librust-rust-decimal-dev:ppc64el. 514s Preparing to unpack .../441-librust-rust-decimal-dev_1.36.0-1_ppc64el.deb ... 514s Unpacking librust-rust-decimal-dev:ppc64el (1.36.0-1) ... 514s Selecting previously unselected package librust-unindent-dev:ppc64el. 514s Preparing to unpack .../442-librust-unindent-dev_0.2.3-1_ppc64el.deb ... 514s Unpacking librust-unindent-dev:ppc64el (0.2.3-1) ... 514s Selecting previously unselected package librust-pyo3-dev:ppc64el. 514s Preparing to unpack .../443-librust-pyo3-dev_0.22.6-1_ppc64el.deb ... 514s Unpacking librust-pyo3-dev:ppc64el (0.22.6-1) ... 514s Selecting previously unselected package librust-rustc-hash-dev:ppc64el. 514s Preparing to unpack .../444-librust-rustc-hash-dev_1.1.0-1_ppc64el.deb ... 514s Unpacking librust-rustc-hash-dev:ppc64el (1.1.0-1) ... 514s Selecting previously unselected package pybuild-plugin-autopkgtest. 514s Preparing to unpack .../445-pybuild-plugin-autopkgtest_6.20241024_all.deb ... 514s Unpacking pybuild-plugin-autopkgtest (6.20241024) ... 514s Selecting previously unselected package python3-packaging. 514s Preparing to unpack .../446-python3-packaging_24.2-1_all.deb ... 514s Unpacking python3-packaging (24.2-1) ... 514s Selecting previously unselected package python3-pyproject-hooks. 514s Preparing to unpack .../447-python3-pyproject-hooks_1.2.0-1_all.deb ... 514s Unpacking python3-pyproject-hooks (1.2.0-1) ... 514s Selecting previously unselected package python3-toml. 514s Preparing to unpack .../448-python3-toml_0.10.2-1_all.deb ... 514s Unpacking python3-toml (0.10.2-1) ... 514s Selecting previously unselected package python3-wheel. 514s Preparing to unpack .../449-python3-wheel_0.45.1-1_all.deb ... 514s Unpacking python3-wheel (0.45.1-1) ... 514s Selecting previously unselected package python3-build. 514s Preparing to unpack .../450-python3-build_1.2.2-1_all.deb ... 514s Unpacking python3-build (1.2.2-1) ... 514s Selecting previously unselected package python3-installer. 514s Preparing to unpack .../451-python3-installer_0.7.0+dfsg1-3_all.deb ... 514s Unpacking python3-installer (0.7.0+dfsg1-3) ... 514s Selecting previously unselected package pybuild-plugin-pyproject. 514s Preparing to unpack .../452-pybuild-plugin-pyproject_6.20241024_all.deb ... 514s Unpacking pybuild-plugin-pyproject (6.20241024) ... 514s Selecting previously unselected package python3-all. 514s Preparing to unpack .../453-python3-all_3.12.6-0ubuntu1_ppc64el.deb ... 514s Unpacking python3-all (3.12.6-0ubuntu1) ... 514s Selecting previously unselected package python3-dateutil. 514s Preparing to unpack .../454-python3-dateutil_2.9.0-3_all.deb ... 514s Unpacking python3-dateutil (2.9.0-3) ... 514s Selecting previously unselected package python3-sortedcontainers. 514s Preparing to unpack .../455-python3-sortedcontainers_2.4.0-2_all.deb ... 514s Unpacking python3-sortedcontainers (2.4.0-2) ... 514s Selecting previously unselected package python3-hypothesis. 514s Preparing to unpack .../456-python3-hypothesis_6.119.3-1_all.deb ... 514s Unpacking python3-hypothesis (6.119.3-1) ... 514s Selecting previously unselected package python3-iniconfig. 514s Preparing to unpack .../457-python3-iniconfig_1.1.1-2_all.deb ... 514s Unpacking python3-iniconfig (1.1.1-2) ... 514s Selecting previously unselected package python3-pluggy. 514s Preparing to unpack .../458-python3-pluggy_1.5.0-1_all.deb ... 514s Unpacking python3-pluggy (1.5.0-1) ... 514s Selecting previously unselected package python3-pytest. 514s Preparing to unpack .../459-python3-pytest_8.3.3-1_all.deb ... 514s Unpacking python3-pytest (8.3.3-1) ... 514s Selecting previously unselected package python3-regex. 514s Preparing to unpack .../460-python3-regex_0.1.20240724-1build1_ppc64el.deb ... 514s Unpacking python3-regex (0.1.20240724-1build1) ... 514s Selecting previously unselected package python3-semantic-version. 514s Preparing to unpack .../461-python3-semantic-version_2.10.0-2_all.deb ... 514s Unpacking python3-semantic-version (2.10.0-2) ... 514s Selecting previously unselected package rustc. 514s Preparing to unpack .../462-rustc_1.80.1ubuntu2_ppc64el.deb ... 514s Unpacking rustc (1.80.1ubuntu2) ... 514s Selecting previously unselected package cargo. 514s Preparing to unpack .../463-cargo_1.80.1ubuntu2_ppc64el.deb ... 514s Unpacking cargo (1.80.1ubuntu2) ... 514s Selecting previously unselected package python3-setuptools-rust. 514s Preparing to unpack .../464-python3-setuptools-rust_1.9.0+dfsg-2_all.deb ... 514s Unpacking python3-setuptools-rust (1.9.0+dfsg-2) ... 514s Selecting previously unselected package python3-tiktoken. 514s Preparing to unpack .../465-python3-tiktoken_0.8.0-1build1_ppc64el.deb ... 514s Unpacking python3-tiktoken (0.8.0-1build1) ... 514s Selecting previously unselected package autopkgtest-satdep. 514s Preparing to unpack .../466-1-autopkgtest-satdep.deb ... 514s Unpacking autopkgtest-satdep (0) ... 514s Setting up dh-python (6.20241024) ... 515s Setting up librust-ciborium-io-dev:ppc64el (0.2.2-1) ... 515s Setting up librust-crossbeam-utils-dev:ppc64el (0.8.19-1) ... 515s Setting up librust-parking-dev:ppc64el (2.2.0-1) ... 515s Setting up librust-ppv-lite86-dev:ppc64el (0.2.16-1) ... 515s Setting up python3-iniconfig (1.1.1-2) ... 515s Setting up libsharpyuv0:ppc64el (1.4.0-0.1) ... 515s Setting up librust-pin-utils-dev:ppc64el (0.1.0-1) ... 515s Setting up librust-fnv-dev:ppc64el (1.0.7-1) ... 515s Setting up librust-unindent-dev:ppc64el (0.2.3-1) ... 515s Setting up librust-quick-error-dev:ppc64el (2.0.1-1) ... 515s Setting up librust-traitobject-dev:ppc64el (0.1.0-1) ... 515s Setting up librust-either-dev:ppc64el (1.13.0-1) ... 515s Setting up binutils-mingw-w64-x86-64 (2.43.1-4ubuntu1+12) ... 515s Setting up librust-adler-dev:ppc64el (1.0.2-2) ... 515s Setting up librust-version-check-dev:ppc64el (0.9.5-1) ... 515s Setting up librust-base64-dev:ppc64el (0.21.7-1) ... 515s Setting up librust-indoc-dev:ppc64el (2.0.5-1) ... 515s Setting up librust-anstyle-dev:ppc64el (1.0.8-1) ... 515s Setting up librust-winapi-i686-pc-windows-gnu-dev:ppc64el (0.4.0-1) ... 515s Setting up librust-futures-task-dev:ppc64el (0.3.30-1) ... 515s Setting up librust-rustc-hash-dev:ppc64el (1.1.0-1) ... 515s Setting up librust-wasm-bindgen-shared-dev:ppc64el (0.2.87-1) ... 515s Setting up libarchive-zip-perl (1.68-1) ... 515s Setting up librust-colorchoice-dev:ppc64el (1.0.0-1) ... 515s Setting up librust-fastrand-dev:ppc64el (2.1.1-1) ... 515s Setting up libdebhelper-perl (13.20ubuntu1) ... 515s Setting up librust-unsafe-any-dev:ppc64el (0.4.2-2) ... 515s Setting up librust-tinyvec-macros-dev:ppc64el (0.1.0-1) ... 515s Setting up librust-libm-dev:ppc64el (0.2.8-1) ... 515s Setting up librust-strsim-dev:ppc64el (0.11.1-1) ... 515s Setting up libwebpdecoder3:ppc64el (1.4.0-0.1) ... 515s Setting up m4 (1.4.19-4build1) ... 515s Setting up librust-rustc-demangle-dev:ppc64el (0.1.21-1) ... 515s Setting up python3-all (3.12.6-0ubuntu1) ... 515s Setting up librust-const-cstr-dev:ppc64el (0.3.0-1) ... 515s Setting up librust-fallible-iterator-dev:ppc64el (0.3.0-2) ... 515s Setting up librust-ryu-dev:ppc64el (1.0.15-1) ... 515s Setting up python3-sortedcontainers (2.4.0-2) ... 515s Setting up librust-humantime-dev:ppc64el (2.1.0-1) ... 515s Setting up librust-anstyle-query-dev:ppc64el (1.0.0-1) ... 515s Setting up librust-cast-dev:ppc64el (0.3.0-1) ... 515s Setting up libgomp1:ppc64el (14.2.0-8ubuntu1) ... 515s Setting up librust-subtle-dev:ppc64el (2.6.1-1) ... 515s Setting up librust-simdutf8-dev:ppc64el (0.1.4-4) ... 515s Setting up librust-atomic-waker-dev:ppc64el (1.1.2-1) ... 515s Setting up librust-miniz-oxide-dev:ppc64el (0.7.1-1) ... 515s Setting up librust-pin-project-lite-dev:ppc64el (0.2.13-1) ... 515s Setting up python3-wheel (0.45.1-1) ... 515s Setting up librust-unicode-segmentation-dev:ppc64el (1.11.0-1) ... 515s Setting up librust-typemap-dev:ppc64el (0.3.3-2) ... 515s Setting up librust-compiler-builtins-dev:ppc64el (0.1.101-1) ... 515s Setting up librust-weezl-dev:ppc64el (0.1.5-1) ... 515s Setting up librust-utf8parse-dev:ppc64el (0.2.1-1) ... 515s Setting up librust-crossbeam-epoch-dev:ppc64el (0.9.18-1) ... 515s Setting up autotools-dev (20220109.1) ... 515s Setting up librust-tap-dev:ppc64el (1.0.1-1) ... 515s Setting up python3-packaging (24.2-1) ... 515s Setting up librust-array-init-dev:ppc64el (2.0.1-1) ... 515s Setting up libpkgconf3:ppc64el (1.8.1-4) ... 515s Setting up libpfm4:ppc64el (4.13.0+git83-g91970fe-1) ... 515s Setting up librust-oorandom-dev:ppc64el (11.1.3-1) ... 515s Setting up libexpat1-dev:ppc64el (2.6.4-1) ... 515s Setting up python3-pyproject-hooks (1.2.0-1) ... 515s Setting up librust-rustc-std-workspace-core-dev:ppc64el (1.0.0-1) ... 515s Setting up librust-funty-dev:ppc64el (2.0.0-1) ... 515s Setting up librust-futures-io-dev:ppc64el (0.3.31-1) ... 515s Setting up librust-typenum-dev:ppc64el (1.17.0-2) ... 515s Setting up uuid-dev:ppc64el (2.40.2-1ubuntu1) ... 515s Setting up librust-core-maths-dev:ppc64el (0.1.0-2) ... 515s Setting up librust-stable-deref-trait-dev:ppc64el (1.2.0-1) ... 515s Setting up librust-critical-section-dev:ppc64el (1.1.3-1) ... 515s Setting up libquadmath0:ppc64el (14.2.0-8ubuntu1) ... 515s Setting up librust-scopeguard-dev:ppc64el (1.2.0-1) ... 515s Setting up librust-iana-time-zone-dev:ppc64el (0.1.60-1) ... 515s Setting up fonts-dejavu-mono (2.37-8) ... 515s Setting up libmpc3:ppc64el (1.3.1-1build2) ... 515s Setting up librust-rand-core-dev:ppc64el (0.6.4-2) ... 515s Setting up python3-semantic-version (2.10.0-2) ... 515s Setting up autopoint (0.22.5-2) ... 515s Setting up libjsoncpp25:ppc64el (1.9.5-6build1) ... 515s Setting up fonts-dejavu-core (2.37-8) ... 515s Setting up librust-seahash-dev:ppc64el (4.1.0-1) ... 515s Setting up pkgconf-bin (1.8.1-4) ... 515s Setting up librust-ab-glyph-rasterizer-dev:ppc64el (0.1.7-1) ... 515s Setting up binutils-mingw-w64-i686 (2.43.1-4ubuntu1+12) ... 515s Setting up librust-time-core-dev:ppc64el (0.1.2-1) ... 515s Setting up python3-regex (0.1.20240724-1build1) ... 516s Setting up librust-crunchy-dev:ppc64el (0.2.2-1) ... 516s Setting up python3-toml (0.10.2-1) ... 516s Setting up librust-unicase-dev:ppc64el (2.7.0-1) ... 516s Setting up librust-unicode-width-dev:ppc64el (0.1.14-1) ... 516s Setting up python3-installer (0.7.0+dfsg1-3) ... 516s Setting up autoconf (2.72-3) ... 516s Setting up python3-pluggy (1.5.0-1) ... 516s Setting up libwebp7:ppc64el (1.4.0-0.1) ... 516s Setting up libubsan1:ppc64el (14.2.0-8ubuntu1) ... 516s Setting up zlib1g-dev:ppc64el (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 516s Setting up librust-unicode-ident-dev:ppc64el (1.0.13-1) ... 516s Setting up librust-equivalent-dev:ppc64el (1.0.1-1) ... 516s Setting up dwz (0.15-1build6) ... 516s Setting up librust-bitflags-1-dev:ppc64el (1.3.2-5) ... 516s Setting up librust-uncased-dev:ppc64el (0.9.6-2) ... 516s Setting up librust-slog-dev:ppc64el (2.7.0-1) ... 516s Setting up python3-tiktoken (0.8.0-1build1) ... 516s Setting up librust-pure-rust-locales-dev:ppc64el (0.8.1-1) ... 516s Setting up librhash0:ppc64el (1.4.3-3build1) ... 516s Setting up libasan8:ppc64el (14.2.0-8ubuntu1) ... 516s Setting up librust-ttf-parser-dev:ppc64el (0.24.1-1) ... 516s Setting up librust-cfg-if-dev:ppc64el (1.0.0-1) ... 516s Setting up debugedit (1:5.1-1) ... 516s Setting up librust-color-quant-dev:ppc64el (1.1.0-1) ... 516s Setting up python3-dateutil (2.9.0-3) ... 516s Setting up librust-blobby-dev:ppc64el (0.3.1-1) ... 516s Setting up cmake-data (3.30.3-1) ... 516s Setting up llvm-19-linker-tools (1:19.1.2-1ubuntu1) ... 516s Setting up librust-byteorder-dev:ppc64el (1.5.0-1) ... 516s Setting up libtsan2:ppc64el (14.2.0-8ubuntu1) ... 516s Setting up librust-static-assertions-dev:ppc64el (1.1.0-1) ... 516s Setting up librust-compiler-builtins+core-dev:ppc64el (0.1.101-1) ... 516s Setting up librust-float-ord-dev:ppc64el (0.3.2-1) ... 516s Setting up librust-autocfg-dev:ppc64el (1.1.0-1) ... 516s Setting up libisl23:ppc64el (0.27-1) ... 516s Setting up librust-time-macros-dev:ppc64el (0.2.16-1) ... 516s Setting up llvm-19-runtime (1:19.1.2-1ubuntu1) ... 516s Setting up librust-futures-sink-dev:ppc64el (0.3.31-1) ... 516s Setting up python3-build (1.2.2-1) ... 517s Setting up libsharpyuv-dev:ppc64el (1.4.0-0.1) ... 517s Setting up librust-cfg-if-0.1-dev:ppc64el (0.1.10-2) ... 517s Setting up librust-tinyvec-dev:ppc64el (1.6.0-2) ... 517s Setting up libwebpmux3:ppc64el (1.4.0-0.1) ... 517s Setting up librust-plotters-backend-dev:ppc64el (0.3.7-1) ... 517s Setting up librust-shlex-dev:ppc64el (1.3.0-1) ... 517s Setting up librust-indenter-dev:ppc64el (0.3.3-1) ... 517s Setting up librust-cpp-demangle-dev:ppc64el (0.4.0-1) ... 517s Setting up librust-winapi-x86-64-pc-windows-gnu-dev:ppc64el (0.4.0-1) ... 517s Setting up libcc1-0:ppc64el (14.2.0-8ubuntu1) ... 517s Setting up libbrotli-dev:ppc64el (1.1.0-2build3) ... 517s Setting up liblsan0:ppc64el (14.2.0-8ubuntu1) ... 517s Setting up libitm1:ppc64el (14.2.0-8ubuntu1) ... 517s Setting up librust-clap-lex-dev:ppc64el (0.7.2-2) ... 517s Setting up libhttp-parser2.9:ppc64el (2.9.4-6build1) ... 517s Setting up librust-unarray-dev:ppc64el (0.1.4-1) ... 517s Setting up libstd-rust-1.80:ppc64el (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 517s Setting up librust-itertools-dev:ppc64el (0.10.5-1) ... 517s Setting up librust-heck-dev:ppc64el (0.4.1-1) ... 517s Setting up libbz2-dev:ppc64el (1.0.8-6) ... 517s Setting up librust-num-conv-dev:ppc64el (0.1.0-1) ... 517s Setting up automake (1:1.16.5-1.3ubuntu1) ... 517s update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode 517s Setting up libfile-stripnondeterminism-perl (1.14.0-1) ... 517s Setting up librust-owned-ttf-parser-dev:ppc64el (0.24.0-1) ... 517s Setting up librust-crossbeam-epoch+std-dev:ppc64el (0.9.18-1) ... 517s Setting up librust-libc-dev:ppc64el (0.2.161-1) ... 517s Setting up librust-is-terminal-dev:ppc64el (0.4.13-1) ... 517s Setting up gettext (0.22.5-2) ... 517s Setting up librust-gif-dev:ppc64el (0.11.3-1) ... 517s Setting up librust-crossbeam-deque-dev:ppc64el (0.8.5-1) ... 517s Setting up librust-tiny-keccak-dev:ppc64el (2.0.2-1) ... 517s Setting up librust-linux-raw-sys-dev:ppc64el (0.4.14-1) ... 517s Setting up pybuild-plugin-pyproject (6.20241024) ... 517s Setting up fontconfig-config (2.15.0-1.1ubuntu2) ... 517s Setting up librust-getrandom-dev:ppc64el (0.2.12-1) ... 517s Setting up python3-pytest (8.3.3-1) ... 517s Setting up librust-libloading-dev:ppc64el (0.8.5-1) ... 517s Setting up librust-socket2-dev:ppc64el (0.5.7-1) ... 517s Setting up librust-memmap2-dev:ppc64el (0.9.3-1) ... 517s Setting up libwebpdemux2:ppc64el (1.4.0-0.1) ... 517s Setting up python3-hypothesis (6.119.3-1) ... 518s Setting up librust-ab-glyph-rasterizer+libm-dev:ppc64el (0.1.7-1) ... 518s Setting up libpng-dev:ppc64el (1.6.44-2) ... 518s Setting up librust-tinyvec+tinyvec-macros-dev:ppc64el (1.6.0-2) ... 518s Setting up librust-owning-ref-dev:ppc64el (0.4.1-1) ... 518s Setting up librust-num-cpus-dev:ppc64el (1.16.0-1) ... 518s Setting up librust-memoffset-dev:ppc64el (0.8.0-1) ... 518s Setting up librust-cpufeatures-dev:ppc64el (0.2.11-1) ... 518s Setting up libpython3.12-dev:ppc64el (3.12.7-3) ... 518s Setting up librust-proc-macro2-dev:ppc64el (1.0.86-1) ... 518s Setting up librust-compiler-builtins+rustc-dep-of-std-dev:ppc64el (0.1.101-1) ... 518s Setting up librust-rayon-core-dev:ppc64el (1.12.1-1) ... 518s Setting up librust-winapi-dev:ppc64el (0.3.9-1) ... 518s Setting up pkgconf:ppc64el (1.8.1-4) ... 518s Setting up librust-ab-glyph-dev:ppc64el (0.2.28-1) ... 518s Setting up libstd-rust-1.80-dev:ppc64el (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 518s Setting up libfreetype-dev:ppc64el (2.13.3+dfsg-1) ... 518s Setting up intltool-debian (0.35.0+20060710.6) ... 518s Setting up librust-rand-core+getrandom-dev:ppc64el (0.6.4-2) ... 518s Setting up librust-rand-xorshift-dev:ppc64el (0.3.0-2) ... 518s Setting up librust-signal-hook-registry-dev:ppc64el (1.4.0-1) ... 518s Setting up libwebp-dev:ppc64el (1.4.0-0.1) ... 518s Setting up librust-errno-dev:ppc64el (0.3.8-1) ... 518s Setting up librust-anes-dev:ppc64el (0.1.6-1) ... 518s Setting up llvm-runtime:ppc64el (1:19.0-60~exp1) ... 518s Setting up python3.12-dev (3.12.7-3) ... 518s Setting up librust-jobserver-dev:ppc64el (0.1.32-1) ... 518s Setting up pkg-config:ppc64el (1.8.1-4) ... 518s Setting up cpp-14-powerpc64le-linux-gnu (14.2.0-8ubuntu1) ... 518s Setting up cpp-14 (14.2.0-8ubuntu1) ... 518s Setting up dh-strip-nondeterminism (1.14.0-1) ... 518s Setting up librust-crc32fast-dev:ppc64el (1.4.2-1) ... 518s Setting up librust-num-traits-dev:ppc64el (0.2.19-2) ... 518s Setting up librust-winapi-util-dev:ppc64el (0.1.6-1) ... 518s Setting up librust-wait-timeout-dev:ppc64el (0.2.0-1) ... 518s Setting up cmake (3.30.3-1) ... 518s Setting up libgit2-1.7:ppc64el (1.7.2+ds-1ubuntu3) ... 518s Setting up llvm-19 (1:19.1.2-1ubuntu1) ... 518s Setting up libfontconfig1:ppc64el (2.15.0-1.1ubuntu2) ... 518s Setting up libgcc-14-dev:ppc64el (14.2.0-8ubuntu1) ... 518s Setting up librust-same-file-dev:ppc64el (1.0.6-1) ... 518s Setting up librust-rayon-dev:ppc64el (1.10.0-1) ... 518s Setting up librust-termcolor-dev:ppc64el (1.4.1-1) ... 518s Setting up librust-pkg-config-dev:ppc64el (0.3.27-1) ... 518s Setting up libstdc++-14-dev:ppc64el (14.2.0-8ubuntu1) ... 518s Setting up cpp-powerpc64le-linux-gnu (4:14.1.0-2ubuntu1) ... 518s Setting up gcc-14-powerpc64le-linux-gnu (14.2.0-8ubuntu1) ... 518s Setting up librust-jpeg-decoder-dev:ppc64el (0.3.0-1) ... 518s Setting up librust-dirs-sys-next-dev:ppc64el (0.1.1-1) ... 518s Setting up librust-num-integer-dev:ppc64el (0.1.46-1) ... 518s Setting up librust-dirs-next-dev:ppc64el (2.0.0-1) ... 518s Setting up librust-num-threads-dev:ppc64el (0.1.7-1) ... 518s Setting up libpython3-dev:ppc64el (3.12.6-0ubuntu1) ... 518s Setting up librust-dlib-dev:ppc64el (0.5.2-2) ... 518s Setting up g++-14-powerpc64le-linux-gnu (14.2.0-8ubuntu1) ... 518s Setting up libfontconfig-dev:ppc64el (2.15.0-1.1ubuntu2) ... 518s Setting up librust-libwebp-sys-dev:ppc64el (0.9.5-1build1) ... 518s Setting up po-debconf (1.0.21+nmu1) ... 518s Setting up librust-quote-dev:ppc64el (1.0.37-1) ... 518s Setting up librust-libz-sys-dev:ppc64el (1.1.20-1) ... 518s Setting up librust-syn-dev:ppc64el (2.0.85-1) ... 518s Setting up librust-rand-core+std-dev:ppc64el (0.6.4-2) ... 518s Setting up librust-powerfmt-macros-dev:ppc64el (0.1.0-1) ... 518s Setting up gcc-14 (14.2.0-8ubuntu1) ... 518s Setting up librust-powerfmt-dev:ppc64el (0.2.0-1) ... 518s Setting up gcc-powerpc64le-linux-gnu (4:14.1.0-2ubuntu1) ... 518s Setting up librust-sval-derive-dev:ppc64el (2.6.1-2) ... 518s Setting up libpython3-all-dev:ppc64el (3.12.6-0ubuntu1) ... 518s Setting up librust-cc-dev:ppc64el (1.1.14-1) ... 518s Setting up librust-zeroize-derive-dev:ppc64el (1.4.2-1) ... 518s Setting up llvm (1:19.0-60~exp1) ... 518s Setting up librust-postgres-derive-dev:ppc64el (0.4.5-1) ... 518s Setting up librust-syn-1-dev:ppc64el (1.0.109-2) ... 518s Setting up librust-clap-derive-dev:ppc64el (4.5.13-2) ... 518s Setting up librust-bytecheck-derive-dev:ppc64el (0.6.12-1) ... 518s Setting up librust-no-panic-dev:ppc64el (0.1.13-1) ... 518s Setting up cpp (4:14.1.0-2ubuntu1) ... 518s Setting up librust-serde-derive-dev:ppc64el (1.0.210-1) ... 518s Setting up librust-walkdir-dev:ppc64el (2.5.0-1) ... 518s Setting up librust-zerocopy-derive-dev:ppc64el (0.7.32-2) ... 518s Setting up librust-sha1-asm-dev:ppc64el (0.5.1-2) ... 518s Setting up g++-14 (14.2.0-8ubuntu1) ... 518s Setting up librust-valuable-derive-dev:ppc64el (0.1.0-1) ... 518s Setting up librust-ghost-dev:ppc64el (0.1.5-1) ... 518s Setting up librust-serde-dev:ppc64el (1.0.210-2) ... 518s Setting up librust-bytemuck-derive-dev:ppc64el (1.5.0-2) ... 518s Setting up librust-derive-arbitrary-dev:ppc64el (1.3.2-1) ... 518s Setting up librust-allocator-api2-dev:ppc64el (0.2.16-1) ... 518s Setting up g++-powerpc64le-linux-gnu (4:14.1.0-2ubuntu1) ... 518s Setting up librust-cmake-dev:ppc64el (0.1.45-1) ... 518s Setting up librust-async-attributes-dev (1.1.2-6) ... 518s Setting up librust-rand-chacha-dev:ppc64el (0.3.1-2) ... 518s Setting up librust-futures-macro-dev:ppc64el (0.3.30-1) ... 518s Setting up librust-ctor-dev:ppc64el (0.1.26-1) ... 518s Setting up librust-unicode-bidi-dev:ppc64el (0.3.13-1) ... 518s Setting up librust-tracing-attributes-dev:ppc64el (0.1.27-1) ... 518s Setting up librust-ptr-meta-derive-dev:ppc64el (0.1.4-1) ... 518s Setting up librust-serde-fmt-dev (1.0.3-3) ... 518s Setting up libtool (2.4.7-8) ... 518s Setting up librust-sha2-asm-dev:ppc64el (0.6.2-2) ... 518s Setting up librust-portable-atomic-dev:ppc64el (1.9.0-4) ... 518s Setting up librust-tokio-macros-dev:ppc64el (2.4.0-2) ... 518s Setting up librust-flate2-dev:ppc64el (1.0.34-1) ... 518s Setting up librust-freetype-sys-dev:ppc64el (0.13.1-1) ... 518s Setting up librust-lock-api-dev:ppc64el (0.4.12-1) ... 518s Setting up librust-ptr-meta-dev:ppc64el (0.1.4-1) ... 518s Setting up librust-inventory-dev:ppc64el (0.3.2-1) ... 518s Setting up librust-sval-dev:ppc64el (2.6.1-2) ... 518s Setting up librust-itoa-dev:ppc64el (1.0.9-1) ... 518s Setting up gcc (4:14.1.0-2ubuntu1) ... 518s Setting up librust-bytes-dev:ppc64el (1.8.0-1) ... 518s Setting up librust-bumpalo-dev:ppc64el (3.16.0-1) ... 518s Setting up librust-python3-dll-a-dev:ppc64el (0.2.10-1) ... 518s Setting up librust-siphasher-dev:ppc64el (0.3.10-1) ... 518s Setting up rustc-1.80 (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 518s Setting up dh-autoreconf (20) ... 518s Setting up librust-rand-core+serde-dev:ppc64el (0.6.4-2) ... 518s Setting up librust-sval-ref-dev:ppc64el (2.6.1-1) ... 518s Setting up librust-rkyv-derive-dev:ppc64el (0.7.44-1) ... 518s Setting up librust-zerocopy-dev:ppc64el (0.7.32-1) ... 518s Setting up librust-md5-asm-dev:ppc64el (0.5.0-2) ... 518s Setting up librust-semver-dev:ppc64el (1.0.23-1) ... 518s Setting up librust-freetype-dev:ppc64el (0.7.0-4) ... 518s Setting up librust-bytemuck-dev:ppc64el (1.14.0-1) ... 518s Setting up librust-bit-vec-dev:ppc64el (0.6.3-1) ... 518s Setting up librust-zeroize-dev:ppc64el (1.8.1-1) ... 518s Setting up librust-slab-dev:ppc64el (0.4.9-1) ... 518s Setting up g++ (4:14.1.0-2ubuntu1) ... 518s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 518s Setting up rustc (1.80.1ubuntu2) ... 518s Setting up librust-arbitrary-dev:ppc64el (1.3.2-1) ... 518s Setting up librust-valuable-dev:ppc64el (0.1.0-4) ... 518s Setting up librust-target-lexicon-dev:ppc64el (0.12.14-1) ... 518s Setting up librust-serde-test-dev:ppc64el (1.0.171-1) ... 518s Setting up librust-bit-set-dev:ppc64el (0.5.2-1) ... 518s Setting up build-essential (12.10ubuntu1) ... 518s Setting up librust-concurrent-queue-dev:ppc64el (2.5.0-4) ... 518s Setting up cargo-1.80 (1.80.1+dfsg0ubuntu1-0ubuntu1) ... 518s Setting up librust-erased-serde-dev:ppc64el (0.3.31-1) ... 518s Setting up librust-radium-dev:ppc64el (1.1.0-1) ... 518s Setting up librust-bit-set+std-dev:ppc64el (0.5.2-1) ... 518s Setting up librust-phf-shared-dev:ppc64el (0.11.2-1) ... 518s Setting up librust-tiff-dev:ppc64el (0.9.0-1) ... 518s Setting up librust-smol-str-dev:ppc64el (0.2.0-1) ... 518s Setting up librust-atomic-dev:ppc64el (0.6.0-1) ... 518s Setting up librust-generic-array-dev:ppc64el (0.14.7-1) ... 518s Setting up librust-half-dev:ppc64el (1.8.2-4) ... 518s Setting up librust-phf-dev:ppc64el (0.11.2-1) ... 518s Setting up librust-spin-dev:ppc64el (0.9.8-4) ... 518s Setting up librust-sval-dynamic-dev:ppc64el (2.6.1-1) ... 518s Setting up librust-qoi-dev:ppc64el (0.4.1-2) ... 518s Setting up librust-async-task-dev (4.7.1-3) ... 518s Setting up librust-crypto-common-dev:ppc64el (0.1.6-1) ... 518s Setting up librust-ciborium-ll-dev:ppc64el (0.2.2-1) ... 518s Setting up librust-futures-core-dev:ppc64el (0.3.30-1) ... 518s Setting up librust-lazy-static-dev:ppc64el (1.5.0-1) ... 518s Setting up librust-sval-buffer-dev:ppc64el (2.6.1-1) ... 518s Setting up librust-arrayvec-dev:ppc64el (0.7.4-2) ... 518s Setting up librust-png-dev:ppc64el (0.17.7-3) ... 518s Setting up librust-rustc-version-dev:ppc64el (0.4.0-1) ... 518s Setting up librust-event-listener-dev (5.3.1-8) ... 518s Setting up debhelper (13.20ubuntu1) ... 518s Setting up librust-smallvec-dev:ppc64el (1.13.2-1) ... 518s Setting up librust-sval-fmt-dev:ppc64el (2.6.1-1) ... 518s Setting up librust-const-oid-dev:ppc64el (0.9.3-1) ... 518s Setting up librust-anstyle-parse-dev:ppc64el (0.2.1-1) ... 518s Setting up cargo (1.80.1ubuntu2) ... 518s Setting up librust-ciborium-dev:ppc64el (0.2.2-2) ... 518s Setting up librust-block-buffer-dev:ppc64el (0.10.2-2) ... 518s Setting up python3-setuptools-rust (1.9.0+dfsg-2) ... 518s Setting up librust-pathfinder-simd-dev:ppc64el (0.5.2-1) ... 518s Setting up librust-unicode-normalization-dev:ppc64el (0.1.22-1) ... 518s Setting up librust-anstream-dev:ppc64el (0.6.15-1) ... 518s Setting up librust-bitflags-dev:ppc64el (2.6.0-1) ... 518s Setting up librust-regex-syntax-dev:ppc64el (0.8.2-1) ... 518s Setting up librust-parking-lot-core-dev:ppc64el (0.9.10-1) ... 518s Setting up librust-futures-channel-dev:ppc64el (0.3.30-1) ... 518s Setting up librust-once-cell-dev:ppc64el (1.20.2-1) ... 518s Setting up librust-pyo3-build-config-dev:ppc64el (0.22.6-1) ... 518s Setting up librust-phf-shared+uncased-dev:ppc64el (0.11.2-1) ... 518s Setting up librust-digest-dev:ppc64el (0.10.7-2) ... 518s Setting up librust-md-5-dev:ppc64el (0.10.6-1) ... 518s Setting up librust-sval-serde-dev:ppc64el (2.6.1-1) ... 518s Setting up librust-parking-lot-dev:ppc64el (0.12.3-1) ... 518s Setting up librust-event-listener-strategy-dev:ppc64el (0.5.2-3) ... 518s Setting up librust-pyo3-macros-backend-dev:ppc64el (0.22.6-1) ... 518s Setting up librust-pyo3-ffi-dev:ppc64el (0.22.6-1build1) ... 518s Setting up pybuild-plugin-autopkgtest (6.20241024) ... 518s Setting up librust-const-random-macro-dev:ppc64el (0.1.16-2) ... 518s Setting up librust-const-random-dev:ppc64el (0.1.17-2) ... 518s Setting up librust-pyo3-macros-dev:ppc64el (0.22.6-1) ... 518s Setting up librust-sha1-dev:ppc64el (0.10.6-1) ... 518s Setting up librust-ahash-dev (0.8.11-8) ... 518s Setting up librust-async-channel-dev (2.3.1-8) ... 518s Setting up librust-stringprep-dev:ppc64el (0.1.2-1) ... 518s Setting up librust-tracing-core-dev:ppc64el (0.1.32-1) ... 518s Setting up librust-async-lock-dev (3.4.0-4) ... 518s Setting up librust-eyre-dev:ppc64el (0.6.12-1) ... 518s Setting up librust-yeslogic-fontconfig-sys-dev:ppc64el (3.0.1-1) ... 518s Setting up librust-sha2-dev:ppc64el (0.10.8-1) ... 518s Setting up librust-hmac-dev:ppc64el (0.12.1-1) ... 518s Setting up librust-rustix-dev:ppc64el (0.38.32-1) ... 518s Setting up librust-wyz-dev:ppc64el (0.5.1-1) ... 518s Setting up librust-bitvec-dev:ppc64el (1.0.1-1) ... 518s Setting up librust-phf+uncased-dev:ppc64el (0.11.2-1) ... 518s Setting up librust-value-bag-sval2-dev:ppc64el (1.9.0-1) ... 518s Setting up librust-tempfile-dev:ppc64el (3.10.1-1) ... 518s Setting up librust-eyre+default-dev:ppc64el (0.6.12-1) ... 518s Setting up librust-rusty-fork-dev:ppc64el (0.3.0-1) ... 518s Setting up librust-hashbrown-dev:ppc64el (0.14.5-5) ... 518s Setting up librust-rusty-fork+wait-timeout-dev:ppc64el (0.3.0-1) ... 518s Setting up librust-terminal-size-dev:ppc64el (0.3.0-2) ... 518s Setting up librust-indexmap-dev:ppc64el (2.2.6-1) ... 518s Setting up librust-gimli-dev:ppc64el (0.28.1-2) ... 518s Setting up librust-webp-dev:ppc64el (0.2.6-1) ... 518s Setting up librust-memchr-dev:ppc64el (2.7.4-1) ... 518s Setting up librust-futures-util-dev:ppc64el (0.3.30-2) ... 518s Setting up librust-csv-core-dev:ppc64el (0.1.11-1) ... 518s Setting up librust-futures-lite-dev:ppc64el (2.3.0-2) ... 518s Setting up librust-csv-dev:ppc64el (1.3.0-1) ... 518s Setting up librust-serde-json-dev:ppc64el (1.0.128-1) ... 518s Setting up librust-async-executor-dev (1.13.1-1) ... 518s Setting up librust-futures-executor-dev:ppc64el (0.3.30-1) ... 518s Setting up librust-value-bag-serde1-dev:ppc64el (1.9.0-1) ... 518s Setting up librust-tinytemplate-dev:ppc64el (1.2.1-1) ... 518s Setting up librust-futures-dev:ppc64el (0.3.30-2) ... 518s Setting up librust-value-bag-dev:ppc64el (1.9.0-1) ... 518s Setting up librust-log-dev:ppc64el (0.4.22-1) ... 518s Setting up librust-kv-log-macro-dev (1.0.8-4) ... 518s Setting up librust-pathfinder-geometry-dev:ppc64el (0.5.1-1) ... 518s Setting up librust-tracing-dev:ppc64el (0.1.40-1) ... 518s Setting up librust-polling-dev:ppc64el (3.4.0-1) ... 518s Setting up librust-aho-corasick-dev:ppc64el (1.1.3-1) ... 518s Setting up librust-font-kit-dev:ppc64el (0.11.0-2) ... 518s Setting up librust-async-io-dev:ppc64el (2.3.3-4) ... 518s Setting up librust-blocking-dev (1.6.1-5) ... 518s Setting up librust-async-net-dev (2.0.0-4) ... 518s Setting up librust-rand-dev:ppc64el (0.8.5-1) ... 518s Setting up librust-mio-dev:ppc64el (1.0.2-2) ... 518s Setting up librust-wasm-bindgen-backend-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-twox-hash-dev:ppc64el (1.6.3-1) ... 518s Setting up librust-proptest-dev:ppc64el (1.5.0-2) ... 518s Setting up librust-wasm-bindgen-macro-support-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-regex-automata-dev:ppc64el (0.4.7-1) ... 518s Setting up librust-wasm-bindgen-macro-support+spans-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-wasm-bindgen-macro-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-uuid-dev:ppc64el (1.10.0-1) ... 518s Setting up librust-bstr-dev:ppc64el (1.7.0-2build1) ... 518s Setting up librust-async-signal-dev:ppc64el (0.2.10-1) ... 518s Setting up librust-bytecheck-dev:ppc64el (0.6.12-1) ... 518s Setting up librust-postgres-protocol-dev:ppc64el (0.6.6-2) ... 518s Setting up librust-async-fs-dev (2.1.2-4) ... 518s Setting up librust-wasm-bindgen-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-convert-case-dev:ppc64el (0.6.0-2) ... 518s Setting up librust-regex-dev:ppc64el (1.10.6-1) ... 518s Setting up librust-fancy-regex-dev:ppc64el (0.11.0-2) ... 518s Setting up librust-async-process-dev (2.3.0-1) ... 518s Setting up librust-derive-more-dev:ppc64el (0.99.17-1) ... 518s Setting up librust-wasm-bindgen-macro+spans-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-ruzstd-dev:ppc64el (0.5.0-1) ... 518s Setting up librust-rend-dev:ppc64el (0.4.0-1) ... 518s Setting up librust-env-logger-dev:ppc64el (0.10.2-2) ... 518s Setting up librust-wasm-bindgen+spans-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-wasm-bindgen+default-dev:ppc64el (0.2.87-1) ... 518s Setting up librust-rkyv-dev:ppc64el (0.7.44-1) ... 518s Setting up librust-eui48-dev:ppc64el (1.1.0-2) ... 518s Setting up librust-parse-zoneinfo-dev:ppc64el (0.3.0-1) ... 518s Setting up librust-smol-dev (2.0.2-1) ... 518s Setting up librust-js-sys-dev:ppc64el (0.3.64-1) ... 518s Setting up librust-num-complex-dev:ppc64el (0.4.6-2) ... 518s Setting up librust-object-dev:ppc64el (0.32.2-1) ... 518s Setting up librust-approx-dev:ppc64el (0.5.1-1) ... 518s Setting up librust-web-sys-dev:ppc64el (0.3.64-2) ... 518s Setting up librust-quickcheck-dev:ppc64el (1.0.3-3) ... 518s Setting up librust-geo-types-dev:ppc64el (0.7.11-2) ... 518s Setting up librust-deranged-dev:ppc64el (0.3.11-1) ... 518s Setting up librust-num-bigint-dev:ppc64el (0.4.6-1) ... 518s Setting up librust-addr2line-dev:ppc64el (0.21.0-2) ... 518s Setting up librust-num-rational-dev:ppc64el (0.4.2-1) ... 518s Setting up librust-chrono-dev:ppc64el (0.4.38-2) ... 518s Setting up librust-image-dev:ppc64el (0.24.7-2) ... 518s Setting up librust-time-dev:ppc64el (0.3.36-2) ... 518s Setting up librust-plotters-bitmap-dev:ppc64el (0.3.3-3) ... 518s Setting up librust-backtrace-dev:ppc64el (0.3.69-2) ... 518s Setting up librust-postgres-types-dev:ppc64el (0.2.6-2) ... 518s Setting up librust-tokio-dev:ppc64el (1.39.3-3) ... 518s Setting up librust-async-global-executor-dev:ppc64el (2.4.1-5) ... 518s Setting up librust-plotters-svg-dev:ppc64el (0.3.5-1) ... 518s Setting up librust-clap-builder-dev:ppc64el (4.5.15-2) ... 518s Setting up librust-rust-decimal-dev:ppc64el (1.36.0-1) ... 518s Setting up librust-clap-dev:ppc64el (4.5.16-1) ... 518s Setting up librust-async-std-dev (1.13.0-1) ... 518s Setting up librust-anyhow-dev:ppc64el (1.0.86-1) ... 518s Setting up librust-plotters-dev:ppc64el (0.3.5-4) ... 518s Setting up librust-criterion-dev (0.5.1-6) ... 518s Setting up librust-phf-generator-dev:ppc64el (0.11.2-2) ... 518s Setting up librust-phf-codegen-dev:ppc64el (0.11.2-1) ... 518s Setting up librust-chrono-tz-build-dev:ppc64el (0.2.1-1) ... 518s Setting up librust-chrono-tz-dev:ppc64el (0.8.6-2) ... 518s Setting up librust-pyo3-dev:ppc64el (0.22.6-1) ... 518s Setting up autopkgtest-satdep (0) ... 518s Processing triggers for libc-bin (2.40-1ubuntu3) ... 518s Processing triggers for systemd (256.5-2ubuntu4) ... 519s Processing triggers for man-db (2.13.0-1) ... 521s Processing triggers for install-info (7.1.1-1) ... 533s (Reading database ... 99526 files and directories currently installed.) 533s Removing autopkgtest-satdep (0) ... 534s autopkgtest [09:53:45]: test pybuild-autopkgtest: pybuild-autopkgtest 534s autopkgtest [09:53:45]: test pybuild-autopkgtest: [----------------------- 534s pybuild-autopkgtest 534s I: pybuild base:311: cd /tmp/autopkgtest.hWvff3/autopkgtest_tmp/build; python3.12 -m pytest tests 535s ============================= test session starts ============================== 535s platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 535s rootdir: /tmp/autopkgtest.hWvff3/autopkgtest_tmp/build 535s configfile: pyproject.toml 535s plugins: hypothesis-6.119.3, typeguard-4.4.1 535s collected 30 items 535s 1097s tests/test_encoding.py FFFFFFFFFFFFFFFFFFFFFF [ 73%] 1097s tests/test_misc.py F. [ 80%] 1100s tests/test_offsets.py FF [ 86%] 1101s tests/test_pickle.py F [ 90%] 1104s tests/test_simple_public.py FF. [100%] 1104s 1104s =================================== FAILURES =================================== 1104s _________________________________ test_simple __________________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/gpt-2/encodings/main/vocab.bpe', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_simple(): 1104s > enc = tiktoken.get_encoding("gpt2") 1104s 1104s tests/test_encoding.py:15: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:18: in gpt2 1104s mergeable_ranks = data_gym_to_mergeable_bpe_ranks( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:103: in data_gym_to_mergeable_bpe_ranks 1104s vocab_bpe_contents = read_file_cached(vocab_bpe_file, vocab_bpe_hash).decode() 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _____________________________ test_simple_repeated _____________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/gpt-2/encodings/main/vocab.bpe', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_simple_repeated(): 1104s > enc = tiktoken.get_encoding("gpt2") 1104s 1104s tests/test_encoding.py:32: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:18: in gpt2 1104s mergeable_ranks = data_gym_to_mergeable_bpe_ranks( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:103: in data_gym_to_mergeable_bpe_ranks 1104s vocab_bpe_contents = read_file_cached(vocab_bpe_file, vocab_bpe_hash).decode() 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ______________________________ test_simple_regex _______________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_simple_regex(): 1104s > enc = tiktoken.get_encoding("cl100k_base") 1104s 1104s tests/test_encoding.py:53: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ______________________________ test_basic_encode _______________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_basic_encode(): 1104s > enc = tiktoken.get_encoding("r50k_base") 1104s 1104s tests/test_encoding.py:62: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ______________________________ test_encode_empty _______________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_encode_empty(): 1104s > enc = tiktoken.get_encoding("r50k_base") 1104s 1104s tests/test_encoding.py:74: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ______________________________ test_encode_bytes _______________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_encode_bytes(): 1104s > enc = tiktoken.get_encoding("cl100k_base") 1104s 1104s tests/test_encoding.py:79: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _________________________ test_encode_surrogate_pairs __________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_encode_surrogate_pairs(): 1104s > enc = tiktoken.get_encoding("cl100k_base") 1104s 1104s tests/test_encoding.py:84: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _________________ test_catastrophically_repetitive[r50k_base] __________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'r50k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_catastrophically_repetitive(make_enc: Callable[[], tiktoken.Encoding]): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:96: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ________________ test_catastrophically_repetitive[cl100k_base] _________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_catastrophically_repetitive(make_enc: Callable[[], tiktoken.Encoding]): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:96: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _______________________ test_basic_roundtrip[r50k_base] ________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'r50k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_basic_roundtrip(make_enc): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:115: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ______________________ test_basic_roundtrip[cl100k_base] _______________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_basic_roundtrip(make_enc): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:115: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ________________________ test_hyp_roundtrip[r50k_base] _________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'r50k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s > @hypothesis.given(text=st.text()) 1104s 1104s tests/test_encoding.py:131: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s tests/test_encoding.py:134: in test_hyp_roundtrip 1104s enc = make_enc() 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s E Falsifying example: test_hyp_roundtrip( 1104s E make_enc=functools.partial(get_encoding, 'r50k_base'), 1104s E text='', # or any other generated value 1104s E ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _______________________ test_hyp_roundtrip[cl100k_base] ________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s > @hypothesis.given(text=st.text()) 1104s 1104s tests/test_encoding.py:131: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s tests/test_encoding.py:134: in test_hyp_roundtrip 1104s enc = make_enc() 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s E Falsifying example: test_hyp_roundtrip( 1104s E make_enc=functools.partial(get_encoding, 'cl100k_base'), 1104s E text='', # or any other generated value 1104s E ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ____________________ test_single_token_roundtrip[r50k_base] ____________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'r50k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_single_token_roundtrip(make_enc: Callable[[], tiktoken.Encoding]): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:141: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ___________________ test_single_token_roundtrip[cl100k_base] ___________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_single_token_roundtrip(make_enc: Callable[[], tiktoken.Encoding]): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:141: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ______________________________ test_special_token ______________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_special_token(): 1104s > enc = tiktoken.get_encoding("cl100k_base") 1104s 1104s tests/test_encoding.py:157: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _____________________ test_hyp_special_ordinary[r50k_base] _____________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'r50k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s > @hypothesis.given(text=st.text()) 1104s 1104s tests/test_encoding.py:208: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s tests/test_encoding.py:211: in test_hyp_special_ordinary 1104s enc = make_enc() 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s E Falsifying example: test_hyp_special_ordinary( 1104s E make_enc=functools.partial(get_encoding, 'r50k_base'), 1104s E text='', # or any other generated value 1104s E ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ____________________ test_hyp_special_ordinary[cl100k_base] ____________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s > @hypothesis.given(text=st.text()) 1104s 1104s tests/test_encoding.py:208: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s tests/test_encoding.py:211: in test_hyp_special_ordinary 1104s enc = make_enc() 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.hWvff3/autopkgtest_tmp/build; python3.12 -m pytest tests 1104s in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s E Falsifying example: test_hyp_special_ordinary( 1104s E make_enc=functools.partial(get_encoding, 'cl100k_base'), 1104s E text='', # or any other generated value 1104s E ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _________________________ test_batch_encode[r50k_base] _________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'r50k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_batch_encode(make_enc: Callable[[], tiktoken.Encoding]): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:222: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ________________________ test_batch_encode[cl100k_base] ________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and wepybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.12 returned exit code 13 1104s 'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, requesmake: *** [/tmp/x9gUiLiPpI/run:4: pybuild-autopkgtest] Error 25 1104s pybuild-autopkgtest: error: /tmp/x9gUiLiPpI/run pybuild-autopkgtest returned exit code 2 1104s t.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s def test_batch_encode(make_enc: Callable[[], tiktoken.Encoding]): 1104s > enc = make_enc() 1104s 1104s tests/test_encoding.py:222: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _____________________ test_hyp_batch_roundtrip[r50k_base] ______________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'r50k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s > @hypothesis.given(batch=st.lists(st.text())) 1104s 1104s tests/test_encoding.py:237: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s tests/test_encoding.py:240: in test_hyp_batch_roundtrip 1104s enc = make_enc() 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s E Falsifying example: test_hyp_batch_roundtrip( 1104s E make_enc=functools.partial(get_encoding, 'r50k_base'), 1104s E batch=[], # or any other generated value 1104s E ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ____________________ test_hyp_batch_roundtrip[cl100k_base] _____________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES) 1104s > @hypothesis.given(batch=st.lists(st.text())) 1104s 1104s tests/test_encoding.py:237: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s tests/test_encoding.py:240: in test_hyp_batch_roundtrip 1104s enc = make_enc() 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s E Falsifying example: test_hyp_batch_roundtrip( 1104s E make_enc=functools.partial(get_encoding, 'cl100k_base'), 1104s E batch=[], # or any other generated value 1104s E ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ___________________________ test_encoding_for_model ____________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/gpt-2/encodings/main/vocab.bpe', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_encoding_for_model(): 1104s > enc = tiktoken.encoding_for_model("gpt2") 1104s 1104s tests/test_misc.py:8: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/model.py:105: in encoding_for_model 1104s return get_encoding(encoding_name_for_model(model_name)) 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:18: in gpt2 1104s mergeable_ranks = data_gym_to_mergeable_bpe_ranks( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:103: in data_gym_to_mergeable_bpe_ranks 1104s vocab_bpe_contents = read_file_cached(vocab_bpe_file, vocab_bpe_hash).decode() 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ________________________ test_hyp_offsets[cl100k_base] _________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s make_enc = functools.partial(, 'cl100k_base') 1104s 1104s @pytest.mark.parametrize("make_enc", SOME_ENCODING_FACTORIES) 1104s > @hypothesis.given(data=st.data()) 1104s 1104s tests/test_offsets.py:29: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s tests/test_offsets.py:32: in test_hyp_offsets 1104s enc = make_enc() 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s E Falsifying example: test_hyp_offsets( 1104s E make_enc=functools.partial(get_encoding, 'cl100k_base'), 1104s E data=data(...), 1104s E ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ______________________________ test_basic_offsets ______________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/cl100k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/cl100k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_basic_offsets(): 1104s > enc = tiktoken.get_encoding("cl100k_base") 1104s 1104s tests/test_offsets.py:50: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:76: in cl100k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _________________________________ test_pickle __________________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/encodings/r50k_base.tiktoken', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/encodings/r50k_base.tiktoken', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_pickle(): 1104s import pickle 1104s 1104s > enc_old = tiktoken.get_encoding("r50k_base") 1104s 1104s tests/test_pickle.py:7: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:34: in r50k_base 1104s mergeable_ranks = load_tiktoken_bpe( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:144: in load_tiktoken_bpe 1104s contents = read_file_cached(tiktoken_bpe_file, expected_hash) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/r50k_base.tiktoken (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s _________________________________ test_simple __________________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/gpt-2/encodings/main/vocab.bpe', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_simple(): 1104s # Note that there are more actual tests, they're just not currently public :-) 1104s > enc = tiktoken.get_encoding("gpt2") 1104s 1104s tests/test_simple_public.py:9: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:18: in gpt2 1104s mergeable_ranks = data_gym_to_mergeable_bpe_ranks( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:103: in data_gym_to_mergeable_bpe_ranks 1104s vocab_bpe_contents = read_file_cached(vocab_bpe_file, vocab_bpe_hash).decode() 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s ___________________________ test_encoding_for_model ____________________________ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s > sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:203: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:85: in create_connection 1104s raise err 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s address = ('openaipublic.blob.core.windows.net', 443), timeout = None 1104s source_address = None, socket_options = [(6, 1, 1)] 1104s 1104s def create_connection( 1104s address: tuple[str, int], 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s source_address: tuple[str, int] | None = None, 1104s socket_options: _TYPE_SOCKET_OPTIONS | None = None, 1104s ) -> socket.socket: 1104s """Connect to *address* and return the socket object. 1104s 1104s Convenience function. Connect to *address* (a 2-tuple ``(host, 1104s port)``) and return the socket object. Passing the optional 1104s *timeout* parameter will set the timeout on the socket instance 1104s before attempting to connect. If no *timeout* is supplied, the 1104s global default timeout setting returned by :func:`socket.getdefaulttimeout` 1104s is used. If *source_address* is set it must be a tuple of (host, port) 1104s for the socket to bind as a source address before making the connection. 1104s An host of '' or port 0 tells the OS to use the default. 1104s """ 1104s 1104s host, port = address 1104s if host.startswith("["): 1104s host = host.strip("[]") 1104s err = None 1104s 1104s # Using the value from allowed_gai_family() in the context of getaddrinfo lets 1104s # us select whether to work with IPv4 DNS records, IPv6 records, or both. 1104s # The original create_connection function always returns all records. 1104s family = allowed_gai_family() 1104s 1104s try: 1104s host.encode("idna") 1104s except UnicodeError: 1104s raise LocationParseError(f"'{host}', label empty or too long") from None 1104s 1104s for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 1104s af, socktype, proto, canonname, sa = res 1104s sock = None 1104s try: 1104s sock = socket.socket(af, socktype, proto) 1104s 1104s # If provided, set socket level options before connecting. 1104s _set_socket_options(sock, socket_options) 1104s 1104s if timeout is not _DEFAULT_TIMEOUT: 1104s sock.settimeout(timeout) 1104s if source_address: 1104s sock.bind(source_address) 1104s > sock.connect(sa) 1104s E ConnectionRefusedError: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/connection.py:73: ConnectionRefusedError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', body = None 1104s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} 1104s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s redirect = False, assert_same_host = False 1104s timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None 1104s release_conn = False, chunked = False, body_pos = None, preload_content = False 1104s decode_content = False, response_kw = {} 1104s parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/gpt-2/encodings/main/vocab.bpe', query=None, fragment=None) 1104s destination_scheme = None, conn = None, release_this_conn = True 1104s http_tunnel_required = False, err = None, clean_exit = False 1104s 1104s def urlopen( # type: ignore[override] 1104s self, 1104s method: str, 1104s url: str, 1104s body: _TYPE_BODY | None = None, 1104s headers: typing.Mapping[str, str] | None = None, 1104s retries: Retry | bool | int | None = None, 1104s redirect: bool = True, 1104s assert_same_host: bool = True, 1104s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 1104s pool_timeout: int | None = None, 1104s release_conn: bool | None = None, 1104s chunked: bool = False, 1104s body_pos: _TYPE_BODY_POSITION | None = None, 1104s preload_content: bool = True, 1104s decode_content: bool = True, 1104s **response_kw: typing.Any, 1104s ) -> BaseHTTPResponse: 1104s """ 1104s Get a connection from the pool and perform an HTTP request. This is the 1104s lowest level call for making a request, so you'll need to specify all 1104s the raw details. 1104s 1104s .. note:: 1104s 1104s More commonly, it's appropriate to use a convenience method 1104s such as :meth:`request`. 1104s 1104s .. note:: 1104s 1104s `release_conn` will only behave as expected if 1104s `preload_content=False` because we want to make 1104s `preload_content=False` the default behaviour someday soon without 1104s breaking backwards compatibility. 1104s 1104s :param method: 1104s HTTP request method (such as GET, POST, PUT, etc.) 1104s 1104s :param url: 1104s The URL to perform the request on. 1104s 1104s :param body: 1104s Data to send in the request body, either :class:`str`, :class:`bytes`, 1104s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 1104s 1104s :param headers: 1104s Dictionary of custom headers to send, such as User-Agent, 1104s If-None-Match, etc. If None, pool headers are used. If provided, 1104s these headers completely replace any pool-specific headers. 1104s 1104s :param retries: 1104s Configure the number of retries to allow before raising a 1104s :class:`~urllib3.exceptions.MaxRetryError` exception. 1104s 1104s Pass ``None`` to retry until you receive a response. Pass a 1104s :class:`~urllib3.util.retry.Retry` object for fine-grained control 1104s over different types of retries. 1104s Pass an integer number to retry connection errors that many times, 1104s but no other types of errors. Pass zero to never retry. 1104s 1104s If ``False``, then retries are disabled and any exception is raised 1104s immediately. Also, instead of raising a MaxRetryError on redirects, 1104s the redirect response will be returned. 1104s 1104s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 1104s 1104s :param redirect: 1104s If True, automatically handle redirects (status codes 301, 302, 1104s 303, 307, 308). Each redirect counts as a retry. Disabling retries 1104s will disable redirect, too. 1104s 1104s :param assert_same_host: 1104s If ``True``, will make sure that the host of the pool requests is 1104s consistent else will raise HostChangedError. When ``False``, you can 1104s use the pool on an HTTP proxy and request foreign hosts. 1104s 1104s :param timeout: 1104s If specified, overrides the default timeout for this one 1104s request. It may be a float (in seconds) or an instance of 1104s :class:`urllib3.util.Timeout`. 1104s 1104s :param pool_timeout: 1104s If set and the pool is set to block=True, then this method will 1104s block for ``pool_timeout`` seconds and raise EmptyPoolError if no 1104s connection is available within the time period. 1104s 1104s :param bool preload_content: 1104s If True, the response's body will be preloaded into memory. 1104s 1104s :param bool decode_content: 1104s If True, will attempt to decode the body based on the 1104s 'content-encoding' header. 1104s 1104s :param release_conn: 1104s If False, then the urlopen call will not release the connection 1104s back into the pool once a response is received (but will release if 1104s you read the entire contents of the response such as when 1104s `preload_content=True`). This is useful if you're not preloading 1104s the response's content immediately. You will need to call 1104s ``r.release_conn()`` on the response ``r`` to return the connection 1104s back into the pool. If None, it takes the value of ``preload_content`` 1104s which defaults to ``True``. 1104s 1104s :param bool chunked: 1104s If True, urllib3 will send the body using chunked transfer 1104s encoding. Otherwise, urllib3 will send the body using the standard 1104s content-length form. Defaults to False. 1104s 1104s :param int body_pos: 1104s Position to seek to in file-like body in the event of a retry or 1104s redirect. Typically this won't need to be set because urllib3 will 1104s auto-populate the value when needed. 1104s """ 1104s parsed_url = parse_url(url) 1104s destination_scheme = parsed_url.scheme 1104s 1104s if headers is None: 1104s headers = self.headers 1104s 1104s if not isinstance(retries, Retry): 1104s retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 1104s 1104s if release_conn is None: 1104s release_conn = preload_content 1104s 1104s # Check host 1104s if assert_same_host and not self.is_same_host(url): 1104s raise HostChangedError(self, url, retries) 1104s 1104s # Ensure that the URL we're connecting to is properly encoded 1104s if url.startswith("/"): 1104s url = to_str(_encode_target(url)) 1104s else: 1104s url = to_str(parsed_url.url) 1104s 1104s conn = None 1104s 1104s # Track whether `conn` needs to be released before 1104s # returning/raising/recursing. Update this variable if necessary, and 1104s # leave `release_conn` constant throughout the function. That way, if 1104s # the function recurses, the original value of `release_conn` will be 1104s # passed down into the recursive call, and its value will be respected. 1104s # 1104s # See issue #651 [1] for details. 1104s # 1104s # [1] 1104s release_this_conn = release_conn 1104s 1104s http_tunnel_required = connection_requires_http_tunnel( 1104s self.proxy, self.proxy_config, destination_scheme 1104s ) 1104s 1104s # Merge the proxy headers. Only done when not using HTTP CONNECT. We 1104s # have to copy the headers dict so we can safely change it without those 1104s # changes being reflected in anyone else's copy. 1104s if not http_tunnel_required: 1104s headers = headers.copy() # type: ignore[attr-defined] 1104s headers.update(self.proxy_headers) # type: ignore[union-attr] 1104s 1104s # Must keep the exception bound to a separate variable or else Python 3 1104s # complains about UnboundLocalError. 1104s err = None 1104s 1104s # Keep track of whether we cleanly exited the except block. This 1104s # ensures we do proper cleanup in finally. 1104s clean_exit = False 1104s 1104s # Rewind body position, if needed. Record current position 1104s # for future rewinds in the event of a redirect/retry. 1104s body_pos = set_file_position(body, body_pos) 1104s 1104s try: 1104s # Request a connection from the queue. 1104s timeout_obj = self._get_timeout(timeout) 1104s conn = self._get_conn(timeout=pool_timeout) 1104s 1104s conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 1104s 1104s # Is this a closed/new connection that requires CONNECT tunnelling? 1104s if self.proxy is not None and http_tunnel_required and conn.is_closed: 1104s try: 1104s self._prepare_proxy(conn) 1104s except (BaseSSLError, OSError, SocketTimeout) as e: 1104s self._raise_timeout( 1104s err=e, url=self.proxy.url, timeout_value=conn.timeout 1104s ) 1104s raise 1104s 1104s # If we're going to release the connection in ``finally:``, then 1104s # the response doesn't need to know about the connection. Otherwise 1104s # it will also try to release it and we'll have a double-release 1104s # mess. 1104s response_conn = conn if not release_conn else None 1104s 1104s # Make the request on the HTTPConnection object 1104s > response = self._make_request( 1104s conn, 1104s method, 1104s url, 1104s timeout=timeout_obj, 1104s body=body, 1104s headers=headers, 1104s chunked=chunked, 1104s retries=retries, 1104s response_conn=response_conn, 1104s preload_content=preload_content, 1104s decode_content=decode_content, 1104s **response_kw, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:791: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:492: in _make_request 1104s raise new_e 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:468: in _make_request 1104s self._validate_conn(conn) 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1097: in _validate_conn 1104s conn.connect() 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:611: in connect 1104s self.sock = sock = self._new_conn() 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s 1104s def _new_conn(self) -> socket.socket: 1104s """Establish a socket connection and set nodelay settings on it. 1104s 1104s :return: New socket connection. 1104s """ 1104s try: 1104s sock = connection.create_connection( 1104s (self._dns_host, self.port), 1104s self.timeout, 1104s source_address=self.source_address, 1104s socket_options=self.socket_options, 1104s ) 1104s except socket.gaierror as e: 1104s raise NameResolutionError(self.host, self, e) from e 1104s except SocketTimeout as e: 1104s raise ConnectTimeoutError( 1104s self, 1104s f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 1104s ) from e 1104s 1104s except OSError as e: 1104s > raise NewConnectionError( 1104s self, f"Failed to establish a new connection: {e}" 1104s ) from e 1104s E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 1104s 1104s /usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError 1104s 1104s The above exception was the direct cause of the following exception: 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s > resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:667: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen 1104s retries = retries.increment( 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 1104s method = 'GET', url = '/gpt-2/encodings/main/vocab.bpe', response = None 1104s error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 1104s _pool = 1104s _stacktrace = 1104s 1104s def increment( 1104s self, 1104s method: str | None = None, 1104s url: str | None = None, 1104s response: BaseHTTPResponse | None = None, 1104s error: Exception | None = None, 1104s _pool: ConnectionPool | None = None, 1104s _stacktrace: TracebackType | None = None, 1104s ) -> Retry: 1104s """Return a new Retry object with incremented retry counters. 1104s 1104s :param response: A response object, or None, if the server did not 1104s return a response. 1104s :type response: :class:`~urllib3.response.BaseHTTPResponse` 1104s :param Exception error: An error encountered during the request, or 1104s None if the response was received successfully. 1104s 1104s :return: A new ``Retry`` object. 1104s """ 1104s if self.total is False and error: 1104s # Disabled, indicate to re-raise the error. 1104s raise reraise(type(error), error, _stacktrace) 1104s 1104s total = self.total 1104s if total is not None: 1104s total -= 1 1104s 1104s connect = self.connect 1104s read = self.read 1104s redirect = self.redirect 1104s status_count = self.status 1104s other = self.other 1104s cause = "unknown" 1104s status = None 1104s redirect_location = None 1104s 1104s if error and self._is_connection_error(error): 1104s # Connect retry? 1104s if connect is False: 1104s raise reraise(type(error), error, _stacktrace) 1104s elif connect is not None: 1104s connect -= 1 1104s 1104s elif error and self._is_read_error(error): 1104s # Read retry? 1104s if read is False or method is None or not self._is_method_retryable(method): 1104s raise reraise(type(error), error, _stacktrace) 1104s elif read is not None: 1104s read -= 1 1104s 1104s elif error: 1104s # Other retry? 1104s if other is not None: 1104s other -= 1 1104s 1104s elif response and response.get_redirect_location(): 1104s # Redirect retry? 1104s if redirect is not None: 1104s redirect -= 1 1104s cause = "too many redirects" 1104s response_redirect_location = response.get_redirect_location() 1104s if response_redirect_location: 1104s redirect_location = response_redirect_location 1104s status = response.status 1104s 1104s else: 1104s # Incrementing because of a server error like a 500 in 1104s # status_forcelist and the given method is in the allowed_methods 1104s cause = ResponseError.GENERIC_ERROR 1104s if response and response.status: 1104s if status_count is not None: 1104s status_count -= 1 1104s cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 1104s status = response.status 1104s 1104s history = self.history + ( 1104s RequestHistory(method, url, error, status, redirect_location), 1104s ) 1104s 1104s new_retry = self.new( 1104s total=total, 1104s connect=connect, 1104s read=read, 1104s redirect=redirect, 1104s status=status_count, 1104s other=other, 1104s history=history, 1104s ) 1104s 1104s if new_retry.is_exhausted(): 1104s reason = error or ResponseError(cause) 1104s > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 1104s E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/urllib3/util/retry.py:517: MaxRetryError 1104s 1104s During handling of the above exception, another exception occurred: 1104s 1104s def test_encoding_for_model(): 1104s > enc = tiktoken.encoding_for_model("gpt2") 1104s 1104s tests/test_simple_public.py:26: 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s /usr/lib/python3/dist-packages/tiktoken/model.py:105: in encoding_for_model 1104s return get_encoding(encoding_name_for_model(model_name)) 1104s /usr/lib/python3/dist-packages/tiktoken/registry.py:86: in get_encoding 1104s enc = Encoding(**constructor()) 1104s /usr/lib/python3/dist-packages/tiktoken_ext/openai_public.py:18: in gpt2 1104s mergeable_ranks = data_gym_to_mergeable_bpe_ranks( 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:103: in data_gym_to_mergeable_bpe_ranks 1104s vocab_bpe_contents = read_file_cached(vocab_bpe_file, vocab_bpe_hash).decode() 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:63: in read_file_cached 1104s contents = read_file(blobpath) 1104s /usr/lib/python3/dist-packages/tiktoken/load.py:24: in read_file 1104s resp = requests.get(blobpath) 1104s /usr/lib/python3/dist-packages/requests/api.py:73: in get 1104s return request("get", url, params=params, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/api.py:59: in request 1104s return session.request(method=method, url=url, **kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 1104s resp = self.send(prep, **send_kwargs) 1104s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 1104s r = adapter.send(request, **kwargs) 1104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1104s 1104s self = 1104s request = , stream = False 1104s timeout = Timeout(connect=None, read=None, total=None), verify = True 1104s cert = None, proxies = OrderedDict() 1104s 1104s def send( 1104s self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 1104s ): 1104s """Sends PreparedRequest object. Returns Response object. 1104s 1104s :param request: The :class:`PreparedRequest ` being sent. 1104s :param stream: (optional) Whether to stream the request content. 1104s :param timeout: (optional) How long to wait for the server to send 1104s data before giving up, as a float, or a :ref:`(connect timeout, 1104s read timeout) ` tuple. 1104s :type timeout: float or tuple or urllib3 Timeout object 1104s :param verify: (optional) Either a boolean, in which case it controls whether 1104s we verify the server's TLS certificate, or a string, in which case it 1104s must be a path to a CA bundle to use 1104s :param cert: (optional) Any user-provided SSL certificate to be trusted. 1104s :param proxies: (optional) The proxies dictionary to apply to the request. 1104s :rtype: requests.Response 1104s """ 1104s 1104s try: 1104s conn = self.get_connection_with_tls_context( 1104s request, verify, proxies=proxies, cert=cert 1104s ) 1104s except LocationValueError as e: 1104s raise InvalidURL(e, request=request) 1104s 1104s self.cert_verify(conn, request.url, verify, cert) 1104s url = self.request_url(request, proxies) 1104s self.add_headers( 1104s request, 1104s stream=stream, 1104s timeout=timeout, 1104s verify=verify, 1104s cert=cert, 1104s proxies=proxies, 1104s ) 1104s 1104s chunked = not (request.body is None or "Content-Length" in request.headers) 1104s 1104s if isinstance(timeout, tuple): 1104s try: 1104s connect, read = timeout 1104s timeout = TimeoutSauce(connect=connect, read=read) 1104s except ValueError: 1104s raise ValueError( 1104s f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 1104s f"or a single float to set both timeouts to the same value." 1104s ) 1104s elif isinstance(timeout, TimeoutSauce): 1104s pass 1104s else: 1104s timeout = TimeoutSauce(connect=timeout, read=timeout) 1104s 1104s try: 1104s resp = conn.urlopen( 1104s method=request.method, 1104s url=url, 1104s body=request.body, 1104s headers=request.headers, 1104s redirect=False, 1104s assert_same_host=False, 1104s preload_content=False, 1104s decode_content=False, 1104s retries=self.max_retries, 1104s timeout=timeout, 1104s chunked=chunked, 1104s ) 1104s 1104s except (ProtocolError, OSError) as err: 1104s raise ConnectionError(err, request=request) 1104s 1104s except MaxRetryError as e: 1104s if isinstance(e.reason, ConnectTimeoutError): 1104s # TODO: Remove this in 3.0.0: see #2811 1104s if not isinstance(e.reason, NewConnectionError): 1104s raise ConnectTimeout(e, request=request) 1104s 1104s if isinstance(e.reason, ResponseError): 1104s raise RetryError(e, request=request) 1104s 1104s if isinstance(e.reason, _ProxyError): 1104s raise ProxyError(e, request=request) 1104s 1104s if isinstance(e.reason, _SSLError): 1104s # This branch is for urllib3 v1.22 and later. 1104s raise SSLError(e, request=request) 1104s 1104s > raise ConnectionError(e, request=request) 1104s E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 1104s 1104s /usr/lib/python3/dist-packages/requests/adapters.py:700: ConnectionError 1104s =========================== short test summary info ============================ 1104s FAILED tests/test_encoding.py::test_simple - requests.exceptions.ConnectionEr... 1104s FAILED tests/test_encoding.py::test_simple_repeated - requests.exceptions.Con... 1104s FAILED tests/test_encoding.py::test_simple_regex - requests.exceptions.Connec... 1104s FAILED tests/test_encoding.py::test_basic_encode - requests.exceptions.Connec... 1104s FAILED tests/test_encoding.py::test_encode_empty - requests.exceptions.Connec... 1104s FAILED tests/test_encoding.py::test_encode_bytes - requests.exceptions.Connec... 1104s FAILED tests/test_encoding.py::test_encode_surrogate_pairs - requests.excepti... 1104s FAILED tests/test_encoding.py::test_catastrophically_repetitive[r50k_base] - ... 1104s FAILED tests/test_encoding.py::test_catastrophically_repetitive[cl100k_base] 1104s FAILED tests/test_encoding.py::test_basic_roundtrip[r50k_base] - requests.exc... 1104s FAILED tests/test_encoding.py::test_basic_roundtrip[cl100k_base] - requests.e... 1104s FAILED tests/test_encoding.py::test_hyp_roundtrip[r50k_base] - requests.excep... 1104s FAILED tests/test_encoding.py::test_hyp_roundtrip[cl100k_base] - requests.exc... 1104s FAILED tests/test_encoding.py::test_single_token_roundtrip[r50k_base] - reque... 1104s FAILED tests/test_encoding.py::test_single_token_roundtrip[cl100k_base] - req... 1104s FAILED tests/test_encoding.py::test_special_token - requests.exceptions.Conne... 1104s FAILED tests/test_encoding.py::test_hyp_special_ordinary[r50k_base] - request... 1104s FAILED tests/test_encoding.py::test_hyp_special_ordinary[cl100k_base] - reque... 1104s FAILED tests/test_encoding.py::test_batch_encode[r50k_base] - requests.except... 1104s FAILED tests/test_encoding.py::test_batch_encode[cl100k_base] - requests.exce... 1104s FAILED tests/test_encoding.py::test_hyp_batch_roundtrip[r50k_base] - requests... 1104s FAILED tests/test_encoding.py::test_hyp_batch_roundtrip[cl100k_base] - reques... 1104s FAILED tests/test_misc.py::test_encoding_for_model - requests.exceptions.Conn... 1104s FAILED tests/test_offsets.py::test_hyp_offsets[cl100k_base] - requests.except... 1104s FAILED tests/test_offsets.py::test_basic_offsets - requests.exceptions.Connec... 1104s FAILED tests/test_pickle.py::test_pickle - requests.exceptions.ConnectionErro... 1104s FAILED tests/test_simple_public.py::test_simple - requests.exceptions.Connect... 1104s FAILED tests/test_simple_public.py::test_encoding_for_model - requests.except... 1104s =================== 28 failed, 2 passed in 569.43s (0:09:29) =================== 1105s autopkgtest [10:03:16]: test pybuild-autopkgtest: -----------------------] 1105s pybuild-autopkgtest FAIL non-zero exit status 25 1105s autopkgtest [10:03:16]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 1105s autopkgtest [10:03:16]: @@@@@@@@@@@@@@@@@@@@ summary 1105s pybuild-autopkgtest FAIL non-zero exit status 25