Source: python-w3lib
Version: 2.1.1-1
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20230726 ftbfs-trixie

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules binary
> dh binary --buildsystem=pybuild
>    dh_update_autotools_config -O--buildsystem=pybuild
>    dh_autoreconf -O--buildsystem=pybuild
>    dh_auto_configure -O--buildsystem=pybuild
> I: pybuild base:240: python3.11 setup.py config 
> running config
>    dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:240: /usr/bin/python3 setup.py build 
> running build
> running build_py
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/url.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/util.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/_infra.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/html.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/_types.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/http.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/encoding.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> copying w3lib/_url.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
> running egg_info
> writing w3lib.egg-info/PKG-INFO
> writing dependency_links to w3lib.egg-info/dependency_links.txt
> writing top-level names to w3lib.egg-info/top_level.txt
> writing manifest file 'w3lib.egg-info/SOURCES.txt'
> reading manifest file 'w3lib.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching '*.txt' under directory 'tests'
> adding license file 'LICENSE'
> writing manifest file 'w3lib.egg-info/SOURCES.txt'
> copying w3lib/py.typed -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build/w3lib
>    dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build; 
> python3.11 -m pytest tests
> ============================= test session starts 
> ==============================
> platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0
> rootdir: /<<PKGBUILDDIR>>
> configfile: pytest.ini
> collected 314 items
> 
> tests/test_encoding.py ...................                               [  
> 6%]
> tests/test_html.py ..................................................... [ 
> 22%]
> ..                                                                       [ 
> 23%]
> tests/test_http.py .......                                               [ 
> 25%]
> tests/test_url.py x...xxx....x..x.................................xxxxxx [ 
> 42%]
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.....Fx...xx......xxxFx....xx.x.. [ 
> 65%]
> xx....x......xxxxxx..xxxx..x....x....................................... [ 
> 88%]
> ..............................                                           [ 
> 98%]
> tests/test_util.py .....                                                 
> [100%]
> 
> =================================== FAILURES 
> ===================================
> _ 
> test_safe_url_string_url[https://"%;<=>@[]^`{|}\x7f:"%;<=>@[]^`{|}\x7f:@example.com-https://%22%25%3B%3C%3D%3E%40%5B%5D%5E%60%7B%7C%7D%7F:%22%25%3b%3c%3d%3e%40%5b%5d%5e%60%7b%7c%7d%7f...@example.com]
>  _
> 
> url = 'https://"%;<=>@[]^`{|}\x7f:"%;<=>@[]^`{|}\x7f:@example.com'
> output = 
> 'https://%22%25%3B%3C%3D%3E%40%5B%5D%5E%60%7B%7C%7D%7F:%22%25%3b%3c%3d%3e%40%5b%5d%5e%60%7b%7c%7d%7f...@example.com'
> 
>     @pytest.mark.parametrize(
>         "url,output",
>         tuple(
>             case
>             if case[0] not in KNOWN_SAFE_URL_STRING_URL_ISSUES
>             else pytest.param(*case, marks=pytest.mark.xfail(strict=True))
>             for case in SAFE_URL_URL_CASES
>         ),
>     )
>     def test_safe_url_string_url(
>         url: StrOrBytes, output: Union[str, Type[Exception]]
>     ) -> None:
> >       _test_safe_url_string(url, output=output)
> 
> tests/test_url.py:435: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> tests/test_url.py:343: in _test_safe_url_string
>     return _test_safe_url_func(
> tests/test_url.py:332: in _test_safe_url_func
>     actual = func(url, **kwargs)
> w3lib/url.py:142: in safe_url_string
>     parts = urlsplit(_strip(decoded))
> /usr/lib/python3.11/urllib/parse.py:500: in urlsplit
>     _check_bracketed_host(bracketed_host)
> /usr/lib/python3.11/urllib/parse.py:446: in _check_bracketed_host
>     ip = ipaddress.ip_address(hostname) # Throws Value Error if not IPv6 or 
> IPv4
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> address = ''
> 
>     def ip_address(address):
>         """Take an IP string/int and return an object of the correct type.
>     
>         Args:
>             address: A string or integer, the IP address.  Either IPv4 or
>               IPv6 addresses may be supplied; integers less than 2**32 will
>               be considered to be IPv4 by default.
>     
>         Returns:
>             An IPv4Address or IPv6Address object.
>     
>         Raises:
>             ValueError: if the *address* passed isn't either a v4 or a v6
>               address
>     
>         """
>         try:
>             return IPv4Address(address)
>         except (AddressValueError, NetmaskValueError):
>             pass
>     
>         try:
>             return IPv6Address(address)
>         except (AddressValueError, NetmaskValueError):
>             pass
>     
> >       raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 
> > address')
> E       ValueError: '' does not appear to be an IPv4 or IPv6 address
> 
> /usr/lib/python3.11/ipaddress.py:54: ValueError
> _______ test_safe_url_string_url[http://[2a01:5cc0:1:2:3:4]-ValueError] 
> ________
> [XPASS(strict)] 
> =========================== short test summary info 
> ============================
> FAILED 
> tests/test_url.py::test_safe_url_string_url[https:/"%;<=>@[]^`{|}\x7f:"%;<=>@[]^`{|}\x7f:@example.com-https:/%22%25%3B%3C%3D%3E%40%5B%5D%5E%60%7B%7C%7D%7F:%22%25%3b%3c%3d%3e%40%5b%5d%5e%60%7b%7c%7d%7f...@example.com]
> FAILED 
> tests/test_url.py::test_safe_url_string_url[http:/[2a01:5cc0:1:2:3:4]-ValueError]
> ================== 2 failed, 236 passed, 76 xfailed in 4.78s 
> ===================
> E: pybuild pybuild:388: test: plugin distutils failed with: exit code=1: cd 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_w3lib/build; python3.11 -m pytest 
> tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.11 
> returned exit code 13


The full build log is available from:
http://qa-logs.debian.net/2023/07/26/python-w3lib_2.1.1-1_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20230726;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20230726&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

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!

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.

Reply via email to