Source: python-msrestazure Version: 0.6.2-1 Severity: serious Justification: FTBFS on amd64 Tags: bullseye sid ftbfs Usertags: ftbfs-20201027 ftbfs-bullseye
Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > dpkg-buildpackage > ----------------- > > Command: dpkg-buildpackage -us -uc -sa -rfakeroot > dpkg-buildpackage: info: source package python-msrestazure > dpkg-buildpackage: info: source version 0.6.2-1 > dpkg-buildpackage: info: source distribution unstable > dpkg-buildpackage: info: source changed by Nicolas Dandrimont > <ol...@debian.org> > dpkg-source --before-build . > dpkg-buildpackage: info: host architecture amd64 > debian/rules clean > dh clean --with python3 --buildsystem=pybuild > dh_auto_clean -O--buildsystem=pybuild > I: pybuild base:217: python3.9 setup.py clean > running clean > removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build' (and > everything under it) > 'build/bdist.linux-x86_64' does not exist -- can't clean it > 'build/scripts-3.9' does not exist -- can't clean it > I: pybuild base:217: python3.8 setup.py clean > running clean > removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build' (and > everything under it) > 'build/bdist.linux-x86_64' does not exist -- can't clean it > 'build/scripts-3.8' does not exist -- can't clean it > dh_autoreconf_clean -O--buildsystem=pybuild > dh_clean -O--buildsystem=pybuild > dpkg-source -b . > dpkg-source: info: using source format '3.0 (quilt)' > dpkg-source: info: building python-msrestazure using existing > ./python-msrestazure_0.6.2.orig.tar.gz > dpkg-source: info: building python-msrestazure in > python-msrestazure_0.6.2-1.debian.tar.xz > dpkg-source: info: building python-msrestazure in > python-msrestazure_0.6.2-1.dsc > debian/rules binary > dh binary --with python3 --buildsystem=pybuild > dh_update_autotools_config -O--buildsystem=pybuild > dh_autoreconf -O--buildsystem=pybuild > dh_auto_configure -O--buildsystem=pybuild > I: pybuild base:217: python3.9 setup.py config > running config > I: pybuild base:217: python3.8 setup.py config > running config > dh_auto_build -O--buildsystem=pybuild > I: pybuild base:217: /usr/bin/python3.9 setup.py build > running build > running build_py > creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/__init__.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/azure_operation.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/azure_cloud.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/version.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/azure_exceptions.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/azure_active_directory.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/tools.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > copying msrestazure/azure_configuration.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure > creating > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure/polling > copying msrestazure/polling/__init__.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure/polling > copying msrestazure/polling/async_arm_polling.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure/polling > copying msrestazure/polling/arm_polling.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure/polling > I: pybuild base:217: /usr/bin/python3 setup.py build > running build > running build_py > creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/__init__.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/azure_operation.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/azure_cloud.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/version.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/azure_exceptions.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/azure_active_directory.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/tools.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > copying msrestazure/azure_configuration.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure > creating > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure/polling > copying msrestazure/polling/__init__.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure/polling > copying msrestazure/polling/async_arm_polling.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure/polling > copying msrestazure/polling/arm_polling.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_msrestazure/build/msrestazure/polling > dh_auto_test -O--buildsystem=pybuild > I: pybuild pybuild:284: cp -r /<<PKGBUILDDIR>>/tests > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build > I: pybuild base:217: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build; python3.9 -m pytest > -k 'not slow' > ============================= test session starts > ============================== > platform linux -- Python 3.9.0+, pytest-4.6.11, py-1.9.0, pluggy-0.13.0 > rootdir: /<<PKGBUILDDIR>> > plugins: asyncio-0.14.0 > collected 40 items / 5 deselected / 35 selected > > tests/test_arm_polling.py ..... [ > 14%] > tests/test_auth.py ..FFFFFsF... [ > 48%] > tests/test_cloud.py F [ > 51%] > tests/test_configuration.py . [ > 54%] > tests/test_exceptions.py .. [ > 60%] > tests/test_operation.py ..... [ > 74%] > tests/test_tools.py .FF. [ > 85%] > tests/asynctests/test_async_arm_polling.py ..... > [100%] > > =================================== FAILURES > =================================== > _________________ TestServicePrincipalCredentials.test_msi_vm > __________________ > > self = <tests.test_auth.TestServicePrincipalCredentials > testMethod=test_msi_vm> > > @httpretty.activate > def test_msi_vm(self): > > # Test legacy MSI, with no MSI_ENDPOINT > > json_payload = { > 'token_type': "TokenType", > "access_token": "AccessToken" > } > httpretty.register_uri(httpretty.POST, > 'http://localhost:666/oauth2/token', > body=json.dumps(json_payload), > content_type="application/json") > > > token_type, access_token, token_entry = get_msi_token("whatever", > > port=666) > > tests/test_auth.py:431: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > msrestazure/azure_active_directory.py:484: in get_msi_token > result = requests.post(request_uri, data=payload, headers={'Metadata': > 'true'}) > /usr/lib/python3/dist-packages/requests/api.py:119: in post > return request('post', url, data=data, json=json, **kwargs) > /usr/lib/python3/dist-packages/requests/api.py:61: in request > return session.request(method=method, url=url, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <httpretty.core.fakesock.socket object at 0x7f8dbcb7b550>, mode = 'rb' > bufsize = -1 > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > ------------------------------ Captured log call > ------------------------------- > WARNING msrestazure.azure_active_directory:azure_active_directory.py:488 > MSI: Failed to retrieve a token from 'http://localhost:666/oauth2/token' with > an error of ''Thread' object has no attribute 'isAlive''. This could be > caused by the MSI extension not yet fully provisioned. > ____ TestServicePrincipalCredentials.test_msi_vm_imds_no_retry_on_bad_error > ____ > > self = <tests.test_auth.TestServicePrincipalCredentials > testMethod=test_msi_vm_imds_no_retry_on_bad_error> > > @httpretty.activate > def test_msi_vm_imds_no_retry_on_bad_error(self): > """Check that 499 throws immediatly.""" > httpretty.register_uri(httpretty.GET, > > 'http://169.254.169.254/metadata/identity/oauth2/token', > status=499) > with self.assertRaises(HTTPError): > > MSIAuthentication() > > tests/test_auth.py:568: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > msrestazure/azure_active_directory.py:592: in __init__ > self.set_token() > msrestazure/azure_active_directory.py:600: in set_token > token_entry = self._vm_msi.get_token(self.resource) > msrestazure/azure_active_directory.py:649: in get_token > token_entry = self._retrieve_token_from_imds_with_retry(resource) > msrestazure/azure_active_directory.py:685: in > _retrieve_token_from_imds_with_retry > result = requests.get(request_uri, params=payload, headers={'Metadata': > 'true', 'User-Agent':self._user_agent}) > /usr/lib/python3/dist-packages/requests/api.py:76: in get > return request('get', url, params=params, **kwargs) > /usr/lib/python3/dist-packages/requests/api.py:61: in request > return session.request(method=method, url=url, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > ____________ TestServicePrincipalCredentials.test_msi_vm_imds_retry > ____________ > > self = <tests.test_auth.TestServicePrincipalCredentials > testMethod=test_msi_vm_imds_retry> > > @httpretty.activate > def test_msi_vm_imds_retry(self): > json_payload = { > 'token_type': "TokenTypeIMDS", > "access_token": "AccessToken" > } > httpretty.register_uri(httpretty.GET, > > 'http://169.254.169.254/metadata/identity/oauth2/token', > responses=[ > httpretty.Response('', status=404), > httpretty.Response('', status=429), > httpretty.Response('', status=599), > > httpretty.Response(body=json.dumps(json_payload)), > ], > content_type="application/json") > > > credentials = MSIAuthentication() > > tests/test_auth.py:553: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > msrestazure/azure_active_directory.py:592: in __init__ > self.set_token() > msrestazure/azure_active_directory.py:600: in set_token > token_entry = self._vm_msi.get_token(self.resource) > msrestazure/azure_active_directory.py:649: in get_token > token_entry = self._retrieve_token_from_imds_with_retry(resource) > msrestazure/azure_active_directory.py:685: in > _retrieve_token_from_imds_with_retry > result = requests.get(request_uri, params=payload, headers={'Metadata': > 'true', 'User-Agent':self._user_agent}) > /usr/lib/python3/dist-packages/requests/api.py:76: in get > return request('get', url, params=params, **kwargs) > /usr/lib/python3/dist-packages/requests/api.py:61: in request > return session.request(method=method, url=url, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <httpretty.core.fakesock.socket object at 0x7f8dbd51ddc0>, mode = 'rb' > bufsize = -1 > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > ______ TestServicePrincipalCredentials.test_msi_vm_imds_timeout_not_used > _______ > > self = <tests.test_auth.TestServicePrincipalCredentials > testMethod=test_msi_vm_imds_timeout_not_used> > > @httpretty.activate > def test_msi_vm_imds_timeout_not_used(self): > """Check that using timeout still allows a successfull scenario to > pass.""" > json_payload = { > 'token_type': "TokenTypeIMDS", > "access_token": "AccessToken" > } > httpretty.register_uri(httpretty.GET, > > 'http://169.254.169.254/metadata/identity/oauth2/token', > body=json.dumps(json_payload), > content_type="application/json") > > > credentials = MSIAuthentication(timeout=15) > > tests/test_auth.py:585: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > msrestazure/azure_active_directory.py:592: in __init__ > self.set_token() > msrestazure/azure_active_directory.py:600: in set_token > token_entry = self._vm_msi.get_token(self.resource) > msrestazure/azure_active_directory.py:649: in get_token > token_entry = self._retrieve_token_from_imds_with_retry(resource) > msrestazure/azure_active_directory.py:685: in > _retrieve_token_from_imds_with_retry > result = requests.get(request_uri, params=payload, headers={'Metadata': > 'true', 'User-Agent':self._user_agent}) > /usr/lib/python3/dist-packages/requests/api.py:76: in get > return request('get', url, params=params, **kwargs) > /usr/lib/python3/dist-packages/requests/api.py:61: in request > return session.request(method=method, url=url, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <httpretty.core.fakesock.socket object at 0x7f8dbca95b20>, mode = 'rb' > bufsize = -1 > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > ________ TestServicePrincipalCredentials.test_msi_vm_imds_timeout_used > _________ > > self = <tests.test_auth.TestServicePrincipalCredentials > testMethod=test_msi_vm_imds_timeout_used> > > @httpretty.activate > def test_msi_vm_imds_timeout_used(self): > """Will loop on 410 until timeout is reached.""" > httpretty.register_uri(httpretty.GET, > > 'http://169.254.169.254/metadata/identity/oauth2/token', > status=410) > > start_time = time.time() > with self.assertRaises(MSIAuthenticationTimeoutError): > > MSIAuthentication(timeout=1) > > tests/test_auth.py:598: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > msrestazure/azure_active_directory.py:592: in __init__ > self.set_token() > msrestazure/azure_active_directory.py:600: in set_token > token_entry = self._vm_msi.get_token(self.resource) > msrestazure/azure_active_directory.py:649: in get_token > token_entry = self._retrieve_token_from_imds_with_retry(resource) > msrestazure/azure_active_directory.py:685: in > _retrieve_token_from_imds_with_retry > result = requests.get(request_uri, params=payload, headers={'Metadata': > 'true', 'User-Agent':self._user_agent}) > /usr/lib/python3/dist-packages/requests/api.py:76: in get > return request('get', url, params=params, **kwargs) > /usr/lib/python3/dist-packages/requests/api.py:61: in request > return session.request(method=method, url=url, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > ______ TestServicePrincipalCredentials.test_msi_vm_imds_timeout_zero_used > ______ > > self = <tests.test_auth.TestServicePrincipalCredentials > testMethod=test_msi_vm_imds_timeout_zero_used> > > @httpretty.activate > def test_msi_vm_imds_timeout_zero_used(self): > """If zero timeout, should do a try and fail immediatly.""" > httpretty.register_uri(httpretty.GET, > > 'http://169.254.169.254/metadata/identity/oauth2/token', > status=410) > > with self.assertRaises(MSIAuthenticationTimeoutError): > > MSIAuthentication(timeout=0) > > tests/test_auth.py:612: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > msrestazure/azure_active_directory.py:592: in __init__ > self.set_token() > msrestazure/azure_active_directory.py:600: in set_token > token_entry = self._vm_msi.get_token(self.resource) > msrestazure/azure_active_directory.py:649: in get_token > token_entry = self._retrieve_token_from_imds_with_retry(resource) > msrestazure/azure_active_directory.py:685: in > _retrieve_token_from_imds_with_retry > result = requests.get(request_uri, params=payload, headers={'Metadata': > 'true', 'User-Agent':self._user_agent}) > /usr/lib/python3/dist-packages/requests/api.py:76: in get > return request('get', url, params=params, **kwargs) > /usr/lib/python3/dist-packages/requests/api.py:61: in request > return session.request(method=method, url=url, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > ____________________ TestCloud.test_get_cloud_from_endpoint > ____________________ > > self = <tests.test_cloud.TestCloud testMethod=test_get_cloud_from_endpoint> > > @httpretty.activate > def test_get_cloud_from_endpoint(self): > > public_azure_dict = { > "galleryEndpoint": "https://gallery.azure.com", > "graphEndpoint": "https://graph.windows.net/", > "portalEndpoint": "https://portal.azure.com", > "authentication": { > "loginEndpoint": "https://login.windows.net", > "audiences": ["https://management.core.windows.net/", > "https://management.azure.com/"] > } > } > > httpretty.register_uri(httpretty.GET, > > "https://management.azure.com/metadata/endpoints?api-version=1.0", > body=json.dumps(public_azure_dict), > content_type="application/json") > > > cloud = > > azure_cloud.get_cloud_from_metadata_endpoint("https://management.azure.com") > > tests/test_cloud.py:54: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > msrestazure/azure_cloud.py:250: in get_cloud_from_metadata_endpoint > _populate_from_metadata_endpoint(cloud, arm_endpoint, session) > msrestazure/azure_cloud.py:208: in _populate_from_metadata_endpoint > response = session.get(metadata_endpoint) > /usr/lib/python3/dist-packages/requests/sessions.py:543: in get > return self.request('GET', url, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <httpretty.core.fakesock.socket object at 0x7f8dbc959550>, mode = 'rb' > bufsize = -1 > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > ________________________ TestTools.test_register_failed > ________________________ > > self = <tests.test_tools.TestTools testMethod=test_register_failed> > time_sleep = <MagicMock name='sleep' id='140246733055696'> > > @httpretty.activate > @mock.patch('time.sleep', return_value=None) > def test_register_failed(self, time_sleep): > """Protocol: > - We call the provider and get a 409 provider error > - Now we POST register provider and get "Registering" > - This POST failed > """ > > provider_url = ("https://management.azure.com/" > "subscriptions/12345678-9abc-def0-0000-000000000000/" > "resourceGroups/clitest.rg000001/" > > "providers/Microsoft.Sql/servers/ygserver123?api-version=2014-04-01") > > provider_error = > ('{"error":{"code":"MissingSubscriptionRegistration", ' > '"message":"The subscription registration is in > \'Unregistered\' state. ' > 'The subscription must be registered to use > namespace \'Microsoft.Sql\'. ' > 'See https://aka.ms/rps-not-found for how to > register subscriptions."}}') > > provider_success = '{"success": true}' > > httpretty.register_uri(httpretty.PUT, > provider_url, > responses=[ > httpretty.Response(body=provider_error, > status=409), > httpretty.Response(body=provider_success), > ], > content_type="application/json") > > register_post_url = ("https://management.azure.com/" > > "subscriptions/12345678-9abc-def0-0000-000000000000/" > > "providers/Microsoft.Sql/register?api-version=2016-02-01") > > httpretty.register_uri(httpretty.POST, > register_post_url, > status=409, > content_type="application/json") > > configuration = AzureConfiguration(None) > register_rp_hook = configuration.hooks[0] > > session = requests.Session() > def rp_cb(r, *args, **kwargs): > kwargs.setdefault("msrest", {})["session"] = session > return register_rp_hook(r, *args, **kwargs) > session.hooks['response'].append(rp_cb) > > > response = session.put(provider_url) > > tests/test_tools.py:156: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > /usr/lib/python3/dist-packages/requests/sessions.py:590: in put > return self.request('PUT', url, data=data, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <httpretty.core.fakesock.socket object at 0x7f8dbcb33250>, mode = 'rb' > bufsize = -1 > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > _______________________ TestTools.test_register_rp_hook > ________________________ > > self = <tests.test_tools.TestTools testMethod=test_register_rp_hook> > time_sleep = <MagicMock name='sleep' id='140246731038432'> > > @httpretty.activate > @mock.patch('time.sleep', return_value=None) > def test_register_rp_hook(self, time_sleep): > """Protocol: > - We call the provider and get a 409 provider error > - Now we POST register provider and get "Registering" > - Now we GET register provider and get "Registered" > - We call again the first endpoint and this time this succeed > """ > > provider_url = ("https://management.azure.com/" > "subscriptions/12345678-9abc-def0-0000-000000000000/" > "resourceGroups/clitest.rg000001/" > > "providers/Microsoft.Sql/servers/ygserver123?api-version=2014-04-01") > > provider_error = > ('{"error":{"code":"MissingSubscriptionRegistration", ' > '"message":"The subscription registration is in > \'Unregistered\' state. ' > 'The subscription must be registered to use > namespace \'Microsoft.Sql\'. ' > 'See https://aka.ms/rps-not-found for how to > register subscriptions."}}') > > provider_success = '{"success": true}' > > httpretty.register_uri(httpretty.PUT, > provider_url, > responses=[ > httpretty.Response(body=provider_error, > status=409), > httpretty.Response(body=provider_success), > ], > content_type="application/json") > > register_post_url = ("https://management.azure.com/" > > "subscriptions/12345678-9abc-def0-0000-000000000000/" > > "providers/Microsoft.Sql/register?api-version=2016-02-01") > > register_post_result = { > "registrationState":"Registering" > } > > register_get_url = ("https://management.azure.com/" > > "subscriptions/12345678-9abc-def0-0000-000000000000/" > "providers/Microsoft.Sql?api-version=2016-02-01") > > register_get_result = { > "registrationState":"Registered" > } > > httpretty.register_uri(httpretty.POST, > register_post_url, > body=json.dumps(register_post_result), > content_type="application/json") > > httpretty.register_uri(httpretty.GET, > register_get_url, > body=json.dumps(register_get_result), > content_type="application/json") > > configuration = AzureConfiguration(None) > register_rp_hook = configuration.hooks[0] > > session = requests.Session() > def rp_cb(r, *args, **kwargs): > kwargs.setdefault("msrest", {})["session"] = session > return register_rp_hook(r, *args, **kwargs) > session.hooks['response'].append(rp_cb) > > > response = session.put(provider_url) > > tests/test_tools.py:106: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > /usr/lib/python3/dist-packages/requests/sessions.py:590: in put > return self.request('PUT', url, data=data, **kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:530: in request > resp = self.send(prep, **send_kwargs) > /usr/lib/python3/dist-packages/requests/sessions.py:643: in send > r = adapter.send(request, **kwargs) > /usr/lib/python3/dist-packages/requests/adapters.py:439: in send > resp = conn.urlopen( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:670: in urlopen > httplib_response = self._make_request( > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:426: in _make_request > six.raise_from(e, None) > <string>:3: in raise_from > ??? > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:421: in _make_request > httplib_response = conn.getresponse() > /usr/lib/python3.9/http/client.py:1343: in getresponse > response = self.response_class(self.sock, method=self._method) > /usr/lib/python3.9/http/client.py:245: in __init__ > self.fp = sock.makefile("rb") > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <httpretty.core.fakesock.socket object at 0x7f8dbd48ea00>, mode = 'rb' > bufsize = -1 > > def makefile(self, mode='r', bufsize=-1): > """Returns this fake socket's own tempfile buffer. > > If there is an entry associated with the socket, the file > descriptor gets filled in with the entry data before being > returned. > """ > self._mode = mode > self._bufsize = bufsize > > if self._entry: > t = threading.Thread( > target=self._entry.fill_filekind, args=(self.fd,) > ) > t.start() > if self.timeout == socket._GLOBAL_DEFAULT_TIMEOUT: > timeout = None > else: > timeout = self.timeout > t.join(timeout) > > if t.isAlive(): > E AttributeError: 'Thread' object has no attribute 'isAlive' > > /usr/lib/python3/dist-packages/httpretty/core.py:438: AttributeError > =============================== warnings summary > =============================== > /usr/lib/python3/dist-packages/_pytest/mark/structures.py:331 > /usr/lib/python3/dist-packages/_pytest/mark/structures.py:331: > PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo? You can > register custom marks to avoid this warning - for details, see > https://docs.pytest.org/en/latest/mark.html > warnings.warn( > > .pybuild/cpython3_3.9_msrestazure/build/tests/test_auth.py::TestServicePrincipalCredentials::test_service_principal > .pybuild/cpython3_3.9_msrestazure/build/tests/test_auth.py::TestServicePrincipalCredentials::test_user_pass_credentials > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build/msrestazure/azure_active_directory.py:83: > DeprecationWarning: china parameter is deprecated, please use > cloud_environment=msrestazure.azure_cloud.AZURE_CHINA_CLOUD > warnings.warn(err_msg, DeprecationWarning) > > -- Docs: https://docs.pytest.org/en/latest/warnings.html > === 9 failed, 25 passed, 1 skipped, 5 deselected, 3 warnings in 2.42 seconds > === > E: pybuild pybuild:352: test: plugin distutils failed with: exit code=1: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_msrestazure/build; python3.9 -m pytest > -k 'not slow' > dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.9 > 3.8" returned exit code 13 The full build log is available from: http://qa-logs.debian.net/2020/10/27/python-msrestazure_0.6.2-1_unstable.log A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! About the archive rebuild: The rebuild was done on EC2 VM instances from Amazon Web Services, using a clean, minimal and up-to-date chroot. Every failed build was retried once to eliminate random failures.