I think there are several issues:

The first issue is the mere presence of tests.  The source package has
code to run the upstream tests (via "nose"); that is precisely one of
the reasons for the Build-Depends on python3-crypto.  However, these
tests are not run (anymore) because upstream now strips the "tests/"
subdirectory from their PyPI tarball.  We should instead use the github
tarball, which contains the tests: see merge request [1].

  The alternative would be to give up trying to run tests, in which case
  we could already remove the test dependencies including the one on
  python3-crypto, fixing this bug.  But it is preferable to continue
  running the tests and ensure the quality of the package.

Then, to fix the current bug, we should migrate to python3-pycryptodome
instead of using python3-crypto.  Here is some context and information:

The http://www.pycryptodome.org/ project is a fork of venerable
PyCrypto (which provides "import Crypto").

pycryptodome.org provides two PyPI packages: cryptodome and
cryptodomex.

- cryptodome is a drop-in replacement for PyCrypto: it also provides
"import Crypto".  However, this also means that it cannot be installed
at the same time as PyCrypto.

- cryptodomex is a "clean" alternative to PyCrypto: it provides the
same features but as "import Cryptodome", so it can be installed
side-by-side with PyCrypto.

The beaker upstream uses cryptodome, but there is no Debian package
for that.  There is only Debian package python3-pycryptodome, which
provides cryptodomex.

So there is some work involved to make a patch so that beaker switches
to using "import Cryptodome" instead of "import Crypto".  I propose this
merge request [2].

[1] https://salsa.debian.org/python-team/packages/beaker/-/merge_requests/1
[2] https://salsa.debian.org/python-team/packages/beaker/-/merge_requests/2

Reply via email to