Package: src:flask-bcrypt
Version: 1.0.1-2
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202511/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:flask-bcrypt, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with python3,sphinxdoc --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
I: pybuild base:311: python3.13 setup.py clean 
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:289: UserWarning: 
Unknown distribution option: 'test_suite'
  warnings.warn(msg)
/usr/lib/python3/dist-packages/setuptools/dist.py:759: 
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        
********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX 
license expression:

        License :: OSI Approved :: BSD License

        See 
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license 
for details.
        
********************************************************************************

!!
  self._finalize_license_expression()
running clean
removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_flask-bcrypt/build' (and 
everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.13' does not exist -- can't clean it
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --with python3,sphinxdoc --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:311: python3.13 setup.py config 
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:289: UserWarning: 
Unknown distribution option: 'test_suite'
  warnings.warn(msg)
/usr/lib/python3/dist-packages/setuptools/dist.py:759: 
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        
********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX 
license expression:

        License :: OSI Approved :: BSD License

        See 
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license 
for details.
        
********************************************************************************

!!
  self._finalize_license_expression()
running config
   dh_auto_build -O--buildsystem=pybuild
I: pybuild base:311: /usr/bin/python3 setup.py build 
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:289: UserWarning: 
Unknown distribution option: 'test_suite'
  warnings.warn(msg)
/usr/lib/python3/dist-packages/setuptools/dist.py:759: 
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        
********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX 
license expression:

        License :: OSI Approved :: BSD License

        See 
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license 
for details.
        
********************************************************************************

!!
  self._finalize_license_expression()
running build
running build_py
copying flask_bcrypt.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_flask-bcrypt/build
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_flask-bcrypt/build; python3.13 -m 
pytest 
============================= test session starts ==============================
platform linux -- Python 3.13.9, pytest-8.4.2, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.4.4
collected 14 items

test_bcrypt.py ....F.........                                            [100%]

=================================== FAILURES ===================================
_______________________ BasicTestCase.test_long_password _______________________

self = <test_bcrypt.BasicTestCase testMethod=test_long_password>

    def test_long_password(self):
        """Test bcrypt maximum password length.
    
        The bcrypt algorithm has a maximum password length of 72 bytes, and
        ignores any bytes beyond that."""
    
        # Create a password with a 72 bytes length
        password = 'A' * 72
        pw_hash = self.bcrypt.generate_password_hash(password)
        # Ensure that a longer password yields the same hash
>       self.assertTrue(self.bcrypt.check_password_hash(pw_hash, 'A' * 80))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

test_bcrypt.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flask_bcrypt.Bcrypt object at 0x7f83f7f33350>
pw_hash = b'$2b$06$rM6wSGy8DIUWOGk4YYM5/OOiUFihvKWXmzu3JENutUvzYGa/8ugd2'
password = 
b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'

    def check_password_hash(self, pw_hash, password):
        '''Tests a password hash against a candidate password. The candidate
        password is first hashed and then subsequently compared in constant
        time to the existing hash. This will either return `True` or `False`.
    
        Example usage of :class:`check_password_hash` would look something
        like this::
    
            pw_hash = bcrypt.generate_password_hash('secret', 10)
            bcrypt.check_password_hash(pw_hash, 'secret') # returns True
    
        :param pw_hash: The hash to be compared against.
        :param password: The password to compare.
        '''
    
        # Python 3 unicode strings must be encoded as bytes before hashing.
        pw_hash = self._unicode_to_bytes(pw_hash)
        password = self._unicode_to_bytes(password)
    
        if self._handle_long_passwords:
            password = hashlib.sha256(password).hexdigest()
            password = self._unicode_to_bytes(password)
    
>       return hmac.compare_digest(bcrypt.hashpw(password, pw_hash), pw_hash)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       ValueError: password cannot be longer than 72 bytes, truncate manually 
if necessary (e.g. my_password[:72])

flask_bcrypt.py:225: ValueError
=========================== short test summary info ============================
FAILED test_bcrypt.py::BasicTestCase::test_long_password - ValueError: passwo...
========================= 1 failed, 13 passed in 2.02s =========================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_flask-bcrypt/build; python3.13 -m 
pytest 
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 
returned exit code 13
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

Reply via email to