Dear maintainer, I've prepared an NMU for beaker (versioned as 1.11.0-1.1). The diff is attached to this message.
Cheers -- Sebastian Ramacher
diff -Nru beaker-1.11.0/debian/changelog beaker-1.11.0/debian/changelog --- beaker-1.11.0/debian/changelog 2020-12-30 17:47:10.000000000 +0100 +++ beaker-1.11.0/debian/changelog 2021-04-08 21:06:16.000000000 +0200 @@ -1,3 +1,12 @@ +beaker (1.11.0-1.1) unstable; urgency=medium + + * Non-maintainer upload. + + [ Fabrice Bauzac ] + * Use python3-pyryptodome instead of python3-crypto (Closes: #971289) + + -- Sebastian Ramacher <sramac...@debian.org> Thu, 08 Apr 2021 21:06:16 +0200 + beaker (1.11.0-1) unstable; urgency=medium [ Ondřej Nový ] diff -Nru beaker-1.11.0/debian/control beaker-1.11.0/debian/control --- beaker-1.11.0/debian/control 2020-12-30 17:47:10.000000000 +0100 +++ beaker-1.11.0/debian/control 2021-04-08 21:04:40.000000000 +0200 @@ -8,7 +8,7 @@ python3-setuptools, # for tests python3-sqlalchemy (>= 0.4), python3-webtest, python3-nose, - python3-crypto, python3-pylibmc | python3-memcache, + python3-pycryptodome, python3-pylibmc | python3-memcache, python3-pymongo, python3-redis, Standards-Version: 4.5.1 @@ -23,7 +23,7 @@ Recommends: ${python3:Recommends}, python3-pkg-resources Suggests: ${python3:Suggests}, python3-sqlalchemy, - python3-pycryptopp | python3-crypto, + python3-pycryptopp | python3-pycryptodome, python3-pylibmc | python3-memcache, python3-pymongo, python3-redis, diff -Nru beaker-1.11.0/debian/patches/0001-Use-cryptodomex-instead-of-cryptodome.patch beaker-1.11.0/debian/patches/0001-Use-cryptodomex-instead-of-cryptodome.patch --- beaker-1.11.0/debian/patches/0001-Use-cryptodomex-instead-of-cryptodome.patch 1970-01-01 01:00:00.000000000 +0100 +++ beaker-1.11.0/debian/patches/0001-Use-cryptodomex-instead-of-cryptodome.patch 2021-04-08 21:03:49.000000000 +0200 @@ -0,0 +1,78 @@ +From: Fabrice Bauzac <n...@mykolab.com> +Date: Fri, 22 Jan 2021 00:51:53 +0100 +Subject: Use cryptodomex instead of cryptodome + +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. + +This patch modifies the upstream sources to use cryptodomex instead of +cryptodome. +--- + beaker/crypto/pycrypto.py | 4 ++-- + beaker/crypto/util.py | 4 ++-- + setup.py | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/beaker/crypto/pycrypto.py b/beaker/crypto/pycrypto.py +index 55b319c..afb44f1 100644 +--- a/beaker/crypto/pycrypto.py ++++ b/beaker/crypto/pycrypto.py +@@ -14,8 +14,8 @@ try: + aesDecrypt = aesEncrypt + + except ImportError: +- from Crypto.Cipher import AES +- from Crypto.Util import Counter ++ from Cryptodome.Cipher import AES ++ from Cryptodome.Util import Counter + + def aesEncrypt(data, key): + cipher = AES.new(key, AES.MODE_CTR, +diff --git a/beaker/crypto/util.py b/beaker/crypto/util.py +index 07d1418..2e7d30c 100644 +--- a/beaker/crypto/util.py ++++ b/beaker/crypto/util.py +@@ -2,7 +2,7 @@ from hashlib import md5 + + try: + # Use PyCrypto (if available) +- from Crypto.Hash import HMAC as hmac, SHA as hmac_sha1 ++ from Cryptodome.Hash import HMAC as hmac, SHA as hmac_sha1 + sha1 = hmac_sha1.new + + except ImportError: +@@ -13,4 +13,4 @@ except ImportError: + # NOTE: We have to use the callable with hashlib (hashlib.sha1), + # otherwise hmac only accepts the sha module object itself + from hashlib import sha1 +- hmac_sha1 = sha1 +\ No newline at end of file ++ hmac_sha1 = sha1 +diff --git a/setup.py b/setup.py +index c026373..d542c6d 100644 +--- a/setup.py ++++ b/setup.py +@@ -23,7 +23,7 @@ if not hasattr(inspect, 'signature'): + INSTALL_REQUIRES.append('funcsigs') + + +-TESTS_REQUIRE = ['nose', 'Mock', 'pycryptodome'] ++TESTS_REQUIRE = ['nose', 'Mock', 'pycryptodomex'] + + if py_version == (2, 6): + TESTS_REQUIRE.append('WebTest<2.0.24') diff -Nru beaker-1.11.0/debian/patches/series beaker-1.11.0/debian/patches/series --- beaker-1.11.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ beaker-1.11.0/debian/patches/series 2021-04-08 21:04:05.000000000 +0200 @@ -0,0 +1 @@ +0001-Use-cryptodomex-instead-of-cryptodome.patch