File: 0011-py7zr-uses-PyCryptodome.patch

package info (click to toggle)
calibre 8.15.0%2Bds%2B~0.10.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 445,088 kB
  • sloc: python: 456,101; cpp: 151,500; ansic: 85,816; javascript: 57,787; xml: 1,247; sh: 957; sql: 735; objc: 330; makefile: 78; 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 f64ca06..26b32bd 100644
--- a/src/calibre/test_build.py
+++ b/src/calibre/test_build.py
@@ -47,7 +47,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')