Repository navigation
Commit 6893b94
Import _serialization instead of serialization in x509/extensions (#15363)
x509/extensions.py only uses serialization.Encoding and
serialization.PublicFormat, both defined in _serialization -- the module
that exists precisely to break this cycle, and which every asymmetric
module already imports. Importing the serialization package pulled its
whole __init__ (and with it ssh.py and its dependency graph) into every
'import cryptography.x509'.
Benchmark (release build, warm bytecode cache, python -X importtime,
min of 5 warm runs):
import cryptography.x509: 67.8 ms -> 53.7 ms (-21%)
Claude-Session: https://claude.ai/code/session_01C5bsKENedjVD9gcLApf1x4
Co-authored-by: Claude <[email protected]>1 parent a7582c7 commit 6893b94
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
0 commit comments