Closed danielhollas closed 3 months ago
I've minimized the change to address the specific issue. I'll deal with the typeshed ignore workaround separately.
I should have added a news fragment before merging. I added it later in 71b4678432.
This change is released in v8.4.0.
Deferring import of
inspect
cuts the import time by ~10% (4ms on my machine).CPython issue: https://github.com/python/cpython/issues/118761
I haven't been able to run the tests locally, seeing these errors:
Benchmarks
These have been run with latest CPython main branch (as of Aug 6th 2024), these gains are likely representative for Python 3.13, but not 3.12.
this PR
main