--- Begin Message ---
Source: python-scrapy
Version: 2.4.1-1
Severity: important
When I rebuild python-scrapy in pbuilder, I get a FTBFS due to the
tests in tests/test_command_check.py failing unless I enable the use of
the network using the --use-network=yes option.
I had difficulty capturing the packets sent by the test suite, so I'm
not able to provide any information about the network access but from
the summary below and the attached full build log it seems like the
test suite is doing some DNS requests that are failing:
...
tests/test_command_check.py FFFFFF [
0%]
...
=========================== short test summary info
============================
FAILED tests/test_command_check.py::CheckCommandTest::test_SCRAPY_CHECK_set
FAILED
tests/test_command_check.py::CheckCommandTest::test_check_all_default_contracts
FAILED
tests/test_command_check.py::CheckCommandTest::test_check_cb_kwargs_contract
FAILED
tests/test_command_check.py::CheckCommandTest::test_check_returns_items_contract
FAILED
tests/test_command_check.py::CheckCommandTest::test_check_returns_requests_contract
FAILED
tests/test_command_check.py::CheckCommandTest::test_check_scrapes_contract
...
=================================== FAILURES
===================================
____________________ CheckCommandTest.test_SCRAPY_CHECK_set
____________________
self = <tests.test_command_check.CheckCommandTest
testMethod=test_SCRAPY_CHECK_set>
def test_SCRAPY_CHECK_set(self):
parse_def = """
import os
if not os.environ.get('SCRAPY_CHECK'):
raise Exception('SCRAPY_CHECK not set')
"""
> self._test_contract(parse_def=parse_def)
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:36:
in _test_contract
self.assertIn('OK', err)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = <tests.test_command_check.CheckCommandTest
testMethod=test_SCRAPY_CHECK_set>
containee = 'OK'
container =
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n---...--------------------------------------------------------------------\nRan
0 contracts in 0.223s\n\nFAILED (errors=1)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or "%r not in %r"
% (containee, container))
E twisted.trial.unittest.FailTest: 'OK' not in
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n----------------------------------------------------------------------\nTraceback
(most recent call last):\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in
_inlineCallbacks\n result = result.throwExceptionIntoGenerator(g)\n File
"/usr/lib/python3/dist-packages/twisted/python/failure.py", line 512, in
throwExceptionIntoGenerator\n return g.throw(self.type, self.value,
self.tb)\n File
"/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/scrapy/core/downloader/middleware.py",
line 45, in process_request\n return (yield download_func(request=request,
spider=spider))\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in
_runCallbacks\n current.result = callback(current.result, *args, **kw)\n
File "/usr/lib/python3/dist-packages/twisted/internet/endpoints.py", line 981,
in startConnectionAttempts\n raise
error.DNSLookupError(\ntwisted.internet.error.DNSLookupError: DNS lookup
failed: no results for hostname lookup:
example.com.\n\n----------------------------------------------------------------------\nRan
0 contracts in 0.223s\n\nFAILED (errors=1)\n'
/usr/lib/python3/dist-packages/twisted/trial/_synctest.py:493: FailTest
______________ CheckCommandTest.test_check_all_default_contracts
_______________
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_all_default_contracts>
def test_check_all_default_contracts(self):
contracts = """
@returns items 1
@returns requests 1
@scrapes key1 key2
@cb_kwargs {"arg1": "val1", "arg2": "val2"}
"""
parse_def = """
yield {'key1': 'val1', 'key2': 'val2'}
yield scrapy.Request(url='http://next-url.com')
if len(cb_kwargs.items()) == 0:
raise Exception("Callback args not set")
"""
> self._test_contract(contracts, parse_def)
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:89:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:36:
in _test_contract
self.assertIn('OK', err)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_all_default_contracts>
containee = 'OK'
container =
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n---...--------------------------------------------------------------------\nRan
0 contracts in 0.223s\n\nFAILED (errors=1)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or "%r not in %r"
% (containee, container))
E twisted.trial.unittest.FailTest: 'OK' not in
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n----------------------------------------------------------------------\nTraceback
(most recent call last):\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in
_inlineCallbacks\n result = result.throwExceptionIntoGenerator(g)\n File
"/usr/lib/python3/dist-packages/twisted/python/failure.py", line 512, in
throwExceptionIntoGenerator\n return g.throw(self.type, self.value,
self.tb)\n File
"/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/scrapy/core/downloader/middleware.py",
line 45, in process_request\n return (yield download_func(request=request,
spider=spider))\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in
_runCallbacks\n current.result = callback(current.result, *args, **kw)\n
File "/usr/lib/python3/dist-packages/twisted/internet/endpoints.py", line 981,
in startConnectionAttempts\n raise
error.DNSLookupError(\ntwisted.internet.error.DNSLookupError: DNS lookup
failed: no results for hostname lookup:
example.com.\n\n----------------------------------------------------------------------\nRan
0 contracts in 0.223s\n\nFAILED (errors=1)\n'
/usr/lib/python3/dist-packages/twisted/trial/_synctest.py:493: FailTest
________________ CheckCommandTest.test_check_cb_kwargs_contract
________________
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_cb_kwargs_contract>
def test_check_cb_kwargs_contract(self):
contracts = """
@cb_kwargs {"arg1": "val1", "arg2": "val2"}
"""
parse_def = """
if len(cb_kwargs.items()) == 0:
raise Exception("Callback args not set")
"""
> self._test_contract(contracts, parse_def)
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:65:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:36:
in _test_contract
self.assertIn('OK', err)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_cb_kwargs_contract>
containee = 'OK'
container =
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n---...--------------------------------------------------------------------\nRan
0 contracts in 0.227s\n\nFAILED (errors=1)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or "%r not in %r"
% (containee, container))
E twisted.trial.unittest.FailTest: 'OK' not in
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n----------------------------------------------------------------------\nTraceback
(most recent call last):\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in
_inlineCallbacks\n result = result.throwExceptionIntoGenerator(g)\n File
"/usr/lib/python3/dist-packages/twisted/python/failure.py", line 512, in
throwExceptionIntoGenerator\n return g.throw(self.type, self.value,
self.tb)\n File
"/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/scrapy/core/downloader/middleware.py",
line 45, in process_request\n return (yield download_func(request=request,
spider=spider))\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in
_runCallbacks\n current.result = callback(current.result, *args, **kw)\n
File "/usr/lib/python3/dist-packages/twisted/internet/endpoints.py", line 981,
in startConnectionAttempts\n raise
error.DNSLookupError(\ntwisted.internet.error.DNSLookupError: DNS lookup
failed: no results for hostname lookup:
example.com.\n\n----------------------------------------------------------------------\nRan
0 contracts in 0.227s\n\nFAILED (errors=1)\n'
/usr/lib/python3/dist-packages/twisted/trial/_synctest.py:493: FailTest
______________ CheckCommandTest.test_check_returns_items_contract
______________
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_returns_items_contract>
def test_check_returns_items_contract(self):
contracts = """
@returns items 1
"""
parse_def = """
yield {'key1': 'val1', 'key2': 'val2'}
"""
> self._test_contract(contracts, parse_def)
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:36:
in _test_contract
self.assertIn('OK', err)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_returns_items_contract>
containee = 'OK'
container =
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n---...--------------------------------------------------------------------\nRan
0 contracts in 0.225s\n\nFAILED (errors=1)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or "%r not in %r"
% (containee, container))
E twisted.trial.unittest.FailTest: 'OK' not in
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n----------------------------------------------------------------------\nTraceback
(most recent call last):\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in
_inlineCallbacks\n result = result.throwExceptionIntoGenerator(g)\n File
"/usr/lib/python3/dist-packages/twisted/python/failure.py", line 512, in
throwExceptionIntoGenerator\n return g.throw(self.type, self.value,
self.tb)\n File
"/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/scrapy/core/downloader/middleware.py",
line 45, in process_request\n return (yield download_func(request=request,
spider=spider))\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in
_runCallbacks\n current.result = callback(current.result, *args, **kw)\n
File "/usr/lib/python3/dist-packages/twisted/internet/endpoints.py", line 981,
in startConnectionAttempts\n raise
error.DNSLookupError(\ntwisted.internet.error.DNSLookupError: DNS lookup
failed: no results for hostname lookup:
example.com.\n\n----------------------------------------------------------------------\nRan
0 contracts in 0.225s\n\nFAILED (errors=1)\n'
/usr/lib/python3/dist-packages/twisted/trial/_synctest.py:493: FailTest
____________ CheckCommandTest.test_check_returns_requests_contract
_____________
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_returns_requests_contract>
def test_check_returns_requests_contract(self):
contracts = """
@returns requests 1
"""
parse_def = """
yield scrapy.Request(url='http://next-url.com')
"""
> self._test_contract(contracts, parse_def)
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:36:
in _test_contract
self.assertIn('OK', err)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_returns_requests_contract>
containee = 'OK'
container =
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n---...--------------------------------------------------------------------\nRan
0 contracts in 0.227s\n\nFAILED (errors=1)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or "%r not in %r"
% (containee, container))
E twisted.trial.unittest.FailTest: 'OK' not in
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n----------------------------------------------------------------------\nTraceback
(most recent call last):\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in
_inlineCallbacks\n result = result.throwExceptionIntoGenerator(g)\n File
"/usr/lib/python3/dist-packages/twisted/python/failure.py", line 512, in
throwExceptionIntoGenerator\n return g.throw(self.type, self.value,
self.tb)\n File
"/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/scrapy/core/downloader/middleware.py",
line 45, in process_request\n return (yield download_func(request=request,
spider=spider))\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in
_runCallbacks\n current.result = callback(current.result, *args, **kw)\n
File "/usr/lib/python3/dist-packages/twisted/internet/endpoints.py", line 981,
in startConnectionAttempts\n raise
error.DNSLookupError(\ntwisted.internet.error.DNSLookupError: DNS lookup
failed: no results for hostname lookup:
example.com.\n\n----------------------------------------------------------------------\nRan
0 contracts in 0.227s\n\nFAILED (errors=1)\n'
/usr/lib/python3/dist-packages/twisted/trial/_synctest.py:493: FailTest
_________________ CheckCommandTest.test_check_scrapes_contract
_________________
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_scrapes_contract>
def test_check_scrapes_contract(self):
contracts = """
@scrapes key1 key2
"""
parse_def = """
yield {'key1': 'val1', 'key2': 'val2'}
"""
> self._test_contract(contracts, parse_def)
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:74:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/tests/test_command_check.py:36:
in _test_contract
self.assertIn('OK', err)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = <tests.test_command_check.CheckCommandTest
testMethod=test_check_scrapes_contract>
containee = 'OK'
container =
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n---...--------------------------------------------------------------------\nRan
0 contracts in 0.227s\n\nFAILED (errors=1)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or "%r not in %r"
% (containee, container))
E twisted.trial.unittest.FailTest: 'OK' not in
'E\n======================================================================\nERROR:
[check_spider] parse
(errback)\n----------------------------------------------------------------------\nTraceback
(most recent call last):\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in
_inlineCallbacks\n result = result.throwExceptionIntoGenerator(g)\n File
"/usr/lib/python3/dist-packages/twisted/python/failure.py", line 512, in
throwExceptionIntoGenerator\n return g.throw(self.type, self.value,
self.tb)\n File
"/build/python-scrapy-2.4.1/.pybuild/cpython3_3.9_scrapy/build/scrapy/core/downloader/middleware.py",
line 45, in process_request\n return (yield download_func(request=request,
spider=spider))\n File
"/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in
_runCallbacks\n current.result = callback(current.result, *args, **kw)\n
File "/usr/lib/python3/dist-packages/twisted/internet/endpoints.py", line 981,
in startConnectionAttempts\n raise
error.DNSLookupError(\ntwisted.internet.error.DNSLookupError: DNS lookup
failed: no results for hostname lookup:
example.com.\n\n----------------------------------------------------------------------\nRan
0 contracts in 0.227s\n\nFAILED (errors=1)\n'
/usr/lib/python3/dist-packages/twisted/trial/_synctest.py:493: FailTest
-- System Information:
Debian Release: bullseye/sid
APT prefers testing-debug
APT policy: (900, 'testing-debug'), (900, 'testing'), (800,
'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700,
'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-2-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
--
bye,
pabs
https://wiki.debian.org/PaulWise
python-scrapy_2.4.1-1_amd64.build.xz
Description: application/xz
signature.asc
Description: This is a digitally signed message part
--- End Message ---