Source: python-asdf
Version: 2.1.0-1
Severity: serious
Tags: ftbfs

python-asdf fails to build from source if some webserver is listening to
localhost:80. The Debian policy prohibits doing so in section 4.9. The
access is only legitimate if python-asdf starts the web server.

| =================================== FAILURES 
===================================
| _____________________________ test_invalid_source 
______________________________
| 
| small_tree = {'not_shared': array([10,  9,  8,  7,  6,  5,  4,  3,  2,  1], 
dtype=uint8), 'science_data': array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.]), 
'skipping': array([0., 2., 4., 6., 8.]), 'subset': array([3., 4., 5., 6.])}
| 
|     def test_invalid_source(small_tree):
|         buff = io.BytesIO()
|     
|         ff = asdf.AsdfFile(small_tree)
|         ff.write_to(buff)
|     
|         buff.seek(0)
|         with asdf.AsdfFile.open(buff) as ff2:
|             ff2.blocks.get_block(0)
|     
|             with pytest.raises(ValueError):
|                 ff2.blocks.get_block(2)
|     
|             with pytest.raises(IOError):
| >               ff2.blocks.get_block("http://127.0.0.1/";)
| 
| asdf/tests/test_low_level.py:141: 
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ 
| asdf/block.py:643: in get_block
|     source, do_not_fill_defaults=True)
| asdf/asdf.py:364: in open_external
|     do_not_fill_defaults=do_not_fill_defaults)
| asdf/asdf.py:778: in open
|     ignore_missing_extensions=ignore_missing_extensions)
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ 
| 
| cls = <class 'asdf.asdf.AsdfFile'>
| self = <asdf.asdf.AsdfFile object at 0x7f8e88f79400>, fd = 'http://127.0.0.1/'
| uri = None, mode = 'r', validate_checksums = False, do_not_fill_defaults = 
True
| _get_yaml_content = False, _force_raw_types = False
| strict_extension_check = False, ignore_missing_extensions = False
| 
|     @classmethod
|     def _open_impl(cls, self, fd, uri=None, mode='r',
|                    validate_checksums=False,
|                    do_not_fill_defaults=False,
|                    _get_yaml_content=False,
|                    _force_raw_types=False,
|                    strict_extension_check=False,
|                    ignore_missing_extensions=False):
|         """Attempt to open file-like object as either AsdfFile or 
AsdfInFits"""
|         if not is_asdf_file(fd):
|             try:
|                 # TODO: this feels a bit circular, try to clean up. Also
|                 # this introduces another dependency on astropy which may
|                 # not be desireable.
|                 from . import fits_embed
|                 return fits_embed.AsdfInFits._open_impl(fd, uri=uri,
|                             validate_checksums=validate_checksums,
|                             
ignore_version_mismatch=self._ignore_version_mismatch,
|                             extensions=self._extensions,
|                             strict_extension_check=strict_extension_check,
|                             
ignore_missing_extensions=ignore_missing_extensions,
|                             _extension_metadata=self._extension_metadata)
|             except ValueError:
|                 pass
|             raise ValueError(
| >               "Input object does not appear to be ASDF file or FITS with " +
|                 "ASDF extension")
| E           ValueError: Input object does not appear to be ASDF file or FITS 
with ASDF extension
| 
| asdf/asdf.py:682: ValueError
| ----------------------------- Captured stdout call 
-----------------------------
| Downloading http://127.0.0.1/ [Done]
| =============================== warnings summary 
===============================
| 
.pybuild/cpython3_3.7_asdf/build/asdf/tests/test_suite.py::test_reference_file[reference_files/1.0.0/complex.asdf]
|   /usr/lib/python3/dist-packages/numpy/core/numeric.py:2321: RuntimeWarning: 
overflow encountered in absolute
|     return less_equal(abs(x-y), atol + rtol * abs(y))
| 
| -- Docs: http://doc.pytest.org/en/latest/warnings.html
| === 1 failed, 319 passed, 12 skipped, 4 xfailed, 1 warnings in 4.60 seconds 
====
| E: pybuild pybuild:338: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_asdf/build; python3.7 -m pytest 
| dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.7 3.6" 
returned exit code 13
| make: *** [debian/rules:8: build] Error 25
| dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Helmut

Reply via email to