File: 0012-py7zr-uses-PyCryptodome.patch

package info (click to toggle)
calibre 8.5.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 431,828 kB
  • sloc: python: 450,752; ansic: 87,218; javascript: 57,667; cpp: 18,719; xml: 1,244; sh: 935; sql: 735; objc: 330; makefile: 68; sed: 3
file content (25 lines) | stat: -rw-r--r-- 856 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Mon, 11 Jul 2022 21:33:53 +0900
Subject: "py7zr" uses PyCryptodome

Forwarded: not-needed

This test checks the Cryptodome class was replaced old Crypto class.
py7zr requires Cryptodome's extended features like AES.
---
 src/calibre/test_build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
index 06a9357..5c9d506 100644
--- a/src/calibre/test_build.py
+++ b/src/calibre/test_build.py
@@ -48,7 +48,7 @@ class BuildTest(unittest.TestCase):
                     self.assertTrue(False, f'Failed to load DLL {x} with error: {err}')
 
     def test_pycryptodome(self):
-        from Crypto.Cipher import AES
+        from Cryptodome.Cipher import AES
         del AES
 
     @unittest.skipUnless(islinux, 'DBUS only used on linux')