Commit 5b8dd74
Use cryptography's non-deprecated CFB location when available
CFB moved from cryptography.hazmat.primitives.ciphers.modes to
cryptography.hazmat.decrepit.ciphers.modes in cryptography 47, which is
also exactly when the old location started emitting
CryptographyDeprecationWarning on attribute access. Prefer the new
location when it exists, falling back to the old one on cryptography < 47
where decrepit does not exist yet.
This removes the warning both at import time and when AESCipher is
actually used with cfb mode, for every supported cryptography version.
Fixes #10331 parent 9e597e1 commit 5b8dd74
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| |||
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
108 | | - | |
| 116 | + | |
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
| |||
0 commit comments